fix(themes): declare generated runtime dependencies - #771
Merged
Merged
Conversation
dahukish
force-pushed
the
codex/fix-theme-runtime-deps
branch
from
September 24, 2026 16:24
533a490 to
9ec1859
Compare
Contributor
Author
|
Hey @jaywcjlove 👋 — this fixes the Two commits: declare the missing deps across all theme packages, and add a CI check to Happy to adjust anything — thanks for taking a look! |
dahukish
marked this pull request as ready for review
September 24, 2026 16:31
jaywcjlove
added a commit
that referenced
this pull request
Sep 24, 2026
jaywcjlove
added a commit
that referenced
this pull request
Sep 24, 2026
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.
Problem
Theme packages whose generated ESM/CJS output imports
@babel/runtimehelpers or@lezer/highlightdirectly were missing those declarations inpackage.json. Under bundler configs that don't hoist phantom dependencies — raw webpack, pnpm strict mode, Vite library mode — consumers get a hard module-not-found error at build time.Closes #755
Summary
@babel/runtime: ^7.18.6in every theme package whose built output emits Babel helperrequire()calls.@lezer/highlight: ^1.0.0in every theme package whose source importstagsdirectly (all exceptconsole, which re-exports only from@uiw/codemirror-themes).themes/_scripts/check-runtime-dependencies.cjs— scans builtesm/andcjs/output for imports not declared inpackage.jsonand exits non-zero on any gap..github/workflows/pr.ymlafternpm run buildto prevent regressions.Note on
@babel/runtimeThe correct long-term fix is to configure the babel build to use inline helpers instead of
@babel/runtime, removing the runtime dependency entirely. That change is out of scope here; this PR declares the existing implicit dependency explicitly.Test plan
npm run buildfollowed bynpm run check:theme-dependenciespasses@babel/runtimefromthemes/basic/package.jsoncauses the check to fail as expected