graceful-fs
Advanced tools
Comparing version 4.2.4 to 4.2.5
@@ -5,2 +5,6 @@ 'use strict' | ||
var getPrototypeOf = Object.getPrototypeOf || function (obj) { | ||
return obj.__proto__ | ||
} | ||
function clone (obj) { | ||
@@ -11,3 +15,3 @@ if (obj === null || typeof obj !== 'object') | ||
if (obj instanceof Object) | ||
var copy = { __proto__: obj.__proto__ } | ||
var copy = { __proto__: getPrototypeOf(obj) } | ||
else | ||
@@ -14,0 +18,0 @@ var copy = Object.create(null) |
@@ -173,2 +173,17 @@ var fs = require('fs') | ||
var fs$copyFile = fs.copyFile | ||
if (fs$copyFile) | ||
fs.copyFile = copyFile | ||
function copyFile (src, dest, cb) { | ||
return fs$copyFile(src, dest, function (err) { | ||
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) | ||
enqueue([fs$copyFile, [src, dest, cb]]) | ||
else { | ||
if (typeof cb === 'function') | ||
cb.apply(this, arguments) | ||
retry() | ||
} | ||
}) | ||
} | ||
var fs$readdir = fs.readdir | ||
@@ -175,0 +190,0 @@ fs.readdir = readdir |
{ | ||
"name": "graceful-fs", | ||
"description": "A drop-in replacement for fs, making various improvements.", | ||
"version": "4.2.4", | ||
"version": "4.2.5", | ||
"repository": { | ||
@@ -17,3 +17,4 @@ "type": "git", | ||
"postpublish": "git push origin --follow-tags", | ||
"test": "node test.js | tap -" | ||
"test": "nyc --silent node test.js | tap -", | ||
"posttest": "nyc report" | ||
}, | ||
@@ -20,0 +21,0 @@ "keywords": [ |
@@ -22,2 +22,3 @@ var constants = require('constants') | ||
} | ||
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) | ||
@@ -136,3 +137,3 @@ module.exports = patch | ||
// This ensures `util.promisify` works as it does for native `fs.read`. | ||
read.__proto__ = fs$read | ||
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) | ||
return read | ||
@@ -139,0 +140,0 @@ })(fs.read) |
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
28392
733