install: bypass manifest cache for `bun outdated`
Problem
bun outdated answers from the on-disk manifest cache (default TTL 300s). Right after a bun install, it reports everything up to date even when the registry has a newer in-range version. bun update in the identical state already bypasses the cache (PackageManagerOptions.rs: "Update should never read from manifest cache") and updates the package, so the two commands disagree about the same registry in the same second.
# registry has pkg@1.0.0; install; registry publishes 1.2.0 (in range)
$ bun outdated # 0 registry GETs, "everything up to date"
$ bun update # refetches, updates pkg to 1.2.0
npm outdated always revalidates.
Fix
Extend the existing manifest-cache bypass from Subcommand::Update to Subcommand::Outdated. bun update --interactive already initializes with Subcommand::Update and is unaffected.
Verification
New test in test/cli/install/bun-update.test.ts installs baz@0.0.3 with the manifest cache enabled, then changes the registry to advertise 0.0.5 and runs bun outdated. Without the fix it makes 0 registry requests and misses the new version; with the fix it hits the registry once and reports 0.0.5.
[review] gate passed · iteration 2 · 2 files touched
fails on main (without fix)
ASAN without fix: BUILD FAILED (no junit output)
$ BUN_DEBUG_QUIET_LOGS=1 bun scripts/build.ts --profile=debug --quiet test "--reporter=junit" "--reporter-outfile=/tmp/mechgate.xml" test/cli/install/bun-update.test.ts
info: syncing channel updates for nightly-2026-05-06-x86_64-unknown-linux-gnu
info: latest update on 2026-05-06 for version 1.97.0-nightly (e95e73209 2026-05-05)
info: component rust-src is up to date
info: checking for self-update (current version: 1.29.0)
ninja: Entering directory `/workspace/bun/build/debug'
[1/35] cxx obj/unified/UnifiedSource-packages_bun_usockets_src_crypto-0.cpp.o
[2/35] cxx obj/unified/UnifiedSource-src_jsc_bindings_node-0.cpp.o
[3/35] cxx obj/unified/UnifiedSource-src_uws_sys-0.cpp.o
[4/35] cxx obj/unified/UnifiedSource-src_jsc_bindings-4.cpp.o
[5/35] cxx obj/unified/UnifiedSource-src_jsc_bindings-2.cpp.o
[6/35] cxx obj/unified/UnifiedSource-src_jsc_bindings-8.cpp.o
[7/35] cxx obj/unified/UnifiedSource-src_jsc_bindings-12.cpp.o
[8/35] cxx obj/unified/UnifiedSource-src_jsc_bindings_v8-0.cpp.o
[9/35] cxx obj/unified/UnifiedSource-src_jsc_modules-0.cpp.o
[10/35] cxx obj/unified/UnifiedSource-src_jsc_bindings-13.cpp.o
[11/35] cxx obj/src/jsc/bindings/bindings.cpp.o
[12/35] cxx o
... (truncated)
release without fix: all passed
bun test v1.4.0-canary.1 (09955aacc)
test/cli/install/bun-update.test.ts:
(pass) should update to latest version of dependency (~) [14.04ms]
(pass) should update to latest versions of dependencies (~) [12.60ms]
(pass) lockfile should not be modified when there are no version changes, issue#5888 [27.27ms]
(pass) should support catalog versions in update [5.97ms]
(pass) should support --recursive flag [6.35ms]
(pass) should print UTF-8 arrows correctly with colors enabled [8.99ms]
(pass) outdated should not answer from a stale manifest cache [7.96ms]
7 pass
0 fail
173 expect() calls
Ran 7 tests across 1 file. [222.00ms]
__F:0:S:0
passes on PR (with fix)
ASAN with fix: all passed
$ BUN_DEBUG_QUIET_LOGS=1 bun scripts/build.ts --profile=debug --quiet test "--reporter=junit" "--reporter-outfile=/tmp/mechgate.xml" test/cli/install/bun-update.test.ts
info: syncing channel updates for nightly-2026-05-06-x86_64-unknown-linux-gnu
info: latest update on 2026-05-06 for version 1.97.0-nightly (e95e73209 2026-05-05)
info: component rust-src is up to date
info: checking for self-update (current version: 1.29.0)
bun test v1.4.0 (303278ede)
test/cli/install/bun-update.test.ts:
(pass) should update to latest version of dependency (~) [509.70ms]
(pass) should update to latest versions of dependencies (~) [527.63ms]
(pass) lockfile should not be modified when there are no version changes, issue#5888 [1361.15ms]
(pass) should support catalog versions in update [197.66ms]
(pass) should support --recursive flag [281.60ms]
(pass) should print UTF-8 arrows correctly with colors enabled [384.94ms]
(pass) outdated should not answer from a stale manifest cache [426.08ms]
7 pass
0 fail
173 expect() calls
Ran 7 tests across 1 file. [5.78s]
__F:0:S:0
release with fix: all passed
$ bun scripts/build.ts --profile=release
info: syncing channel updates for nightly-2026-05-06-x86_64-unknown-linux-gnu
info: latest update on 2026-05-06 for version 1.97.0-nightly (e95e73209 2026-05-05)
info: component rust-src is up to date
info: checking for self-update (current version: 1.29.0)
[configured] bun-profile → bun (stripped) in 667ms (unchanged)
ninja: Entering directory `/workspace/bun/build/release'
[1/32] cxx obj/unified/UnifiedSource-packages_bun_usockets_src_crypto-0.cpp.o
[2/32] cc obj/packages/bun-usockets/src/bsd.c.o
[3/32] cxx obj/unified/UnifiedSource-src_uws_sys-0.cpp.o
[4/32] cc obj/packages/bun-usockets/src/context.c.o
[5/32] cxx obj/src/jsc/bindings/webcore/SerializedScriptValue.cpp.o
[6/32] cxx obj/unified/UnifiedSource-src_jsc_bindings_v8-0.cpp.o
[7/32] cxx obj/unified/UnifiedSource-src_jsc_bindings-4.cpp.o
[8/32] cxx obj/unified/UnifiedSource-src_jsc_modules-0.cpp.o
[9/32] cxx obj/src/jsc/bindings/BunProcess.cpp.o
[10/32] cc obj/packages/bun-usockets/src/eventing/epoll_kqueue.c.o
[11/32] cxx obj/unified/UnifiedSource-src_jsc_bindings-2.cpp.o
[12/32] cc obj/packages/bun-usockets/src/eventing/libuv.c.o
[13/32] cxx obj/src/jsc/bindings/
... (truncated)
diff hotspot
.../PackageManager/PackageManagerOptions.rs | 6 +-
test/cli/install/bun-update.test.ts | 69 ++++++++++++++++++++++
2 files changed, 73 insertions(+), 2 deletions(-)
gate history · 2 passed · 0 rejected · iteration 2
evidence per changed file
file reads edits tests
src/install/PackageManager/PackageManagerOptions.rs 3 1 0
test/cli/install/bun-update.test.ts 1 2 0