diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2017-06-09 08:17:46 +0300 |
---|---|---|
committer | Kat Marchán <kzm@sykosomatic.org> | 2017-06-09 08:17:46 +0300 |
commit | 2b1e40efba0b3d1004259efa4275cf42144e3ce3 (patch) | |
tree | 14a151d9a7551727ea1ddc7fc1f9f20a4bf1f6c2 /node_modules | |
parent | 80c33cf5e6ef207450949764de41ea96538c636e (diff) |
git: bump pacote for git shallow clone fix
Fixes: https://github.com/npm/npm/issues/16898
Diffstat (limited to 'node_modules')
-rw-r--r-- | node_modules/pacote/CHANGELOG.md | 10 | ||||
-rw-r--r-- | node_modules/pacote/lib/fetchers/git.js | 8 | ||||
-rw-r--r-- | node_modules/pacote/package.json | 22 |
3 files changed, 26 insertions, 14 deletions
diff --git a/node_modules/pacote/CHANGELOG.md b/node_modules/pacote/CHANGELOG.md index 882017226..6f49016c2 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.34"></a> +## [2.7.34](https://github.com/zkat/pacote/compare/v2.7.33...v2.7.34) (2017-06-09) + + +### Bug Fixes + +* **git:** whitelist specific shallow-cloneable hosts ([b210cc8](https://github.com/zkat/pacote/commit/b210cc8)) + + + <a name="2.7.33"></a> ## [2.7.33](https://github.com/zkat/pacote/compare/v2.7.32...v2.7.33) (2017-06-08) diff --git a/node_modules/pacote/lib/fetchers/git.js b/node_modules/pacote/lib/fetchers/git.js index 9da6a6438..a5f51cd6c 100644 --- a/node_modules/pacote/lib/fetchers/git.js +++ b/node_modules/pacote/lib/fetchers/git.js @@ -65,7 +65,7 @@ Fetcher.impl(fetchGit, { return withTmp(opts, tmp => { if (streamError) { throw streamError } return cloneRepo( - manifest._repo, manifest._ref, manifest._rawRef, tmp, opts + spec, manifest._repo, manifest._ref, manifest._rawRef, tmp, opts ).then(HEAD => { if (streamError) { throw streamError } manifest._resolved = spec.saveSpec.replace(/(:?#.*)?$/, `#${HEAD}`) @@ -158,8 +158,10 @@ function withTmp (opts, cb) { } } -function cloneRepo (repo, resolvedRef, rawRef, tmp, opts) { - if (resolvedRef) { +// Only certain whitelisted hosted gits support shadow cloning +const SHALLOW_HOSTS = new Set(['github', 'gist', 'gitlab', 'bitbucket']) +function cloneRepo (spec, repo, resolvedRef, rawRef, tmp, opts) { + if (resolvedRef && spec.hosted && SHALLOW_HOSTS.has(spec.hosted.type)) { return git.shallow(repo, resolvedRef.ref, tmp, opts) } else { return git.clone(repo, rawRef, tmp, opts) diff --git a/node_modules/pacote/package.json b/node_modules/pacote/package.json index 15d926187..6e666f3a4 100644 --- a/node_modules/pacote/package.json +++ b/node_modules/pacote/package.json @@ -1,8 +1,8 @@ { - "_from": "pacote@2.7.33", - "_id": "pacote@2.7.33", + "_from": "pacote@2.7.34", + "_id": "pacote@2.7.34", "_inBundle": false, - "_integrity": "sha512-CvPBNmLl+wFJzZ74GTf7y6PO0RC49Ht6iah+fY7Qk/6t+Y3HMoi1XZcKfPk46We9oUFiA5zQTzRazvdaiU8rAQ==", + "_integrity": "sha512-7ckPYopKYndv/7KLMrEFzRZtNI008JsyxH6h8vVMgdnpCW1dDEie1iUqxoP/Ln0nWSPHEWA789YUBsiGx4p2NQ==", "_location": "/pacote", "_phantomChildren": { "cacache": "9.2.8", @@ -10,7 +10,7 @@ "lru-cache": "4.0.2", "mississippi": "1.3.0", "mkdirp": "0.5.1", - "npm-package-arg": "5.1.1", + "npm-package-arg": "5.1.2", "once": "1.4.0", "readable-stream": "2.2.10", "retry": "0.10.1", @@ -21,20 +21,20 @@ "_requested": { "type": "version", "registry": true, - "raw": "pacote@2.7.33", + "raw": "pacote@2.7.34", "name": "pacote", "escapedName": "pacote", - "rawSpec": "2.7.33", + "rawSpec": "2.7.34", "saveSpec": null, - "fetchSpec": "2.7.33" + "fetchSpec": "2.7.34" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/pacote/-/pacote-2.7.33.tgz", - "_shasum": "4a316d7c369fa6eed679a323ac2a98eec129e250", - "_spec": "pacote@2.7.33", + "_resolved": "https://registry.npmjs.org/pacote/-/pacote-2.7.34.tgz", + "_shasum": "57d316284901d1830833137d51dc148be3efbfcc", + "_spec": "pacote@2.7.34", "_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.33" + "version": "2.7.34" } |