diff options
author | nlf <quitlahok@gmail.com> | 2021-02-19 00:55:54 +0300 |
---|---|---|
committer | nlf <quitlahok@gmail.com> | 2021-02-19 00:55:54 +0300 |
commit | 9c51005a19fd4c3e7cd4c987d2e39d1b763036bf (patch) | |
tree | 351cddb6ced6108fa9cf41a904dba3f30e80fbc5 /node_modules | |
parent | 80c2ac995170a05b26856a2b72fe9c8163b2c999 (diff) |
npm-package-arg@8.1.1
Diffstat (limited to 'node_modules')
-rw-r--r-- | node_modules/npm-package-arg/npa.js | 3 | ||||
-rw-r--r-- | node_modules/npm-package-arg/package.json | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/node_modules/npm-package-arg/npa.js b/node_modules/npm-package-arg/npa.js index d18168b75..6018dd608 100644 --- a/node_modules/npm-package-arg/npa.js +++ b/node_modules/npm-package-arg/npa.js @@ -17,6 +17,7 @@ let os const isWindows = process.platform === 'win32' || global.FAKE_WINDOWS const hasSlashes = isWindows ? /\\|[/]/ : /[/]/ const isURL = /^(?:git[+])?[a-z]+:/i +const isGit = /^[^@]+@[^:.]+\.[^:]+:.+$/i const isFilename = /[.](?:tgz|tar.gz|tar)$/i function npa (arg, where) { @@ -35,6 +36,8 @@ function npa (arg, where) { const namePart = nameEndsAt > 0 ? arg.slice(0, nameEndsAt) : arg if (isURL.test(arg)) { spec = arg + } else if (isGit.test(arg)) { + spec = `git+ssh://${arg}` } else if (namePart[0] !== '@' && (hasSlashes.test(namePart) || isFilename.test(namePart))) { spec = arg } else if (nameEndsAt > 0) { diff --git a/node_modules/npm-package-arg/package.json b/node_modules/npm-package-arg/package.json index 5035feef3..c460be828 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": "8.1.0", + "version": "8.1.1", "description": "Parse the things that can be arguments to `npm install`", "main": "npa.js", "directories": { |