cacache 16.1.1 → 16.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -81,7 +81,7 @@ function readStream (cache, integrity, opts = {}) {
81
81
  return stream.emit('error', sizeError(size, stat.size))
82
82
  }
83
83
 
84
- readPipeline(cpath, stat.size, sri, stream)
84
+ return readPipeline(cpath, stat.size, sri, stream)
85
85
  }).catch(err => stream.emit('error', err))
86
86
 
87
87
  return stream
@@ -80,9 +80,11 @@ class CacacheWriteStream extends Flush {
80
80
  // defer this one tick by rejecting a promise on it.
81
81
  return Promise.reject(e).catch(cb)
82
82
  }
83
+ // eslint-disable-next-line promise/catch-or-return
83
84
  this.handleContentP.then(
84
85
  (res) => {
85
86
  res.integrity && this.emit('integrity', res.integrity)
87
+ // eslint-disable-next-line promise/always-return
86
88
  res.size !== null && this.emit('size', res.size)
87
89
  cb()
88
90
  },
@@ -285,6 +285,7 @@ function lsStream (cache) {
285
285
  }))
286
286
  }))
287
287
  stream.end()
288
+ return stream
288
289
  }).catch(err => stream.emit('error', err))
289
290
 
290
291
  return stream
package/lib/get.js CHANGED
@@ -155,6 +155,7 @@ function getStream (cache, key, opts = {}) {
155
155
  stream.unshift(memoStream)
156
156
  }
157
157
  stream.unshift(src)
158
+ return stream
158
159
  }).catch((err) => stream.emit('error', err))
159
160
 
160
161
  return stream
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cacache",
3
- "version": "16.1.1",
3
+ "version": "16.1.2",
4
4
  "cache-version": {
5
5
  "content": "2",
6
6
  "index": "5"