</>PackageGraphPackageGraph

modern-tar

npmv0.8.4TypeScript

Zero dependency streaming tar parser and writer for JavaScript.

Safe to adopt

Yes — modern-tar scores well across adoption, maintenance, weight, supply chain, and licensing. 8.2M downloads per week and 3 known dependents. Last published 32 days ago. 36 releases in the last 2 years.

  • AAdoption: grade A, Excellent.

    8.2M downloads per week and 3 known dependents.

  • AMaintenance: grade A, Excellent.

    Last published 32 days ago. 36 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 95 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding modern-tar to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

95 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
node >=18.0.0
Module format
ESM + CommonJS
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the modern-tar README.

typescriptFull README ↗
import { packTar, unpackTar } from 'modern-tar';

// Entry bodies can be strings, bytes, Blobs, or ReadableStreams.
const archive = await packTar([
	{ header: { name: "file.txt", size: 5 }, body: "hello" },
	{ header: { name: "dir/", type: "directory", size: 0 } },
	{ header: { name: "dir/nested.txt", size: 3 }, body: new Uint8Array([97, 98, 99]) } // "abc"
]);

// Unpack tar buffer into entries
const extracted = await unpackTar(archive);
const decoder = new TextDecoder();

for (const { header, data } of extracted) {
Example truncated — see the full README.

Dependencies

Declared by modern-tar v0.8.4. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (12)

@arethetypeswrong/cli 0.18.5@biomejs/biome 2.5.6@hegeldev/hegel 0.4.3@types/node 26.1.2@vitest/browser-playwright 4.1.10@vitest/coverage-v8 4.1.10miniflare 4.20260730.0playwright 1.62.1publint 0.3.22tsdown 0.22.14typescript 7.0.2vitest 4.1.10

Used by

Popular packages that depend on modern-tar.

Relationship graph

Dependencies (left) and dependents (right) of modern-tar.

@puppeteer/browse…geckodrivermultitarsmodern-tar
modern-tar dependencies dependents

Frequently installed together

Release history

36 releases in the last two years, typically about 4 days apart.

Recent versions of modern-tar
VersionPublishedSizeLicense
0.8.4latest1 month ago95 KBMIT
0.8.31 month ago94 KBMIT
0.8.21 month ago94 KBMIT
0.8.11 month ago94 KBMIT
0.8.01 month ago88 KBMIT
0.7.71 month ago91 KBMIT
0.7.65 months ago82 KBMIT
0.7.56 months ago83 KBMIT
0.7.46 months ago83 KBMIT
0.7.38 months ago83 KBMIT
0.7.29 months ago84 KBMIT
0.7.19 months ago83 KBMIT
0.7.010 months ago83 KBMIT
0.6.110 months ago74 KBMIT
0.6.010 months ago74 KBMIT

Overview

modern-tar is an npm package that zero dependency streaming tar parser and writer for JavaScript. It is extremely widely used, with about 8.2M downloads per week and 3 known dependents in the graph. The latest version is 0.8.4, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need zero dependency streaming tar parser and writer for JavaScript and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (8.2M weekly downloads).
  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

Cons

  • No significant drawbacks detected from available metadata.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Frequently asked questions

Should I use modern-tar?

Yes — modern-tar scores well across adoption, maintenance, weight, supply chain, and licensing. 8.2M downloads per week and 3 known dependents. Last published 32 days ago. 36 releases in the last 2 years.

How do I install modern-tar?

Run `npm install modern-tar` to add modern-tar to your npm project.

What license is modern-tar released under?

modern-tar is distributed under the MIT license.

How popular is modern-tar?

modern-tar has approximately 8,210,536 downloads per week and 3 known dependent packages.

Is modern-tar still maintained?

The most recent release of modern-tar (v0.8.4) was published 1 month ago.

Does modern-tar run install scripts?

No. modern-tar does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.