diff options
Diffstat (limited to 'deps/npm/node_modules/pacote/node_modules/make-fetch-happen/index.js')
-rw-r--r-- | deps/npm/node_modules/pacote/node_modules/make-fetch-happen/index.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/index.js index 18a2893538..d82811b63d 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/index.js +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/index.js @@ -42,9 +42,22 @@ cachingFetch.defaults = function (_uri, _opts) { } defaultedFetch.defaults = fetch.defaults + defaultedFetch.delete = fetch.delete return defaultedFetch } +cachingFetch.delete = cacheDelete +function cacheDelete (uri, opts) { + opts = configureOptions(opts) + if (opts.cacheManager) { + const req = new fetch.Request(uri, { + method: opts.method, + headers: opts.headers + }) + return opts.cacheManager.delete(req, opts) + } +} + function initializeCache (opts) { if (typeof opts.cacheManager === 'string') { if (!Cache) { |