fsevents 1.2.7 → 1.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/.travis.yml +1 -2
- package/fsevents.cc +8 -11
- package/node_modules/abbrev/package.json +2 -3
- package/node_modules/ansi-regex/package.json +1 -1
- package/node_modules/aproba/package.json +1 -1
- package/node_modules/are-we-there-yet/package.json +1 -1
- package/node_modules/balanced-match/package.json +1 -1
- package/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/chownr/chownr.js +47 -10
- package/node_modules/chownr/package.json +7 -7
- package/node_modules/code-point-at/package.json +1 -1
- package/node_modules/concat-map/package.json +1 -1
- package/node_modules/console-control-strings/package.json +1 -1
- package/node_modules/core-util-is/package.json +1 -1
- package/node_modules/debug/CHANGELOG.md +34 -1
- package/node_modules/debug/README.md +188 -63
- package/node_modules/debug/dist/debug.js +886 -0
- package/node_modules/debug/package.json +28 -26
- package/node_modules/debug/src/browser.js +77 -82
- package/node_modules/debug/src/common.js +249 -0
- package/node_modules/debug/src/index.js +5 -3
- package/node_modules/debug/src/node.js +72 -146
- package/node_modules/deep-extend/package.json +1 -1
- package/node_modules/delegates/package.json +1 -1
- package/node_modules/detect-libc/package.json +1 -1
- package/node_modules/fs-minipass/index.js +2 -1
- package/node_modules/fs-minipass/package.json +13 -10
- package/node_modules/fs.realpath/package.json +1 -1
- package/node_modules/gauge/package.json +1 -1
- package/node_modules/glob/LICENSE +6 -0
- package/node_modules/glob/README.md +8 -1
- package/node_modules/glob/package.json +9 -6
- package/node_modules/has-unicode/package.json +1 -1
- package/node_modules/iconv-lite/package.json +1 -1
- package/node_modules/ignore-walk/README.md +1 -1
- package/node_modules/ignore-walk/index.js +9 -5
- package/node_modules/ignore-walk/package.json +11 -8
- package/node_modules/inflight/package.json +1 -1
- package/node_modules/inherits/inherits.js +2 -0
- package/node_modules/inherits/inherits_browser.js +18 -14
- package/node_modules/inherits/package.json +9 -11
- package/node_modules/ini/package.json +1 -1
- package/node_modules/is-fullwidth-code-point/package.json +1 -1
- package/node_modules/isarray/package.json +1 -1
- package/node_modules/minimatch/package.json +1 -1
- package/node_modules/minimist/package.json +1 -1
- package/node_modules/minipass/README.md +486 -4
- package/node_modules/minipass/index.js +190 -28
- package/node_modules/minipass/package.json +17 -14
- package/node_modules/minizlib/README.md +36 -27
- package/node_modules/minizlib/constants.js +73 -4
- package/node_modules/minizlib/index.js +137 -152
- package/node_modules/minizlib/package.json +12 -12
- package/node_modules/mkdirp/package.json +1 -2
- package/node_modules/ms/index.js +29 -19
- package/node_modules/ms/package.json +17 -17
- package/node_modules/ms/readme.md +18 -9
- package/node_modules/needle/README.md +1 -2
- package/node_modules/needle/examples/multipart-stream.js +1 -1
- package/node_modules/needle/lib/auth.js +1 -1
- package/node_modules/needle/lib/multipart.js +1 -1
- package/node_modules/needle/lib/needle.js +4 -2
- package/node_modules/needle/package.json +13 -13
- package/node_modules/needle/test/basic_auth_spec.js +1 -1
- package/node_modules/needle/test/cookies_spec.js +2 -2
- package/node_modules/needle/test/headers_spec.js +1 -1
- package/node_modules/needle/test/output_spec.js +1 -1
- package/node_modules/needle/test/post_data_spec.js +20 -20
- package/node_modules/needle/test/proxy_spec.js +1 -1
- package/node_modules/needle/test/utils/test.js +1 -1
- package/node_modules/node-pre-gyp/CHANGELOG.md +10 -0
- package/node_modules/node-pre-gyp/README.md +41 -6
- package/node_modules/node-pre-gyp/lib/build.js +1 -1
- package/node_modules/node-pre-gyp/lib/install.js +20 -8
- package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +1 -1
- package/node_modules/node-pre-gyp/lib/pre-binding.js +5 -5
- package/node_modules/node-pre-gyp/lib/rebuild.js +1 -1
- package/node_modules/node-pre-gyp/lib/reinstall.js +1 -1
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +48 -0
- package/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js +5 -2
- package/node_modules/node-pre-gyp/lib/util/napi.js +70 -22
- package/node_modules/node-pre-gyp/lib/util/versioning.js +7 -6
- package/node_modules/node-pre-gyp/package.json +11 -11
- package/node_modules/nopt/package.json +1 -1
- package/node_modules/npm-bundled/index.js +26 -6
- package/node_modules/npm-bundled/package.json +9 -6
- package/node_modules/npm-normalize-package-bin/.github/settings.yml +2 -0
- package/node_modules/npm-normalize-package-bin/.npmignore +24 -0
- package/node_modules/npm-normalize-package-bin/LICENSE +15 -0
- package/node_modules/npm-normalize-package-bin/README.md +14 -0
- package/node_modules/npm-normalize-package-bin/index.js +60 -0
- package/node_modules/npm-normalize-package-bin/package-lock.json +3529 -0
- package/node_modules/npm-normalize-package-bin/package.json +57 -0
- package/node_modules/npm-normalize-package-bin/test/array.js +37 -0
- package/node_modules/npm-normalize-package-bin/test/nobin.js +35 -0
- package/node_modules/npm-normalize-package-bin/test/object.js +141 -0
- package/node_modules/npm-normalize-package-bin/test/string.js +37 -0
- package/node_modules/npm-packlist/index.js +76 -16
- package/node_modules/npm-packlist/package.json +16 -9
- package/node_modules/npmlog/package.json +1 -1
- package/node_modules/number-is-nan/package.json +1 -1
- package/node_modules/object-assign/package.json +1 -1
- package/node_modules/once/package.json +1 -1
- package/node_modules/os-homedir/package.json +1 -1
- package/node_modules/os-tmpdir/package.json +1 -1
- package/node_modules/osenv/package.json +1 -1
- package/node_modules/path-is-absolute/package.json +1 -1
- package/node_modules/process-nextick-args/index.js +2 -1
- package/node_modules/process-nextick-args/package.json +6 -6
- package/node_modules/rc/node_modules/minimist/package.json +1 -1
- package/node_modules/rc/package.json +1 -1
- package/node_modules/readable-stream/package.json +1 -1
- package/node_modules/rimraf/package.json +6 -6
- package/node_modules/rimraf/rimraf.js +9 -1
- package/node_modules/safe-buffer/package.json +1 -1
- package/node_modules/safer-buffer/package.json +1 -1
- package/node_modules/sax/package.json +1 -1
- package/node_modules/semver/CHANGELOG.md +39 -0
- package/node_modules/semver/README.md +26 -13
- package/node_modules/semver/bin/semver +84 -77
- package/node_modules/semver/package.json +14 -8
- package/node_modules/semver/semver.js +906 -775
- package/node_modules/set-blocking/package.json +1 -1
- package/node_modules/signal-exit/package.json +1 -1
- package/node_modules/string-width/package.json +1 -1
- package/node_modules/string_decoder/package.json +1 -1
- package/node_modules/strip-ansi/package.json +1 -1
- package/node_modules/strip-json-comments/package.json +1 -1
- package/node_modules/tar/lib/large-numbers.js +32 -27
- package/node_modules/tar/lib/mkdir.js +2 -2
- package/node_modules/tar/lib/parse.js +6 -1
- package/node_modules/tar/lib/read-entry.js +4 -0
- package/node_modules/tar/lib/write-entry.js +2 -2
- package/node_modules/tar/package.json +17 -13
- package/node_modules/util-deprecate/package.json +1 -1
- package/node_modules/wide-align/package.json +1 -1
- package/node_modules/wrappy/package.json +1 -1
- package/node_modules/yallist/package.json +11 -11
- package/node_modules/yallist/yallist.js +50 -0
- package/package.json +5 -8
- package/src/constants.cc +20 -20
- package/node_modules/debug/.coveralls.yml +0 -1
- package/node_modules/debug/.eslintrc +0 -11
- package/node_modules/debug/.npmignore +0 -9
- package/node_modules/debug/.travis.yml +0 -14
- package/node_modules/debug/Makefile +0 -50
- package/node_modules/debug/component.json +0 -19
- package/node_modules/debug/karma.conf.js +0 -70
- package/node_modules/debug/src/debug.js +0 -202
- package/node_modules/debug/src/inspector-log.js +0 -15
- package/node_modules/needle/note.xml +0 -7
- package/node_modules/needle/note.xml.1 +0 -7
@@ -0,0 +1,57 @@
|
|
1
|
+
{
|
2
|
+
"_from": "npm-normalize-package-bin@^1.0.1",
|
3
|
+
"_id": "npm-normalize-package-bin@1.0.1",
|
4
|
+
"_inBundle": false,
|
5
|
+
"_integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==",
|
6
|
+
"_location": "/npm-normalize-package-bin",
|
7
|
+
"_phantomChildren": {},
|
8
|
+
"_requested": {
|
9
|
+
"type": "range",
|
10
|
+
"registry": true,
|
11
|
+
"raw": "npm-normalize-package-bin@^1.0.1",
|
12
|
+
"name": "npm-normalize-package-bin",
|
13
|
+
"escapedName": "npm-normalize-package-bin",
|
14
|
+
"rawSpec": "^1.0.1",
|
15
|
+
"saveSpec": null,
|
16
|
+
"fetchSpec": "^1.0.1"
|
17
|
+
},
|
18
|
+
"_requiredBy": [
|
19
|
+
"/npm-bundled"
|
20
|
+
],
|
21
|
+
"_resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
|
22
|
+
"_shasum": "6e79a41f23fd235c0623218228da7d9c23b8f6e2",
|
23
|
+
"_spec": "npm-normalize-package-bin@^1.0.1",
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/npm-bundled",
|
25
|
+
"author": {
|
26
|
+
"name": "Isaac Z. Schlueter",
|
27
|
+
"email": "i@izs.me",
|
28
|
+
"url": "https://izs.me"
|
29
|
+
},
|
30
|
+
"bugs": {
|
31
|
+
"url": "https://github.com/npm/npm-normalize-package-bin/issues"
|
32
|
+
},
|
33
|
+
"bundleDependencies": false,
|
34
|
+
"deprecated": false,
|
35
|
+
"description": "Turn any flavor of allowable package.json bin into a normalized object",
|
36
|
+
"devDependencies": {
|
37
|
+
"tap": "^14.10.2"
|
38
|
+
},
|
39
|
+
"homepage": "https://github.com/npm/npm-normalize-package-bin#readme",
|
40
|
+
"license": "ISC",
|
41
|
+
"name": "npm-normalize-package-bin",
|
42
|
+
"repository": {
|
43
|
+
"type": "git",
|
44
|
+
"url": "git+https://github.com/npm/npm-normalize-package-bin.git"
|
45
|
+
},
|
46
|
+
"scripts": {
|
47
|
+
"postpublish": "git push origin --follow-tags",
|
48
|
+
"postversion": "npm publish",
|
49
|
+
"preversion": "npm test",
|
50
|
+
"snap": "tap",
|
51
|
+
"test": "tap"
|
52
|
+
},
|
53
|
+
"tap": {
|
54
|
+
"check-coverage": true
|
55
|
+
},
|
56
|
+
"version": "1.0.1"
|
57
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
const normalize = require('../')
|
2
|
+
const t = require('tap')
|
3
|
+
|
4
|
+
t.test('benign array', async t => {
|
5
|
+
const pkg = { name: 'hello', version: 'world', bin: ['./x/y', 'y/z', './a'] }
|
6
|
+
const expect = { name: 'hello', version: 'world', bin: {
|
7
|
+
y: 'x/y',
|
8
|
+
z: 'y/z',
|
9
|
+
a: 'a',
|
10
|
+
} }
|
11
|
+
t.strictSame(normalize(pkg), expect)
|
12
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
13
|
+
})
|
14
|
+
|
15
|
+
t.test('conflicting array', async t => {
|
16
|
+
const pkg = { name: 'hello', version: 'world', bin: ['./x/y', 'z/y', './a'] }
|
17
|
+
const expect = { name: 'hello', version: 'world', bin: {
|
18
|
+
y: 'z/y',
|
19
|
+
a: 'a',
|
20
|
+
} }
|
21
|
+
t.strictSame(normalize(pkg), expect)
|
22
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
23
|
+
})
|
24
|
+
|
25
|
+
t.test('slashy array', async t => {
|
26
|
+
const pkg = { name: 'hello', version: 'world', bin: [ '/etc/passwd' ] }
|
27
|
+
const expect = { name: 'hello', version: 'world', bin: { passwd: 'etc/passwd' } }
|
28
|
+
t.strictSame(normalize(pkg), expect)
|
29
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
30
|
+
})
|
31
|
+
|
32
|
+
t.test('dotty array', async t => {
|
33
|
+
const pkg = { name: 'hello', version: 'world', bin: ['../../../../etc/passwd'] }
|
34
|
+
const expect = { name: 'hello', version: 'world', bin: { passwd: 'etc/passwd' } }
|
35
|
+
t.strictSame(normalize(pkg), expect)
|
36
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
37
|
+
})
|
@@ -0,0 +1,35 @@
|
|
1
|
+
const normalize = require('../')
|
2
|
+
const t = require('tap')
|
3
|
+
|
4
|
+
// all of these just delete the bins, so expect the same value
|
5
|
+
const expect = { name: 'hello', version: 'world' }
|
6
|
+
|
7
|
+
t.test('no bin in object', async t => {
|
8
|
+
const pkg = { name: 'hello', version: 'world' }
|
9
|
+
t.strictSame(normalize(pkg), expect)
|
10
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
11
|
+
})
|
12
|
+
|
13
|
+
t.test('empty string bin in object', async t => {
|
14
|
+
const pkg = { name: 'hello', version: 'world', bin: '' }
|
15
|
+
t.strictSame(normalize(pkg), expect)
|
16
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
17
|
+
})
|
18
|
+
|
19
|
+
t.test('false bin in object', async t => {
|
20
|
+
const pkg = { name: 'hello', version: 'world', bin: false }
|
21
|
+
t.strictSame(normalize(pkg), expect)
|
22
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
23
|
+
})
|
24
|
+
|
25
|
+
t.test('null bin in object', async t => {
|
26
|
+
const pkg = { name: 'hello', version: 'world', bin: null }
|
27
|
+
t.strictSame(normalize(pkg), expect)
|
28
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
29
|
+
})
|
30
|
+
|
31
|
+
t.test('number bin', async t => {
|
32
|
+
const pkg = { name: 'hello', version: 'world', bin: 42069 }
|
33
|
+
t.strictSame(normalize(pkg), expect)
|
34
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
35
|
+
})
|
@@ -0,0 +1,141 @@
|
|
1
|
+
const normalize = require('../')
|
2
|
+
const t = require('tap')
|
3
|
+
|
4
|
+
t.test('benign object', async t => {
|
5
|
+
// just clean up the ./ in the targets and remove anything weird
|
6
|
+
const pkg = { name: 'hello', version: 'world', bin: {
|
7
|
+
y: './x/y',
|
8
|
+
z: './y/z',
|
9
|
+
a: './a',
|
10
|
+
} }
|
11
|
+
const expect = { name: 'hello', version: 'world', bin: {
|
12
|
+
y: 'x/y',
|
13
|
+
z: 'y/z',
|
14
|
+
a: 'a',
|
15
|
+
} }
|
16
|
+
t.strictSame(normalize(pkg), expect)
|
17
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
18
|
+
})
|
19
|
+
|
20
|
+
t.test('empty and non-string targets', async t => {
|
21
|
+
// just clean up the ./ in the targets and remove anything weird
|
22
|
+
const pkg = { name: 'hello', version: 'world', bin: {
|
23
|
+
z: './././',
|
24
|
+
y: '',
|
25
|
+
'./x': 'x.js',
|
26
|
+
re: /asdf/,
|
27
|
+
foo: { bar: 'baz' },
|
28
|
+
false: false,
|
29
|
+
null: null,
|
30
|
+
array: [1,2,3],
|
31
|
+
func: function () {},
|
32
|
+
} }
|
33
|
+
const expect = { name: 'hello', version: 'world', bin: {
|
34
|
+
x: 'x.js',
|
35
|
+
} }
|
36
|
+
t.strictSame(normalize(pkg), expect)
|
37
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
38
|
+
})
|
39
|
+
|
40
|
+
t.test('slashy object', async t => {
|
41
|
+
const pkg = { name: 'hello', version: 'world', bin: {
|
42
|
+
'/path/foo': '/etc/passwd',
|
43
|
+
'bar': '/etc/passwd',
|
44
|
+
'/etc/glorb/baz': '/etc/passwd',
|
45
|
+
'/etc/passwd:/bin/usr/exec': '/etc/passwd',
|
46
|
+
} }
|
47
|
+
const expect = {
|
48
|
+
name: 'hello',
|
49
|
+
version: 'world',
|
50
|
+
bin: {
|
51
|
+
foo: 'etc/passwd',
|
52
|
+
bar: 'etc/passwd',
|
53
|
+
baz: 'etc/passwd',
|
54
|
+
exec: 'etc/passwd',
|
55
|
+
}
|
56
|
+
}
|
57
|
+
t.strictSame(normalize(pkg), expect)
|
58
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
59
|
+
})
|
60
|
+
|
61
|
+
t.test('dotty object', async t => {
|
62
|
+
const pkg = {
|
63
|
+
name: 'hello',
|
64
|
+
version: 'world',
|
65
|
+
bin: {
|
66
|
+
'nodots': '../../../../etc/passwd',
|
67
|
+
'../../../../../../dots': '../../../../etc/passwd',
|
68
|
+
'.././../\\./..//C:\\./': 'this is removed',
|
69
|
+
'.././../\\./..//C:\\/': 'super safe programming language',
|
70
|
+
'.././../\\./..//C:\\x\\y\\z/': 'xyz',
|
71
|
+
} }
|
72
|
+
const expect = { name: 'hello', version: 'world', bin: {
|
73
|
+
nodots: 'etc/passwd',
|
74
|
+
dots: 'etc/passwd',
|
75
|
+
C: 'super safe programming language',
|
76
|
+
z: 'xyz',
|
77
|
+
} }
|
78
|
+
t.strictSame(normalize(pkg), expect)
|
79
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
80
|
+
})
|
81
|
+
|
82
|
+
t.test('weird object', async t => {
|
83
|
+
const pkg = { name: 'hello', version: 'world', bin: /asdf/ }
|
84
|
+
const expect = { name: 'hello', version: 'world' }
|
85
|
+
t.strictSame(normalize(pkg), expect)
|
86
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
87
|
+
})
|
88
|
+
|
89
|
+
t.test('oddball keys', async t => {
|
90
|
+
const pkg = {
|
91
|
+
bin: {
|
92
|
+
'~': 'target',
|
93
|
+
'£': 'target',
|
94
|
+
'ζ': 'target',
|
95
|
+
'ぎ': 'target',
|
96
|
+
'操': 'target',
|
97
|
+
'🎱': 'target',
|
98
|
+
'💎': 'target',
|
99
|
+
'💸': 'target',
|
100
|
+
'🦉': 'target',
|
101
|
+
'сheck-dom': 'target',
|
102
|
+
'Ωpm': 'target',
|
103
|
+
'ζλ': 'target',
|
104
|
+
'мга': 'target',
|
105
|
+
'пше': 'target',
|
106
|
+
'тзч': 'target',
|
107
|
+
'тзь': 'target',
|
108
|
+
'нфкт': 'target',
|
109
|
+
'ссср': 'target',
|
110
|
+
'君の名は': 'target',
|
111
|
+
'君の名は': 'target',
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
115
|
+
const expect = {
|
116
|
+
bin: {
|
117
|
+
'~': 'target',
|
118
|
+
'£': 'target',
|
119
|
+
'ζ': 'target',
|
120
|
+
'ぎ': 'target',
|
121
|
+
'操': 'target',
|
122
|
+
'🎱': 'target',
|
123
|
+
'💎': 'target',
|
124
|
+
'💸': 'target',
|
125
|
+
'🦉': 'target',
|
126
|
+
'сheck-dom': 'target',
|
127
|
+
'Ωpm': 'target',
|
128
|
+
'ζλ': 'target',
|
129
|
+
'мга': 'target',
|
130
|
+
'пше': 'target',
|
131
|
+
'тзч': 'target',
|
132
|
+
'тзь': 'target',
|
133
|
+
'нфкт': 'target',
|
134
|
+
'ссср': 'target',
|
135
|
+
'君の名は': 'target',
|
136
|
+
},
|
137
|
+
}
|
138
|
+
|
139
|
+
t.strictSame(normalize(pkg), expect)
|
140
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
141
|
+
})
|
@@ -0,0 +1,37 @@
|
|
1
|
+
const normalize = require('../')
|
2
|
+
const t = require('tap')
|
3
|
+
|
4
|
+
t.test('benign string', async t => {
|
5
|
+
const pkg = { name: 'hello', version: 'world', bin: 'hello.js' }
|
6
|
+
const expect = { name: 'hello', version: 'world', bin: { hello: 'hello.js' } }
|
7
|
+
t.strictSame(normalize(pkg), expect)
|
8
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
9
|
+
})
|
10
|
+
|
11
|
+
t.test('slashy string', async t => {
|
12
|
+
const pkg = { name: 'hello', version: 'world', bin: '/etc/passwd' }
|
13
|
+
const expect = { name: 'hello', version: 'world', bin: { hello: 'etc/passwd' } }
|
14
|
+
t.strictSame(normalize(pkg), expect)
|
15
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
16
|
+
})
|
17
|
+
|
18
|
+
t.test('dotty string', async t => {
|
19
|
+
const pkg = { name: 'hello', version: 'world', bin: '../../../../etc/passwd' }
|
20
|
+
const expect = { name: 'hello', version: 'world', bin: { hello: 'etc/passwd' } }
|
21
|
+
t.strictSame(normalize(pkg), expect)
|
22
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
23
|
+
})
|
24
|
+
|
25
|
+
t.test('double path', async t => {
|
26
|
+
const pkg = { name: 'hello', version: 'world', bin: '/etc/passwd:/bin/usr/exec' }
|
27
|
+
const expect = { name: 'hello', version: 'world', bin: { hello: 'etc/passwd:/bin/usr/exec' } }
|
28
|
+
t.strictSame(normalize(pkg), expect)
|
29
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
30
|
+
})
|
31
|
+
|
32
|
+
t.test('string with no name', async t => {
|
33
|
+
const pkg = { bin: 'foobar.js' }
|
34
|
+
const expect = {}
|
35
|
+
t.strictSame(normalize(pkg), expect)
|
36
|
+
t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
|
37
|
+
})
|
@@ -17,6 +17,8 @@ const rootBuiltinRules = Symbol('root-builtin-rules')
|
|
17
17
|
const packageNecessaryRules = Symbol('package-necessary-rules')
|
18
18
|
const path = require('path')
|
19
19
|
|
20
|
+
const normalizePackageBin = require('npm-normalize-package-bin')
|
21
|
+
|
20
22
|
const defaultRules = [
|
21
23
|
'.npmignore',
|
22
24
|
'.gitignore',
|
@@ -35,12 +37,25 @@ const defaultRules = [
|
|
35
37
|
'**/.npmrc',
|
36
38
|
'.*.swp',
|
37
39
|
'.DS_Store',
|
40
|
+
'**/.DS_Store/**',
|
38
41
|
'._*',
|
42
|
+
'**/._*/**',
|
39
43
|
'*.orig',
|
40
|
-
'package-lock.json',
|
44
|
+
'/package-lock.json',
|
45
|
+
'/yarn.lock',
|
41
46
|
'archived-packages/**',
|
47
|
+
'core',
|
48
|
+
'!core/',
|
49
|
+
'!**/core/',
|
50
|
+
'*.core',
|
51
|
+
'*.vgcore',
|
52
|
+
'vgcore.*',
|
53
|
+
'core.+([0-9])',
|
42
54
|
]
|
43
55
|
|
56
|
+
// There may be others, but :?|<> are handled by node-tar
|
57
|
+
const nameIsBadForWindows = file => /\*/.test(file)
|
58
|
+
|
44
59
|
// a decorator that applies our custom rules to an ignore walker
|
45
60
|
const npmWalker = Class => class Walker extends Class {
|
46
61
|
constructor (opt) {
|
@@ -81,6 +96,16 @@ const npmWalker = Class => class Walker extends Class {
|
|
81
96
|
}
|
82
97
|
}
|
83
98
|
|
99
|
+
onReaddir (entries) {
|
100
|
+
if (!this.parent) {
|
101
|
+
entries = entries.filter(e =>
|
102
|
+
e !== '.git' &&
|
103
|
+
!(e === 'node_modules' && this.bundled.length === 0)
|
104
|
+
)
|
105
|
+
}
|
106
|
+
return super.onReaddir(entries)
|
107
|
+
}
|
108
|
+
|
84
109
|
filterEntry (entry, partial) {
|
85
110
|
// get the partial path from the root of the walk
|
86
111
|
const p = this.path.substr(this.root.length + 1)
|
@@ -136,13 +161,31 @@ const npmWalker = Class => class Walker extends Class {
|
|
136
161
|
onPackageJson (ig, pkg, then) {
|
137
162
|
this.packageJsonCache.set(ig, pkg)
|
138
163
|
|
139
|
-
// if there's a browser or main, make sure we don't ignore it
|
164
|
+
// if there's a bin, browser or main, make sure we don't ignore it
|
165
|
+
// also, don't ignore the package.json itself!
|
166
|
+
//
|
167
|
+
// Weird side-effect of this: a readme (etc) file will be included
|
168
|
+
// if it exists anywhere within a folder with a package.json file.
|
169
|
+
// The original intent was only to include these files in the root,
|
170
|
+
// but now users in the wild are dependent on that behavior for
|
171
|
+
// localized documentation and other use cases. Adding a `/` to
|
172
|
+
// these rules, while tempting and arguably more "correct", is a
|
173
|
+
// breaking change.
|
140
174
|
const rules = [
|
141
175
|
pkg.browser ? '!' + pkg.browser : '',
|
142
176
|
pkg.main ? '!' + pkg.main : '',
|
143
|
-
'
|
144
|
-
|
145
|
-
|
177
|
+
'!package.json',
|
178
|
+
'!npm-shrinkwrap.json',
|
179
|
+
'!@(readme|copying|license|licence|notice|changes|changelog|history){,.*[^~$]}'
|
180
|
+
]
|
181
|
+
if (pkg.bin) {
|
182
|
+
// always an object, because normalized already
|
183
|
+
for (const key in pkg.bin)
|
184
|
+
rules.push('!' + pkg.bin[key])
|
185
|
+
}
|
186
|
+
|
187
|
+
const data = rules.filter(f => f).join('\n') + '\n'
|
188
|
+
super.onReadIgnoreFile(packageNecessaryRules, data, _=>_)
|
146
189
|
|
147
190
|
if (Array.isArray(pkg.files))
|
148
191
|
super.onReadIgnoreFile('package.json', '*\n' + pkg.files.map(
|
@@ -152,6 +195,16 @@ const npmWalker = Class => class Walker extends Class {
|
|
152
195
|
then()
|
153
196
|
}
|
154
197
|
|
198
|
+
// override parent stat function to completely skip any filenames
|
199
|
+
// that will break windows entirely.
|
200
|
+
// XXX(isaacs) Next major version should make this an error instead.
|
201
|
+
stat (entry, file, dir, then) {
|
202
|
+
if (nameIsBadForWindows(entry))
|
203
|
+
then()
|
204
|
+
else
|
205
|
+
super.stat(entry, file, dir, then)
|
206
|
+
}
|
207
|
+
|
155
208
|
// override parent onstat function to nix all symlinks
|
156
209
|
onstat (st, entry, file, dir, then) {
|
157
210
|
if (st.isSymbolicLink())
|
@@ -163,7 +216,8 @@ const npmWalker = Class => class Walker extends Class {
|
|
163
216
|
onReadIgnoreFile (file, data, then) {
|
164
217
|
if (file === 'package.json')
|
165
218
|
try {
|
166
|
-
|
219
|
+
const ig = path.resolve(this.path, file)
|
220
|
+
this.onPackageJson(ig, normalizePackageBin(JSON.parse(data)), then)
|
167
221
|
} catch (er) {
|
168
222
|
// ignore package.json files that are not json
|
169
223
|
then()
|
@@ -193,12 +247,13 @@ class WalkerSync extends npmWalker(IgnoreWalkerSync) {
|
|
193
247
|
const walk = (options, callback) => {
|
194
248
|
options = options || {}
|
195
249
|
const p = new Promise((resolve, reject) => {
|
196
|
-
const bw = new BundleWalker(options)
|
250
|
+
const bw = new BundleWalker(options)
|
197
251
|
bw.on('done', bundled => {
|
198
252
|
options.bundled = bundled
|
199
253
|
options.packageJsonCache = bw.packageJsonCache
|
200
254
|
new Walker(options).on('done', resolve).on('error', reject).start()
|
201
255
|
})
|
256
|
+
bw.start()
|
202
257
|
})
|
203
258
|
return callback ? p.then(res => callback(null, res), callback) : p
|
204
259
|
}
|
@@ -213,15 +268,20 @@ const walkSync = options => {
|
|
213
268
|
return walker.result
|
214
269
|
}
|
215
270
|
|
216
|
-
//
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
271
|
+
// optimize for compressibility
|
272
|
+
// extname, then basename, then locale alphabetically
|
273
|
+
// https://twitter.com/isntitvacant/status/1131094910923231232
|
274
|
+
const sort = (a, b) => {
|
275
|
+
const exta = path.extname(a).toLowerCase()
|
276
|
+
const extb = path.extname(b).toLowerCase()
|
277
|
+
const basea = path.basename(a).toLowerCase()
|
278
|
+
const baseb = path.basename(b).toLowerCase()
|
279
|
+
|
280
|
+
return exta.localeCompare(extb) ||
|
281
|
+
basea.localeCompare(baseb) ||
|
282
|
+
a.localeCompare(b)
|
283
|
+
}
|
284
|
+
|
225
285
|
|
226
286
|
module.exports = walk
|
227
287
|
walk.sync = walkSync
|
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"_from": "npm-packlist@^1.1.6",
|
3
|
-
"_id": "npm-packlist@1.
|
3
|
+
"_id": "npm-packlist@1.4.7",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-vAj7dIkp5NhieaGZxBJB8fF4R0078rqsmhJcAfXZ6O7JJhjhPK96n5Ry1oZcfLXgfun0GWTZPOxaEyqv8GBykQ==",
|
6
6
|
"_location": "/npm-packlist",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
@@ -18,10 +18,10 @@
|
|
18
18
|
"_requiredBy": [
|
19
19
|
"/node-pre-gyp"
|
20
20
|
],
|
21
|
-
"_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.
|
22
|
-
"_shasum": "
|
21
|
+
"_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.7.tgz",
|
22
|
+
"_shasum": "9e954365a06b80b18111ea900945af4f88ed4848",
|
23
23
|
"_spec": "npm-packlist@^1.1.6",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/node-pre-gyp",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -40,7 +40,7 @@
|
|
40
40
|
"devDependencies": {
|
41
41
|
"mkdirp": "^0.5.1",
|
42
42
|
"rimraf": "^2.6.1",
|
43
|
-
"tap": "^
|
43
|
+
"tap": "^14.6.9"
|
44
44
|
},
|
45
45
|
"directories": {
|
46
46
|
"test": "test"
|
@@ -52,15 +52,22 @@
|
|
52
52
|
"license": "ISC",
|
53
53
|
"main": "index.js",
|
54
54
|
"name": "npm-packlist",
|
55
|
+
"publishConfig": {
|
56
|
+
"tag": "legacy-v1"
|
57
|
+
},
|
55
58
|
"repository": {
|
56
59
|
"type": "git",
|
57
60
|
"url": "git+https://github.com/npm/npm-packlist.git"
|
58
61
|
},
|
59
62
|
"scripts": {
|
60
|
-
"postpublish": "git push origin --
|
63
|
+
"postpublish": "git push origin --follow-tags",
|
61
64
|
"postversion": "npm publish",
|
62
65
|
"preversion": "npm test",
|
63
|
-
"
|
66
|
+
"snap": "tap",
|
67
|
+
"test": "tap"
|
68
|
+
},
|
69
|
+
"tap": {
|
70
|
+
"jobs": 1
|
64
71
|
},
|
65
|
-
"version": "1.
|
72
|
+
"version": "1.4.7"
|
66
73
|
}
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
|
22
22
|
"_shasum": "08a7f2a8bf734604779a9efa4ad5cc717abb954b",
|
23
23
|
"_spec": "npmlog@^4.0.2",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/node-pre-gyp",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
22
22
|
"_shasum": "097b602b53422a522c1afb8790318336941a011d",
|
23
23
|
"_spec": "number-is-nan@^1.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/is-fullwidth-code-point",
|
25
25
|
"author": {
|
26
26
|
"name": "Sindre Sorhus",
|
27
27
|
"email": "sindresorhus@gmail.com",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
22
22
|
"_shasum": "2109adc7965887cfc05cbbd442cac8bfbb360863",
|
23
23
|
"_spec": "object-assign@^4.1.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/gauge",
|
25
25
|
"author": {
|
26
26
|
"name": "Sindre Sorhus",
|
27
27
|
"email": "sindresorhus@gmail.com",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
23
23
|
"_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1",
|
24
24
|
"_spec": "once@^1.3.0",
|
25
|
-
"_where": "/Users/
|
25
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/glob",
|
26
26
|
"author": {
|
27
27
|
"name": "Isaac Z. Schlueter",
|
28
28
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
22
22
|
"_shasum": "ffbc4988336e0e833de0c168c7ef152121aa7fb3",
|
23
23
|
"_spec": "os-homedir@^1.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/osenv",
|
25
25
|
"author": {
|
26
26
|
"name": "Sindre Sorhus",
|
27
27
|
"email": "sindresorhus@gmail.com",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
22
22
|
"_shasum": "bbe67406c79aa85c5cfec766fe5734555dfa1274",
|
23
23
|
"_spec": "os-tmpdir@^1.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/osenv",
|
25
25
|
"author": {
|
26
26
|
"name": "Sindre Sorhus",
|
27
27
|
"email": "sindresorhus@gmail.com",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
|
22
22
|
"_shasum": "85cdfafaeb28e8677f416e287592b5f3f49ea410",
|
23
23
|
"_spec": "osenv@^0.1.4",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/nopt",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
22
22
|
"_shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f",
|
23
23
|
"_spec": "path-is-absolute@^1.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/glob",
|
25
25
|
"author": {
|
26
26
|
"name": "Sindre Sorhus",
|
27
27
|
"email": "sindresorhus@gmail.com",
|
@@ -1,6 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
if (
|
3
|
+
if (typeof process === 'undefined' ||
|
4
|
+
!process.version ||
|
4
5
|
process.version.indexOf('v0.') === 0 ||
|
5
6
|
process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
|
6
7
|
module.exports = { nextTick: nextTick };
|
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"_from": "process-nextick-args@~2.0.0",
|
3
|
-
"_id": "process-nextick-args@2.0.
|
3
|
+
"_id": "process-nextick-args@2.0.1",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
|
6
6
|
"_location": "/process-nextick-args",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
@@ -18,10 +18,10 @@
|
|
18
18
|
"_requiredBy": [
|
19
19
|
"/readable-stream"
|
20
20
|
],
|
21
|
-
"_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.
|
22
|
-
"_shasum": "
|
21
|
+
"_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
22
|
+
"_shasum": "7820d9b16120cc55ca9ae7792680ae7dba6d7fe2",
|
23
23
|
"_spec": "process-nextick-args@~2.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/readable-stream",
|
25
25
|
"author": "",
|
26
26
|
"bugs": {
|
27
27
|
"url": "https://github.com/calvinmetcalf/process-nextick-args/issues"
|
@@ -46,5 +46,5 @@
|
|
46
46
|
"scripts": {
|
47
47
|
"test": "node test.js"
|
48
48
|
},
|
49
|
-
"version": "2.0.
|
49
|
+
"version": "2.0.1"
|
50
50
|
}
|