Skip to content

fix(cli): support legacy generator names in IR definition#12103

Merged
iamnamananand996 merged 3 commits intomainfrom
fix-ir-validation
Feb 5, 2026
Merged

fix(cli): support legacy generator names in IR definition#12103
iamnamananand996 merged 3 commits intomainfrom
fix-ir-validation

Conversation

@iamnamananand996
Copy link
Member

@iamnamananand996 iamnamananand996 commented Feb 5, 2026

Description

Add compatibility for legacy generator names used in older IR configs by mapping fern-typescript and java-model to the current generator metadata. Also switch from getGeneratorNameOrThrow to normalizeGeneratorName (which returns null for unknown generators) so the CLI gracefully skips unrecognized generators instead of throwing.

Changes Made

  • Add fern-typescript case to the TypeScript generator name mapping in getGeneratorVersions.ts
  • Add java-model case (without fern- prefix) to the Java model generator name mapping
  • Export new normalizeGeneratorName from @fern-api/configuration-loader
  • Replace getGeneratorNameOrThrow with normalizeGeneratorName + null-check in getGeneratorVersions.ts (CLI upgrade utils), logging a debug message and skipping unknown generators
  • Add CLI version 3.64.5 to packages/cli/cli/versions.yml
  • Updated README.md generator (if applicable)

Updates since last revision

  • Resolved merge conflict with main in versions.yml (main added 3.64.3 and 3.64.4)
  • Rebased version from 3.65.13.64.5 to follow the correct sequence after main's latest 3.64.4

Testing

  • Unit tests added/updated
  • Manual testing completed

Human Review Checklist

  • Verify version 3.64.5 is the correct next patch after 3.64.4 on main
  • Confirm that silently skipping unknown generators (with debug log) is preferred over throwing — this is a behavioral change
  • Check if any other legacy generator names (beyond fern-typescript and java-model) should also be mapped

Link to Devin run: https://app.devin.ai/sessions/3c88c6585a1e4353becb41c8023583a0
Requested by: @iamnamananand996

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.
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

🌱 Seed Test Selector

Select languages to run seed tests for:

  • Python
  • TypeScript
  • Java
  • Go
  • Ruby
  • C#
  • PHP
  • Swift
  • Rust
  • OpenAPI
  • Postman

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.
@iamnamananand996 iamnamananand996 changed the title fix(cli): support legacy generator names; bump CLI version fix(cli): support legacy generator names Feb 5, 2026
@iamnamananand996 iamnamananand996 changed the title fix(cli): support legacy generator names fix(cli): support legacy generator names in IR definition Feb 5, 2026
Co-Authored-By: naman.anand@buildwithfern.com <iamnamananand996@gmail.com>
@devin-ai-integration devin-ai-integration bot changed the title fix(cli): support legacy generator names in IR definition fix(cli): support legacy generator names in IR definition Feb 5, 2026
@iamnamananand996 iamnamananand996 merged commit 0d4beb6 into main Feb 5, 2026
102 checks passed
@iamnamananand996 iamnamananand996 deleted the fix-ir-validation branch February 5, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants