Skip to content

Commit

Permalink
Explicitly add stream to cache
Browse files Browse the repository at this point in the history
Pacote doesn't do this automatically anymore

Closes npm/pacote#73 & Closes npm#2160
  • Loading branch information
mjsir911 committed Mar 27, 2021
1 parent ffead4a commit e05b741
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,9 @@ with --force.`)

log.silly('cache add', 'spec', spec)

// we ask pacote for the thing, and then just throw the data
// away so that it tee-pipes it into the cache like it does
// for a normal request.
await pacote.tarball.stream(spec, stream => {
stream.resume()
cacache.put.stream(opts.cache, stream, opts)
return stream.promise()
}, this.npm.flatOptions)
}
Expand Down

0 comments on commit e05b741

Please sign in to comment.