feat(pm): support bun 1.4 package manager commands - #2513
Merged
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
Collaborator
Author
Bun 1.4 added a native dedupe command with a --check mode. Run it when the detected bun is >= 1.4 and keep the bun install fallback with a version-hinted diagnostic for older versions. Covered by resolution unit tests and a bun 1.4 PTY snapshot case in the pm_dedupe fixture. Refs voidzero-dev#2460
Bun 1.4 added a native prune command with a --production flag. Run it when the detected bun is >= 1.4, mapping --prod to --production, and keep the noop diagnostic for older versions. bun prune has no optional flag, so --no-optional is now declared unsupported for bun. Covered by resolution unit tests and a bun 1.4 PTY snapshot case. Refs voidzero-dev#2460
Bun 1.4 added an audit fix subcommand. Run it when the detected bun is >= 1.4 and keep the noop diagnostic with a version hint for older versions. Covered by resolution unit tests and a bun 1.4 PTY snapshot case in a new pm_audit fixture. Refs voidzero-dev#2460
Bun 1.4 supports workspace-filtered installs and default-catalog saves. Relax the not_supported rules to bun < 1.4 so newer versions receive the flags while older versions keep the warn-and-drop behavior. Covered by resolution unit tests and a bun 1.4 workspace PTY snapshot case. Refs voidzero-dev#2460
Covered by resolution unit tests and a bun 1.4 workspace PTY snapshot case. Refs voidzero-dev#2460
bun update previously dropped --filter silently; bun before 1.4 now warns before dropping it, and 1.4 or newer receives the flag. Covered by resolution unit tests and a bun 1.4 workspace PTY snapshot case. Refs voidzero-dev#2460
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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
force-pushed
the
feat/bun-1-4-pm-commands
branch
from
August 20, 2026 15:09
d63e35e to
997c6a0
Compare
jong-kyung
marked this pull request as ready for review
August 20, 2026 15:09
The fixture resolves the latest bun, and the bun 1.4.0 release changed the build hash that bun pm trust prints alongside its redacted version, so the recorded snapshot went stale on every CI run.
Collaborator
Author
|
@fengmk2 I temporarily fixed the CI failure caused by the changed bun build hash. |
fengmk2
pushed a commit
that referenced
this pull request
Aug 21, 2026
bun banners append the build's short commit hash after the version ("bun
pm trust v1.4.0 (34cbb9a40)"), and the hash changes with every bun
release. The version was already masked, but the hash was recorded
verbatim, so snapshots of fixtures that follow the latest bun broke
whenever bun shipped a release, as create_approve_builds_bun did when
bun 1.4.0 came out.
Ref: #2513 [CI
Failure](https://github.com/voidzero-dev/vite-plus/actions/runs/32384435197/job/96475848783)
Collaborator
Author
|
I'll handle conflicts |
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.
Bun 1.4 added native package manager commands that vp previously worked around:
dedupe,prune, andaudit fix, plus--filterforadd/remove/updateand--catalogforadd.Release notes: https://bun.com/blog/bun-v1.4
When the detected bun version is >= 1.4, vp now routes these directly:
vp deduperunsbun dedupe, including--check, instead of falling back tobun install.vp pm prunerunsbun prune, mapping--prodto--production, instead of a noop. bun prune has no optional flag, so--no-optionalis declared unsupported for bun.vp pm audit --fixrunsbun audit fixinstead of a noop.vp add/vp remove/vp updateforward--filter, andvp addforwards--save-catalogas--catalog.vp updatepreviously dropped--filtersilently; bun before 1.4 now warns before dropping it.Older bun versions keep the previous fallback or noop behavior, with diagnostics that now name the required version. The version gating uses the existing
not_supported(bun < "1.4")macro rules for flags and asupports_v1_4_commandspredicate for the hand-written resolvers.Every command is covered by resolution unit tests and a bun 1.4 PTY snapshot case that runs the real binary: dedupe and check mode, prune removing a dev dependency with
--production,audit fix, and workspace fixtures verifying--filterscoping and thecatalog:entry written by--catalog.Closes #2460