archiver
Installation
SKILL.md
Archiver
Overview
Archiver (current: 8.0.0) streams ZIP and TAR archives to any writable stream: a file, an HTTP response or an upload. Version 8 changed the API, so snippets from older articles fail:
- The package is ESM only (
import, notrequire). - There is no
archiver("zip")factory any more; use the classesZipArchive,TarArchiveandJsonArchive. - It ships no type declarations of its own; for TypeScript install
@types/archiver(8.x describes the v8 classes). archive.finalize()returns a promise.
The examples below ran on Node 24 with archiver 8.0.0 and the results were listed with unzip -l and tar tzf.