Comparing version 3.2.2 to 3.2.3
@@ -0,1 +1,10 @@ | ||
## [3.2.3](https://github.com/streamich/memfs/compare/v3.2.2...v3.2.3) (2021-08-31) | ||
### Bug Fixes | ||
* global and timers this arg in browser ([1e93ab1](https://github.com/streamich/memfs/commit/1e93ab1628e230762471737a1d2586b5bc86b496)) | ||
* prevent callback from triggering twice when callback throws ([07e8215](https://github.com/streamich/memfs/commit/07e8215b4a862ae2e0f1cd7f7cfe4b1465bfc2e6)) | ||
* prevent callback from triggering twice when callback throws ([6db755d](https://github.com/streamich/memfs/commit/6db755dabc32d81eceeb3152413bb70298a5c710)), closes [#542](https://github.com/streamich/memfs/issues/542) | ||
## [3.2.2](https://github.com/streamich/memfs/compare/v3.2.1...v3.2.2) (2021-04-05) | ||
@@ -2,0 +11,0 @@ |
@@ -18,3 +18,3 @@ "use strict"; | ||
var mode = link.getNode().mode; | ||
dirent.name = encoding_1.strToEncoding(link.getName(), encoding); | ||
dirent.name = (0, encoding_1.strToEncoding)(link.getName(), encoding); | ||
dirent.mode = mode; | ||
@@ -21,0 +21,0 @@ return dirent; |
"use strict"; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
@@ -16,3 +20,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
} | ||
return new (buffer_1.Buffer.bind.apply(buffer_1.Buffer, __spreadArray([void 0, arg0], args)))(); | ||
return new (buffer_1.Buffer.bind.apply(buffer_1.Buffer, __spreadArray([void 0, arg0], args, false)))(); | ||
} | ||
@@ -19,0 +23,0 @@ var bufferAllocUnsafe = buffer_1.Buffer.allocUnsafe || bufferV0P12Ponyfill; |
@@ -1,2 +0,2 @@ | ||
declare class AssertionError extends global.Error { | ||
declare class AssertionError extends globalThis.Error { | ||
generatedMessage: any; | ||
@@ -3,0 +3,0 @@ name: any; |
@@ -69,3 +69,3 @@ "use strict"; | ||
return AssertionError; | ||
}(global.Error)); | ||
}(globalThis.Error)); | ||
exports.AssertionError = AssertionError; | ||
@@ -96,5 +96,5 @@ function message(key, args) { | ||
exports.E = E; | ||
exports.Error = makeNodeError(global.Error); | ||
exports.TypeError = makeNodeError(global.TypeError); | ||
exports.RangeError = makeNodeError(global.RangeError); | ||
exports.Error = makeNodeError(globalThis.Error); | ||
exports.TypeError = makeNodeError(globalThis.TypeError); | ||
exports.RangeError = makeNodeError(globalThis.RangeError); | ||
// To declare an error message, use the E(sym, val) function above. The sym | ||
@@ -101,0 +101,0 @@ // must be an upper case string. The val can be either a function or a string. |
@@ -55,3 +55,3 @@ "use strict"; | ||
// this.setBuffer(bufferFrom(str, 'utf8')); | ||
this.buf = buffer_1.bufferFrom(str, 'utf8'); | ||
this.buf = (0, buffer_1.bufferFrom)(str, 'utf8'); | ||
this.touch(); | ||
@@ -61,7 +61,7 @@ }; | ||
if (!this.buf) | ||
this.setBuffer(buffer_1.bufferAllocUnsafe(0)); | ||
return buffer_1.bufferFrom(this.buf); // Return a copy. | ||
this.setBuffer((0, buffer_1.bufferAllocUnsafe)(0)); | ||
return (0, buffer_1.bufferFrom)(this.buf); // Return a copy. | ||
}; | ||
Node.prototype.setBuffer = function (buf) { | ||
this.buf = buffer_1.bufferFrom(buf); // Creates a copy of data. | ||
this.buf = (0, buffer_1.bufferFrom)(buf); // Creates a copy of data. | ||
this.touch(); | ||
@@ -103,5 +103,5 @@ }; | ||
if (!this.buf) | ||
this.buf = buffer_1.bufferAllocUnsafe(0); | ||
this.buf = (0, buffer_1.bufferAllocUnsafe)(0); | ||
if (pos + len > this.buf.length) { | ||
var newBuf = buffer_1.bufferAllocUnsafe(pos + len); | ||
var newBuf = (0, buffer_1.bufferAllocUnsafe)(pos + len); | ||
this.buf.copy(newBuf, 0, 0, this.buf.length); | ||
@@ -120,3 +120,3 @@ this.buf = newBuf; | ||
if (!this.buf) | ||
this.buf = buffer_1.bufferAllocUnsafe(0); | ||
this.buf = (0, buffer_1.bufferAllocUnsafe)(0); | ||
var actualLen = len; | ||
@@ -135,6 +135,6 @@ if (actualLen > buf.byteLength) { | ||
if (!len) | ||
this.buf = buffer_1.bufferAllocUnsafe(0); | ||
this.buf = (0, buffer_1.bufferAllocUnsafe)(0); | ||
else { | ||
if (!this.buf) | ||
this.buf = buffer_1.bufferAllocUnsafe(0); | ||
this.buf = (0, buffer_1.bufferAllocUnsafe)(0); | ||
if (len <= this.buf.length) { | ||
@@ -144,3 +144,3 @@ this.buf = this.buf.slice(0, len); | ||
else { | ||
var buf = buffer_1.bufferAllocUnsafe(0); | ||
var buf = (0, buffer_1.bufferAllocUnsafe)(0); | ||
this.buf.copy(buf); | ||
@@ -147,0 +147,0 @@ buf.fill(0, len); |
"use strict"; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
@@ -17,7 +21,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
return new Promise(function (resolve, reject) { | ||
vol[fn].bind(vol).apply(void 0, __spreadArray(__spreadArray([], args), [function (error, result) { | ||
vol[fn].bind(vol).apply(void 0, __spreadArray(__spreadArray([], args, false), [function (error, result) { | ||
if (error) | ||
return reject(error); | ||
return resolve(getResult(result)); | ||
}])); | ||
}], false)); | ||
}); | ||
@@ -24,0 +28,0 @@ }; |
@@ -5,5 +5,5 @@ "use strict"; | ||
if (typeof setImmediate === 'function') | ||
_setImmediate = setImmediate.bind(global); | ||
_setImmediate = setImmediate.bind(globalThis); | ||
else | ||
_setImmediate = setTimeout.bind(global); | ||
_setImmediate = setTimeout.bind(globalThis); | ||
exports.default = _setImmediate; |
@@ -8,3 +8,3 @@ "use strict"; | ||
function setTimeoutUnref(callback, time, args) { | ||
var ref = setTimeout.apply(null, arguments); | ||
var ref = setTimeout.apply(globalThis, arguments); | ||
if (ref && typeof ref === 'object' && typeof ref.unref === 'function') | ||
@@ -11,0 +11,0 @@ ref.unref(); |
{ | ||
"name": "memfs", | ||
"version": "3.2.2", | ||
"version": "3.2.3", | ||
"description": "In-memory file-system with Node's fs API.", | ||
@@ -13,3 +13,3 @@ "main": "lib/index.js", | ||
"build": "tsc -p . && cpy src/*.js lib", | ||
"test": "jest", | ||
"test": "jest --maxWorkers 2", | ||
"test:coverage": "jest --coverage", | ||
@@ -30,19 +30,19 @@ "test:watch": "jest --watch", | ||
"devDependencies": { | ||
"@types/jest": "26.0.22", | ||
"@types/node": "10.17.56", | ||
"@types/jest": "27.0.1", | ||
"@types/node": "10.17.60", | ||
"cpy-cli": "3.1.1", | ||
"husky": "6.0.0", | ||
"jest": "26.6.3", | ||
"prettier": "2.2.1", | ||
"pretty-quick": "3.1.0", | ||
"husky": "7.0.2", | ||
"jest": "27.1.0", | ||
"prettier": "2.3.2", | ||
"pretty-quick": "3.1.1", | ||
"rimraf": "3.0.2", | ||
"ts-jest": "26.5.4", | ||
"ts-node": "9.1.1", | ||
"ts-jest": "27.0.5", | ||
"ts-node": "10.2.1", | ||
"tslint": "5.20.1", | ||
"tslint-config-common": "1.6.0", | ||
"typescript": "4.2.3", | ||
"semantic-release": "17.4.2", | ||
"typescript": "4.4.2", | ||
"semantic-release": "17.4.7", | ||
"@semantic-release/changelog": "5.0.1", | ||
"@semantic-release/git": "9.0.0", | ||
"@semantic-release/npm": "7.1.0" | ||
"@semantic-release/npm": "7.1.3" | ||
}, | ||
@@ -49,0 +49,0 @@ "config": { |
Sorry, the diff of this file is too big to display
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
189719
4288