diff --git a/lib/pack.js b/lib/pack.js index a3f4ff22..938ece8e 100644 --- a/lib/pack.js +++ b/lib/pack.js @@ -22,7 +22,7 @@ class PackJob { } } -const MiniPass = require('minipass') +const { Minipass } = require('minipass') const zlib = require('minizlib') const ReadEntry = require('./read-entry.js') const WriteEntry = require('./write-entry.js') @@ -56,7 +56,7 @@ const path = require('path') const warner = require('./warn-mixin.js') const normPath = require('./normalize-windows-path.js') -const Pack = warner(class Pack extends MiniPass { +const Pack = warner(class Pack extends Minipass { constructor (opt) { super(opt) opt = opt || Object.create(null) diff --git a/lib/read-entry.js b/lib/read-entry.js index 7f44bebf..6186266e 100644 --- a/lib/read-entry.js +++ b/lib/read-entry.js @@ -1,9 +1,9 @@ 'use strict' -const MiniPass = require('minipass') +const { Minipass } = require('minipass') const normPath = require('./normalize-windows-path.js') const SLURP = Symbol('slurp') -module.exports = class ReadEntry extends MiniPass { +module.exports = class ReadEntry extends Minipass { constructor (header, ex, gex) { super() // read entries always start life paused. this is to avoid the diff --git a/lib/write-entry.js b/lib/write-entry.js index 3b5540f7..7d2f3eb1 100644 --- a/lib/write-entry.js +++ b/lib/write-entry.js @@ -1,5 +1,5 @@ 'use strict' -const MiniPass = require('minipass') +const { Minipass } = require('minipass') const Pax = require('./pax.js') const Header = require('./header.js') const fs = require('fs') @@ -41,7 +41,7 @@ const stripAbsolutePath = require('./strip-absolute-path.js') const modeFix = require('./mode-fix.js') -const WriteEntry = warner(class WriteEntry extends MiniPass { +const WriteEntry = warner(class WriteEntry extends Minipass { constructor (p, opt) { opt = opt || {} super(opt) @@ -417,7 +417,7 @@ class WriteEntrySync extends WriteEntry { } } -const WriteEntryTar = warner(class WriteEntryTar extends MiniPass { +const WriteEntryTar = warner(class WriteEntryTar extends Minipass { constructor (readEntry, opt) { opt = opt || {} super(opt) diff --git a/package.json b/package.json index 221410af..f80a297a 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^4.0.0", + "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" diff --git a/test/pack.js b/test/pack.js index 8906ae30..28dbbf01 100644 --- a/test/pack.js +++ b/test/pack.js @@ -12,7 +12,7 @@ const Header = require('../lib/header.js') const zlib = require('zlib') const miniz = require('minizlib') const mutateFS = require('mutate-fs') -const MiniPass = require('minipass') +const { Minipass } = require('minipass') process.env.USER = 'isaacs' const EE = require('events').EventEmitter const rimraf = require('rimraf') @@ -563,8 +563,8 @@ t.test('readdir fail', t => { t.test('pipe into a slow reader', t => { const out = [] - const mp = new MiniPass() - const mp2 = new MiniPass() + const mp = new Minipass() + const mp2 = new Minipass() const p = new Pack({ cwd: files }).add('long-path').end() p.pause() p.pipe(mp).pipe(mp2) diff --git a/test/parse.js b/test/parse.js index 97705e42..3066f7e8 100644 --- a/test/parse.js +++ b/test/parse.js @@ -7,12 +7,12 @@ const fs = require('fs') const path = require('path') const tardir = path.resolve(__dirname, 'fixtures/tars') const zlib = require('zlib') -const MiniPass = require('minipass') +const { Minipass } = require('minipass') const Header = require('../lib/header.js') const EE = require('events').EventEmitter t.test('fixture tests', t => { - class ByteStream extends MiniPass { + class ByteStream extends Minipass { write (chunk) { for (let i = 0; i < chunk.length - 1; i++) { super.write(chunk.slice(i, i + 1)) @@ -604,7 +604,7 @@ t.test('end while consuming', t => { 'package/node_modules/b/package.json', ] - const mp = new MiniPass() + const mp = new Minipass() const p = new Parse({ onentry: entry => { actual.push(entry.path) diff --git a/test/unpack.js b/test/unpack.js index b23aab3d..2d75c946 100644 --- a/test/unpack.js +++ b/test/unpack.js @@ -5,7 +5,7 @@ process.umask(0o022) const Unpack = require('../lib/unpack.js') const UnpackSync = Unpack.Sync const t = require('tap') -const MiniPass = require('minipass') +const { Minipass } = require('minipass') const makeTar = require('./make-tar.js') const Header = require('../lib/header.js') @@ -2252,7 +2252,7 @@ t.test('transform', t => { } } - class Bracer extends MiniPass { + class Bracer extends Minipass { write (data) { const d = data.toString().split('').map(c => '[' + c + ']').join('') return super.write(d) @@ -2324,7 +2324,7 @@ t.test('transform error', t => { const poop = new Error('poop') const txFn = () => { - const tx = new MiniPass() + const tx = new Minipass() tx.write = () => tx.emit('error', poop) tx.resume() return tx