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:
authorKat Marchán <kzm@sykosomatic.org>2017-06-01 07:11:20 +0300
committerKat Marchán <kzm@sykosomatic.org>2017-06-01 07:11:20 +0300
commit1f26e9567a6d14088704e121ebe787c38b6849a4 (patch)
tree5604ed67d82c24eb789b8a7ca68acc639fb30433 /node_modules
parent19397ad523434656af3d3765e80e22d7e6305f48 (diff)
pacote@2.7.27
This fixes semver-looking git committishes. Credit: @zkat
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/pacote/CHANGELOG.md10
-rw-r--r--node_modules/pacote/lib/fetchers/git.js13
-rw-r--r--node_modules/pacote/package.json20
3 files changed, 26 insertions, 17 deletions
diff --git a/node_modules/pacote/CHANGELOG.md b/node_modules/pacote/CHANGELOG.md
index 259b6982f..33ba50715 100644
--- a/node_modules/pacote/CHANGELOG.md
+++ b/node_modules/pacote/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="2.7.27"></a>
+## [2.7.27](https://github.com/zkat/pacote/compare/v2.7.26...v2.7.27) (2017-06-01)
+
+
+### Bug Fixes
+
+* **git:** fix semver range detection. oops ([76d9233](https://github.com/zkat/pacote/commit/76d9233))
+
+
+
<a name="2.7.26"></a>
## [2.7.26](https://github.com/zkat/pacote/compare/v2.7.25...v2.7.26) (2017-06-01)
diff --git a/node_modules/pacote/lib/fetchers/git.js b/node_modules/pacote/lib/fetchers/git.js
index 7787e2ef4..9da6a6438 100644
--- a/node_modules/pacote/lib/fetchers/git.js
+++ b/node_modules/pacote/lib/fetchers/git.js
@@ -15,7 +15,6 @@ const PassThrough = require('stream').PassThrough
const path = require('path')
const pipe = BB.promisify(require('mississippi').pipe)
const rimraf = BB.promisify(require('rimraf'))
-const semver = require('semver')
const uniqueFilename = require('unique-filename')
// `git` dependencies are fetched from git repositories and packed up.
@@ -102,7 +101,7 @@ function hostedManifest (spec, opts) {
function plainManifest (repo, spec, opts) {
const rawRef = spec.gitCommittish || spec.gitRange
return resolve(
- repo, rawRef, spec.name, opts
+ repo, spec, spec.name, opts
).then(ref => {
if (ref) {
const resolved = spec.saveSpec.replace(/(?:#.*)?$/, `#${ref.sha}`)
@@ -111,7 +110,7 @@ function plainManifest (repo, spec, opts) {
_resolved: resolved,
_spec: spec,
_ref: ref,
- _rawRef: rawRef,
+ _rawRef: spec.gitCommittish || spec.gitRange,
_uniqueResolved: resolved
}
} else {
@@ -130,18 +129,18 @@ function plainManifest (repo, spec, opts) {
})
}
-function resolve (url, rawRef, name, opts) {
- const isSemver = semver.validRange(rawRef)
+function resolve (url, spec, name, opts) {
+ const isSemver = !!spec.gitRange
return git.revs(url, opts).then(remoteRefs => {
return isSemver
? pickManifest({
versions: remoteRefs.versions,
'dist-tags': remoteRefs['dist-tags'],
name: name
- }, rawRef, opts)
+ }, spec.gitRange, opts)
: remoteRefs
? BB.resolve(
- remoteRefs.refs[rawRef] || remoteRefs.refs[remoteRefs.shas[rawRef]]
+ remoteRefs.refs[spec.gitCommittish] || remoteRefs.refs[remoteRefs.shas[spec.gitCommittish]]
)
: null
})
diff --git a/node_modules/pacote/package.json b/node_modules/pacote/package.json
index 70970a168..b7aa3c44d 100644
--- a/node_modules/pacote/package.json
+++ b/node_modules/pacote/package.json
@@ -1,8 +1,8 @@
{
- "_from": "pacote@2.7.26",
- "_id": "pacote@2.7.26",
+ "_from": "pacote@2.7.27",
+ "_id": "pacote@2.7.27",
"_inBundle": false,
- "_integrity": "sha512-/DT9ehDr49F+6lMNXHvEe/AjTxYgT+jejGtK7wFLAKaYsxdTqewpncXvm3jzYAOF2tEfAwA54duktrA7JkCH+g==",
+ "_integrity": "sha512-NDMlLoiBu08GSnysuFxyoFpgd1fcO2vAFMr/JG/oPsr7m8B9sRfp2ozHpaXjgo0JonzxsEZr0WFm6SauZ1Rvww==",
"_location": "/pacote",
"_phantomChildren": {
"cacache": "9.2.6",
@@ -21,20 +21,20 @@
"_requested": {
"type": "version",
"registry": true,
- "raw": "pacote@2.7.26",
+ "raw": "pacote@2.7.27",
"name": "pacote",
"escapedName": "pacote",
- "rawSpec": "2.7.26",
+ "rawSpec": "2.7.27",
"saveSpec": null,
- "fetchSpec": "2.7.26"
+ "fetchSpec": "2.7.27"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/pacote/-/pacote-2.7.26.tgz",
- "_shasum": "3a3fa8921c00e0d27299c0c1288e32d148b1a73c",
- "_spec": "pacote@2.7.26",
+ "_resolved": "https://registry.npmjs.org/pacote/-/pacote-2.7.27.tgz",
+ "_shasum": "ab3a7e6b584d351c9d19bfe76b0b420f7013eff6",
+ "_spec": "pacote@2.7.27",
"_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "Kat Marchán",
@@ -120,5 +120,5 @@
"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": "2.7.26"
+ "version": "2.7.27"
}