{"id":50944746,"url":"https://github.com/backstage/codemods","last_synced_at":"2026-06-17T18:35:31.621Z","repository":{"id":365519481,"uuid":"1211428391","full_name":"backstage/codemods","owner":"backstage","description":"Codemods for Backstage","archived":false,"fork":false,"pushed_at":"2026-06-17T18:14:18.000Z","size":857,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-17T18:25:08.929Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/backstage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-15T11:38:08.000Z","updated_at":"2026-06-17T18:14:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/backstage/codemods","commit_stats":null,"previous_names":["backstage/codemods"],"tags_count":125,"template":false,"template_full_name":null,"purl":"pkg:github/backstage/codemods","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backstage%2Fcodemods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backstage%2Fcodemods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backstage%2Fcodemods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backstage%2Fcodemods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/backstage","download_url":"https://codeload.github.com/backstage/codemods/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backstage%2Fcodemods/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34461617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-17T18:35:30.857Z","updated_at":"2026-06-17T18:35:31.615Z","avatar_url":"https://github.com/backstage.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# backstage-codemods\n\nOfficial codemods for upgrading and maintaining Backstage projects, built by the community and approved by the Backstage core team.\n\nBackstage moves fast! APIs get deprecated, plugin systems get rewritten, and manual upgrades across a large app become tedious and error-prone. This repo provides automated transformations that handle the mechanical parts of those migrations for you.\n\nSee the [Codemod docs](https://docs.codemod.com) for more on building and running codemods.\n\n## Codemods\n\n\u003c!-- CODEMODS_START --\u003e\n\n### v1.52.0\n\nRun the [`migration-recipe`](./codemods/v1.52.0/migration-recipe) to apply every codemod below in one pass, or run any individual codemod on its own.\n\n| Codemod                                                                                                 | Description                                                                                    |\n| ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |\n| [migrate-bui-props-to-intersection](./codemods/v1.52.0/migrate-bui-props-to-intersection)               | Migrate ComboboxProps/SelectProps interface extends to type intersection                       |\n| [migrate-select-combobox-deprecated-props](./codemods/v1.52.0/migrate-select-combobox-deprecated-props) | Migrate deprecated Select/Combobox search props and option value to id                         |\n| [migration-recipe](./codemods/v1.52.0/migration-recipe)                                                 | Migration recipe that runs every @backstage v1.52.0 codemod from the registry in a safe order. |\n| [remove-stitching-strategy-mode](./codemods/v1.52.0/remove-stitching-strategy-mode)                     | Remove deprecated catalog.stitchingStrategy.mode from app-config                               |\n| [rename-bui-css-tokens-v1-52](./codemods/v1.52.0/rename-bui-css-tokens-v1-52)                           | Rename deprecated BUI semantic color tokens                                                    |\n\n### v1.51.0\n\nRun the [`migration-recipe`](./codemods/v1.51.0/migration-recipe) to apply every codemod below in one pass, or run any individual codemod on its own.\n\n| Codemod                                                                                             | Description                                                                                            |\n| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |\n| [experimental-form-decorators-to-stable](./codemods/v1.51.0/experimental-form-decorators-to-stable) | Rename EXPERIMENTAL_formDecorators to formDecorators in Backstage template specs for 1.51.0            |\n| [loading-to-is-pending](./codemods/v1.51.0/loading-to-is-pending)                                   | Rename deprecated loading prop to isPending in @backstage/ui and data-loading to data-ispending in CSS |\n| [migrate-nav-item-to-page](./codemods/v1.51.0/migrate-nav-item-to-page)                             | Migrate NavItemBlueprint to PageBlueprint title/icon params for Backstage 1.51.0                       |\n| [migrate-policy-query-user](./codemods/v1.51.0/migrate-policy-query-user)                           | Migrate PolicyQueryUser off removed token, expiresInSeconds, and identity fields                       |\n| [migration-recipe](./codemods/v1.51.0/migration-recipe)                                             | Migration recipe that runs every @backstage v1.51.0 codemod from the registry in a safe order.         |\n| [portable-schema-method-call](./codemods/v1.51.0/portable-schema-method-call)                       | Call PortableSchema.schema() as a method instead of property access                                    |\n| [remove-immediate-stitching-mode](./codemods/v1.51.0/remove-immediate-stitching-mode)               | Migrate catalog.stitchingStrategy.mode from immediate to deferred                                      |\n| [rename-header-main-class](./codemods/v1.51.0/rename-header-main-class)                             | Rename removed .bui-Header to .bui-HeaderContent and classNames.root to classNames.content             |\n| [render-test-app-nav-migration](./codemods/v1.51.0/render-test-app-nav-migration)                   | Migrate renderInTestApp nav-item tests to renderTestApp for Backstage 1.51.0                           |\n\nOlder versions are available in the [`codemods/`](./codemods) directory.\n\n\u003c!-- CODEMODS_END --\u003e\n\n## Usage\n\nRun any codemod in this repo against your Backstage project with the [Codemod CLI](https://docs.codemod.com/cli):\n\n```bash\nnpx codemod \u003ccodemod-name\u003e\n```\n\nMost codemods include an optional AI-powered fixup step that catches edge cases the AST transforms cannot handle mechanically (namespace imports, spread props, aliased re-exports, etc.). It is disabled by default. Enable it on a single codemod or on a migration recipe (which forwards it to every child codemod that supports it):\n\n```bash\n# Single codemod\nnpx codemod \u003ccodemod-name\u003e --param aiFixup=true\n\n# Migration recipe — forwards aiFixup to all supported child codemods\nnpx codemod @backstage/v1-51-0-migration-recipe --param aiFixup=true\n```\n\n## Development\n\nCodemods in this repo are written using [jssg](https://docs.codemod.com/jssg) (JS ast-grep) TypeScript transformation scripts that operate on ASTs generated by ast-grep. See the [jssg docs](https://docs.codemod.com/jssg) for the full API reference.\n\n```bash\n# Install dependencies\nyarn install\n\n# Run all tests\nyarn test\n\n# Lint all files\nyarn lint\n\n# Format all files\nyarn format\n```\n\n## Contributing\n\nContributions are welcome especially codemods that automate common Backstage upgrade steps. See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on submitting changes, adding changesets, and the release process.\n\n## Project structure\n\n```\ncodemods/\n  \u003cversion\u003e/\n    \u003cname\u003e/\n      scripts/codemod.ts   # Codemod logic (jssg / ast-grep)\n      tests/               # Input/expected test fixtures\n      codemod.yaml         # Codemod manifest\n      workflow.yaml        # Execution workflow\n      package.json\n```\n\n## License\n\nCopyright 2026 © The Backstage Authors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackstage%2Fcodemods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbackstage%2Fcodemods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackstage%2Fcodemods/lists"}