1487 Commits

Author SHA1 Message Date
Fredrik Adelöw 826788803e Revert "try to remove protojs pins"
This reverts commit b15f74b62f.

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-27 12:29:38 +02:00
github-actions[bot] 68db890456 Version Packages (next) 2026-05-26 15:26:38 +00:00
Fredrik Adelöw b15f74b62f try to remove protojs pins
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-26 10:29:17 +02:00
github-actions[bot] b97fcb0a93 Version Packages 2026-05-19 18:28:24 +00:00
benjdlambert 219cc05885 fix(create-app): remove disabled nav-item config that breaks custom sidebar
The nav-item extensions were disabled in the template config to prevent
duplicate rendering, but the custom sidebar already handles this via
nav.take(). After #33788 added filtering of disabled nav items from page
discovery, disabling them causes nav.take('page:catalog') to return
nothing, breaking the sidebar navigation.

Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 09:08:02 +02:00
github-actions[bot] 42a2f56e61 Version Packages (next) 2026-05-12 18:28:01 +00:00
Fredrik Adelöw d61a91846e fix(create-app): pin jest and @jest/environment-jsdom-abstract to ~30.2.0
30.4.0 introduced synchronous require(ESM) that requires Node v24.9+,
breaking tests on Node 22. 30.3.0 pulls in @sinonjs/fake-timers@^15
which conflicts with @types/sinon@^17 (used by aws-sdk-client-mock).
30.2.0 avoids both issues cleanly.

Resets lockfile to a clean base-install from master constraints.

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 15:04:51 +02:00
Fredrik Adelöw e7020fa352 fix(create-app): pin @jest/environment-jsdom-abstract to ~30.3.0 alongside jest
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 14:46:37 +02:00
Fredrik Adelöw 9198a7f03e fix(create-app): pin jest to ~30.3.0 to avoid Node 24.9+ requirement
Jest 30.4.0 introduced synchronous require(ESM) support that requires
Node v24.9+. With ^30.2.0 in the templates, a fresh yarn install in
e2e test apps resolves to 30.4.x and breaks on Node 22.

Pin to ~30.3.0 (30.3.x patches only), which includes the 30.3.0 fix
that explicitly disables the require_module feature flag, while staying
below the 30.4.0 runtime requirement.

