diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2017-06-06 09:40:53 +0300 |
---|---|---|
committer | Kat Marchán <kzm@sykosomatic.org> | 2017-06-06 09:40:53 +0300 |
commit | 64f0105e81352b42b72900d83b437b90afc6d9ce (patch) | |
tree | 0c1cf08bc29b848e9e1c14aac860d371b152344c | |
parent | bfe44d40130a16d69faa69eb854c585f62411e45 (diff) |
deps: bump pacote to fix local-cache header issue
Fixes: #17008
-rw-r--r-- | node_modules/pacote/CHANGELOG.md | 11 | ||||
-rw-r--r-- | node_modules/pacote/extract.js | 4 | ||||
-rw-r--r-- | node_modules/pacote/lib/fetchers/registry/manifest.js | 2 | ||||
-rw-r--r-- | node_modules/pacote/lib/fetchers/registry/tarball.js | 5 | ||||
-rw-r--r-- | node_modules/pacote/node_modules/make-fetch-happen/CHANGELOG.md | 10 | ||||
-rw-r--r-- | node_modules/pacote/node_modules/make-fetch-happen/cache.js | 6 | ||||
-rw-r--r-- | node_modules/pacote/node_modules/make-fetch-happen/package.json | 20 | ||||
-rw-r--r-- | node_modules/pacote/package.json | 24 | ||||
-rw-r--r-- | package-lock.json | 12 | ||||
-rw-r--r-- | package.json | 2 |
10 files changed, 60 insertions, 36 deletions
diff --git a/node_modules/pacote/CHANGELOG.md b/node_modules/pacote/CHANGELOG.md index 7f7eac282..b97ecf26f 100644 --- a/node_modules/pacote/CHANGELOG.md +++ b/node_modules/pacote/CHANGELOG.md @@ -2,6 +2,17 @@ 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.31"></a> +## [2.7.31](https://github.com/zkat/pacote/compare/v2.7.30...v2.7.31) (2017-06-06) + + +### Bug Fixes + +* **extract:** always return a bluebird promise ([06ca91d](https://github.com/zkat/pacote/commit/06ca91d)) +* **registry:** bump make-fetch-happen for local cache header issue fix ([868615c](https://github.com/zkat/pacote/commit/868615c)) + + + <a name="2.7.30"></a> ## [2.7.30](https://github.com/zkat/pacote/compare/v2.7.29...v2.7.30) (2017-06-05) diff --git a/node_modules/pacote/extract.js b/node_modules/pacote/extract.js index 79a410167..01036519a 100644 --- a/node_modules/pacote/extract.js +++ b/node_modules/pacote/extract.js @@ -36,7 +36,7 @@ function extract (spec, dest, opts) { }) } else { opts.log.silly('pacote', 'no tarball hash provided for', spec.name, '- extracting by manifest') - return retry((tryAgain, attemptNum) => { + return BB.resolve(retry((tryAgain, attemptNum) => { return extractByManifest( startTime, spec, dest, opts ).catch(err => { @@ -54,7 +54,7 @@ function extract (spec, dest, opts) { throw err } }) - }, {retries: 1}) + }, {retries: 1})) } } diff --git a/node_modules/pacote/lib/fetchers/registry/manifest.js b/node_modules/pacote/lib/fetchers/registry/manifest.js index febebfbde..be67c2e45 100644 --- a/node_modules/pacote/lib/fetchers/registry/manifest.js +++ b/node_modules/pacote/lib/fetchers/registry/manifest.js @@ -88,7 +88,7 @@ function fetchPackument (uri, spec, registry, opts) { // Force integrity to null: we never check integrity hashes for manifests integrity: null })).then(res => res.json().then(packument => { - packument._cached = res.headers.has('x-local-cache') + packument._cached = decodeURIComponent(res.headers.has('x-local-cache')) packument._contentLength = +res.headers.get('content-length') // NOTE - we need to call pickMem again because proxy // objects get reused! diff --git a/node_modules/pacote/lib/fetchers/registry/tarball.js b/node_modules/pacote/lib/fetchers/registry/tarball.js index 8ad2b6860..2c63872e7 100644 --- a/node_modules/pacote/lib/fetchers/registry/tarball.js +++ b/node_modules/pacote/lib/fetchers/registry/tarball.js @@ -51,7 +51,10 @@ function fromManifest (manifest, spec, opts) { ], spec }, opts)).then(res => { - stream.emit('integrity', res.headers.get('x-local-cache-hash')) + const hash = res.headers.get('x-local-cache-hash') + if (hash) { + stream.emit('integrity', decodeURIComponent(hash)) + } res.body.on('error', err => stream.emit('error', err)) res.body.pipe(stream) }).catch(err => stream.emit('error', err)) diff --git a/node_modules/pacote/node_modules/make-fetch-happen/CHANGELOG.md b/node_modules/pacote/node_modules/make-fetch-happen/CHANGELOG.md index 54d88f339..93a9f3e79 100644 --- a/node_modules/pacote/node_modules/make-fetch-happen/CHANGELOG.md +++ b/node_modules/pacote/node_modules/make-fetch-happen/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.4.12"></a> +## [2.4.12](https://github.com/zkat/make-fetch-happen/compare/v2.4.11...v2.4.12) (2017-06-06) + + +### Bug Fixes + +* **cache:** encode x-local-cache-etc headers to be header-safe ([dc9fb1b](https://github.com/zkat/make-fetch-happen/commit/dc9fb1b)) + + + <a name="2.4.11"></a> ## [2.4.11](https://github.com/zkat/make-fetch-happen/compare/v2.4.10...v2.4.11) (2017-06-05) diff --git a/node_modules/pacote/node_modules/make-fetch-happen/cache.js b/node_modules/pacote/node_modules/make-fetch-happen/cache.js index 9aeae6b2f..edb9b3d03 100644 --- a/node_modules/pacote/node_modules/make-fetch-happen/cache.js +++ b/node_modules/pacote/node_modules/make-fetch-happen/cache.js @@ -250,8 +250,8 @@ function matchDetails (req, cached) { } function addCacheHeaders (resHeaders, path, key, hash, time) { - resHeaders.set('X-Local-Cache', path) - resHeaders.set('X-Local-Cache-Key', key) - resHeaders.set('X-Local-Cache-Hash', hash) + resHeaders.set('X-Local-Cache', encodeURIComponent(path)) + resHeaders.set('X-Local-Cache-Key', encodeURIComponent(key)) + resHeaders.set('X-Local-Cache-Hash', encodeURIComponent(hash)) resHeaders.set('X-Local-Cache-Time', new Date(time).toUTCString()) } diff --git a/node_modules/pacote/node_modules/make-fetch-happen/package.json b/node_modules/pacote/node_modules/make-fetch-happen/package.json index 376072235..f48dad65c 100644 --- a/node_modules/pacote/node_modules/make-fetch-happen/package.json +++ b/node_modules/pacote/node_modules/make-fetch-happen/package.json @@ -1,8 +1,8 @@ { - "_from": "make-fetch-happen@^2.4.11", - "_id": "make-fetch-happen@2.4.11", + "_from": "make-fetch-happen@^2.4.12", + "_id": "make-fetch-happen@2.4.12", "_inBundle": false, - "_integrity": "sha512-3dbl9CVS9Y0hqVzcD5HBYnaNUGw3XWpmeTqGT6ACRrmKS7WKwSDfv5+Gd1K0X/Mt52hsvZwtOH8hrNIulYkhag==", + "_integrity": "sha512-7nqjivrk3WElOcoikc8tvRM3appfY2G6DO/rrRS86dxJE/DuO6QuPJqNkXmPf+DqVTeO+tmBqrtEjEqMWR2WSw==", "_location": "/pacote/make-fetch-happen", "_phantomChildren": { "safe-buffer": "5.1.0" @@ -10,19 +10,19 @@ "_requested": { "type": "range", "registry": true, - "raw": "make-fetch-happen@^2.4.11", + "raw": "make-fetch-happen@^2.4.12", "name": "make-fetch-happen", "escapedName": "make-fetch-happen", - "rawSpec": "^2.4.11", + "rawSpec": "^2.4.12", "saveSpec": null, - "fetchSpec": "^2.4.11" + "fetchSpec": "^2.4.12" }, "_requiredBy": [ "/pacote" ], - "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.4.11.tgz", - "_shasum": "0b29967da2dc995e88f778dd0c673855ec7613e3", - "_spec": "make-fetch-happen@^2.4.11", + "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.4.12.tgz", + "_shasum": "5e16f97b3e1fc30017da82ba4b4a5529e773f399", + "_spec": "make-fetch-happen@^2.4.12", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote", "author": { "name": "Kat Marchán", @@ -92,5 +92,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.4.11" + "version": "2.4.12" } diff --git a/node_modules/pacote/package.json b/node_modules/pacote/package.json index 44e5b7eca..3ae047a7a 100644 --- a/node_modules/pacote/package.json +++ b/node_modules/pacote/package.json @@ -1,8 +1,8 @@ { - "_from": "pacote@2.7.30", - "_id": "pacote@2.7.30", + "_from": "pacote@2.7.31", + "_id": "pacote@2.7.31", "_inBundle": false, - "_integrity": "sha512-xFxozbxytemyfNPZmkL2seTD15mozK8ghov9npjBO4YTs3SnA8I55aiN94eZJ+XhLKzbN8yXqQMr9ti4c3WIDw==", + "_integrity": "sha512-POj+CFlJ5tb9W1QS0INbUibVOHPHuA4ei3ClpcVULsm1dYKOCs0WrgvtdtsKB6o/cjbd01JQivbgffvkjtn0LQ==", "_location": "/pacote", "_phantomChildren": { "cacache": "9.2.8", @@ -21,20 +21,20 @@ "_requested": { "type": "version", "registry": true, - "raw": "pacote@2.7.30", + "raw": "pacote@2.7.31", "name": "pacote", "escapedName": "pacote", - "rawSpec": "2.7.30", + "rawSpec": "2.7.31", "saveSpec": null, - "fetchSpec": "2.7.30" + "fetchSpec": "2.7.31" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/pacote/-/pacote-2.7.30.tgz", - "_shasum": "f31678e0a40161b592498688c1e2c8d7918eac7e", - "_spec": "pacote@2.7.30", + "_resolved": "https://registry.npmjs.org/pacote/-/pacote-2.7.31.tgz", + "_shasum": "340144d11b54a0a0f5413390cda80ef867f46c2b", + "_spec": "pacote@2.7.31", "_where": "/Users/zkat/Documents/code/npm", "author": { "name": "Kat Marchán", @@ -59,7 +59,7 @@ "cacache": "^9.2.8", "glob": "^7.1.2", "lru-cache": "^4.0.2", - "make-fetch-happen": "^2.4.11", + "make-fetch-happen": "^2.4.12", "minimatch": "^3.0.4", "mississippi": "^1.2.0", "normalize-package-data": "^2.3.6", @@ -87,7 +87,7 @@ "require-inject": "^1.4.0", "rimraf": "^2.5.4", "standard": "^10.0.1", - "standard-version": "^4.0.0", + "standard-version": "^4.1.0", "tacks": "^1.2.6", "tap": "^10.3.3", "weallbehave": "^1.2.0", @@ -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.30" + "version": "2.7.31" } diff --git a/package-lock.json b/package-lock.json index 45939c6d2..3fd555371 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1300,14 +1300,14 @@ } }, "pacote": { - "version": "2.7.30", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-2.7.30.tgz", - "integrity": "sha512-xFxozbxytemyfNPZmkL2seTD15mozK8ghov9npjBO4YTs3SnA8I55aiN94eZJ+XhLKzbN8yXqQMr9ti4c3WIDw==", + "version": "2.7.31", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-2.7.31.tgz", + "integrity": "sha512-POj+CFlJ5tb9W1QS0INbUibVOHPHuA4ei3ClpcVULsm1dYKOCs0WrgvtdtsKB6o/cjbd01JQivbgffvkjtn0LQ==", "dependencies": { "make-fetch-happen": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.4.11.tgz", - "integrity": "sha512-3dbl9CVS9Y0hqVzcD5HBYnaNUGw3XWpmeTqGT6ACRrmKS7WKwSDfv5+Gd1K0X/Mt52hsvZwtOH8hrNIulYkhag==", + "version": "2.4.12", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.4.12.tgz", + "integrity": "sha512-7nqjivrk3WElOcoikc8tvRM3appfY2G6DO/rrRS86dxJE/DuO6QuPJqNkXmPf+DqVTeO+tmBqrtEjEqMWR2WSw==", "dependencies": { "agentkeepalive": { "version": "3.1.0", diff --git a/package.json b/package.json index ba61cdda8..69fda83ab 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "once": "~1.4.0", "opener": "~1.4.3", "osenv": "~0.1.4", - "pacote": "~2.7.30", + "pacote": "~2.7.31", "path-is-inside": "~1.0.2", "promise-inflight": "~1.0.1", "read": "~1.0.7", |