npm-packlist 1.4.5 → 1.4.6
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.
- package/index.js +13 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -51,6 +51,9 @@ const defaultRules = [
|
|
|
51
51
|
'core.+([0-9])',
|
|
52
52
|
]
|
|
53
53
|
|
|
54
|
+
// There may be others, but :?|<> are handled by node-tar
|
|
55
|
+
const nameIsBadForWindows = file => /\*/.test(file)
|
|
56
|
+
|
|
54
57
|
// a decorator that applies our custom rules to an ignore walker
|
|
55
58
|
const npmWalker = Class => class Walker extends Class {
|
|
56
59
|
constructor (opt) {
|
|
@@ -191,6 +194,16 @@ const npmWalker = Class => class Walker extends Class {
|
|
|
191
194
|
then()
|
|
192
195
|
}
|
|
193
196
|
|
|
197
|
+
// override parent stat function to completely skip any filenames
|
|
198
|
+
// that will break windows entirely.
|
|
199
|
+
// XXX(isaacs) Next major version should make this an error instead.
|
|
200
|
+
stat (entry, file, dir, then) {
|
|
201
|
+
if (nameIsBadForWindows(entry))
|
|
202
|
+
then()
|
|
203
|
+
else
|
|
204
|
+
super.stat(entry, file, dir, then)
|
|
205
|
+
}
|
|
206
|
+
|
|
194
207
|
// override parent onstat function to nix all symlinks
|
|
195
208
|
onstat (st, entry, file, dir, then) {
|
|
196
209
|
if (st.isSymbolicLink())
|