Comparing version 1.6.7 to 1.6.8
23
index.js
@@ -1,2 +0,2 @@ | ||
const { Readable, Writable } = require('streamx') | ||
const { Readable, Writable, getStreamError } = require('streamx') | ||
const binding = require('./binding') | ||
@@ -984,3 +984,2 @@ | ||
this._encoding = encoding | ||
this._closed = false | ||
@@ -1013,17 +1012,6 @@ this.path = path | ||
_destroy (cb) { | ||
if (this._closed) cb(null) | ||
else this.close(cb) | ||
} | ||
close (cb = noop) { | ||
if (this._closed) return | ||
const self = this | ||
const req = getReq() | ||
req.callback = function (err, _) { | ||
if (err) return cb(err) | ||
self._closed = true | ||
cb(null) | ||
cb(err) | ||
} | ||
@@ -1033,2 +1021,9 @@ | ||
} | ||
close (cb = noop) { | ||
if (this.destroyed) return cb(null) | ||
this | ||
.once('close', () => cb(getStreamError(this))) | ||
.destroy() | ||
} | ||
} | ||
@@ -1035,0 +1030,0 @@ |
{ | ||
"name": "bare-fs", | ||
"version": "1.6.7", | ||
"version": "1.6.8", | ||
"description": "Native file system for Javascript", | ||
@@ -15,3 +15,3 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "standard && bare test/all.js", | ||
"test": "standard && bare test.js", | ||
"install": "bare-dev rebuild", | ||
@@ -18,0 +18,0 @@ "prebuild": "bare-dev prebuild" |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
81124
904
1