File tree Expand file tree Collapse file tree 4 files changed +12
-9
lines changed
node_modules/npm-package-arg Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ const hasSlashes = isWindows ? /\\|[/]/ : /[/]/
1717const isURL = / ^ (?: g i t [ + ] ) ? [ a - z ] + : / i
1818const isGit = / ^ [ ^ @ ] + @ [ ^ : . ] + \. [ ^ : ] + : .+ $ / i
1919const isFilename = / [ . ] (?: t g z | t a r .g z | t a r ) $ / i
20+ const isPortNumber = / : [ 0 - 9 ] + ( \/ | $ ) / i
2021
2122function 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 ( / ^ g i t \+ s s h : \/ \/ ( [ ^ : # ] + : [ ^ # ] + (?: \. g i t ) ? ) (?: # ( .* ) ) ? $ / 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 ]
Original file line number Diff line number Diff line change 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" : {
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" : {
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}
Original file line number Diff line number Diff line change 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",
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": {
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments