Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
PR-URL: #381
Credit: @wraithgar
Close: #381
Reviewed-by: @isaacs
  • Loading branch information
wraithgar authored and isaacs committed May 2, 2023
1 parent 75d3081 commit 4cbdd67
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions lib/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions lib/read-entry.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/write-entry.js
Original file line number Diff line number Diff line change
@@ -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')
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions test/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions test/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions test/unpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4cbdd67

Please sign in to comment.