Replace tar-stream usage with nanotar-backed tar handling#137
Draft
Replace tar-stream usage with nanotar-backed tar handling#137
Conversation
Open
Agent-Logs-Url: https://github.com/node-modules/compressing/sessions/220b4855-39a4-4453-9161-12eca9fa08db Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Agent-Logs-Url: https://github.com/node-modules/compressing/sessions/220b4855-39a4-4453-9161-12eca9fa08db Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
Agent-Logs-Url: https://github.com/node-modules/compressing/sessions/220b4855-39a4-4453-9161-12eca9fa08db Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #137 +/- ##
==========================================
- Coverage 96.41% 92.22% -4.20%
==========================================
Files 19 20 +1
Lines 1145 1492 +347
Branches 294 388 +94
==========================================
+ Hits 1104 1376 +272
- Misses 41 116 +75 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Copilot
AI
changed the title
[WIP] Add support for using nanotar
Replace tar-stream usage with nanotar-backed tar handling
Apr 23, 2026
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.
This updates the tar implementation to use
nanotarinstead oftar-streamwhile preserving the existingcompressing.tarAPI and extraction behavior. The change keeps tar/tgz/zip integration intact, including the existing path traversal and symlink protections.Dependency change
tar-streamdependency withnanotar.Tar archive creation
tar.Streamandtar.FileStreamthrough the new helper without changing the public API.Tar extraction compatibility
tar.UncompressStream.Cross-format compatibility
TarStreamsubclass initialization sozip.Streamcontinues to work correctly after the tar refactor.Coverage updates
compressDirround-trip assertion to verify the new archive generation path.Example of the unchanged public surface: