Comparing version 2.3.0 to 2.3.1
28
index.js
@@ -1660,9 +1660,9 @@ /* global Bare */ | ||
_writev (datas, cb) { | ||
writev(this.fd, datas, cb) | ||
_writev (batch, cb) { | ||
writev(this.fd, batch.map(({ chunk }) => chunk), cb) | ||
} | ||
_destroy (cb) { | ||
if (!this.fd) return cb(null) | ||
close(this.fd, () => cb(null)) | ||
_destroy (err, cb) { | ||
if (!this.fd) return cb(err) | ||
close(this.fd, () => cb(err)) | ||
} | ||
@@ -1714,16 +1714,16 @@ } | ||
_read (cb) { | ||
_read (size) { | ||
if (!this._missing) { | ||
this.push(null) | ||
return cb(null) | ||
return | ||
} | ||
const data = Buffer.allocUnsafe(Math.min(this._missing, 65536)) | ||
const data = Buffer.allocUnsafe(Math.min(this._missing, size)) | ||
read(this.fd, data, 0, data.byteLength, this._offset, (err, read) => { | ||
if (err) return cb(err) | ||
if (err) return this.destroy(err) | ||
if (!read) { | ||
this.push(null) | ||
return cb(null) | ||
return | ||
} | ||
@@ -1736,10 +1736,8 @@ | ||
if (!this._missing) this.push(null) | ||
cb(null) | ||
}) | ||
} | ||
_destroy (cb) { | ||
if (!this.fd) return cb(null) | ||
close(this.fd, () => cb(null)) | ||
_destroy (err, cb) { | ||
if (!this.fd) return cb(err) | ||
close(this.fd, () => cb(err)) | ||
} | ||
@@ -1746,0 +1744,0 @@ } |
{ | ||
"name": "bare-fs", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Native file system for Javascript", | ||
@@ -31,3 +31,3 @@ "main": "index.js", | ||
"bare-path": "^2.0.0", | ||
"bare-stream": "^1.0.0" | ||
"bare-stream": "^2.0.0" | ||
}, | ||
@@ -34,0 +34,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
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
513506
1545
+ Addedbare-stream@2.3.2(transitive)
- Removedbare-stream@1.0.0(transitive)
Updatedbare-stream@^2.0.0