diff --git a/lib/fetcher.js b/lib/fetcher.js index 0ce7aedb..786fd9d8 100644 --- a/lib/fetcher.js +++ b/lib/fetcher.js @@ -10,7 +10,7 @@ const cacache = require('cacache') const fsm = require('fs-minipass') const getContents = require('@npmcli/installed-package-contents') const npa = require('npm-package-arg') -const retry = require('promise-retry') +const { promiseRetry } = require('@gar/promise-retry') const ssri = require('ssri') const tar = require('tar') const { Minipass } = require('minipass') @@ -319,7 +319,7 @@ class FetcherBase { this.spec }. Extracting by manifest.`) } - return this.resolve().then(() => retry(tryAgain => + return this.resolve().then(() => promiseRetry(tryAgain => streamHandler(this.#istream(this[_.tarballFromResolved]())) .catch(streamErr => { // Most likely data integrity. A cache ENOENT error is unlikely diff --git a/package.json b/package.json index 3a1eafd4..93f8f37c 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "git" ], "dependencies": { + "@gar/promise-retry": "^1.0.0", "@npmcli/git": "^7.0.0", "@npmcli/installed-package-contents": "^4.0.0", "@npmcli/package-json": "^7.0.0", @@ -59,7 +60,6 @@ "npm-pick-manifest": "^11.0.1", "npm-registry-fetch": "^19.0.0", "proc-log": "^6.0.0", - "promise-retry": "^2.0.1", "sigstore": "^4.0.0", "ssri": "^13.0.0", "tar": "^7.4.3"