Co-authored-by: Cursor <cursoragent@cursor.com>

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-11 14:46:36 +02:00
github-actions[bot] b0bc1e5cc9 Version Packages (next) 2026-05-05 14:57:07 +00:00
github-actions[bot] 7295193bb6 Version Packages (next) 2026-04-28 15:53:09 +00:00
Patrik Oldsberg 7daa136495 create-app: pin protobufjs and @protobufjs/inquire in yarn.lock seed
@protobufjs/inquire@1.1.1 dropped the eval-based workaround that hid its
dynamic require() from bundlers, which makes webpack/rspack emit a
"Critical dependency: the request of a dependency is an expression"
warning that fails the build under CI=true. protobufjs@7.5.6 also
bumped its dependency on @protobufjs/inquire from ^1.1.0 to ^1.1.1, so
pinning just the inquire range isn't enough — pin protobufjs to 7.5.5
for all known workspace ranges as well.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-28 16:05:29 +02:00
github-actions[bot] 1cc86bee1c Version Packages (next) 2026-04-21 15:07:43 +00:00
Fredrik Adelöw 8e7f7249e7 chore: regenerate knip reports
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-16 12:14:47 +02:00
Patrik Oldsberg 927c0039d7 repo-tools, create-app: replace duplicate error utilities with cli-common imports (#33893)
* Replace duplicate error utilities with @backstage/cli-common imports

Remove dead CustomError and ExitCodeError classes from repo-tools and
create-app, replacing them with the ExitCodeError import from
@backstage/cli-common. This fixes the instanceof check in exitWithError
so it actually catches errors thrown by cli-common's run().

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor

* Add changeset for repo-tools and create-app

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor

---------

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-04-15 12:39:42 +00:00
github-actions[bot] 93e643d142 Version Packages 2026-04-14 14:57:31 +00:00
Patrik Oldsberg 6541cbfc58 Remove stray package.json from create-app templates
These empty `{}` files were accidentally committed during the template
directory rename and override the properly templated package.json
generated from package.json.hbs, causing E2E tests to fail.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:52:20 +02:00
Patrik Oldsberg 7fc1a406d2 Increase E2E timeouts for default-app template
The new frontend system app takes longer to compile and render on
Windows CI runners. Switch from port-based to URL-based server
readiness detection and increase expect timeout to 30s to avoid
flaky failures on slow runners.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:52:20 +02:00
Patrik Oldsberg 02a0f0dfa0 Use exact match for sidebar link assertions in E2E template test
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:52:20 +02:00
Patrik Oldsberg 491297557e Add missing package versions to test mock for default-app template
The test was updated to use the default-app template (renamed from
next-app), but the mock version list was missing packages that this
template requires such as @backstage/core-compat-api,
@backstage/frontend-defaults, @backstage/frontend-plugin-api, and
others. Also sorted the mock entries alphabetically.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:52:20 +02:00
Patrik Oldsberg d312841559 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-04-09 15:51:28 +02:00
Patrik Oldsberg 83624f080b Fix broken doc link after template directory rename
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:51:28 +02:00
Patrik Oldsberg 25418372e0 create-app: rename template directories
Rename `next-app` to `default-app` and `default-app` to `legacy-app`
to better reflect their roles.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:51:27 +02:00
Andre Wanlin eb8a6f7291 Merge pull request #33346 from awanlin/create-app/mcp-actions
create-app - Added the `mcp-actions-backend` and the `plugin-auth` plugins
2026-04-09 08:48:17 -05:00
Andre Wanlin 72a493a56a create-app - Added the mcp-actions-backend plugin
Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Changes based on feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Minor corrections

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Default to false

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Corrections

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Feedback changes

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Feedback changes

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Added tip

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

More feedback changes

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed typos

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Reorder auth

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-04-09 08:33:59 -05:00
github-actions[bot] 6c10d88c13 Version Packages (next) 2026-04-07 15:30:58 +00:00
github-actions[bot] a2cb332e25 Version Packages (next) 2026-03-31 15:30:51 +00:00
Patrik Oldsberg daaaa72ebb e2e: use exact name matching for sidebar link assertions
New plugin nav items like "Catalog Graph" cause Playwright's
substring-based getByRole name matching to find multiple elements
when searching for "Catalog". Switch to exact: true.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-25 22:53:03 +01:00
github-actions[bot] c1b510cabb Version Packages (next) 2026-03-24 14:54:00 +00:00
Fredrik Adelöw 311af05c71 even more careful lockfile
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-23 15:23:11 +01:00
Fredrik Adelöw e9e6c4e529 fix https://github.com/knex/knex/issues/6403
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-23 14:42:30 +01:00
Patrik Oldsberg a49d871524 Merge pull request #33451 from backstage/rugvip/create-app-fixes
create-app: improve next template sidebar, nav wiring, and examples
2026-03-20 14:56:44 +01:00
Patrik Oldsberg 54b88a8607 create-app: remove redundant extension config
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-20 12:29:59 +01:00
Patrik Oldsberg 288a997236 create-app: move down app visualizer sidebar item
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-20 12:29:58 +01:00
Patrik Oldsberg ae4963eacb create-app: remove unnecessary core-compat-api usage
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-20 12:29:58 +01:00
Patrik Oldsberg 016098080a create-app: add example techdocs page
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-20 12:29:56 +01:00
Patrik Oldsberg 66c56c192e create-app: use nav system for settings sidebar item
Replace the hardcoded SidebarSettings component with nav.take('page:user-settings') in the create-app template sidebar, so that the user-settings nav item is rendered via the nav system.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-20 09:05:37 +01:00
Johan Persson d66a3ec9ab feat(frontend-plugin-api): add titleRouteRef to PageBlueprint
Add `titleRouteRef` to `PageLayoutProps` so the plugin header title
links back to the plugin root. `PageBlueprint` resolves it from
`plugin.routes.root` with fallback to `params.routeRef`.

- PageLayout swap resolves the title link via a conditional child
  component that calls `useRouteRef` only when a route ref exists
- Header actions get stable React keys via `cloneElement`

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-20 09:05:23 +01:00
Patrik Oldsberg 4cf9f3a965 create-app: remove unnecessary @backstage/cli-module-new dependency
Removed the direct @backstage/cli-module-new devDependency from the
next-app template since it is already included transitively through
@backstage/cli-defaults.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-18 11:02:34 +01:00
github-actions[bot] 5725b5fcfa Version Packages 2026-03-17 21:39:07 +00:00
Patrik Oldsberg 8dda73d806 create-app: fix duplicate search item in next-app
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-17 20:13:06 +01:00
Patrik Oldsberg 219490cd92 create-app: Fix E2E test for new default template
Add @backstage/cli-module-new to the version map so that the
next-app template can resolve it during templating, and update
the E2E test to build the dist workspace from the next-app
template since it is now the default.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 16:45:11 +01:00
Patrik Oldsberg 4568618cf1 create-app: fix next-app e2e sign-in assertion
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 16:18:02 +01:00
Patrik Oldsberg 7cd15e7c90 create-app: fix next-app template formatting
Align the next-app template output with the scaffolded app Prettier config so the default app E2E checks pass.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 16:17:18 +01:00
Patrik Oldsberg 08d9770715 cli: Rename frontend plugin templates and add auto-detection
Renamed the CLI templates for frontend plugins:
- new-frontend-plugin → frontend-plugin
- new-frontend-plugin-module → frontend-plugin-module
- frontend-plugin (legacy) → legacy-frontend-plugin

Added auto-detection logic that checks packages/app/package.json to
determine which frontend system the app uses. When using default
templates, only the appropriate frontend plugin template is shown:
- Apps with @backstage/frontend-defaults see the new system templates
- Apps with @backstage/app-defaults see the legacy template

Both templates display as "frontend-plugin" to users, so existing
workflows are preserved while automatically using the correct template.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-17 16:17:17 +01:00
Patrik Oldsberg a6735c33b1 create-app: Make new frontend system the default
The new frontend system is now the default template when creating a new
Backstage app. The previous `--next` flag has been replaced with a
`--legacy` flag that can be used to create an app using the old frontend
system instead.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-17 16:12:27 +01:00
Johan Persson c548a0ff86 refactor(catalog,api-docs): migrate entity table cards to BUI (#33260)
* feat(catalog-react): add EntityDataTable and EntityRelationCard components

Add EntityDataTable (BUI Table wrapper for entity data) and
EntityRelationCard (card shell + data fetching + table) as shared
building blocks for entity relation table cards. Includes BUI column
factories, column presets for common entity types, and a new
translation key for the empty state help link.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* refactor(catalog): migrate 8 entity table cards to EntityRelationCard

Rewrite HasComponentsCard, HasResourcesCard, HasSubcomponentsCard,
HasSubdomainsCard, HasSystemsCard, DependsOnComponentsCard,
DependsOnResourcesCard, and DependencyOfComponentsCard as thin
wrappers around EntityRelationCard from catalog-react. Remove variant
and tableOptions props.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* refactor(api-docs): migrate 5 entity table cards to EntityRelationCard

Rewrite ConsumedApisCard, ProvidedApisCard, HasApisCard,
ConsumingComponentsCard, and ProvidingComponentsCard to use
EntityRelationCard from catalog-react. Add BUI column presets for
API-specific columns alongside existing MUI presets. Remove variant
and tableOptions props.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* chore: add API reports and changesets for entity table card migration

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* fix(catalog-react,api-docs): refine entity card migration

Use BUI Alert for error states and BUI Link for empty state help
links in EntityRelationCard instead of core-components. Replace MUI
ToggleButton with BUI ButtonIcon for the API definition column.
Add trailing periods to empty state translation messages. Fix tests
asserting on removed external link icon SVG.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* feat(catalog-react): add column sorting to EntityDataTable

Introduce EntityColumnConfig extending ColumnConfig with an optional
sortValue getter. EntityDataTable now uses useTable with a sortFn
that reads sortValue from each column, restoring the per-column
sorting that the old core-components Table provided by default. All
built-in column factories set isSortable and sortValue.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* fix(api-docs): use dynamic entity kind in empty state messages

Restore entity.kind interpolation in ConsumedApisCard, ProvidedApisCard,
and HasApisCard empty state translations instead of hardcoded strings.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* fix(catalog-react): use data length for useTable pageSize

Replace pageSize: Infinity with tableData.length to avoid potential
edge cases in pagination math.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* fix(catalog-react): avoid this binding in column factories

Use columnFactories.createEntityRelationColumn instead of
this.createEntityRelationColumn so the methods work when
destructured.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* chore: update alpha API reports

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* fix(create-app): remove variant prop from migrated entity cards in template

The create-app template EntityPage still passed variant="gridItem"
to cards that no longer accept it.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* test(catalog-react): add tests for EntityDataTable and EntityRelationCard

Cover rendering with data, empty state, error state, and column
sorting for EntityDataTable. Cover title rendering, empty state
with help link, related entity display, and error state for
EntityRelationCard.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* refactor(catalog,api-docs): add backwards compatibility for legacy props

Support both old (variant, columns, tableOptions) and new (columnConfig)
props via a discriminated union type. When legacy props are detected the
old MUI-based implementation is used; otherwise the new BUI-based
EntityRelationCard renders. This avoids immediate breaking changes and
provides a migration path. Changesets downgraded from major/minor to
minor/patch accordingly.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* refactor(catalog-react,catalog,api-docs): address review feedback

Remove BaseProps types and use inline union in component signatures.
Move EntityDataTable, EntityRelationCard, and related types to alpha
exports. Group column presets and help links into entityColumnPresets
object. Update all consumers and API reports.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

---------

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-17 14:33:45 +00:00
Patrik Oldsberg ea90ab0590 Move yarn new templates from @backstage/cli to @backstage/cli-module-new
The built-in templates used by `yarn new` are moved from `packages/cli/templates/`
to `packages/cli-module-new/templates/`, colocating them with the code that
consumes them.

A backwards compatibility rewrite in the template resolution ensures that
existing `@backstage/cli/templates/*` references in root `package.json`
configurations continue to work by transparently resolving them to
`@backstage/cli-module-new/templates/*`.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:10:24 +01:00
Patrik Oldsberg 4d081452b1 Address review feedback from freben
- Use cli-defaults instead of listing individual CLI modules in
  create-app template and root package.json
- Move nodeTransform config files from cli-module-build to cli-node
  to avoid cross-module direct imports
- Rename cli-module-create-github-app to cli-module-github
- Start createCliModule init chain with Promise.resolve()
- Deduplicate exitWithError in runCliModule.ts
- Extract shared isCommandNodeHidden to @internal/cli
- Add explanatory comment for fromArray deduplication field
- Restore error for cli role packages missing bin in runCliExtraction

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 12:55:22 +01:00
Patrik Oldsberg 7781ae5911 Add @backstage/cli-defaults package
Introduces a new `@backstage/cli-defaults` package that re-exports all
standard CLI modules as a single array, simplifying dependency management
for consumers. The CLI's `CliInitializer` is updated to support array
exports alongside single module exports. The create-app template,
changesets, and CLI fallback are updated to use `@backstage/cli-defaults`
instead of listing 11 individual modules.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 15:01:35 +01:00