fix(langs): declare all language packages as explicit dependencies#760
Merged
jaywcjlove merged 2 commits intouiwjs:masterfrom Mar 2, 2026
Merged
Conversation
The generated src/index.ts imports from 20+ @codemirror/lang-* and @codemirror/legacy-modes packages that were never declared in package.json. They only worked as phantom dependencies hoisted from @codemirror/language-data, which breaks under pnpm strict mode. - Enhance gen-langs-map.cjs to auto-sync package.json dependencies after generating the TypeScript file - Move @codemirror/language-data to devDependencies (only needed as input for the gen script, not at runtime) - Remove @codemirror/language-data from peerDependencies Fixes uiwjs#759 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
github-actions bot
pushed a commit
that referenced
this pull request
Mar 2, 2026
…ncies (#760) * fix(langs): declare all language packages as explicit dependencies The generated src/index.ts imports from 20+ @codemirror/lang-* and @codemirror/legacy-modes packages that were never declared in package.json. They only worked as phantom dependencies hoisted from @codemirror/language-data, which breaks under pnpm strict mode. - Enhance gen-langs-map.cjs to auto-sync package.json dependencies after generating the TypeScript file - Move @codemirror/language-data to devDependencies (only needed as input for the gen script, not at runtime) - Remove @codemirror/language-data from peerDependencies Fixes #759 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(langs): pin @codemirror/language-data to 6.5.2 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> dddf539
jaywcjlove
added a commit
that referenced
this pull request
Mar 2, 2026
6 tasks
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
package.jsondependencies after generatingsrc/index.ts, ensuring every imported package is explicitly declared@codemirror/language-datafromdependenciestodevDependenciesand pinned to6.5.2(only used as gen script input, not at runtime)@codemirror/language-datafrompeerDependenciesProblem
The generated
src/index.tsimports from 20+@codemirror/lang-*and@codemirror/legacy-modespackages that were never declared inpackage.json. They only worked as phantom dependencies hoisted from@codemirror/language-data, which breaks under pnpm strict mode.Fixes #754
Fixes #759
Note on
src/index.tsdiffThe regenerated
src/index.tsincludes minor content changes (e.g.jinjaupgraded from legacy mode to@codemirror/lang-jinja, newxq/xqm/xqyextensions added) because the repo has no lockfile —npm installresolved@codemirror/language-data@6.5.2while the previously committed output was generated from6.5.1. This version has now been pinned to6.5.2indevDependenciesto prevent future drift.Test plan
npm run geninextensions/langs/and verifypackage.jsondependencies are auto-updatedsrc/index.tshave corresponding entries inpackage.jsonpnpm install --strict-peer-dependenciesto confirm no phantom dependency issues🤖 Generated with Claude Code