Repository navigation
test: isolate bundle builds from the Bun test runner - #452
Merged
EyJunge1 merged 2 commits intoOct 28, 2026
Merged
Conversation
Read the CLI bundle from a temp --outfile instead of stdout, pipe stdio explicitly, reject empty output, and cache per entrypoint so the two plugin.js assertions share one subprocess build.
7 tasks done
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.
Summary
On Bun 1.3.14, the first
Bun.buildintests/plugin-bundle-boundary.test.tsfails to resolve existing relative imports such as../services/logger.js. The following identical build succeeds; selecting the SDK test alone makes that test fail instead. Identical standalone API and CLI builds pass on the same generated files and dependencies.This matches Bun's test-runner resolver-cache issue, with the directory-cache behavior described in oven-sh/bun#36245. Isolate bundle construction in a fresh process using the current Bun executable, a repository-root working directory, and the same
--target=bun --packages=bundlesettings.The change is confined to the test file. Every existing transformer, SDK/OIDC, and bundled provider-loader assertion is retained, and build failures include stderr diagnostics. This preserves the bootstrap guards established by #82 and #165 without changing runtime imports, dependencies, or Bun versions.
Test plan
Validated on Linux with Bun 1.3.14, based on upstream
83c386bc6b048220a2e7d9309733e1acd6c608cb:bun test tests/plugin-bundle-boundary.test.ts→ 2 passed, 1 failed, with the unresolved-import errors above.bun run build,bun run typecheck, andbun run check→ passed.bun test→ 949 passed, 4 skipped, 0 failed across 131 files.git diff --check→ passed.Windows and macOS have not been validated locally. No README update is needed for this internal test-isolation change.
Checklist
main(do not open PRs from commits already onmain)bun testpasses (or N/A)bun run typecheckpasses (or N/A)bun run checkpasses (format + lint + typecheck; or N/A)