@@ -15,8 +15,6 @@ import { UnarchiveAppendEvent, UnarchiveErrorEvent, UnarchiveEvent, UnarchiveEve
1515 UnrarrerInternal , UntarrerInternal , UnzipperInternal ,
1616 getUnarchiverInternal } from './decompress-internal.js' ;
1717
18- console . warn ( `Stop using archive.js and use decompress.js instead. This module will be removed.` ) ;
19-
2018export {
2119 UnarchiveAppendEvent ,
2220 UnarchiveErrorEvent ,
@@ -58,18 +56,22 @@ export {
5856
5957const createWorkerFn = ( scriptFilename ) => new Worker ( scriptFilename ) ;
6058
59+ function warn ( ) {
60+ console . warn ( `Stop using archive.js and use decompress.js instead. This module will be removed.` ) ;
61+ }
62+
6163// Thin wrappers of unarchivers for clients who want to construct a specific
6264// unarchiver themselves rather than use getUnarchiver().
6365export class Unzipper extends UnzipperInternal {
64- constructor ( ab , options ) { super ( ab , createWorkerFn , options ) ; }
66+ constructor ( ab , options ) { warn ( ) ; super ( ab , createWorkerFn , options ) ; }
6567}
6668
6769export class Unrarrer extends UnrarrerInternal {
68- constructor ( ab , options ) { super ( ab , createWorkerFn , options ) ; }
70+ constructor ( ab , options ) { warn ( ) ; super ( ab , createWorkerFn , options ) ; }
6971}
7072
7173export class Untarrer extends UntarrerInternal {
72- constructor ( ab , options ) { super ( ab , createWorkerFn , options ) ; }
74+ constructor ( ab , options ) { warn ( ) ; super ( ab , createWorkerFn , options ) ; }
7375}
7476
7577/**
@@ -83,5 +85,6 @@ export class Untarrer extends UntarrerInternal {
8385 * @returns {Unarchiver }
8486 */
8587export function getUnarchiver ( ab , options = { } ) {
88+ warn ( ) ;
8689 return getUnarchiverInternal ( ab , createWorkerFn , options ) ;
8790}
0 commit comments