Repository navigation
feat: support downloading files without extraction - #5
Merged
Merged
Conversation
Extraction is now detected from the mime type of the resolved url via mime-types: gzip, tar and zip are extracted, anything else (a .jar, a .node, a bare binary) is downloaded as is. A new "dst" option sets the destination path for such files, and "extract" overrides the detection. Also parse urls with node's URL instead of regexps/string splitting, which additionally allows uppercase and underscores in owner/repo of the github_artifact protocol. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The resolving logic moves into src/resolve.ts so it can be imported without running the installer, which reads package.json from cwd at module load. src/index.ts keeps the cli loop; resolveSimplePath and resolveDst now take the package version and cwd as arguments instead of reaching for module state. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ovr
force-pushed
the
download-files-without-unpacking
branch
from
September 21, 2026 11:52
d49d640 to
a53cfc8
Compare
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.
Adds support for downloading plain files (a
.jar, a.node, a bare binary) instead of always trying to unpack them, which currently fails withUnable to detect archive format from its contents.Whether a file is an archive is now detected from the mime type of the resolved url via
mime-types— gzip, tar and zip are extracted, everything else is downloaded as is; a newdstoption sets the destination path (subdirectories are created, escaping the package directory is rejected) andextractoverrides the detection.Along the way urls are parsed with node's
URLinstead of regexps andsplit, which also lifts the old[a-z-]+limit on owner/repo in thegithub_artifact://protocol, and the constraints check moved before url resolution so filtered-out platforms no longer hit the GitHub API.Documented in the README and covered end-to-end in CI:
example/now downloads a plain file and the workflow asserts it landed on disk.🤖 Generated with Claude Code