fsevents 1.2.9 → 1.2.11

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.
Files changed (124) hide show
  1. package/binding.gyp +1 -9
  2. package/fsevents.js +1 -3
  3. package/node_modules/abbrev/package.json +10 -13
  4. package/node_modules/ansi-regex/package.json +10 -13
  5. package/node_modules/aproba/package.json +10 -13
  6. package/node_modules/are-we-there-yet/package.json +10 -13
  7. package/node_modules/balanced-match/package.json +10 -13
  8. package/node_modules/brace-expansion/package.json +10 -13
  9. package/node_modules/chownr/chownr.js +47 -10
  10. package/node_modules/chownr/package.json +15 -18
  11. package/node_modules/code-point-at/package.json +10 -13
  12. package/node_modules/concat-map/package.json +5 -8
  13. package/node_modules/console-control-strings/package.json +10 -13
  14. package/node_modules/core-util-is/package.json +10 -13
  15. package/node_modules/debug/README.md +0 -18
  16. package/node_modules/debug/dist/debug.js +2 -28
  17. package/node_modules/debug/node.js +1 -0
  18. package/node_modules/debug/package.json +15 -30
  19. package/node_modules/debug/src/browser.js +103 -187
  20. package/node_modules/debug/src/common.js +240 -257
  21. package/node_modules/debug/src/index.js +5 -3
  22. package/node_modules/debug/src/node.js +82 -165
  23. package/node_modules/deep-extend/package.json +10 -13
  24. package/node_modules/delegates/package.json +10 -13
  25. package/node_modules/detect-libc/package.json +10 -13
  26. package/node_modules/fs-minipass/index.js +2 -1
  27. package/node_modules/fs-minipass/package.json +21 -21
  28. package/node_modules/fs.realpath/package.json +10 -13
  29. package/node_modules/gauge/package.json +10 -13
  30. package/node_modules/glob/LICENSE +6 -0
  31. package/node_modules/glob/README.md +8 -1
  32. package/node_modules/glob/package.json +17 -17
  33. package/node_modules/has-unicode/package.json +10 -13
  34. package/node_modules/iconv-lite/package.json +10 -13
  35. package/node_modules/ignore-walk/README.md +1 -1
  36. package/node_modules/ignore-walk/index.js +9 -5
  37. package/node_modules/ignore-walk/package.json +19 -19
  38. package/node_modules/inflight/package.json +10 -13
  39. package/node_modules/inherits/inherits.js +2 -0
  40. package/node_modules/inherits/inherits_browser.js +18 -14
  41. package/node_modules/inherits/package.json +16 -19
  42. package/node_modules/ini/package.json +10 -13
  43. package/node_modules/is-fullwidth-code-point/package.json +10 -13
  44. package/node_modules/isarray/package.json +10 -13
  45. package/node_modules/minimatch/package.json +10 -13
  46. package/node_modules/minimist/package.json +5 -8
  47. package/node_modules/minipass/README.md +486 -4
  48. package/node_modules/minipass/index.js +190 -28
  49. package/node_modules/minipass/package.json +20 -20
  50. package/node_modules/minizlib/README.md +36 -27
  51. package/node_modules/minizlib/constants.js +73 -4
  52. package/node_modules/minizlib/index.js +137 -152
  53. package/node_modules/minizlib/package.json +15 -18
  54. package/node_modules/mkdirp/package.json +10 -13
  55. package/node_modules/ms/index.js +2 -2
  56. package/node_modules/ms/package.json +14 -17
  57. package/node_modules/ms/readme.md +1 -1
  58. package/node_modules/needle/lib/needle.js +2 -0
  59. package/node_modules/needle/package.json +15 -18
  60. package/node_modules/needle/test/headers_spec.js +1 -1
  61. package/node_modules/node-pre-gyp/CHANGELOG.md +11 -0
  62. package/node_modules/node-pre-gyp/lib/install.js +44 -14
  63. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +240 -0
  64. package/node_modules/node-pre-gyp/lib/util/napi.js +3 -2
  65. package/node_modules/node-pre-gyp/package.json +14 -17
  66. package/node_modules/nopt/package.json +10 -13
  67. package/node_modules/npm-bundled/index.js +13 -5
  68. package/node_modules/npm-bundled/package.json +17 -17
  69. package/node_modules/npm-normalize-package-bin/.github/settings.yml +2 -0
  70. package/node_modules/npm-normalize-package-bin/.npmignore +24 -0
  71. package/node_modules/npm-normalize-package-bin/LICENSE +15 -0
  72. package/node_modules/npm-normalize-package-bin/README.md +14 -0
  73. package/node_modules/npm-normalize-package-bin/index.js +60 -0
  74. package/node_modules/npm-normalize-package-bin/package-lock.json +3529 -0
  75. package/node_modules/npm-normalize-package-bin/package.json +57 -0
  76. package/node_modules/npm-normalize-package-bin/test/array.js +37 -0
  77. package/node_modules/npm-normalize-package-bin/test/nobin.js +35 -0
  78. package/node_modules/npm-normalize-package-bin/test/object.js +141 -0
  79. package/node_modules/npm-normalize-package-bin/test/string.js +37 -0
  80. package/node_modules/npm-packlist/index.js +55 -16
  81. package/node_modules/npm-packlist/package.json +24 -20
  82. package/node_modules/npmlog/package.json +10 -13
  83. package/node_modules/number-is-nan/package.json +10 -13
  84. package/node_modules/object-assign/package.json +10 -13
  85. package/node_modules/once/package.json +10 -13
  86. package/node_modules/os-homedir/package.json +10 -13
  87. package/node_modules/os-tmpdir/package.json +10 -13
  88. package/node_modules/osenv/package.json +10 -13
  89. package/node_modules/path-is-absolute/package.json +10 -13
  90. package/node_modules/process-nextick-args/index.js +2 -1
  91. package/node_modules/process-nextick-args/package.json +14 -17
  92. package/node_modules/rc/node_modules/minimist/package.json +10 -13
  93. package/node_modules/rc/package.json +10 -13
  94. package/node_modules/readable-stream/package.json +10 -13
  95. package/node_modules/rimraf/package.json +14 -17
  96. package/node_modules/rimraf/rimraf.js +9 -1
  97. package/node_modules/safe-buffer/package.json +10 -13
  98. package/node_modules/safer-buffer/package.json +10 -13
  99. package/node_modules/sax/package.json +10 -13
  100. package/node_modules/semver/README.md +12 -11
  101. package/node_modules/semver/package.json +14 -17
  102. package/node_modules/set-blocking/package.json +10 -13
  103. package/node_modules/signal-exit/package.json +10 -13
  104. package/node_modules/string-width/package.json +10 -13
  105. package/node_modules/string_decoder/package.json +10 -13
  106. package/node_modules/strip-ansi/package.json +10 -13
  107. package/node_modules/strip-json-comments/package.json +10 -13
  108. package/node_modules/tar/lib/large-numbers.js +32 -27
  109. package/node_modules/tar/lib/mkdir.js +2 -2
  110. package/node_modules/tar/lib/parse.js +6 -1
  111. package/node_modules/tar/lib/read-entry.js +4 -0
  112. package/node_modules/tar/lib/write-entry.js +2 -2
  113. package/node_modules/tar/package.json +25 -24
  114. package/node_modules/util-deprecate/package.json +10 -13
  115. package/node_modules/wide-align/package.json +10 -13
  116. package/node_modules/wrappy/package.json +10 -13
  117. package/node_modules/yallist/package.json +14 -17
  118. package/node_modules/yallist/yallist.js +50 -0
  119. package/package.json +4 -14
  120. package/install.js +0 -7
  121. package/node_modules/needle/.npmignore +0 -6
  122. package/node_modules/needle/package-lock.json +0 -395
  123. package/node_modules/needle/test/keys/ssl.cert +0 -21
  124. package/node_modules/needle/test/keys/ssl.key +0 -27
@@ -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',
@@ -34,6 +36,7 @@ const defaultRules = [
34
36
  'npm-debug.log',
35
37
  '**/.npmrc',
36
38
  '.*.swp',
39
+ '.DS_Store',
37
40
  '**/.DS_Store/**',
38
41
  '._*',
39
42
  '**/._*/**',
@@ -50,6 +53,9 @@ const defaultRules = [
50
53
  'core.+([0-9])',
51
54
  ]
52
55
 
56
+ // There may be others, but :?|<> are handled by node-tar
57
+ const nameIsBadForWindows = file => /\*/.test(file)
58
+
53
59
  // a decorator that applies our custom rules to an ignore walker
54
60
  const npmWalker = Class => class Walker extends Class {
55
61
  constructor (opt) {
@@ -90,6 +96,16 @@ const npmWalker = Class => class Walker extends Class {
90
96
  }
91
97
  }
92
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
+
93
109
  filterEntry (entry, partial) {
94
110
  // get the partial path from the root of the walk
95
111
  const p = this.path.substr(this.root.length + 1)
@@ -147,18 +163,26 @@ const npmWalker = Class => class Walker extends Class {
147
163
 
148
164
  // if there's a bin, browser or main, make sure we don't ignore it
149
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.
150
174
  const rules = [
151
175
  pkg.browser ? '!' + pkg.browser : '',
152
176
  pkg.main ? '!' + pkg.main : '',
153
177
  '!package.json',
178
+ '!npm-shrinkwrap.json',
154
179
  '!@(readme|copying|license|licence|notice|changes|changelog|history){,.*[^~$]}'
155
180
  ]
156
- if (pkg.bin)
157
- if (typeof pkg.bin === "object")
158
- for (const key in pkg.bin)
159
- rules.push('!' + pkg.bin[key])
160
- else
161
- rules.push('!' + pkg.bin)
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
+ }
162
186
 
163
187
  const data = rules.filter(f => f).join('\n') + '\n'
164
188
  super.onReadIgnoreFile(packageNecessaryRules, data, _=>_)
@@ -171,6 +195,16 @@ const npmWalker = Class => class Walker extends Class {
171
195
  then()
172
196
  }
173
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
+
174
208
  // override parent onstat function to nix all symlinks
175
209
  onstat (st, entry, file, dir, then) {
176
210
  if (st.isSymbolicLink())
@@ -183,7 +217,7 @@ const npmWalker = Class => class Walker extends Class {
183
217
  if (file === 'package.json')
184
218
  try {
185
219
  const ig = path.resolve(this.path, file)
186
- this.onPackageJson(ig, JSON.parse(data), then)
220
+ this.onPackageJson(ig, normalizePackageBin(JSON.parse(data)), then)
187
221
  } catch (er) {
188
222
  // ignore package.json files that are not json
189
223
  then()
@@ -234,15 +268,20 @@ const walkSync = options => {
234
268
  return walker.result
235
269
  }
236
270
 
237
- // package.json first, node_modules last, files before folders, alphasort
238
- const sort = (a, b) =>
239
- a === 'package.json' ? -1
240
- : b === 'package.json' ? 1
241
- : /^node_modules/.test(a) && !/^node_modules/.test(b) ? 1
242
- : /^node_modules/.test(b) && !/^node_modules/.test(a) ? -1
243
- : path.dirname(a) === '.' && path.dirname(b) !== '.' ? -1
244
- : path.dirname(b) === '.' && path.dirname(a) !== '.' ? 1
245
- : a.localeCompare(b)
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
+
246
285
 
247
286
  module.exports = walk
248
287
  walk.sync = walkSync
@@ -1,32 +1,27 @@
1
1
  {
2
- "_args": [
3
- [
4
- "npm-packlist@1.4.1",
5
- "/Users/pipobscure/fsevents"
6
- ]
7
- ],
8
- "_from": "npm-packlist@1.4.1",
9
- "_id": "npm-packlist@1.4.1",
2
+ "_from": "npm-packlist@^1.1.6",
3
+ "_id": "npm-packlist@1.4.7",
10
4
  "_inBundle": false,
11
- "_integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==",
5
+ "_integrity": "sha512-vAj7dIkp5NhieaGZxBJB8fF4R0078rqsmhJcAfXZ6O7JJhjhPK96n5Ry1oZcfLXgfun0GWTZPOxaEyqv8GBykQ==",
12
6
  "_location": "/npm-packlist",
13
7
  "_phantomChildren": {},
14
8
  "_requested": {
15
- "type": "version",
9
+ "type": "range",
16
10
  "registry": true,
17
- "raw": "npm-packlist@1.4.1",
11
+ "raw": "npm-packlist@^1.1.6",
18
12
  "name": "npm-packlist",
19
13
  "escapedName": "npm-packlist",
20
- "rawSpec": "1.4.1",
14
+ "rawSpec": "^1.1.6",
21
15
  "saveSpec": null,
22
- "fetchSpec": "1.4.1"
16
+ "fetchSpec": "^1.1.6"
23
17
  },
24
18
  "_requiredBy": [
25
19
  "/node-pre-gyp"
26
20
  ],
27
- "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz",
28
- "_spec": "1.4.1",
29
- "_where": "/Users/pipobscure/fsevents",
21
+ "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.7.tgz",
22
+ "_shasum": "9e954365a06b80b18111ea900945af4f88ed4848",
23
+ "_spec": "npm-packlist@^1.1.6",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/node-pre-gyp",
30
25
  "author": {
31
26
  "name": "Isaac Z. Schlueter",
32
27
  "email": "i@izs.me",
@@ -35,15 +30,17 @@
35
30
  "bugs": {
36
31
  "url": "https://github.com/npm/npm-packlist/issues"
37
32
  },
33
+ "bundleDependencies": false,
38
34
  "dependencies": {
39
35
  "ignore-walk": "^3.0.1",
40
36
  "npm-bundled": "^1.0.1"
41
37
  },
38
+ "deprecated": false,
42
39
  "description": "Get a list of the files to add from a folder into an npm package",
43
40
  "devDependencies": {
44
41
  "mkdirp": "^0.5.1",
45
42
  "rimraf": "^2.6.1",
46
- "tap": "^12.0.1"
43
+ "tap": "^14.6.9"
47
44
  },
48
45
  "directories": {
49
46
  "test": "test"
@@ -55,15 +52,22 @@
55
52
  "license": "ISC",
56
53
  "main": "index.js",
57
54
  "name": "npm-packlist",
55
+ "publishConfig": {
56
+ "tag": "legacy-v1"
57
+ },
58
58
  "repository": {
59
59
  "type": "git",
60
60
  "url": "git+https://github.com/npm/npm-packlist.git"
61
61
  },
62
62
  "scripts": {
63
- "postpublish": "git push origin --all; git push origin --tags",
63
+ "postpublish": "git push origin --follow-tags",
64
64
  "postversion": "npm publish",
65
65
  "preversion": "npm test",
66
- "test": "tap test/*.js --100 -J"
66
+ "snap": "tap",
67
+ "test": "tap"
68
+ },
69
+ "tap": {
70
+ "jobs": 1
67
71
  },
68
- "version": "1.4.1"
72
+ "version": "1.4.7"
69
73
  }
@@ -1,32 +1,27 @@
1
1
  {
2
- "_args": [
3
- [
4
- "npmlog@4.1.2",
5
- "/Users/pipobscure/fsevents"
6
- ]
7
- ],
8
- "_from": "npmlog@4.1.2",
2
+ "_from": "npmlog@^4.0.2",
9
3
  "_id": "npmlog@4.1.2",
10
4
  "_inBundle": false,
11
5
  "_integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
12
6
  "_location": "/npmlog",
13
7
  "_phantomChildren": {},
14
8
  "_requested": {
15
- "type": "version",
9
+ "type": "range",
16
10
  "registry": true,
17
- "raw": "npmlog@4.1.2",
11
+ "raw": "npmlog@^4.0.2",
18
12
  "name": "npmlog",
19
13
  "escapedName": "npmlog",
20
- "rawSpec": "4.1.2",
14
+ "rawSpec": "^4.0.2",
21
15
  "saveSpec": null,
22
- "fetchSpec": "4.1.2"
16
+ "fetchSpec": "^4.0.2"
23
17
  },
24
18
  "_requiredBy": [
25
19
  "/node-pre-gyp"
26
20
  ],
27
21
  "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
28
- "_spec": "4.1.2",
29
- "_where": "/Users/pipobscure/fsevents",
22
+ "_shasum": "08a7f2a8bf734604779a9efa4ad5cc717abb954b",
23
+ "_spec": "npmlog@^4.0.2",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/node-pre-gyp",
30
25
  "author": {
31
26
  "name": "Isaac Z. Schlueter",
32
27
  "email": "i@izs.me",
@@ -35,12 +30,14 @@
35
30
  "bugs": {
36
31
  "url": "https://github.com/npm/npmlog/issues"
37
32
  },
33
+ "bundleDependencies": false,
38
34
  "dependencies": {
39
35
  "are-we-there-yet": "~1.1.2",
40
36
  "console-control-strings": "~1.1.0",
41
37
  "gauge": "~2.7.3",
42
38
  "set-blocking": "~2.0.0"
43
39
  },
40
+ "deprecated": false,
44
41
  "description": "logger for npm",
45
42
  "devDependencies": {
46
43
  "standard": "~7.1.2",
@@ -1,32 +1,27 @@
1
1
  {
2
- "_args": [
3
- [
4
- "number-is-nan@1.0.1",
5
- "/Users/pipobscure/fsevents"
6
- ]
7
- ],
8
- "_from": "number-is-nan@1.0.1",
2
+ "_from": "number-is-nan@^1.0.0",
9
3
  "_id": "number-is-nan@1.0.1",
10
4
  "_inBundle": false,
11
5
  "_integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
12
6
  "_location": "/number-is-nan",
13
7
  "_phantomChildren": {},
14
8
  "_requested": {
15
- "type": "version",
9
+ "type": "range",
16
10
  "registry": true,
17
- "raw": "number-is-nan@1.0.1",
11
+ "raw": "number-is-nan@^1.0.0",
18
12
  "name": "number-is-nan",
19
13
  "escapedName": "number-is-nan",
20
- "rawSpec": "1.0.1",
14
+ "rawSpec": "^1.0.0",
21
15
  "saveSpec": null,
22
- "fetchSpec": "1.0.1"
16
+ "fetchSpec": "^1.0.0"
23
17
  },
24
18
  "_requiredBy": [
25
19
  "/is-fullwidth-code-point"
26
20
  ],
27
21
  "_resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
28
- "_spec": "1.0.1",
29
- "_where": "/Users/pipobscure/fsevents",
22
+ "_shasum": "097b602b53422a522c1afb8790318336941a011d",
23
+ "_spec": "number-is-nan@^1.0.0",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/is-fullwidth-code-point",
30
25
  "author": {
31
26
  "name": "Sindre Sorhus",
32
27
  "email": "sindresorhus@gmail.com",
@@ -35,6 +30,8 @@
35
30
  "bugs": {
36
31
  "url": "https://github.com/sindresorhus/number-is-nan/issues"
37
32
  },
33
+ "bundleDependencies": false,
34
+ "deprecated": false,
38
35
  "description": "ES2015 Number.isNaN() ponyfill",
39
36
  "devDependencies": {
40
37
  "ava": "*"