electron-log
Advanced tools
Comparing version 5.1.6 to 5.1.7
{ | ||
"name": "electron-log", | ||
"version": "5.1.6", | ||
"version": "5.1.7", | ||
"description": "Just a simple logging module for your Electron application", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -24,3 +24,3 @@ 'use strict'; | ||
*/ | ||
provide({ filePath, writeOptions, writeAsync = false }) { | ||
provide({ filePath, writeOptions = {}, writeAsync = false }) { | ||
let file; | ||
@@ -53,3 +53,3 @@ try { | ||
createFile({ filePath, writeOptions, writeAsync }) { | ||
this.testFileWriting(filePath); | ||
this.testFileWriting({ filePath, writeOptions }); | ||
return new File({ path: filePath, writeOptions, writeAsync }); | ||
@@ -69,7 +69,8 @@ } | ||
* @param {string} filePath | ||
* @param {WriteOptions} writeOptions | ||
* @private | ||
*/ | ||
testFileWriting(filePath) { | ||
testFileWriting({ filePath, writeOptions }) { | ||
fs.mkdirSync(path.dirname(filePath), { recursive: true }); | ||
fs.writeFileSync(filePath, '', { flag: 'a' }); | ||
fs.writeFileSync(filePath, '', { flag: 'a', mode: writeOptions.mode }); | ||
} | ||
@@ -76,0 +77,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91285
2913