Optimize Windows zip extraction#96
Conversation
Mirror the tar-first, zip-fallback approach from astral-sh/setup-uv PR #660. # Conflicts: # src/install.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a0b6ee734
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR optimizes Windows zip extraction during prek installation by attempting a faster tar-based extraction first and falling back to the existing zip extraction when needed, aligning the flow with similar tooling optimizations.
Changes:
- Refactors archive extraction into a dedicated
extractArchivehelper. - Implements Windows-specific zip extraction that tries
tarfirst, then falls back toextractZipon failure. - Regenerates the bundled
dist/index.jsoutput to reflect the TypeScript changes.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/install.ts |
Adds tar-first Windows zip extraction with a zip fallback via new helper functions. |
dist/index.js |
Updates generated bundle to include the new extraction logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Use tar-first extraction for Windows zip archives and fall back to zip extraction when needed. astral-sh/setup-uv#660