fix(bun): apply top-level patchedDependencies#724
Conversation
Greptile SummaryThis PR fixes Bun-only projects silently installing unpatched packages by teaching the manifest model to parse top-level
Confidence Score: 5/5Safe to merge; the core load and removal logic is correct and well-covered by the new tests. The removal function correctly guards the empty-map cleanup behind the The module-level doc comment in Important Files Changed
Reviews (4): Last reviewed commit: "fix(bun): avoid stale patch removal rewr..." | Re-trigger Greptile |
edb9187 to
adf5c44
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9ac4785. Configure here.

Summary
package.json#patchedDependenciesfield from the manifest modelRoot Cause
Aube preserved Bun
patchedDependenciesinbun.lock, but install-time patch loading only readpnpm.patchedDependencies,aube.patchedDependencies, and workspace YAML entries frompackage.json/pnpm-workspace.yaml. Bun-only projects could therefore install successfully while materializing the unpatched package contents.Validation
cargo test -p aube-manifest bun_patched_dependencies_reads_top_level_fieldcargo test -p aube load_reads_bun_top_level_patched_dependencies./test/bats/bin/bats test/import.bats --filter 'aube install smoke installs messy bun.lock fixture'cargo fmt --checkgit diff --check/tmp/tmp-aube-issues-722/bun-patched-dependencieswith localtarget/debug/aubeNote
Medium Risk
Changes install-time patch resolution to honor Bun’s top-level
package.json#patchedDependencies, which can alter the on-disk contents of installed packages for Bun projects. Scope is limited to patch loading/removal paths with added regression tests.Overview
Aube now reads Bun’s top-level
package.json#patchedDependenciesand merges it into the patch sources used duringaube install, alongside existingpnpm/aube-namespaced entries and workspace YAML declarations.Patch management is updated to also remove Bun top-level patch entries (dropping the map when it becomes empty), and new unit/integration coverage ensures Bun-authored patches are loaded and applied correctly (including BOM-prefixed
package.json).Reviewed by Cursor Bugbot for commit 9c2a7b1. Bugbot is set up for automated code reviews on this repo. Configure here.