From e88ac365cc32a2a592774e72d3f76e7c0d6b5599 Mon Sep 17 00:00:00 2001 From: Gar Date: Fri, 7 May 2021 10:09:33 -0700 Subject: [PATCH 1/5] tap@15.0.9 --- package-lock.json | 219 ++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 104 insertions(+), 117 deletions(-) diff --git a/package-lock.json b/package-lock.json index a1664057fbddd..2982c23c6c915 100644 --- a/package-lock.json +++ b/package-lock.json @@ -161,7 +161,7 @@ "jsdom": "^16.5.2", "licensee": "^8.1.0", "marked-man": "^0.7.0", - "tap": "^15.0.6", + "tap": "^15.0.9", "yaml": "^1.10.2" }, "engines": { @@ -7364,9 +7364,9 @@ } }, "node_modules/tap": { - "version": "15.0.6", - "resolved": "https://registry.npmjs.org/tap/-/tap-15.0.6.tgz", - "integrity": "sha512-f3LaBSGgXkwTh17Lj4H4DxKIl4BrDZlmxWHtLVGwl8vx+XxNKvf0qMbeFLVhsVTRVz9E5yTaSUweB00YcO+TMw==", + "version": "15.0.9", + "resolved": "https://registry.npmjs.org/tap/-/tap-15.0.9.tgz", + "integrity": "sha512-bqY5SxEqYKRd37PIUfKBf9HMs/hklyl/fGXkuStr9rYTIGa0/icpSLsm6IVOmx2qT0/TliPNJ6OvS5kddJYHdg==", "bundleDependencies": [ "ink", "treport", @@ -7398,8 +7398,8 @@ "tap-mocha-reporter": "^5.0.0", "tap-parser": "^10.0.1", "tap-yaml": "^1.0.0", - "tcompare": "^5.0.4", - "treport": "^2.0.1", + "tcompare": "^5.0.6", + "treport": "^2.0.2", "which": "^2.0.2" }, "bin": { @@ -7495,26 +7495,26 @@ } }, "node_modules/tap/node_modules/@babel/compat-data": { - "version": "7.13.12", + "version": "7.14.0", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/@babel/core": { - "version": "7.13.14", + "version": "7.14.0", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-compilation-targets": "^7.13.13", - "@babel/helper-module-transforms": "^7.13.14", - "@babel/helpers": "^7.13.10", - "@babel/parser": "^7.13.13", + "@babel/generator": "^7.14.0", + "@babel/helper-compilation-targets": "^7.13.16", + "@babel/helper-module-transforms": "^7.14.0", + "@babel/helpers": "^7.14.0", + "@babel/parser": "^7.14.0", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14", + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -7531,12 +7531,12 @@ } }, "node_modules/tap/node_modules/@babel/generator": { - "version": "7.13.9", + "version": "7.14.1", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.13.0", + "@babel/types": "^7.14.1", "jsesc": "^2.5.1", "source-map": "^0.5.0" } @@ -7551,12 +7551,12 @@ } }, "node_modules/tap/node_modules/@babel/helper-compilation-targets": { - "version": "7.13.13", + "version": "7.13.16", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.13.12", + "@babel/compat-data": "^7.13.15", "@babel/helper-validator-option": "^7.12.17", "browserslist": "^4.14.5", "semver": "^6.3.0" @@ -7604,7 +7604,7 @@ } }, "node_modules/tap/node_modules/@babel/helper-module-transforms": { - "version": "7.13.14", + "version": "7.14.0", "dev": true, "inBundle": true, "license": "MIT", @@ -7613,10 +7613,10 @@ "@babel/helper-replace-supers": "^7.13.12", "@babel/helper-simple-access": "^7.13.12", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.14.0", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14" + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0" } }, "node_modules/tap/node_modules/@babel/helper-optimise-call-expression": { @@ -7665,7 +7665,7 @@ } }, "node_modules/tap/node_modules/@babel/helper-validator-identifier": { - "version": "7.12.11", + "version": "7.14.0", "dev": true, "inBundle": true, "license": "MIT" @@ -7677,29 +7677,29 @@ "license": "MIT" }, "node_modules/tap/node_modules/@babel/helpers": { - "version": "7.13.10", + "version": "7.14.0", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0" } }, "node_modules/tap/node_modules/@babel/highlight": { - "version": "7.13.10", + "version": "7.14.0", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.14.0", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "node_modules/tap/node_modules/@babel/parser": { - "version": "7.13.13", + "version": "7.14.1", "dev": true, "inBundle": true, "license": "MIT", @@ -7751,7 +7751,7 @@ } }, "node_modules/tap/node_modules/@babel/plugin-transform-destructuring": { - "version": "7.13.0", + "version": "7.13.17", "dev": true, "inBundle": true, "license": "MIT", @@ -7802,29 +7802,28 @@ } }, "node_modules/tap/node_modules/@babel/traverse": { - "version": "7.13.13", + "version": "7.14.0", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", + "@babel/generator": "^7.14.0", "@babel/helper-function-name": "^7.12.13", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.13", - "@babel/types": "^7.13.13", + "@babel/parser": "^7.14.0", + "@babel/types": "^7.14.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "node_modules/tap/node_modules/@babel/types": { - "version": "7.13.14", + "version": "7.14.1", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-validator-identifier": "^7.14.0", "to-fast-properties": "^2.0.0" } }, @@ -7835,7 +7834,7 @@ "license": "MIT" }, "node_modules/tap/node_modules/@types/react": { - "version": "16.14.5", + "version": "16.14.6", "dev": true, "inBundle": true, "license": "MIT", @@ -7921,7 +7920,7 @@ } }, "node_modules/tap/node_modules/balanced-match": { - "version": "1.0.0", + "version": "1.0.2", "dev": true, "inBundle": true, "license": "MIT" @@ -7937,16 +7936,16 @@ } }, "node_modules/tap/node_modules/browserslist": { - "version": "4.16.3", + "version": "4.16.6", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001181", - "colorette": "^1.2.1", - "electron-to-chromium": "^1.3.649", + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", "escalade": "^3.1.1", - "node-releases": "^1.1.70" + "node-releases": "^1.1.71" }, "bin": { "browserslist": "cli.js" @@ -7993,7 +7992,7 @@ } }, "node_modules/tap/node_modules/caniuse-lite": { - "version": "1.0.30001204", + "version": "1.0.30001223", "dev": true, "inBundle": true, "license": "CC-BY-4.0" @@ -8102,7 +8101,7 @@ } }, "node_modules/tap/node_modules/csstype": { - "version": "3.0.7", + "version": "3.0.8", "dev": true, "inBundle": true, "license": "MIT" @@ -8125,7 +8124,7 @@ } }, "node_modules/tap/node_modules/electron-to-chromium": { - "version": "1.3.703", + "version": "1.3.727", "dev": true, "inBundle": true, "license": "ISC" @@ -8219,7 +8218,7 @@ } }, "node_modules/tap/node_modules/glob": { - "version": "7.1.6", + "version": "7.1.7", "dev": true, "inBundle": true, "license": "ISC", @@ -8463,12 +8462,6 @@ "node": ">=8" } }, - "node_modules/tap/node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "inBundle": true, - "license": "MIT" - }, "node_modules/tap/node_modules/lodash.throttle": { "version": "4.1.1", "dev": true, @@ -9091,7 +9084,7 @@ } }, "node_modules/tap/node_modules/treport": { - "version": "2.0.1", + "version": "2.0.2", "dev": true, "inBundle": true, "license": "ISC", @@ -9398,9 +9391,9 @@ } }, "node_modules/tcompare": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/tcompare/-/tcompare-5.0.4.tgz", - "integrity": "sha512-worXBcrmLoFu9oJYAKznjPE89APTEXk/XCazuDuSQfK1EqX3bpLPW3cY/RQucbcc7mW+yKW0duujsuFlU7dRCA==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/tcompare/-/tcompare-5.0.6.tgz", + "integrity": "sha512-OvO7omN/wkdsKzmOqr3sQFfLbghs/2X5mwSkcfgRiXZshfPnTsAs3IRf1RixR/Pff26qG/r9ogcZMpV0YdeGXg==", "dev": true, "dependencies": { "diff": "^4.0.2" @@ -15751,9 +15744,9 @@ } }, "tap": { - "version": "15.0.6", - "resolved": "https://registry.npmjs.org/tap/-/tap-15.0.6.tgz", - "integrity": "sha512-f3LaBSGgXkwTh17Lj4H4DxKIl4BrDZlmxWHtLVGwl8vx+XxNKvf0qMbeFLVhsVTRVz9E5yTaSUweB00YcO+TMw==", + "version": "15.0.9", + "resolved": "https://registry.npmjs.org/tap/-/tap-15.0.9.tgz", + "integrity": "sha512-bqY5SxEqYKRd37PIUfKBf9HMs/hklyl/fGXkuStr9rYTIGa0/icpSLsm6IVOmx2qT0/TliPNJ6OvS5kddJYHdg==", "dev": true, "requires": { "@types/react": "^16.9.23", @@ -15780,8 +15773,8 @@ "tap-mocha-reporter": "^5.0.0", "tap-parser": "^10.0.1", "tap-yaml": "^1.0.0", - "tcompare": "^5.0.4", - "treport": "^2.0.1", + "tcompare": "^5.0.6", + "treport": "^2.0.2", "which": "^2.0.2" }, "dependencies": { @@ -15794,24 +15787,24 @@ } }, "@babel/compat-data": { - "version": "7.13.12", + "version": "7.14.0", "bundled": true, "dev": true }, "@babel/core": { - "version": "7.13.14", + "version": "7.14.0", "bundled": true, "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-compilation-targets": "^7.13.13", - "@babel/helper-module-transforms": "^7.13.14", - "@babel/helpers": "^7.13.10", - "@babel/parser": "^7.13.13", + "@babel/generator": "^7.14.0", + "@babel/helper-compilation-targets": "^7.13.16", + "@babel/helper-module-transforms": "^7.14.0", + "@babel/helpers": "^7.14.0", + "@babel/parser": "^7.14.0", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14", + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -15821,11 +15814,11 @@ } }, "@babel/generator": { - "version": "7.13.9", + "version": "7.14.1", "bundled": true, "dev": true, "requires": { - "@babel/types": "^7.13.0", + "@babel/types": "^7.14.1", "jsesc": "^2.5.1", "source-map": "^0.5.0" } @@ -15839,11 +15832,11 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.13.13", + "version": "7.13.16", "bundled": true, "dev": true, "requires": { - "@babel/compat-data": "^7.13.12", + "@babel/compat-data": "^7.13.15", "@babel/helper-validator-option": "^7.12.17", "browserslist": "^4.14.5", "semver": "^6.3.0" @@ -15884,7 +15877,7 @@ } }, "@babel/helper-module-transforms": { - "version": "7.13.14", + "version": "7.14.0", "bundled": true, "dev": true, "requires": { @@ -15892,10 +15885,10 @@ "@babel/helper-replace-supers": "^7.13.12", "@babel/helper-simple-access": "^7.13.12", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.14.0", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14" + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0" } }, "@babel/helper-optimise-call-expression": { @@ -15939,7 +15932,7 @@ } }, "@babel/helper-validator-identifier": { - "version": "7.12.11", + "version": "7.14.0", "bundled": true, "dev": true }, @@ -15949,27 +15942,27 @@ "dev": true }, "@babel/helpers": { - "version": "7.13.10", + "version": "7.14.0", "bundled": true, "dev": true, "requires": { "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0" } }, "@babel/highlight": { - "version": "7.13.10", + "version": "7.14.0", "bundled": true, "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.14.0", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.13.13", + "version": "7.14.1", "bundled": true, "dev": true }, @@ -16002,7 +15995,7 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.13.0", + "version": "7.13.17", "bundled": true, "dev": true, "requires": { @@ -16040,27 +16033,26 @@ } }, "@babel/traverse": { - "version": "7.13.13", + "version": "7.14.0", "bundled": true, "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", + "@babel/generator": "^7.14.0", "@babel/helper-function-name": "^7.12.13", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.13", - "@babel/types": "^7.13.13", + "@babel/parser": "^7.14.0", + "@babel/types": "^7.14.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.13.14", + "version": "7.14.1", "bundled": true, "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-validator-identifier": "^7.14.0", "to-fast-properties": "^2.0.0" } }, @@ -16070,7 +16062,7 @@ "dev": true }, "@types/react": { - "version": "16.14.5", + "version": "16.14.6", "bundled": true, "dev": true, "requires": { @@ -16126,7 +16118,7 @@ "dev": true }, "balanced-match": { - "version": "1.0.0", + "version": "1.0.2", "bundled": true, "dev": true }, @@ -16140,15 +16132,15 @@ } }, "browserslist": { - "version": "4.16.3", + "version": "4.16.6", "bundled": true, "dev": true, "requires": { - "caniuse-lite": "^1.0.30001181", - "colorette": "^1.2.1", - "electron-to-chromium": "^1.3.649", + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", "escalade": "^3.1.1", - "node-releases": "^1.1.70" + "node-releases": "^1.1.71" } }, "caller-callsite": { @@ -16173,7 +16165,7 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001204", + "version": "1.0.30001223", "bundled": true, "dev": true }, @@ -16255,7 +16247,7 @@ } }, "csstype": { - "version": "3.0.7", + "version": "3.0.8", "bundled": true, "dev": true }, @@ -16268,7 +16260,7 @@ } }, "electron-to-chromium": { - "version": "1.3.703", + "version": "1.3.727", "bundled": true, "dev": true }, @@ -16327,7 +16319,7 @@ "dev": true }, "glob": { - "version": "7.1.6", + "version": "7.1.7", "bundled": true, "dev": true, "requires": { @@ -16488,11 +16480,6 @@ "p-locate": "^4.1.0" } }, - "lodash": { - "version": "4.17.21", - "bundled": true, - "dev": true - }, "lodash.throttle": { "version": "4.1.1", "bundled": true, @@ -16909,7 +16896,7 @@ "dev": true }, "treport": { - "version": "2.0.1", + "version": "2.0.2", "bundled": true, "dev": true, "requires": { @@ -17180,9 +17167,9 @@ } }, "tcompare": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/tcompare/-/tcompare-5.0.4.tgz", - "integrity": "sha512-worXBcrmLoFu9oJYAKznjPE89APTEXk/XCazuDuSQfK1EqX3bpLPW3cY/RQucbcc7mW+yKW0duujsuFlU7dRCA==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/tcompare/-/tcompare-5.0.6.tgz", + "integrity": "sha512-OvO7omN/wkdsKzmOqr3sQFfLbghs/2X5mwSkcfgRiXZshfPnTsAs3IRf1RixR/Pff26qG/r9ogcZMpV0YdeGXg==", "dev": true, "requires": { "diff": "^4.0.2" diff --git a/package.json b/package.json index 7360d8f9640d8..6932de55b2649 100644 --- a/package.json +++ b/package.json @@ -190,7 +190,7 @@ "jsdom": "^16.5.2", "licensee": "^8.1.0", "marked-man": "^0.7.0", - "tap": "^15.0.6", + "tap": "^15.0.9", "yaml": "^1.10.2" }, "scripts": { From a6a826067cb46c711521772c2d0158257d54400a Mon Sep 17 00:00:00 2001 From: Gar Date: Fri, 7 May 2021 10:10:54 -0700 Subject: [PATCH 2/5] npm-packlist@2.2.2 * fix(sort): avoid locale-dependent sorting issues --- node_modules/npm-packlist/bin/index.js | 5 +-- node_modules/npm-packlist/index.js | 44 +++++++++++--------------- node_modules/npm-packlist/package.json | 17 ++++++++-- package-lock.json | 12 +++---- 4 files changed, 43 insertions(+), 35 deletions(-) diff --git a/node_modules/npm-packlist/bin/index.js b/node_modules/npm-packlist/bin/index.js index f06feffd9b55a..40811db7d32e7 100755 --- a/node_modules/npm-packlist/bin/index.js +++ b/node_modules/npm-packlist/bin/index.js @@ -12,13 +12,14 @@ process.argv.slice(2).forEach(arg => { dirs.push(arg) }) -const sort = list => doSort ? list.sort((a, b) => a.localeCompare(b)) : list +const sort = list => doSort ? list.sort((a, b) => a.localeCompare(b, 'en')) : list const packlist = require('../') if (!dirs.length) console.log(sort(packlist.sync({ path: process.cwd() })).join('\n')) -else +else { dirs.forEach(path => { console.log(`> ${path}`) console.log(sort(packlist.sync({ path })).join('\n')) }) +} diff --git a/node_modules/npm-packlist/index.js b/node_modules/npm-packlist/index.js index 12b51316c5e27..f498fa008ceca 100644 --- a/node_modules/npm-packlist/index.js +++ b/node_modules/npm-packlist/index.js @@ -29,7 +29,7 @@ const normalizePackageBin = require('npm-normalize-package-bin') const packageMustHaveFileNames = 'readme|copying|license|licence' const packageMustHaves = `@(${packageMustHaveFileNames}){,.*[^~$]}` -const packageMustHavesRE = new RegExp(`^(${packageMustHaveFileNames})(\\..*[^~\$])?$`, 'i') +const packageMustHavesRE = new RegExp(`^(${packageMustHaveFileNames})(\\..*[^~$])?$`, 'i') const fs = require('fs') const glob = require('glob') @@ -75,13 +75,11 @@ const npmWalker = Class => class Walker extends Class { 'package.json', '.npmignore', '.gitignore', - packageNecessaryRules + packageNecessaryRules, ] opt.includeEmpty = false opt.path = opt.path || process.cwd() - const dirName = path.basename(opt.path) - const parentName = path.basename(path.dirname(opt.path)) // only follow links in the root node_modules folder, because if those // folders are included, it's because they're bundled, and bundles @@ -89,7 +87,7 @@ const npmWalker = Class => class Walker extends Class { // This regexp tests to see that we're either a node_modules folder, // or a @scope within a node_modules folder, in the root's node_modules // hierarchy (ie, not in test/foo/node_modules/ or something). - const followRe = /^(?:\/node_modules\/(?:@[^\/]+\/[^\/]+|[^\/]+)\/)*\/node_modules(?:\/@[^\/]+)?$/ + const followRe = /^(?:\/node_modules\/(?:@[^/]+\/[^/]+|[^/]+)\/)*\/node_modules(?:\/@[^/]+)?$/ const rootPath = opt.parent ? opt.parent.root : opt.path const followTestPath = opt.path.replace(/\\/g, '/').substr(rootPath.length) opt.follow = followRe.test(followTestPath) @@ -103,10 +101,10 @@ const npmWalker = Class => class Walker extends Class { this.bundled = opt.bundled || [] this.bundledScopes = Array.from(new Set( this.bundled.filter(f => /^@/.test(f)) - .map(f => f.split('/')[0]))) + .map(f => f.split('/')[0]))) const rules = defaultRules.join('\n') + '\n' this.packageJsonCache = opt.packageJsonCache || new Map() - super.onReadIgnoreFile(rootBuiltinRules, rules, _=>_) + super.onReadIgnoreFile(rootBuiltinRules, rules, _ => _) } else { this.bundled = [] this.bundledScopes = [] @@ -128,9 +126,8 @@ const npmWalker = Class => class Walker extends Class { // to be in the state the user wants to include them, and // a package.json somewhere else might be a template or // test or something else entirely. - if (this.parent || !entries.includes('package.json')) { + if (this.parent || !entries.includes('package.json')) return super.onReaddir(entries) - } // when the cache has been seeded with the root manifest, // we must respect that (it may differ from the filesystem) @@ -140,9 +137,8 @@ const npmWalker = Class => class Walker extends Class { const pkg = this.packageJsonCache.get(ig) // fall back to filesystem when seeded manifest is invalid - if (!pkg || typeof pkg !== 'object') { + if (!pkg || typeof pkg !== 'object') return this.readPackageJson(entries) - } // feels wonky, but this ensures package bin is _always_ // normalized, as well as guarding against invalid JSON @@ -174,7 +170,7 @@ const npmWalker = Class => class Walker extends Class { '/package.json', '/npm-shrinkwrap.json', '!/package-lock.json', - packageMustHaves, + packageMustHaves ) return files } @@ -232,9 +228,8 @@ const npmWalker = Class => class Walker extends Class { return this.emit('error', er) results[i] = { negate, fileList } - if (--n === 0) { + if (--n === 0) processResults(results) - } } const processResults = results => { for (const {negate, fileList} of results) { @@ -272,7 +267,7 @@ const npmWalker = Class => class Walker extends Class { filterEntry (entry, partial) { // get the partial path from the root of the walk const p = this.path.substr(this.root.length + 1) - const pkgre = /^node_modules\/(@[^\/]+\/?[^\/]+|[^\/]+)(\/.*)?$/ + const pkgre = /^node_modules\/(@[^/]+\/?[^/]+|[^/]+)(\/.*)?$/ const isRoot = !this.parent const pkg = isRoot && pkgre.test(entry) ? entry.replace(pkgre, '$1') : null @@ -282,7 +277,7 @@ const npmWalker = Class => class Walker extends Class { return ( // if we're in a bundled package, check with the parent. /^node_modules($|\/)/i.test(p) ? this.parent.filterEntry( - this.basename + '/' + entry, partial) + this.basename + '/' + entry, partial) // if package is bundled, all files included // also include @scope dirs for bundled scoped deps @@ -290,8 +285,8 @@ const npmWalker = Class => class Walker extends Class { // However, this only matters if we're in the root. // node_modules folders elsewhere, like lib/node_modules, // should be included normally unless ignored. - : pkg ? -1 !== this.bundled.indexOf(pkg) || - -1 !== this.bundledScopes.indexOf(pkg) + : pkg ? this.bundled.indexOf(pkg) !== -1 || + this.bundledScopes.indexOf(pkg) !== -1 // only walk top node_modules if we want to bundle something : rootNM ? !!this.bundled.length @@ -307,10 +302,10 @@ const npmWalker = Class => class Walker extends Class { ? true // package-lock never included - : isRoot && entry === 'package-lock.json' ? false + : isRoot && entry === 'package-lock.json' ? false - // otherwise, follow ignore-walk's logic - : super.filterEntry(entry, partial) + // otherwise, follow ignore-walk's logic + : super.filterEntry(entry, partial) ) } @@ -453,12 +448,11 @@ const sort = (a, b) => { const basea = path.basename(a).toLowerCase() const baseb = path.basename(b).toLowerCase() - return exta.localeCompare(extb) || - basea.localeCompare(baseb) || - a.localeCompare(b) + return exta.localeCompare(extb, 'en') || + basea.localeCompare(baseb, 'en') || + a.localeCompare(b, 'en') } - module.exports = walk walk.sync = walkSync walk.Walker = Walker diff --git a/node_modules/npm-packlist/package.json b/node_modules/npm-packlist/package.json index e909559bdb204..49fa947547b6c 100644 --- a/node_modules/npm-packlist/package.json +++ b/node_modules/npm-packlist/package.json @@ -1,6 +1,6 @@ { "name": "npm-packlist", - "version": "2.2.0", + "version": "2.2.2", "description": "Get a list of the files to add from a folder into an npm package", "directories": { "test": "test" @@ -19,21 +19,34 @@ "index.js" ], "devDependencies": { + "eslint": "^7.25.0", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^5.1.0", + "eslint-plugin-standard": "^5.0.0", "mutate-fs": "^2.1.1", "tap": "^15.0.6" }, "scripts": { "test": "tap", + "posttest": "npm run lint", "snap": "tap", + "postsnap": "npm run lintfix", "preversion": "npm test", "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" + "prepublishOnly": "git push origin --follow-tags", + "eslint": "eslint", + "lint": "npm run eslint -- index.js bin/index.js \"test/**/*.js\"", + "lintfix": "npm run lint -- --fix" }, "repository": { "type": "git", "url": "git+https://github.com/npm/npm-packlist.git" }, "tap": { + "test-env": [ + "LC_ALL=sk" + ], "check-coverage": true, "nyc-arg": [ "--include=index.js", diff --git a/package-lock.json b/package-lock.json index 2982c23c6c915..1ba3005b2bc3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5428,9 +5428,9 @@ } }, "node_modules/npm-packlist": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.2.0.tgz", - "integrity": "sha512-d3da2MEaYliq7h+PNOHqUhlQjRm0M6gNPi6yHsZYzsCj6bLqUTWCC+JMzW/u9Aaxu8i4F1AA0eJUPUSoFU5izA==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.2.2.tgz", + "integrity": "sha512-Jt01acDvJRhJGthnUJVF/w6gumWOZxO7IkpY/lsX9//zqQgnF7OJaxgQXcerd4uQOLu7W5bkb4mChL9mdfm+Zg==", "inBundle": true, "dependencies": { "glob": "^7.1.6", @@ -14293,9 +14293,9 @@ } }, "npm-packlist": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.2.0.tgz", - "integrity": "sha512-d3da2MEaYliq7h+PNOHqUhlQjRm0M6gNPi6yHsZYzsCj6bLqUTWCC+JMzW/u9Aaxu8i4F1AA0eJUPUSoFU5izA==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.2.2.tgz", + "integrity": "sha512-Jt01acDvJRhJGthnUJVF/w6gumWOZxO7IkpY/lsX9//zqQgnF7OJaxgQXcerd4uQOLu7W5bkb4mChL9mdfm+Zg==", "requires": { "glob": "^7.1.6", "ignore-walk": "^3.0.3", From 71ac935976390e4fd05987ff510049f82bc6e2a9 Mon Sep 17 00:00:00 2001 From: Luke Hefson Date: Fri, 7 May 2021 12:55:43 +0100 Subject: [PATCH 3/5] chore(github): Convert md issue template to yaml PR-URL: https://github.com/npm/cli/pull/3206 Credit: @lukehefson Close: #3206 Reviewed-by: @darcyclarke --- .github/ISSUE_TEMPLATE/bug_7.md | 35 ----------------------- .github/ISSUE_TEMPLATE/bug_7.yml | 49 ++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 35 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_7.md create mode 100644 .github/ISSUE_TEMPLATE/bug_7.yml diff --git a/.github/ISSUE_TEMPLATE/bug_7.md b/.github/ISSUE_TEMPLATE/bug_7.md deleted file mode 100644 index cd995b62d2bbc..0000000000000 --- a/.github/ISSUE_TEMPLATE/bug_7.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: 🐞 Bug v7 -about: File a bug/issue against v7.x -title: '[BUG] ' -labels: Bug, Needs Triage, Release 7.x -assignees: '' - ---- - -<!-- -Note: Please search to see if an issue already exists for your problem: https://github.com/npm/cli/issues ---> - -### Current Behavior: -<!-- ex. a clear & concise description of what you're experiencing. --> - -### Expected Behavior: -<!-- ex. a clear & concise description of what you expected to happen. --> - -### Steps To Reproduce: -<!-- -ex. steps to reproduce the behavior: -1. In this environment... -2. With this config... -3. Run '...' -4. See error... ---> - -### Environment: -<!-- -ex. -- OS: Ubuntu 20.04 -- Node: 13.14.0 -- npm: 7.6.3 ---> diff --git a/.github/ISSUE_TEMPLATE/bug_7.yml b/.github/ISSUE_TEMPLATE/bug_7.yml new file mode 100644 index 0000000000000..455177d277a5c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_7.yml @@ -0,0 +1,49 @@ +name: 🐞 Bug v7 +description: File a bug/issue against v7.x +title: "[BUG] <title>" +labels: [Bug, Needs Triage, Release 7.x] +body: +- type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please [search here](https://github.com/npm/cli/issues) to see if an issue already exists for your problem. + options: + - label: I have searched the existing issues + required: true +- type: textarea + attributes: + label: Current Behavior + description: A clear & concise description of what you're experiencing. + validations: + required: false +- type: textarea + attributes: + label: Expected Behavior + description: A clear & concise description of what you expected to happen. + validations: + required: false +- type: textarea + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior. + value: | + 1. In this environment... + 2. With this config... + 3. Run '...' + 4. See error... + validations: + required: false +- type: textarea + attributes: + label: Environment + description: | + examples: + - **OS**: Ubuntu 20.04 + - **Node**: 13.14.0 + - **npm**: 7.6.3 + value: | + - OS: + - Node: + - npm: + validations: + required: false From 6fb386d3bfbaa8e4771ff87a08de1f3aa6f9b34d Mon Sep 17 00:00:00 2001 From: Gar <gar+gh@danger.computer> Date: Thu, 6 May 2021 14:17:41 -0700 Subject: [PATCH 4/5] fix(tests): increase test fuzziness These tests periodically fail in CI, 10 milliseconds is very much not enough time to account for fuzziness, and 5 minutes is more than enough precision given the scales of time involved in each test. PR-URL: https://github.com/npm/cli/pull/3201 Credit: @wraithgar Close: #3201 Reviewed-by: @nlf --- test/lib/utils/update-notifier.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/lib/utils/update-notifier.js b/test/lib/utils/update-notifier.js index 1735b31057b14..ad4d407728f93 100644 --- a/test/lib/utils/update-notifier.js +++ b/test/lib/utils/update-notifier.js @@ -145,15 +145,15 @@ t.test('situations in which we do not notify', t => { }) t.test('only check weekly for GA releases', async t => { - // the 10 is fuzz factor for test environment - STAT_MTIME = Date.now() - (1000 * 60 * 60 * 24 * 7) + 10 + // One week (plus five minutes to account for test environment fuzziness) + STAT_MTIME = Date.now() - (1000 * 60 * 60 * 24 * 7) + (1000 * 60 * 5) t.equal(await updateNotifier(npm), null) t.strictSame(MANIFEST_REQUEST, [], 'no requests for manifests') }) t.test('only check daily for betas', async t => { - // the 10 is fuzz factor for test environment - STAT_MTIME = Date.now() - (1000 * 60 * 60 * 24) + 10 + // One day (plus five minutes to account for test environment fuzziness) + STAT_MTIME = Date.now() - (1000 * 60 * 60 * 24) + (1000 * 60 * 5) t.equal(await updateNotifier({ ...npm, version: HAVE_BETA }), null) t.strictSame(MANIFEST_REQUEST, [], 'no requests for manifests') }) From de49f58f55dc2ac3a5057cd492a43c32ae41381e Mon Sep 17 00:00:00 2001 From: mrmlnc <mrmlnc@yandex-team.ru> Date: Sun, 9 May 2021 19:21:25 +0300 Subject: [PATCH 5/5] fix(contributing): link to proper cli repo PR-URL: https://github.com/npm/cli/pull/3216 Credit: @mrmlnc Close: #3216 Reviewed-by: @darcyclarke --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6821da895b3b5..558ce2a839b23 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ All interactions in the **npm** organization on GitHub are considered to be cove **1. Clone this repository...** ```bash -$ git clone git@github.com:npm/cli.git +$ git clone git@github.com:npm/cli.git npm ``` **2. Navigate into project & install development-specific dependencies...**