Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

graceful-fs@1.2.0

  • Loading branch information...
commit f0dbb7d545ddec39f2d2b174ab743ee47420f994 1 parent c0e7304
@isaacs isaacs authored
View
10 node_modules/graceful-fs/graceful-fs.js
@@ -1,10 +1,14 @@
// 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 = []
, constants = require("constants")
View
7 node_modules/graceful-fs/package.json
@@ -6,7 +6,7 @@
},
"name": "graceful-fs",
"description": "fs monkey-patching to avoid EMFILE and other problems",
- "version": "1.1.14",
+ "version": "1.2.0",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-graceful-fs.git"
@@ -30,6 +30,7 @@
],
"license": "BSD",
"readme": "Just like node's `fs` module, but it does an incremental back-off when\nEMFILE is encountered.\n\nUseful in asynchronous situations where one needs to try to open lots\nand lots of files.\n",
- "_id": "graceful-fs@1.1.14",
- "_from": "graceful-fs@~1.1.1"
+ "readmeFilename": "README.md",
+ "_id": "graceful-fs@1.2.0",
+ "_from": "graceful-fs@latest"
}
View
5 node_modules/graceful-fs/test/open.js
@@ -1,6 +1,11 @@
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) {
var start = fs._curOpen
var fd = fs.openSync(__filename, 'r')
View
2  package.json
@@ -38,7 +38,7 @@
"ini": "~1.1.0",
"slide": "1",
"abbrev": "~1.0.4",
- "graceful-fs": "~1.1.1",
+ "graceful-fs": "~1.2.0",
"minimatch": "~0.2.8",
"nopt": "~2.1.1",
"rimraf": "2",
Please sign in to comment.
Something went wrong with that request. Please try again.