feat(cli): replace deprecated generator aliases during fern generator upgrade#12327
Closed
iamnamananand996 wants to merge 3 commits intomainfrom
Closed
feat(cli): replace deprecated generator aliases during fern generator upgrade#12327iamnamananand996 wants to merge 3 commits intomainfrom
fern generator upgrade#12327iamnamananand996 wants to merge 3 commits intomainfrom
Conversation
… upgrade Co-Authored-By: naman.anand@buildwithfern.com <iamnamananand996@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: naman.anand@buildwithfern.com <iamnamananand996@gmail.com>
Co-Authored-By: naman.anand@buildwithfern.com <iamnamananand996@gmail.com>
Contributor
|
This PR is stale because it has been open 25 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Contributor
|
This PR was closed because it has been inactive for 5 days after being marked stale. |
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
Refs: User request from @iamnamananand996
fern generator upgradenow automatically replaces deprecated generator aliases (e.g.fern-typescript-node-sdk) with their canonical names (e.g.fern-typescript-sdk) ingenerators.yml. Previously,normalizeGeneratorNameresolved aliases internally for version lookups but never wrote the canonical name back to the YAML file.Link to Devin run
Changes Made
upgradeGenerator.ts: After normalizing a generator name, compare the original (with org prefix) to the normalized result. If they differ (i.e. it's a deprecated alias), update thenamefield in the YAML. Preserves the user's format convention — if they used shorthand (fern-typescript-node-sdk), the replacement is also shorthand (fern-typescript-sdk); if they used the full form (fernapi/...), the replacement uses the full form.fern-typescript-node-sdk → fern-typescript-sdk: 1.0.0 → 1.5.0orfern-typescript-node-sdk → fern-typescript-sdk: 2.0.0 (alias updated)when only the name changed.skippedMajorUpgradesmessages also use the replaced canonical name for consistency.previousNameoptional field toAppliedUpgradeinterface to track renames.3.77.0entry to CLIversions.yml.Testing
fern-typescript-node-sdkconfirmed the alias is replaced ingenerators.ymland output showsfern-typescript-node-sdk → fern-typescript-sdk: 0.39.3 → 0.51.7Review Checklist
latestVersionisnull(e.g. API lookup fails), the alias name replacement is still written to the YAML (generator.set("name", ...)on L162) but noappliedUpgradeentry is recorded — verify this silent-rename-on-failure behavior is acceptable