From 5e1a14975311bfdc43df8e1eb317ae5690ee580c Mon Sep 17 00:00:00 2001 From: Michael Perrotte Date: Tue, 29 Oct 2019 12:25:04 -0400 Subject: [PATCH] npm-packlist@1.4.6 --- node_modules/ignore-walk/README.md | 2 +- node_modules/ignore-walk/index.js | 14 ++++++++----- node_modules/ignore-walk/package.json | 19 ++++++++++------- node_modules/npm-packlist/index.js | 14 +++++++++++++ node_modules/npm-packlist/package.json | 29 ++++++++++++++------------ package-lock.json | 12 +++++------ package.json | 2 +- 7 files changed, 58 insertions(+), 34 deletions(-) diff --git a/node_modules/ignore-walk/README.md b/node_modules/ignore-walk/README.md index 66b69e894b2dd..278f61017f5e7 100644 --- a/node_modules/ignore-walk/README.md +++ b/node_modules/ignore-walk/README.md @@ -1,7 +1,7 @@ # ignore-walk [![Build -Status](https://travis-ci.org/isaacs/ignore-walk.svg?branch=master)](https://travis-ci.org/isaacs/ignore-walk) +Status](https://travis-ci.org/npm/ignore-walk.svg?branch=master)](https://travis-ci.org/npm/ignore-walk) Nested/recursive `.gitignore`/`.npmignore` parsing and filtering. diff --git a/node_modules/ignore-walk/index.js b/node_modules/ignore-walk/index.js index abfd9ece57fd4..eec6851804a99 100644 --- a/node_modules/ignore-walk/index.js +++ b/node_modules/ignore-walk/index.js @@ -17,7 +17,7 @@ class Walker extends EE { this.includeEmpty = !!opts.includeEmpty this.root = this.parent ? this.parent.root : this.path this.follow = !!opts.follow - this.result = this.parent ? this.parent.result : [] + this.result = this.parent ? this.parent.result : new Set() this.entries = null this.sawError = false } @@ -31,8 +31,12 @@ class Walker extends EE { if (!(this.sawError && ev === 'error')) { if (ev === 'error') this.sawError = true - else if (ev === 'done' && !this.parent) - data = data.sort(this.sort) + else if (ev === 'done' && !this.parent) { + data = Array.from(data) + .map(e => /^@/.test(e) ? `./${e}` : e).sort(this.sort) + this.result = data + } + if (ev === 'error' && this.parent) ret = this.parent.emit('error', data) else @@ -57,7 +61,7 @@ class Walker extends EE { this.entries = entries if (entries.length === 0) { if (this.includeEmpty) - this.result.push(this.path.substr(this.root.length + 1)) + this.result.add(this.path.substr(this.root.length + 1)) this.emit('done', this.result) } else { const hasIg = this.entries.some(e => @@ -145,7 +149,7 @@ class Walker extends EE { const abs = this.path + '/' + entry if (!st.isDirectory()) { if (file) - this.result.push(abs.substr(this.root.length + 1)) + this.result.add(abs.substr(this.root.length + 1)) then() } else { // is a directory diff --git a/node_modules/ignore-walk/package.json b/node_modules/ignore-walk/package.json index cc041a55e4757..882c1398b07d6 100644 --- a/node_modules/ignore-walk/package.json +++ b/node_modules/ignore-walk/package.json @@ -1,8 +1,8 @@ { "_from": "ignore-walk@^3.0.1", - "_id": "ignore-walk@3.0.1", + "_id": "ignore-walk@3.0.3", "_inBundle": false, - "_integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "_integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", "_location": "/ignore-walk", "_phantomChildren": {}, "_requested": { @@ -18,10 +18,10 @@ "_requiredBy": [ "/npm-packlist" ], - "_resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "_shasum": "a83e62e7d272ac0e3b551aaa82831a19b69f82f8", + "_resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", + "_shasum": "017e2447184bfeade7c238e4aefdd1e8f95b1e37", "_spec": "ignore-walk@^3.0.1", - "_where": "/Users/rebecca/code/npm/node_modules/npm-packlist", + "_where": "/Users/mperrotte/npminc/cli/node_modules/npm-packlist", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -40,7 +40,7 @@ "mkdirp": "^0.5.1", "mutate-fs": "^1.1.0", "rimraf": "^2.6.1", - "tap": "^10.7.2" + "tap": "^14.6.9" }, "files": [ "index.js" @@ -65,7 +65,10 @@ "postpublish": "git push origin --all; git push origin --tags", "postversion": "npm publish", "preversion": "npm test", - "test": "tap test/*.js --100" + "test": "tap" }, - "version": "3.0.1" + "tap": { + "jobs": 1 + }, + "version": "3.0.3" } diff --git a/node_modules/npm-packlist/index.js b/node_modules/npm-packlist/index.js index 8bfd257794f9e..dd7706a4aee2a 100644 --- a/node_modules/npm-packlist/index.js +++ b/node_modules/npm-packlist/index.js @@ -51,6 +51,9 @@ const defaultRules = [ 'core.+([0-9])', ] +// There may be others, but :?|<> are handled by node-tar +const nameIsBadForWindows = file => /\*/.test(file) + // a decorator that applies our custom rules to an ignore walker const npmWalker = Class => class Walker extends Class { constructor (opt) { @@ -170,6 +173,7 @@ const npmWalker = Class => class Walker extends Class { pkg.browser ? '!' + pkg.browser : '', pkg.main ? '!' + pkg.main : '', '!package.json', + '!npm-shrinkwrap.json', '!@(readme|copying|license|licence|notice|changes|changelog|history){,.*[^~$]}' ] if (pkg.bin) @@ -190,6 +194,16 @@ const npmWalker = Class => class Walker extends Class { then() } + // override parent stat function to completely skip any filenames + // that will break windows entirely. + // XXX(isaacs) Next major version should make this an error instead. + stat (entry, file, dir, then) { + if (nameIsBadForWindows(entry)) + then() + else + super.stat(entry, file, dir, then) + } + // override parent onstat function to nix all symlinks onstat (st, entry, file, dir, then) { if (st.isSymbolicLink()) diff --git a/node_modules/npm-packlist/package.json b/node_modules/npm-packlist/package.json index d72eef9cae739..a8fabfa7f1240 100644 --- a/node_modules/npm-packlist/package.json +++ b/node_modules/npm-packlist/package.json @@ -1,29 +1,29 @@ { - "_from": "npm-packlist@^1.4.3", - "_id": "npm-packlist@1.4.4", + "_from": "npm-packlist@1.4.6", + "_id": "npm-packlist@1.4.6", "_inBundle": false, - "_integrity": "sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw==", + "_integrity": "sha512-u65uQdb+qwtGvEJh/DgQgW1Xg7sqeNbmxYyrvlNznaVTjV3E5P6F/EFjM+BVHXl7JJlsdG8A64M0XI8FI/IOlg==", "_location": "/npm-packlist", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "npm-packlist@^1.4.3", + "raw": "npm-packlist@1.4.6", "name": "npm-packlist", "escapedName": "npm-packlist", - "rawSpec": "^1.4.3", + "rawSpec": "1.4.6", "saveSpec": null, - "fetchSpec": "^1.4.3" + "fetchSpec": "1.4.6" }, "_requiredBy": [ "#USER", "/", "/pacote" ], - "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.4.tgz", - "_shasum": "866224233850ac534b63d1a6e76050092b5d2f44", - "_spec": "npm-packlist@^1.4.3", - "_where": "/Users/isaacs/dev/npm/cli", + "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.6.tgz", + "_shasum": "53ba3ed11f8523079f1457376dd379ee4ea42ff4", + "_spec": "npm-packlist@1.4.6", + "_where": "/Users/mperrotte/npminc/cli", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -42,7 +42,7 @@ "devDependencies": { "mkdirp": "^0.5.1", "rimraf": "^2.6.1", - "tap": "^14.2.1" + "tap": "^14.6.9" }, "directories": { "test": "test" @@ -65,5 +65,8 @@ "snap": "tap", "test": "tap" }, - "version": "1.4.4" + "tap": { + "jobs": 1 + }, + "version": "1.4.6" } diff --git a/package-lock.json b/package-lock.json index 7f82786623e0d..40d9926e2ebc8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2561,9 +2561,9 @@ "dev": true }, "ignore-walk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", + "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", "requires": { "minimatch": "^3.0.4" } @@ -3819,9 +3819,9 @@ } }, "npm-packlist": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.4.tgz", - "integrity": "sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.6.tgz", + "integrity": "sha512-u65uQdb+qwtGvEJh/DgQgW1Xg7sqeNbmxYyrvlNznaVTjV3E5P6F/EFjM+BVHXl7JJlsdG8A64M0XI8FI/IOlg==", "requires": { "ignore-walk": "^3.0.1", "npm-bundled": "^1.0.1" diff --git a/package.json b/package.json index 344533c2cd7e3..fb59a779baa89 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "npm-install-checks": "^3.0.2", "npm-lifecycle": "^3.1.4", "npm-package-arg": "^6.1.1", - "npm-packlist": "^1.4.4", + "npm-packlist": "^1.4.6", "npm-pick-manifest": "^3.0.2", "npm-profile": "^4.0.2", "npm-registry-fetch": "^4.0.0",