File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,14 @@ export class Pack
92
92
93
93
[ WRITEENTRYCLASS ] : typeof WriteEntry | typeof WriteEntrySync
94
94
onWriteEntry ?: ( entry : WriteEntry ) => void ;
95
+ // Note: we actually DO need a linked list here, because we
96
+ // shift() to update the head of the list where we start, but still
97
+ // while that happens, need to know what the next item in the queue
98
+ // will be. Since we do multiple jobs in parallel, it's not as simple
99
+ // as just an Array.shift(), since that would lose the information about
100
+ // the next job in the list. We could add a .next field on the PackJob
101
+ // class, but then we'd have to be tracking the tail of the queue the
102
+ // whole time, and Yallist just does that for us anyway.
95
103
[ QUEUE ] : Yallist < PackJob > ;
96
104
[ JOBS ] : number = 0 ;
97
105
[ PROCESSING ] : boolean = false ;
Original file line number Diff line number Diff line change 2
2
// the full 512 bytes of a header to come in. We will Buffer.concat()
3
3
// it to the next write(), which is a mem copy, but a small one.
4
4
//
5
- // this[QUEUE] is a Yallist of entries that haven't been emitted
5
+ // this[QUEUE] is a list of entries that haven't been emitted
6
6
// yet this can only get filled up if the user keeps write()ing after
7
7
// a write() returns false, or does a write() with more than one entry
8
8
//
20
20
21
21
import { EventEmitter as EE } from 'events'
22
22
import { BrotliDecompress , Unzip } from 'minizlib'
23
- import { Yallist } from 'yallist'
24
23
import { Header } from './header.js'
25
24
import { TarOptions } from './options.js'
26
25
import { Pax } from './pax.js'
@@ -79,8 +78,7 @@ export class Parser extends EE implements Warner {
79
78
writable : true = true
80
79
readable : false = false ;
81
80
82
- [ QUEUE ] : Yallist < ReadEntry | [ string | symbol , any , any ] > =
83
- new Yallist ( ) ;
81
+ [ QUEUE ] : ( ReadEntry | [ string | symbol , any , any ] ) [ ] = [ ] ;
84
82
[ BUFFER ] ?: Buffer ;
85
83
[ READENTRY ] ?: ReadEntry ;
86
84
[ WRITEENTRY ] ?: ReadEntry ;
You can’t perform that action at this time.
0 commit comments