graceful-fs
Advanced tools
Comparing version 1.1.14 to 1.2.0
// this keeps a queue of opened file descriptors, and will make | ||
// fs operations wait until some have closed before trying to open more. | ||
var fs = require("fs") | ||
var fs_ = require("fs") | ||
// there is such a thing as TOO graceful. | ||
if (fs.open === gracefulOpen) return | ||
var fs = module.exports = {} | ||
Object.getOwnPropertyNames(fs_).forEach(function(prop) { | ||
var desc = Object.getOwnPropertyDescriptor(fs_, prop) | ||
Object.defineProperty(fs, prop, desc) | ||
}) | ||
var queue = [] | ||
@@ -10,0 +14,0 @@ , constants = require("constants") |
@@ -5,3 +5,3 @@ { | ||
"description": "fs monkey-patching to avoid EMFILE and other problems", | ||
"version": "1.1.14", | ||
"version": "1.2.0", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
var test = require('tap').test | ||
var fs = require('../graceful-fs.js') | ||
test('graceful fs is not fs', function (t) { | ||
t.notEqual(fs, require('fs')) | ||
t.end() | ||
}) | ||
test('open an existing file works', function (t) { | ||
@@ -5,0 +10,0 @@ var start = fs._curOpen |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
10905
311
2