Skip to content

feat(install): verify bun platform tarball against dist.integrity - #2301

Closed
jong-kyung wants to merge 1 commit into
voidzero-dev:mainfrom
jong-kyung:fix/bun-dist-integrity
Closed

feat(install): verify bun platform tarball against dist.integrity#2301
jong-kyung wants to merge 1 commit into
voidzero-dev:mainfrom
jong-kyung:fix/bun-dist-integrity

Conversation

@jong-kyung

Copy link
Copy Markdown
Collaborator

Summary

Bun platform downloads can now detect tarball corruption or mismatches before extraction by using the platform package's registry-provided dist.integrity. The shared metadata lookup keeps integrity verification and version-not-found handling consistent with the pnpm 12 native download flow.

Related: #2289

Apply the same registry integrity verification the pnpm 12 native flow
uses to bun's @oven/bun-* platform tarball. The metadata fetch is
extracted into a shared fetch_platform_integrity helper used by both
flows; registries that omit dist.integrity keep the previous unverified
behavior.
@netlify

netlify Bot commented Aug 3, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 9ab65d0
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a7015666a6eac0008ec3155

@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@jong-kyung jong-kyung self-assigned this Aug 3, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 9ab65d01fb

ℹ️ 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".

@jong-kyung
jong-kyung marked this pull request as ready for review August 3, 2026 04:37
@jong-kyung
jong-kyung requested a review from fengmk2 August 3, 2026 04:37

@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: 9ab65d01fb

ℹ️ 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 crates/vite_install/src/package_manager.rs
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

Closing this — #2140 moved vite_install/src/package_manager.rs into vite_pm_cli, so this branch conflicts with the new layout. Will re-do the fix on top of main

@jong-kyung jong-kyung closed this Aug 3, 2026
@jong-kyung
jong-kyung deleted the fix/bun-dist-integrity branch August 3, 2026 10:33
fengmk2 added a commit that referenced this pull request Aug 3, 2026
## Summary

Re-does #2301 on top of the pm-cli consolidation (#2140), which moved
`vite_install/src/package_manager.rs` into `crates/vite_pm_cli` and made
the old branch unrebaseable.

- The `packageManager` hash names the main `bun` npm package, so the
platform tarball (`@oven/bun-{os}-{arch}`) was downloaded without any
verification.
- Extracts the registry `dist.integrity` lookup that the pnpm >= 12
native path already implements inline into a shared
`fetch_platform_integrity` helper, and applies it to the bun platform
tarball as well.
- The pnpm >= 12 path now uses the same helper, so its behavior is
unchanged.

Supersedes #2301.

Co-authored-by: MK (fengmk2) <fengmk2@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant