From 8543fc3576f64e91f7946d4c56a5ffb045b55156 Mon Sep 17 00:00:00 2001 From: Audrey Eschright Date: Thu, 17 Jan 2019 16:18:39 -0800 Subject: [PATCH] pacote@9.4.0 --- node_modules/pacote/CHANGELOG.md | 10 ++++++++++ .../pacote/lib/fetchers/registry/manifest.js | 10 ++++++---- .../pacote/lib/fetchers/registry/packument.js | 10 +++++++++- node_modules/pacote/package.json | 20 +++++++++---------- package-lock.json | 6 +++--- package.json | 2 +- 6 files changed, 39 insertions(+), 19 deletions(-) diff --git a/node_modules/pacote/CHANGELOG.md b/node_modules/pacote/CHANGELOG.md index 520b51b7a509a..50a0dbde402cb 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. + +# [9.4.0](https://github.com/zkat/pacote/compare/v9.3.0...v9.4.0) (2019-01-14) + + +### Features + +* **registry:** fall back to fullfat if something might be wrong with corgis ([0e71d6b](https://github.com/zkat/pacote/commit/0e71d6b)) + + + # [9.3.0](https://github.com/zkat/pacote/compare/v9.2.3...v9.3.0) (2018-12-21) diff --git a/node_modules/pacote/lib/fetchers/registry/manifest.js b/node_modules/pacote/lib/fetchers/registry/manifest.js index dc7bdc76b18e2..d29ec71c3375e 100644 --- a/node_modules/pacote/lib/fetchers/registry/manifest.js +++ b/node_modules/pacote/lib/fetchers/registry/manifest.js @@ -16,9 +16,10 @@ function manifest (spec, opts) { } function getManifest (spec, opts) { - return fetchPackument(spec, opts.concat({ + opts = opts.concat({ fullMetadata: opts.enjoyBy ? true : opts.fullMetadata - })).then(packument => { + }) + return fetchPackument(spec, opts).then(packument => { try { return pickManifest(packument, spec.fetchSpec, { defaultTag: opts.defaultTag, @@ -29,14 +30,15 @@ function getManifest (spec, opts) { if (err.code === 'ETARGET' && packument._cached && !opts.offline) { opts.log.silly( 'registry:manifest', - `no matching version for ${spec.name}@${spec.fetchSpec} in the cache. Forcing revalidation` + `no matching version for ${spec.name}@${spec.fetchSpec} in the cache. Forcing revalidation.` ) opts = opts.concat({ preferOffline: false, preferOnline: true }) return fetchPackument(spec, opts.concat({ - fullMetadata: opts.enjoyBy ? true : opts.fullMetadata + // Fetch full metadata in case ETARGET was due to corgi delay + fullMetadata: true })).then(packument => { return pickManifest(packument, spec.fetchSpec, { defaultTag: opts.defaultTag, diff --git a/node_modules/pacote/lib/fetchers/registry/packument.js b/node_modules/pacote/lib/fetchers/registry/packument.js index bd067732c4b52..f5286c80371c3 100644 --- a/node_modules/pacote/lib/fetchers/registry/packument.js +++ b/node_modules/pacote/lib/fetchers/registry/packument.js @@ -59,7 +59,15 @@ function fetchPackument (uri, registry, spec, opts) { mem.set(memoKey, packument) } return packument - })) + })).catch(err => { + if (err.code === 'E404' && !opts.fullMetadata) { + return fetchPackument(uri, registry, spec, opts.concat({ + fullMetadata: true + })) + } else { + throw err + } + }) } class ObjProxy { diff --git a/node_modules/pacote/package.json b/node_modules/pacote/package.json index 48504d8fdbb32..32e8a07b094e1 100644 --- a/node_modules/pacote/package.json +++ b/node_modules/pacote/package.json @@ -1,8 +1,8 @@ { - "_from": "pacote@9.3.0", - "_id": "pacote@9.3.0", + "_from": "pacote@9.4.0", + "_id": "pacote@9.4.0", "_inBundle": false, - "_integrity": "sha512-uy5xghB5wUtmFS+uNhQGhlsIF9rfsfxw6Zsu2VpmSz4/f+8D2+5V1HwjHdSn7W6aQTrxNNmmoUF5qNE10/EVdA==", + "_integrity": "sha512-WQ1KL/phGMkedYEQx9ODsjj7xvwLSpdFJJdEXrLyw5SILMxcTNt5DTxT2Z93fXuLFYJBlZJdnwdalrQdB/rX5w==", "_location": "/pacote", "_phantomChildren": { "safe-buffer": "5.1.2" @@ -10,12 +10,12 @@ "_requested": { "type": "version", "registry": true, - "raw": "pacote@9.3.0", + "raw": "pacote@9.4.0", "name": "pacote", "escapedName": "pacote", - "rawSpec": "9.3.0", + "rawSpec": "9.4.0", "saveSpec": null, - "fetchSpec": "9.3.0" + "fetchSpec": "9.4.0" }, "_requiredBy": [ "#USER", @@ -23,9 +23,9 @@ "/libcipm", "/libnpm" ], - "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.3.0.tgz", - "_shasum": "ec0d21b739a625d81a19ae546386fedee3300bc1", - "_spec": "pacote@9.3.0", + "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.4.0.tgz", + "_shasum": "af979abdeb175cd347c3e33be3241af1ed254807", + "_spec": "pacote@9.4.0", "_where": "/Users/aeschright/code/cli", "author": { "name": "Kat Marchán", @@ -116,5 +116,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": "9.3.0" + "version": "9.4.0" } diff --git a/package-lock.json b/package-lock.json index deee5e1ae4c31..06882c2440651 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6170,9 +6170,9 @@ } }, "pacote": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.3.0.tgz", - "integrity": "sha512-uy5xghB5wUtmFS+uNhQGhlsIF9rfsfxw6Zsu2VpmSz4/f+8D2+5V1HwjHdSn7W6aQTrxNNmmoUF5qNE10/EVdA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.4.0.tgz", + "integrity": "sha512-WQ1KL/phGMkedYEQx9ODsjj7xvwLSpdFJJdEXrLyw5SILMxcTNt5DTxT2Z93fXuLFYJBlZJdnwdalrQdB/rX5w==", "requires": { "bluebird": "^3.5.3", "cacache": "^11.3.2", diff --git a/package.json b/package.json index f2c1fbb21d403..2c6d6b7066cf2 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "once": "~1.4.0", "opener": "^1.5.1", "osenv": "^0.1.5", - "pacote": "^9.3.0", + "pacote": "^9.4.0", "path-is-inside": "~1.0.2", "promise-inflight": "~1.0.1", "qrcode-terminal": "^0.12.0",