fix(cli): support legacy generator names in IR definition#12103
Merged
iamnamananand996 merged 3 commits intomainfrom Feb 5, 2026
Merged
fix(cli): support legacy generator names in IR definition#12103iamnamananand996 merged 3 commits intomainfrom
iamnamananand996 merged 3 commits intomainfrom
Conversation
Add compatibility for legacy generator names used in older IR configs by mapping 'fern-typescript' and 'java-model' to the current generator metadata and adding a GeneratorName constant for 'fernapi/java-model'. Also update packages/cli/cli/versions.yml to add version 3.65.1 (createdAt 2026-02-05, irVersion 63) with a changelog entry describing the fix.
Contributor
🌱 Seed Test SelectorSelect languages to run seed tests for:
How to use: Click the ⋯ menu above → "Edit" → check the boxes you want → click "Update comment". Tests will run automatically and snapshots will be committed to this PR. |
Replace getGeneratorNameOrThrow with normalizeGeneratorName in getGeneratorVersions, adding null checks to log and skip unknown generators instead of throwing. Export normalizeGeneratorName from the generators-yml index and remove the deprecated JAVA_MODEL_LEGACY constant from GeneratorName. These changes make generator version resolution more tolerant of unrecognized names and remove a legacy generator identifier.
3e39097 to
c300222
Compare
tjb9dc
approved these changes
Feb 5, 2026
Co-Authored-By: naman.anand@buildwithfern.com <iamnamananand996@gmail.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.
Description
Add compatibility for legacy generator names used in older IR configs by mapping
fern-typescriptandjava-modelto the current generator metadata. Also switch fromgetGeneratorNameOrThrowtonormalizeGeneratorName(which returnsnullfor unknown generators) so the CLI gracefully skips unrecognized generators instead of throwing.Changes Made
fern-typescriptcase to the TypeScript generator name mapping ingetGeneratorVersions.tsjava-modelcase (withoutfern-prefix) to the Java model generator name mappingnormalizeGeneratorNamefrom@fern-api/configuration-loadergetGeneratorNameOrThrowwithnormalizeGeneratorName+ null-check ingetGeneratorVersions.ts(CLI upgrade utils), logging a debug message and skipping unknown generators3.64.5topackages/cli/cli/versions.ymlUpdates since last revision
maininversions.yml(main added 3.64.3 and 3.64.4)3.65.1→3.64.5to follow the correct sequence after main's latest3.64.4Testing
Human Review Checklist
3.64.5is the correct next patch after3.64.4on mainfern-typescriptandjava-model) should also be mappedLink to Devin run: https://app.devin.ai/sessions/3c88c6585a1e4353becb41c8023583a0
Requested by: @iamnamananand996