Skip to content

Optimize Windows zip extraction#96

Merged
j178 merged 1 commit into
mainfrom
feat/windows-tar-extract-fallback
Mar 16, 2026
Merged

Optimize Windows zip extraction#96
j178 merged 1 commit into
mainfrom
feat/windows-tar-extract-fallback

Conversation

@j178

@j178 j178 commented Mar 16, 2026

Copy link
Copy Markdown
Owner

Use tar-first extraction for Windows zip archives and fall back to zip extraction when needed. astral-sh/setup-uv#660

Mirror the tar-first, zip-fallback approach from astral-sh/setup-uv PR #660.

# Conflicts:
#	src/install.ts
Copilot AI review requested due to automatic review settings March 16, 2026 07:46
@j178 j178 added the enhancement New feature or request label Mar 16, 2026
@j178 j178 merged commit 93b7a40 into main Mar 16, 2026
11 checks passed
@j178 j178 deleted the feat/windows-tar-extract-fallback branch March 16, 2026 07:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/install.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 extractArchive helper.
  • Implements Windows-specific zip extraction that tries tar first, then falls back to extractZip on failure.
  • Regenerates the bundled dist/index.js output 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.

Comment thread src/install.ts
Comment thread src/install.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants