Comparing version 1.12.0 to 1.12.1
22
index.js
@@ -1425,4 +1425,2 @@ const { sep, resolve, isAbsolute, toNamespacedPath } = require('path') | ||
if (this._ended) { | ||
this.closeSync() | ||
return { done: true } | ||
@@ -1433,3 +1431,9 @@ } | ||
return { done: entry === null, value: entry } | ||
if (entry) { | ||
return { done: false, value: entry } | ||
} | ||
this.closeSync() | ||
return { done: true } | ||
} | ||
@@ -1447,6 +1451,14 @@ } | ||
if (this._ended) { | ||
return this.close((err) => err ? reject(err) : resolve({ done: true })) | ||
return resolve({ done: true }) | ||
} | ||
this.read((err, entry) => err ? reject(err) : resolve({ done: entry === null, value: entry })) | ||
this.read((err, entry) => { | ||
if (err) return reject(err) | ||
if (entry) { | ||
return resolve({ done: false, value: entry }) | ||
} | ||
this.close((err) => err ? reject(err) : resolve({ done: true })) | ||
}) | ||
}) | ||
@@ -1453,0 +1465,0 @@ } |
{ | ||
"name": "bare-fs", | ||
"version": "1.12.0", | ||
"version": "1.12.1", | ||
"description": "Native file system for Javascript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
109027
1345