Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2019-08-22 02:30:42 +0300
committerisaacs <i@izs.me>2019-08-22 09:43:36 +0300
commitbf93e91d879c816a055d5913e6e4210d7299f299 (patch)
treed55e31fbe405c154765495265bd8fa2d13704c08 /node_modules
parent9778a1b878aaa817af6e99385e7683c2a389570d (diff)
npm-package-arg@6.1.1
Properly handle git+file: urls on Windows when a drive letter is included.
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/npm-package-arg/CHANGELOG.md10
-rw-r--r--node_modules/npm-package-arg/npa.js18
-rw-r--r--node_modules/npm-package-arg/package.json45
3 files changed, 44 insertions, 29 deletions
diff --git a/node_modules/npm-package-arg/CHANGELOG.md b/node_modules/npm-package-arg/CHANGELOG.md
index 83e5763f4..1b3431acc 100644
--- a/node_modules/npm-package-arg/CHANGELOG.md
+++ b/node_modules/npm-package-arg/CHANGELOG.md
@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="6.1.1"></a>
+## [6.1.1](https://github.com/npm/npm-package-arg/compare/v6.1.0...v6.1.1) (2019-08-21)
+
+
+### Bug Fixes
+
+* preserve drive letter on windows git file:// urls ([3909203](https://github.com/npm/npm-package-arg/commit/3909203))
+
+
+
<a name="6.1.0"></a>
# [6.1.0](https://github.com/npm/npm-package-arg/compare/v6.0.0...v6.1.0) (2018-04-10)
diff --git a/node_modules/npm-package-arg/npa.js b/node_modules/npm-package-arg/npa.js
index 4d56237a5..bf2c17cfd 100644
--- a/node_modules/npm-package-arg/npa.js
+++ b/node_modules/npm-package-arg/npa.js
@@ -6,7 +6,11 @@ module.exports.Result = Result
let url
let HostedGit
let semver
-let path
+let path_
+function path () {
+ if (!path_) path_ = require('path')
+ return path_
+}
let validatePackageName
let osenv
@@ -109,7 +113,6 @@ function Result (opts) {
this.gitCommittish = opts.gitCommittish
this.hosted = opts.hosted
}
-Result.prototype = {}
Result.prototype.setName = function (name) {
if (!validatePackageName) validatePackageName = require('validate-npm-package-name')
@@ -152,8 +155,7 @@ const isAbsolutePath = /^[/]|^[A-Za-z]:/
function resolvePath (where, spec) {
if (isAbsolutePath.test(spec)) return spec
- if (!path) path = require('path')
- return path.resolve(where, spec)
+ return path().resolve(where, spec)
}
function isAbsolute (dir) {
@@ -180,8 +182,7 @@ function fromFile (res, where) {
if (isAbsolute(spec)) {
res.saveSpec = 'file:' + spec
} else {
- if (!path) path = require('path')
- res.saveSpec = 'file:' + path.relative(where, res.fetchSpec)
+ res.saveSpec = 'file:' + path().relative(where, res.fetchSpec)
}
}
return res
@@ -238,6 +239,11 @@ function fromURL (res) {
} else {
setGitCommittish(res, urlparse.hash != null ? urlparse.hash.slice(1) : '')
urlparse.protocol = urlparse.protocol.replace(/^git[+]/, '')
+ if (urlparse.protocol === 'file:' && /^git\+file:\/\/[a-z]:/i.test(res.rawSpec)) {
+ // keep the drive letter : on windows file paths
+ urlparse.host += ':'
+ urlparse.hostname += ':'
+ }
delete urlparse.hash
res.fetchSpec = url.format(urlparse)
}
diff --git a/node_modules/npm-package-arg/package.json b/node_modules/npm-package-arg/package.json
index 7bd5efeb4..7d978a4d4 100644
--- a/node_modules/npm-package-arg/package.json
+++ b/node_modules/npm-package-arg/package.json
@@ -1,41 +1,38 @@
{
- "_args": [
- [
- "npm-package-arg@6.1.0",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "npm-package-arg@6.1.0",
- "_id": "npm-package-arg@6.1.0",
+ "_from": "npm-package-arg@6.1.1",
+ "_id": "npm-package-arg@6.1.1",
"_inBundle": false,
- "_integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==",
+ "_integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==",
"_location": "/npm-package-arg",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "npm-package-arg@6.1.0",
+ "raw": "npm-package-arg@6.1.1",
"name": "npm-package-arg",
"escapedName": "npm-package-arg",
- "rawSpec": "6.1.0",
+ "rawSpec": "6.1.1",
"saveSpec": null,
- "fetchSpec": "6.1.0"
+ "fetchSpec": "6.1.1"
},
"_requiredBy": [
+ "#USER",
"/",
"/init-package-json",
"/libcipm",
- "/libnpmhook/npm-registry-fetch",
+ "/libnpm",
+ "/libnpmaccess",
+ "/libnpmpublish",
"/libnpx",
"/lock-verify",
"/npm-pick-manifest",
- "/npm-registry-client",
"/npm-registry-fetch",
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz",
- "_spec": "6.1.0",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz",
+ "_shasum": "02168cb0a49a2b75bf988a28698de7b529df5cb7",
+ "_spec": "npm-package-arg@6.1.1",
+ "_where": "/Users/isaacs/dev/npm/cli",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -44,17 +41,19 @@
"bugs": {
"url": "https://github.com/npm/npm-package-arg/issues"
},
+ "bundleDependencies": false,
"dependencies": {
- "hosted-git-info": "^2.6.0",
+ "hosted-git-info": "^2.7.1",
"osenv": "^0.1.5",
- "semver": "^5.5.0",
+ "semver": "^5.6.0",
"validate-npm-package-name": "^3.0.0"
},
+ "deprecated": false,
"description": "Parse the things that can be arguments to `npm install`",
"devDependencies": {
"standard": "^11.0.1",
- "standard-version": "^4.3.0",
- "tap": "^11.1.3",
+ "standard-version": "^4.4.0",
+ "tap": "^12.5.0",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.8"
},
@@ -77,9 +76,9 @@
"prerelease": "npm t",
"pretest": "standard",
"release": "standard-version -s",
- "test": "tap -J --coverage test/*.js",
+ "test": "tap --100 -J --coverage test/*.js",
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "6.1.0"
+ "version": "6.1.1"
}