Skip to content

Commit bc21552

Browse files
committed
deps: npm-package-arg@9.1.2
Fixes #4994
1 parent 7e6b824 commit bc21552

File tree

4 files changed

+28
-14
lines changed

4 files changed

+28
-14
lines changed

node_modules/npm-package-arg/lib/npa.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,10 @@ function fromFile (res, where) {
241241
rawNoPrefix = rawSpec.replace(/^file:/, '')
242242
}
243243
// turn file:/../foo into file:../foo
244-
if (/^\/\.\.?(\/|$)/.test(rawNoPrefix)) {
245-
const rawSpec = res.rawSpec.replace(/^file:\//, 'file:')
244+
// for 1, 2 or 3 leading slashes since we attempted
245+
// in the previous step to make it a file protocol url with a leading slash
246+
if (/^\/{1,3}\.\.?(\/|$)/.test(rawNoPrefix)) {
247+
const rawSpec = res.rawSpec.replace(/^file:\/{1,3}/, 'file:')
246248
resolvedUrl = new url.URL(rawSpec, `file://${path.resolve(where)}/`)
247249
specUrl = new url.URL(rawSpec)
248250
rawNoPrefix = rawSpec.replace(/^file:/, '')

node_modules/npm-package-arg/package.json

+19-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "npm-package-arg",
3-
"version": "9.1.0",
3+
"version": "9.1.2",
44
"description": "Parse the things that can be arguments to `npm install`",
55
"main": "./lib/npa.js",
66
"directories": {
@@ -18,13 +18,10 @@
1818
},
1919
"devDependencies": {
2020
"@npmcli/eslint-config": "^3.0.1",
21-
"@npmcli/template-oss": "3.5.0",
21+
"@npmcli/template-oss": "4.3.2",
2222
"tap": "^16.0.1"
2323
},
2424
"scripts": {
25-
"preversion": "npm test",
26-
"postversion": "npm publish",
27-
"prepublishOnly": "git push origin --follow-tags",
2825
"test": "tap",
2926
"snap": "tap",
3027
"npmclilint": "npmcli-lint",
@@ -49,10 +46,25 @@
4946
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
5047
},
5148
"tap": {
52-
"branches": 97
49+
"branches": 97,
50+
"nyc-arg": [
51+
"--exclude",
52+
"tap-snapshots/**"
53+
]
5354
},
5455
"templateOSS": {
5556
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
56-
"version": "3.5.0"
57+
"version": "4.3.2",
58+
"releaseBranches": [
59+
"v9"
60+
],
61+
"ciVersions": [
62+
"12.13.0",
63+
"12.x",
64+
"14.15.0",
65+
"14.x",
66+
"16.0.0",
67+
"16.x"
68+
]
5769
}
5870
}

package-lock.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
"nopt": "^6.0.0",
136136
"npm-audit-report": "^3.0.0",
137137
"npm-install-checks": "^5.0.0",
138-
"npm-package-arg": "^9.1.0",
138+
"npm-package-arg": "^9.1.2",
139139
"npm-pick-manifest": "^7.0.2",
140140
"npm-profile": "^6.2.0",
141141
"npm-registry-fetch": "^13.3.1",
@@ -8010,9 +8010,9 @@
80108010
"license": "ISC"
80118011
},
80128012
"node_modules/npm-package-arg": {
8013-
"version": "9.1.0",
8014-
"resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.1.0.tgz",
8015-
"integrity": "sha512-4J0GL+u2Nh6OnhvUKXRr2ZMG4lR8qtLp+kv7UiV00Y+nGiSxtttCyIRHCt5L5BNkXQld/RceYItau3MDOoGiBw==",
8013+
"version": "9.1.2",
8014+
"resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.1.2.tgz",
8015+
"integrity": "sha512-pzd9rLEx4TfNJkovvlBSLGhq31gGu2QDexFPWT19yCDh0JgnRhlBLNo5759N0AJmBk+kQ9Y/hXoLnlgFD+ukmg==",
80168016
"inBundle": true,
80178017
"dependencies": {
80188018
"hosted-git-info": "^5.0.0",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"nopt": "^6.0.0",
101101
"npm-audit-report": "^3.0.0",
102102
"npm-install-checks": "^5.0.0",
103-
"npm-package-arg": "^9.1.0",
103+
"npm-package-arg": "^9.1.2",
104104
"npm-pick-manifest": "^7.0.2",
105105
"npm-profile": "^6.2.0",
106106
"npm-registry-fetch": "^13.3.1",

0 commit comments

Comments
 (0)