File tree Expand file tree Collapse file tree 3 files changed +5
-12
lines changed Expand file tree Collapse file tree 3 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,6 @@ async function save(
192
192
} ) ;
193
193
await writer . write ( ...files ) ;
194
194
await writer . close ( ) ;
195
- await writer . done ( ) ;
196
195
return ;
197
196
}
198
197
Original file line number Diff line number Diff line change @@ -368,19 +368,14 @@ export class PenumbraZipWriter extends EventTarget {
368
368
await this . writer . close ( ) ;
369
369
this . closed = true ;
370
370
}
371
+ /**
372
+ * Await completion of the underlying zip stream being written to the sink
373
+ * @returns Promise that resolves when the sink write completes
374
+ */
375
+ await this . pipePromise ;
371
376
return size ;
372
377
}
373
378
374
- /**
375
- * Await completion of the underlying zip stream being written to the sink
376
- * @returns Promise that resolves when the sink write completes
377
- */
378
- async done ( ) : Promise < void > {
379
- if ( this . pipePromise ) {
380
- await this . pipePromise ;
381
- }
382
- }
383
-
384
379
/** Cancel Penumbra zip writer */
385
380
abort ( ) : void {
386
381
if ( ! this . controller . signal . aborted ) {
Original file line number Diff line number Diff line change @@ -479,7 +479,6 @@ describe('Penumbra API', () => {
479
479
} ) ) ,
480
480
) ;
481
481
await writer . close ( ) ;
482
- await writer . done ( ) ;
483
482
assert . isTrue (
484
483
progressEventFiredAndWorking ,
485
484
'zip progress event fired & emitted expected properties' ,
You can’t perform that action at this time.
0 commit comments