Repository navigation
feat: Backstage 1.56.0 migration - add v1.56.0 migration recipe - #191
Merged
Merged
Conversation
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
Adds the Backstage 1.56.0 migration recipe:
codemods/v1.56.0/(@backstage/v1-56-0-migration-recipe), one package bundling the deterministic transforms from #189, following the release-owned recipe layout ofcodemods/v1.55.0/.Highlights per step:
getCatalogQuery()next to (never replacing) deprecatedgetCatalogFilters(): literalCatalogFilters[]returns are translated to$any/$allpredicates with singleton collapse and any-of value arrays; empty arrays returnundefined; computed returns get aTODO(backstage-codemod)stub. Files that already definegetCatalogQueryare skipped.usernameMatchingUserEntityNamewithemailLocalPartMatchingUserEntityNameand leaves a TODO suggestingemailMatchingUserEntityProfileEmail. Handles both import shapes of the removed collection (import { atlassianSignInResolvers }andimport * as ns), drops the import when unused, and only flags the YAMLresolver:key (choice between the two email resolvers is a data-alignment decision).totalItemsoption fromstreamEntitiescalls andStreamEntitiesRequest-typed literals, absorbing adjacent commas;GetEntitiesResponse.totalItemsand unrelated fields stay untouched.MenuSectiondisabledKeysto the enclosingMenu; without aMenu, setsisDisabledon literal-keyedMenuItems; dynamic keys and pre-existingMenu disabledKeysget a TODO carrying the original prop.Deviation from the issue table: step 2 is listed as one script, but
run-recipe-testsenforces one fixture language per suite and each workflow step takes a single language, so it ships as two entrypoints (remove-atlassian-username-resolver.ts/-yaml.ts), mirroring the v1.54rename-openapi-validate-command-*precedent.No recipe-level
aiFixup; ambiguity is always marked withTODO(backstage-codemod)(the README tells adopters to grep for it). Manual-only 1.56.0 changes are listed in the README's out-of-scope table.Evidence
codemods/v1.56.0/package; upgrading to 1.56.0 leaves customEntityFilters, the Atlassian resolver,totalItemsoptions, andMenuSection disabledKeysbroken/unmigrated.After: all repo gates pass —
yarn format:check,yarn lint,yarn test(97 jssg suites incl. 25 new fixture cases, per-suitetsc,codemod workflow validate,node --test), andyarn check:changed(the CI gate). A whole-workflow dry-run + apply on a representative app produced exactly the before/after rewrites from the issue for all five steps; a no-op run on a clean tree completes in the same ~1s.Merge Danger
Door: two-way (new package only; no existing codemod or tooling changed; deletions revert cleanly).
Blast Radius: additive. Consumers only pick this up by running the new recipe; the changeset is a minor initial release of a new package.