From 64f0105e81352b42b72900d83b437b90afc6d9ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Mon, 5 Jun 2017 23:40:53 -0700 Subject: deps: bump pacote to fix local-cache header issue Fixes: #17008 --- node_modules/pacote/CHANGELOG.md | 11 ++++++++++ node_modules/pacote/extract.js | 4 ++-- .../pacote/lib/fetchers/registry/manifest.js | 2 +- .../pacote/lib/fetchers/registry/tarball.js | 5 ++++- .../node_modules/make-fetch-happen/CHANGELOG.md | 10 +++++++++ .../pacote/node_modules/make-fetch-happen/cache.js | 6 +++--- .../node_modules/make-fetch-happen/package.json | 20 +++++++++--------- node_modules/pacote/package.json | 24 +++++++++++----------- 8 files changed, 53 insertions(+), 29 deletions(-) (limited to 'node_modules') 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. + +## [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)) + + + ## [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. + +## [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)) + + + ## [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" } -- cgit v1.2.3