fsevents 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/node_modules/node-pre-gyp/CHANGELOG.md +9 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +32 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/nopt/README.md +8 -7
- package/node_modules/node-pre-gyp/node_modules/nopt/package.json +16 -12
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/inherits/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/rc/lib/utils.js +2 -2
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/index.js +14 -2
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/package.json +10 -9
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/bool.js +23 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/kv_short.js +16 -0
- package/node_modules/node-pre-gyp/node_modules/rc/package.json +9 -8
- package/node_modules/node-pre-gyp/node_modules/request/.travis.yml +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/CHANGELOG.md +22 -2
- package/node_modules/node-pre-gyp/node_modules/request/README.md +42 -10
- package/node_modules/node-pre-gyp/node_modules/request/index.js +4 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/aws-sign2/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/{form-data/node_modules/async/LICENSE → bl/node_modules/readable-stream/node_modules/process-nextick-args/license.md} +6 -6
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json +10 -9
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js +7 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/caseless/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/extend/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/forever-agent/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/Readme.md +44 -9
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/lib/form_data.js +48 -25
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +13 -7
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/package.json +26 -11
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/package.json +29 -20
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/README.md +4 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.js +35 -11
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.min.js +5 -5
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/debuggability.js +2 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/direct_resolve.js +2 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise.js +5 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promisify.js +10 -5
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/using.js +14 -3
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/package.json +9 -8
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/index.js +2 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/package.json +22 -15
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/readme.md +3 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/README.md +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml +6 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md +3 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js +7 -10
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json +24 -20
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js +11 -13
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json +11 -10
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +3 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +39 -28
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/package.json +11 -12
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +18 -18
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +8 -5
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +2 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +24 -28
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +57 -63
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +2 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +16 -6
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +24 -8
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +13 -13
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +866 -778
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/HISTORY.md +24 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/index.js +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md +33 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json +50 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json +12 -13
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/package.json +9 -10
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/.npmignore +0 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/.travis.yml +3 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/CHANGELOG.md +13 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/README.md +11 -4
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/bower.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/component.json +15 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/dist/qs.js +523 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/lib/parse.js +3 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/lib/stringify.js +28 -7
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/package.json +20 -18
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/test/parse.js +14 -14
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/test/stringify.js +23 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/stringstream/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/package.json +12 -12
- package/node_modules/node-pre-gyp/node_modules/request/request.js +51 -30
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +3 -2
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/rimraf/package.json +9 -8
- package/node_modules/node-pre-gyp/node_modules/rimraf/rimraf.js +1 -1
- package/node_modules/node-pre-gyp/node_modules/semver/package.json +10 -12
- package/node_modules/node-pre-gyp/node_modules/semver/semver.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/semver/test/index.js +21 -8
- package/node_modules/node-pre-gyp/node_modules/tar/lib/entry.js +7 -0
- package/node_modules/node-pre-gyp/node_modules/tar/lib/parse.js +5 -1
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/fs.js +21 -11
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js +208 -115
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/package.json +18 -17
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/polyfills.js +130 -133
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/package.json +18 -14
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/inherits/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/tar/package.json +22 -15
- package/node_modules/node-pre-gyp/node_modules/tar/test/parse-discard.js +29 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/inherits/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/README.md +12 -2
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +48 -4
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/package.json +9 -9
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/test/basic.js +26 -25
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/test/serialize.js +216 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/package.json +1 -1
- package/node_modules/node-pre-gyp/package.json +10 -10
- package/package.json +2 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/.jscsrc +0 -3
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/CHANGELOG.md +0 -81
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/README.md +0 -1789
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/support/sync-package-managers.js +0 -53
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +0 -9
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +0 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +0 -8
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +0 -1
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/.npmignore +0 -1
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/LICENSE +0 -15
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/max-open.js +0 -69
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/open.js +0 -39
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/readdir-sort.js +0 -20
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/write-then-read.js +0 -47
@@ -1,53 +0,0 @@
|
|
1
|
-
#!/usr/bin/env node
|
2
|
-
|
3
|
-
// This should probably be its own module but complaints about bower/etc.
|
4
|
-
// support keep coming up and I'd rather just enable the workflow here for now
|
5
|
-
// and figure out where this should live later. -- @beaugunderson
|
6
|
-
|
7
|
-
var fs = require('fs');
|
8
|
-
var _ = require('lodash');
|
9
|
-
|
10
|
-
var packageJson = require('../package.json');
|
11
|
-
|
12
|
-
var IGNORES = ['**/.*', 'node_modules', 'bower_components', 'test', 'tests'];
|
13
|
-
var INCLUDES = ['lib/async.js', 'README.md', 'LICENSE'];
|
14
|
-
var REPOSITORY_NAME = 'caolan/async';
|
15
|
-
|
16
|
-
packageJson.jam = {
|
17
|
-
main: packageJson.main,
|
18
|
-
include: INCLUDES,
|
19
|
-
categories: ['Utilities']
|
20
|
-
};
|
21
|
-
|
22
|
-
packageJson.spm = {
|
23
|
-
main: packageJson.main
|
24
|
-
};
|
25
|
-
|
26
|
-
packageJson.volo = {
|
27
|
-
main: packageJson.main,
|
28
|
-
ignore: IGNORES
|
29
|
-
};
|
30
|
-
|
31
|
-
var bowerSpecific = {
|
32
|
-
moduleType: ['amd', 'globals', 'node'],
|
33
|
-
ignore: IGNORES,
|
34
|
-
authors: [packageJson.author]
|
35
|
-
};
|
36
|
-
|
37
|
-
var bowerInclude = ['name', 'description', 'main', 'keywords',
|
38
|
-
'license', 'homepage', 'repository', 'devDependencies'];
|
39
|
-
|
40
|
-
var componentSpecific = {
|
41
|
-
repository: REPOSITORY_NAME,
|
42
|
-
scripts: [packageJson.main]
|
43
|
-
};
|
44
|
-
|
45
|
-
var componentInclude = ['name', 'description', 'version', 'keywords',
|
46
|
-
'license', 'main'];
|
47
|
-
|
48
|
-
var bowerJson = _.merge({}, _.pick(packageJson, bowerInclude), bowerSpecific);
|
49
|
-
var componentJson = _.merge({}, _.pick(packageJson, componentInclude), componentSpecific);
|
50
|
-
|
51
|
-
fs.writeFileSync('./bower.json', JSON.stringify(bowerJson, null, 2));
|
52
|
-
fs.writeFileSync('./component.json', JSON.stringify(componentJson, null, 2));
|
53
|
-
fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, 2));
|
@@ -1 +0,0 @@
|
|
1
|
-
module.exports = require('./lib');
|
package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
module.exports = require('./lib');
|
@@ -1 +0,0 @@
|
|
1
|
-
node_modules/
|
@@ -1,15 +0,0 @@
|
|
1
|
-
The ISC License
|
2
|
-
|
3
|
-
Copyright (c) Isaac Z. Schlueter and Contributors
|
4
|
-
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
6
|
-
purpose with or without fee is hereby granted, provided that the above
|
7
|
-
copyright notice and this permission notice appear in all copies.
|
8
|
-
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
10
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
11
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
12
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
13
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
14
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
15
|
-
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
@@ -1,69 +0,0 @@
|
|
1
|
-
var test = require('tap').test
|
2
|
-
var fs = require('../')
|
3
|
-
|
4
|
-
test('open lots of stuff', function (t) {
|
5
|
-
// Get around EBADF from libuv by making sure that stderr is opened
|
6
|
-
// Otherwise Darwin will refuse to give us a FD for stderr!
|
7
|
-
process.stderr.write('')
|
8
|
-
|
9
|
-
// How many parallel open()'s to do
|
10
|
-
var n = 1024
|
11
|
-
var opens = 0
|
12
|
-
var fds = []
|
13
|
-
var going = true
|
14
|
-
var closing = false
|
15
|
-
var doneCalled = 0
|
16
|
-
|
17
|
-
for (var i = 0; i < n; i++) {
|
18
|
-
go()
|
19
|
-
}
|
20
|
-
|
21
|
-
function go() {
|
22
|
-
opens++
|
23
|
-
fs.open(__filename, 'r', function (er, fd) {
|
24
|
-
if (er) throw er
|
25
|
-
fds.push(fd)
|
26
|
-
if (going) go()
|
27
|
-
})
|
28
|
-
}
|
29
|
-
|
30
|
-
// should hit ulimit pretty fast
|
31
|
-
setTimeout(function () {
|
32
|
-
going = false
|
33
|
-
t.equal(opens - fds.length, n)
|
34
|
-
done()
|
35
|
-
}, 100)
|
36
|
-
|
37
|
-
|
38
|
-
function done () {
|
39
|
-
if (closing) return
|
40
|
-
doneCalled++
|
41
|
-
|
42
|
-
if (fds.length === 0) {
|
43
|
-
console.error('done called %d times', doneCalled)
|
44
|
-
// First because of the timeout
|
45
|
-
// Then to close the fd's opened afterwards
|
46
|
-
// Then this time, to complete.
|
47
|
-
// Might take multiple passes, depending on CPU speed
|
48
|
-
// and ulimit, but at least 3 in every case.
|
49
|
-
t.ok(doneCalled >= 2)
|
50
|
-
return t.end()
|
51
|
-
}
|
52
|
-
|
53
|
-
closing = true
|
54
|
-
setTimeout(function () {
|
55
|
-
// console.error('do closing again')
|
56
|
-
closing = false
|
57
|
-
done()
|
58
|
-
}, 100)
|
59
|
-
|
60
|
-
// console.error('closing time')
|
61
|
-
var closes = fds.slice(0)
|
62
|
-
fds.length = 0
|
63
|
-
closes.forEach(function (fd) {
|
64
|
-
fs.close(fd, function (er) {
|
65
|
-
if (er) throw er
|
66
|
-
})
|
67
|
-
})
|
68
|
-
}
|
69
|
-
})
|
@@ -1,39 +0,0 @@
|
|
1
|
-
var test = require('tap').test
|
2
|
-
var fs = require('../graceful-fs.js')
|
3
|
-
|
4
|
-
test('graceful fs is monkeypatched fs', function (t) {
|
5
|
-
t.equal(fs, require('../fs.js'))
|
6
|
-
t.end()
|
7
|
-
})
|
8
|
-
|
9
|
-
test('open an existing file works', function (t) {
|
10
|
-
var fd = fs.openSync(__filename, 'r')
|
11
|
-
fs.closeSync(fd)
|
12
|
-
fs.open(__filename, 'r', function (er, fd) {
|
13
|
-
if (er) throw er
|
14
|
-
fs.close(fd, function (er) {
|
15
|
-
if (er) throw er
|
16
|
-
t.pass('works')
|
17
|
-
t.end()
|
18
|
-
})
|
19
|
-
})
|
20
|
-
})
|
21
|
-
|
22
|
-
test('open a non-existing file throws', function (t) {
|
23
|
-
var er
|
24
|
-
try {
|
25
|
-
var fd = fs.openSync('this file does not exist', 'r')
|
26
|
-
} catch (x) {
|
27
|
-
er = x
|
28
|
-
}
|
29
|
-
t.ok(er, 'should throw')
|
30
|
-
t.notOk(fd, 'should not get an fd')
|
31
|
-
t.equal(er.code, 'ENOENT')
|
32
|
-
|
33
|
-
fs.open('neither does this file', 'r', function (er, fd) {
|
34
|
-
t.ok(er, 'should throw')
|
35
|
-
t.notOk(fd, 'should not get an fd')
|
36
|
-
t.equal(er.code, 'ENOENT')
|
37
|
-
t.end()
|
38
|
-
})
|
39
|
-
})
|
@@ -1,20 +0,0 @@
|
|
1
|
-
var test = require("tap").test
|
2
|
-
var fs = require("../fs.js")
|
3
|
-
|
4
|
-
var readdir = fs.readdir
|
5
|
-
fs.readdir = function(path, cb) {
|
6
|
-
process.nextTick(function() {
|
7
|
-
cb(null, ["b", "z", "a"])
|
8
|
-
})
|
9
|
-
}
|
10
|
-
|
11
|
-
var g = require("../")
|
12
|
-
|
13
|
-
test("readdir reorder", function (t) {
|
14
|
-
g.readdir("whatevers", function (er, files) {
|
15
|
-
if (er)
|
16
|
-
throw er
|
17
|
-
t.same(files, [ "a", "b", "z" ])
|
18
|
-
t.end()
|
19
|
-
})
|
20
|
-
})
|
@@ -1,47 +0,0 @@
|
|
1
|
-
var fs = require('../');
|
2
|
-
var rimraf = require('rimraf');
|
3
|
-
var mkdirp = require('mkdirp');
|
4
|
-
var test = require('tap').test;
|
5
|
-
var p = require('path').resolve(__dirname, 'files');
|
6
|
-
|
7
|
-
process.chdir(__dirname)
|
8
|
-
|
9
|
-
// Make sure to reserve the stderr fd
|
10
|
-
process.stderr.write('');
|
11
|
-
|
12
|
-
var num = 4097;
|
13
|
-
var paths = new Array(num);
|
14
|
-
|
15
|
-
test('make files', function (t) {
|
16
|
-
rimraf.sync(p);
|
17
|
-
mkdirp.sync(p);
|
18
|
-
|
19
|
-
for (var i = 0; i < num; ++i) {
|
20
|
-
paths[i] = 'files/file-' + i;
|
21
|
-
fs.writeFileSync(paths[i], 'content');
|
22
|
-
}
|
23
|
-
|
24
|
-
t.end();
|
25
|
-
})
|
26
|
-
|
27
|
-
test('read files', function (t) {
|
28
|
-
// now read them
|
29
|
-
var done = 0;
|
30
|
-
for (var i = 0; i < num; ++i) {
|
31
|
-
fs.readFile(paths[i], function(err, data) {
|
32
|
-
if (err)
|
33
|
-
throw err;
|
34
|
-
|
35
|
-
++done;
|
36
|
-
if (done === num) {
|
37
|
-
t.pass('success');
|
38
|
-
t.end()
|
39
|
-
}
|
40
|
-
});
|
41
|
-
}
|
42
|
-
});
|
43
|
-
|
44
|
-
test('cleanup', function (t) {
|
45
|
-
rimraf.sync(p);
|
46
|
-
t.end();
|
47
|
-
});
|