npm-package-arg
Advanced tools
Comparing version 12.0.0 to 12.0.1
@@ -20,2 +20,3 @@ 'use strict' | ||
const isFilename = /[.](?:tgz|tar.gz|tar)$/i | ||
const isPortNumber = /:[0-9]+(\/|$)/i | ||
@@ -328,3 +329,5 @@ function npa (arg, where) { | ||
const matched = rawSpec.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i) | ||
if (matched && !matched[1].match(/:[0-9]+\/?.*$/i)) { | ||
// Filter out all-number "usernames" which are really port numbers | ||
// They can either be :1234 :1234/ or :1234/path but not :12abc | ||
if (matched && !matched[1].match(isPortNumber)) { | ||
res.type = 'git' | ||
@@ -331,0 +334,0 @@ setGitAttrs(res, matched[2]) |
{ | ||
"name": "npm-package-arg", | ||
"version": "12.0.0", | ||
"version": "12.0.1", | ||
"description": "Parse the things that can be arguments to `npm install`", | ||
@@ -21,3 +21,3 @@ "main": "./lib/npa.js", | ||
"@npmcli/eslint-config": "^5.0.0", | ||
"@npmcli/template-oss": "4.23.3", | ||
"@npmcli/template-oss": "4.23.4", | ||
"tap": "^16.0.1" | ||
@@ -59,5 +59,5 @@ }, | ||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
"version": "4.23.3", | ||
"version": "4.23.4", | ||
"publish": true | ||
} | ||
} |
19351
376