Repository navigation
fix(web): tool package registry list no longer relies on import.meta.glob so bun test runs (CL-8436) - #869
Merged
Conversation
…glob so bun test runs (CL-8436) Vite-only import.meta.glob ran at module load time, so any bun test that transitively imported registry-publish.ts (e.g. login-routing) crashed with TypeError before running.
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
apps/web/src/tools/registry-publish.tscalled Vite-onlyimport.meta.globat module scope, so anybun testthat transitively imported it (the shell/login-routing suite) crashed withTypeError: undefined is not a function.import.meta.globcalls insidebuildToolPackageTrees()so they only run when the tree-building path is actually invoked; a bare import (as bun test does transitively) no longer touches the Vite-only API. Vite still statically analyzes the calls wherever they appear in the module, so production behavior is unchanged.bun run testis fully green.Test plan
bun installbun run test(943 pass, 0 fail)bun run typecheckbun run lint(only pre-existing sidecarpreserve-caught-errorwarnings)bun run fmt