Skip to content

Commit 28e8761

Browse files
committed
1 parent 687ab12 commit 28e8761

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const hasSlashes = isWindows ? /\\|[/]/ : /[/]/
1717
const isURL = /^(?:git[+])?[a-z]+:/i
1818
const isGit = /^[^@]+@[^:.]+\.[^:]+:.+$/i
1919
const isFilename = /[.](?:tgz|tar.gz|tar)$/i
20+
const isPortNumber = /:[0-9]+(\/|$)/i
2021

2122
function npa (arg, where) {
2223
let name
@@ -324,7 +325,9 @@ function fromURL (res) {
324325
// git+ssh://[email protected]:username/project.git#deadbeef
325326
// ...and various combinations. The username in the beginning is *required*.
326327
const matched = rawSpec.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i)
327-
if (matched && !matched[1].match(/:[0-9]+\/?.*$/i)) {
328+
// Filter out all-number "usernames" which are really port numbers
329+
// They can either be :1234 :1234/ or :1234/path but not :12abc
330+
if (matched && !matched[1].match(isPortNumber)) {
328331
res.type = 'git'
329332
setGitAttrs(res, matched[2])
330333
res.fetchSpec = matched[1]

node_modules/npm-package-arg/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "npm-package-arg",
3-
"version": "12.0.0",
3+
"version": "12.0.1",
44
"description": "Parse the things that can be arguments to `npm install`",
55
"main": "./lib/npa.js",
66
"directories": {
@@ -18,7 +18,7 @@
1818
},
1919
"devDependencies": {
2020
"@npmcli/eslint-config": "^5.0.0",
21-
"@npmcli/template-oss": "4.23.3",
21+
"@npmcli/template-oss": "4.23.4",
2222
"tap": "^16.0.1"
2323
},
2424
"scripts": {
@@ -55,7 +55,7 @@
5555
},
5656
"templateOSS": {
5757
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
58-
"version": "4.23.3",
58+
"version": "4.23.4",
5959
"publish": true
6060
}
6161
}

package-lock.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"normalize-package-data": "^7.0.0",
130130
"npm-audit-report": "^6.0.0",
131131
"npm-install-checks": "^7.1.1",
132-
"npm-package-arg": "^12.0.0",
132+
"npm-package-arg": "^12.0.1",
133133
"npm-pick-manifest": "^10.0.0",
134134
"npm-profile": "^11.0.1",
135135
"npm-registry-fetch": "^18.0.2",
@@ -12166,9 +12166,9 @@
1216612166
}
1216712167
},
1216812168
"node_modules/npm-package-arg": {
12169-
"version": "12.0.0",
12170-
"resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-12.0.0.tgz",
12171-
"integrity": "sha512-ZTE0hbwSdTNL+Stx2zxSqdu2KZfNDcrtrLdIk7XGnQFYBWYDho/ORvXtn5XEePcL3tFpGjHCV3X3xrtDh7eZ+A==",
12169+
"version": "12.0.1",
12170+
"resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-12.0.1.tgz",
12171+
"integrity": "sha512-aDxjFfPV3Liw0WOBWlyZLMBqtbgbg03rmGvHDJa2Ttv7tIz+1oB5qWec4psCDFZcZi9b5XdGkPdQiJxOPzvQRQ==",
1217212172
"inBundle": true,
1217312173
"license": "ISC",
1217412174
"dependencies": {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"normalize-package-data": "^7.0.0",
9797
"npm-audit-report": "^6.0.0",
9898
"npm-install-checks": "^7.1.1",
99-
"npm-package-arg": "^12.0.0",
99+
"npm-package-arg": "^12.0.1",
100100
"npm-pick-manifest": "^10.0.0",
101101
"npm-profile": "^11.0.1",
102102
"npm-registry-fetch": "^18.0.2",

0 commit comments

Comments
 (0)