diff --git a/node_modules/npm-package-arg/lib/npa.js b/node_modules/npm-package-arg/lib/npa.js index 61fee0783ecc7..cd1932b0bc78b 100644 --- a/node_modules/npm-package-arg/lib/npa.js +++ b/node_modules/npm-package-arg/lib/npa.js @@ -241,8 +241,10 @@ function fromFile (res, where) { rawNoPrefix = rawSpec.replace(/^file:/, '') } // turn file:/../foo into file:../foo - if (/^\/\.\.?(\/|$)/.test(rawNoPrefix)) { - const rawSpec = res.rawSpec.replace(/^file:\//, 'file:') + // for 1, 2 or 3 leading slashes since we attempted + // in the previous step to make it a file protocol url with a leading slash + if (/^\/{1,3}\.\.?(\/|$)/.test(rawNoPrefix)) { + const rawSpec = res.rawSpec.replace(/^file:\/{1,3}/, 'file:') resolvedUrl = new url.URL(rawSpec, `file://${path.resolve(where)}/`) specUrl = new url.URL(rawSpec) rawNoPrefix = rawSpec.replace(/^file:/, '') diff --git a/node_modules/npm-package-arg/package.json b/node_modules/npm-package-arg/package.json index b9729db5d4f14..eddc6bbbbb8f8 100644 --- a/node_modules/npm-package-arg/package.json +++ b/node_modules/npm-package-arg/package.json @@ -1,6 +1,6 @@ { "name": "npm-package-arg", - "version": "9.1.0", + "version": "9.1.2", "description": "Parse the things that can be arguments to `npm install`", "main": "./lib/npa.js", "directories": { @@ -18,13 +18,10 @@ }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", + "@npmcli/template-oss": "4.3.2", "tap": "^16.0.1" }, "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "test": "tap", "snap": "tap", "npmclilint": "npmcli-lint", @@ -49,10 +46,25 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" }, "tap": { - "branches": 97 + "branches": 97, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" + "version": "4.3.2", + "releaseBranches": [ + "v9" + ], + "ciVersions": [ + "12.13.0", + "12.x", + "14.15.0", + "14.x", + "16.0.0", + "16.x" + ] } } diff --git a/package-lock.json b/package-lock.json index 43f364e27eb8c..2441009d92e20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -135,7 +135,7 @@ "nopt": "^6.0.0", "npm-audit-report": "^3.0.0", "npm-install-checks": "^5.0.0", - "npm-package-arg": "^9.1.0", + "npm-package-arg": "^9.1.2", "npm-pick-manifest": "^7.0.2", "npm-profile": "^6.2.0", "npm-registry-fetch": "^13.3.1", @@ -8010,9 +8010,9 @@ "license": "ISC" }, "node_modules/npm-package-arg": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.1.0.tgz", - "integrity": "sha512-4J0GL+u2Nh6OnhvUKXRr2ZMG4lR8qtLp+kv7UiV00Y+nGiSxtttCyIRHCt5L5BNkXQld/RceYItau3MDOoGiBw==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.1.2.tgz", + "integrity": "sha512-pzd9rLEx4TfNJkovvlBSLGhq31gGu2QDexFPWT19yCDh0JgnRhlBLNo5759N0AJmBk+kQ9Y/hXoLnlgFD+ukmg==", "inBundle": true, "dependencies": { "hosted-git-info": "^5.0.0", diff --git a/package.json b/package.json index 7d0be98833116..250f519e11994 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "nopt": "^6.0.0", "npm-audit-report": "^3.0.0", "npm-install-checks": "^5.0.0", - "npm-package-arg": "^9.1.0", + "npm-package-arg": "^9.1.2", "npm-pick-manifest": "^7.0.2", "npm-profile": "^6.2.0", "npm-registry-fetch": "^13.3.1",