Revert "Make languageNamed accept display names and extensions again" (#2883)#2911
Merged
Merged
Conversation
schani
added a commit
that referenced
this pull request
Jul 10, 2026
Conflicts and resolutions: - packages/quicktype-core/src/RendererOptions/types.ts: master (#2910) removed the type-only "command-line-args" import that leaked into published declarations; this branch had added a ".js" extension to the neighboring relative import. Took master's removal plus the extension on the surviving import. - test/unit/core-package.test.ts: both sides appended tests to the same describe block — this branch's five dual CJS/ESM packaging tests, master's declaration-file dependency hygiene tests (#2910). Kept both; the declaration scan now also covers the new dist/esm tree. - package-lock.json auto-merged to exactly master's content (this branch adds no dependencies); re-ran npm install to confirm it regenerates unchanged. The #2911 revert of fuzzy language-name matching and the #2909 switch to upstream typescript-json-schema merged cleanly (the import-extension codemod never touched quicktype-typescript-input). Verified from clean dist: root npm run build emits both legs including dist/esm's {"type": "module"} marker; all 59 unit tests pass; the packed tarball still works from scratch consumers (CJS require → dist/index.js and ESM import → dist/esm/index.js, both generating code) and typechecks under moduleResolution nodenext in both module modes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Reverts #2883 (merge commit 9013ecd) at the maintainer's request: reintroducing fuzzy language-name matching (display names like "C++"/"JSON Schema" and file extensions like "kt" in
languageNamed(), withundefinedinstead of throwing on unknown names) was a mistake.After this revert,
languageNamed()/isLanguageName()are back to the strict v23.1.0+ behavior: they match only the lowercase entries of each language'snamesarray, andlanguageNamed()throws on unknown names.This also removes
test/unit/language-named.test.ts, which tested the fuzzy behavior.Note for app.quicktype.io: #2883 was originally motivated by the web app passing localStorage-stored display names to
languageNamed(), which made returning users hit a blank page. With this revert that strict behavior returns, so the app should normalize/migrate stored language names on its side.PR #2907, which documented the fuzzy
isLanguageName()semantics, has been closed for the same reason.Verification
git revert -m 1), no conflicts.npm run buildclean;npm run test:unitpasses 50/50.🤖 Generated with Claude Code