refactor: replace tar-fs, tar, and tar-stream with modern-tar#1486
Draft
gu-stav wants to merge 1 commit into
Draft
refactor: replace tar-fs, tar, and tar-stream with modern-tar#1486gu-stav wants to merge 1 commit into
gu-stav wants to merge 1 commit into
Conversation
Member
Author
|
This change is part of the following stack: Change managed by git-spice. |
Contributor
📦 Bundle Stats —
|
| Metric | Value | vs main (d388f76) |
|---|---|---|
| Internal (raw) | 2.2 KB | - |
| Internal (gzip) | 838 B | - |
| Bundled (raw) | 11.16 MB | - |
| Bundled (gzip) | 2.10 MB | - |
| Import time | 910ms | +3ms, +0.3% |
bin:sanity
| Metric | Value | vs main (d388f76) |
|---|---|---|
| Internal (raw) | 782 B | - |
| Internal (gzip) | 423 B | - |
| Bundled (raw) | 9.87 MB | - |
| Bundled (gzip) | 1.78 MB | - |
| Import time | 2.35s | +78ms, +3.4% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — @sanity/cli-core
Compared against main (d388f763)
| Metric | Value | vs main (d388f76) |
|---|---|---|
| Internal (raw) | 108.1 KB | - |
| Internal (gzip) | 27.0 KB | - |
| Bundled (raw) | 21.72 MB | - |
| Bundled (gzip) | 3.46 MB | - |
| Import time | 800ms | -1ms, -0.1% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — create-sanity
Compared against main (d388f763)
| Metric | Value | vs main (d388f76) |
|---|---|---|
| Internal (raw) | 908 B | - |
| Internal (gzip) | 483 B | - |
| Bundled (raw) | 931 B | - |
| Bundled (gzip) | 491 B | - |
| Import time | ❌ ChildProcess denied: node | - |
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
Coverage Delta
Comparing 5 changed files against main @ Overall Coverage
|
tar-fs, node-tar, and tar-stream together carry ~30 transitive packages (streamx, bare-fs, minipass, minizlib, ...) for directory packing, tarball extraction, and entry streaming. modern-tar covers all three with zero dependencies and ships its own types, so @types/tar-fs and @types/tar-stream go too.
gu-stav
force-pushed
the
replace-tar-fs-with-modern-tar
branch
from
July 13, 2026 09:18
7d8aae5 to
89765d1
Compare
gu-stav
added a commit
that referenced
this pull request
Jul 13, 2026
The @module-federation/vite 1.16.14 bump (#1484) left the lockfile with two copies of runtime/runtime-core/sdk/error-codes: 2.7.0 for mf-vite and a stale 2.6.0 still resolved for @sanity/workbench's ^2.6.0 range. Any branch that touches dependencies picks up this dedupe as unrelated churn (see #1486). Landing it separately keeps those diffs clean.
gu-stav
added a commit
that referenced
this pull request
Jul 13, 2026
The @module-federation/vite 1.16.14 bump (#1484) left the lockfile with two copies of runtime/runtime-core/sdk/error-codes: 2.7.0 for mf-vite and a stale 2.6.0 still resolved for @sanity/workbench's ^2.6.0 range. Any branch that touches dependencies picks up this dedupe as unrelated churn (see #1486). Landing it separately keeps those diffs clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
tar-fs,tar(node-tar), andtar-streamtogether carry ~30 transitive packages (~10 MB installed:streamx,bare-fs,bare-path,minipass,minizlib, ...) for three jobs: pack a directory into a tar stream, extract a tarball to disk, and stream tar entries. modern-tar does all three with zero dependencies and ships its own types, so@types/tar-fsand@types/tar-streamgo too.tar-fs+tar+tar-stream+@types/*)modern-tar)node_moduleson diskInstalled size is measured from the lockfile as the deduplicated union of the removed packages' dependency closures (sizes from disk,
@types/nodeexcluded since it stays regardless). The install benchmark uses an isolated fixture project containing only these dependencies: pnpm 10.34, median of 3 runs, cold = empty store and cache, warm = populated store,node_moduleswiped between runs (Apple Silicon; deltas will be diluted inside a full@sanity/cliinstall).Note:
tarandtar-streamremain in the lockfile as transitive deps of@sanity/exportand@sanity/runtime-cli; they're no longer direct dependencies.What to review
The behavioral-parity claims. Both extraction paths were differentially tested against the old implementations on identical fixtures:
filePathsubtree case, including.githubexclusion and prefix-sharing sibling dirs.<basename>/...top-level layout the service expects (verified with bsdtar).Testing
Existing unit and integration tests updated to mock
modern-tar/fsinstead oftar-fs; deploy (88), extract-ndjson, and init template tests pass.Notes for release
Replace
tar-fs,tar, andtar-streamwith the dependency-freemodern-tarfor deploy, backup, media-import, dataset-import, and template tarball handling