fix(core): restore integration cwd detection and harden build exit - #427
Merged
Conversation
The "unify builtin devtools plugin" refactor dropped `cwd` when calling `DevToolsBuiltin()` from `DevTools()`, so optional-integration detection silently fell back to `process.cwd()` again — regressing #423 and breaking the `resolves optional integrations from the configured project directory` unit test on every OS in CI. Also hardens two unrelated hang risks found while chasing the failing e2e job: the CLI's `build` command now exits explicitly once the static build finishes instead of relying on the event loop draining naturally, and the Iconify SVG fetch now times out instead of hanging forever on a stalled connection. The e2e harness's CLI-build spawn gets an explicit timeout too, so a future hang fails fast with a clear message instead of silently burning the whole test timeout. Fixed with the help of an agent.
@vitejs/devtools
@vitejs/devtools-kit
@vitejs/devtools-oxc
@vitejs/devtools-rolldown
@vitejs/devtools-vite
@vitejs/devtools-vitest
commit: |
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.
Description
CI is red on
main. Root causes:testjob (fails on ubuntu/windows/macos): the "unify builtin devtools plugin" refactor movedBUILTIN_LAUNCHER_INTEGRATIONS/detection intoDevToolsBuiltin()but dropped thecwdforward fromDevTools({ cwd }), so optional-integration detection (isPackageExists) silently fell back toprocess.cwd()again — regressing fix(core): use standalone root for integration detection #423 and failing the existingresolves optional integrations from the configured project directoryunit test. Fixed by forwardingcwdthrough.e2ejob (times out after 120s on the CLI-build test): while chasing this down, found two real hang risks with no bearing on this specific flake but worth closing:vite-devtools buildrelies on the event loop draining naturally to exit, so any stray open handle from adevtools.setup()hook (ours or third-party) would hang the process forever with no diagnostic; and the client's Iconify SVG fetch has no timeout, so a stalled connection hangs indefinitely instead of degrading to a blank icon like the code already intends for network failures. Added an explicitprocess.exit(0)after a successful build, and anAbortSignal.timeout()on the Iconify fetch. Also gave the e2e harness's CLI-build spawn its own bounded timeout so a future hang fails fast with a clear message instead of silently burning the whole test timeout.Verified locally: full unit suite (256 passed), lint, typecheck, and the e2e static-build test all green.
Linked Issues
Additional context
Regresses #423 via the refactor in 3fbc896 (no PR, direct push to
main).Created with the help of an agent.