You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node_modules/tar/dist/commonjs/pack.d.ts:70:5 - error TS2416: Property 'end'intype'Pack' is not assignable to the same property in base type'Minipass<Buffer, ContiguousData>'.
Type '(path?: string | ReadEntry | undefined) => this' is not assignable to type'{ (cb?: (() => void) | undefined): this; (chunk: any, cb?: (() => void) | undefined): this; (chunk: any, encoding?: Encoding | undefined, cb?: (() => void) | undefined): this; }'.
Types of parameters 'path' and 'cb' are incompatible.
Type '(() => void) | undefined' is not assignable to type'string | ReadEntry | undefined'.
Type '() => void' is not assignable to type'string | ReadEntry | undefined'.
70 end(path?: string | ReadEntry): this;~~~
This works with version 6.2.1:
publicasyncextractTarGz(tarFilePath: string,destDirectory: string): Promise<void>{functiongetFileSize(filePath: string){conststats=fs.statSync(filePath);returnstats.size;}// extract graphicconstgraphic=(process.platform==='win32') ? '>' : '\u{1F4E6}';consttotalSize=getFileSize(tarFilePath);constprogressBar=newProgress(totalSize,"Extracting",graphic);returnnewPromise((resolve,reject)=>{constextractor=tar.extract({cwd: destDirectory});fs.createReadStream(tarFilePath).pipe(zlib.createGunzip())// decompressing gzip file before passing it to tar.pipe(extractorasReturnType<typeoftar.extract>&NodeJS.WritableStream).on('data',(chunk)=>{progressBar.update(chunk.length);}).on('end',()=>{progressBar.complete();resolve();}).on('error',(err)=>{reject(err);});});}
The text was updated successfully, but these errors were encountered:
Regarding the outdated dependency, I noticed that node-tar depends on minipass@5.0.0. I see you're behind both projects, is there a particular reason for sticking with this version? 🤔
With 7.0.1:
This works with version 6.2.1:
The text was updated successfully, but these errors were encountered: