Commit Graph

1439 Commits

Author SHA1 Message Date
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
Patrik Oldsberg 935c646e89 Fix CLI module discovery and create-app test mock
Resolve CLI module entry points relative to the target project root
rather than relying on bare module name resolution. This ensures modules
are found even when the CLI package is symlinked from a separate location,
such as in the E2E test workspace setup.

Also add the missing cli-module-* entries to the create-app tasks test
mock that were omitted in a previous commit.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 01:12:43 +01:00
Patrik Oldsberg 86509de5c8 Fix CI failures: dependencies, API reports, and create-app versions
- Move runtime dependencies from devDependencies to dependencies in
  cli-module-build, cli-module-auth, cli-module-migrate, cli-module-new,
  cli-module-test-jest, and cli-module-translations
- Fix relative package.json paths in cli-module-build
- Downgrade rollup in cli-module-build to ^4.27.3 to match the CLI
- Downgrade eslint-webpack-plugin to ^4.2.0 to prevent @types/eslint v9
- Add CLI module packages to create-app version helper
- Add allow-warnings for CLI module packages in API reports
- Generate API report files for all CLI module packages

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 16:44:50 +01:00
Patrik Oldsberg d806b0cc9f Add automatic discovery of CLI modules from project dependencies
The CLI now scans the project root's dependencies and devDependencies
for packages with the cli-module role, loading them automatically.
Falls back to the built-in set with a deprecation warning when no
modules are found. Updated create-app templates and the monorepo root
to include all CLI modules as explicit devDependencies.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 12:40:43 +01:00
github-actions[bot] ed7c4e3bef Version Packages (next) 2026-03-10 17:34:12 +00:00
Fredrik Adelöw a302ac285c fix end to end tests
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 16:16:12 +01:00
Johan Persson d14b6e07f1 feat(org,catalog-graph)!: migrate MembersListCard, OwnershipCard, and CatalogGraphCard to BUI (#33177)
* feat(org): migrate MembersListCard to BUI EntityInfoCard

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

* feat(org)!: migrate OwnershipCard to BUI EntityInfoCard

Replaced MUI InfoCard with BUI EntityInfoCard in OwnershipCard.
Removed the `variant` and `maxScrollHeight` props since card sizing
and scrolling are now handled by the BUI layout. Wrapped body content
in a flex column div to keep the relations toggle pinned while the
grid scrolls. Updated app-legacy and create-app templates to remove
the dropped `variant` prop.

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

* feat(catalog-graph)!: migrate CatalogGraphCard to BUI EntityInfoCard

Replace MUI InfoCard with BUI EntityInfoCard in CatalogGraphCard.
The `variant` prop is removed — card sizing is now handled by the
BUI layout system. The deep link is replaced with a footer Link.

Remove `variant="gridItem"` from all EntityCatalogGraphCard usages
in app-legacy and create-app templates.

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

* feat(catalog-react): export useEntityRoute hook

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

* fix(cli): update translation extraction test for renamed org keys

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

---------

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-06 16:19:31 +01:00
Patrik Oldsberg d757071651 Merge pull request #33082 from backstage/bui-migrate-catalog-entity-cards
feat(catalog,org): migrate entity cards from MUI/InfoCard to BUI
2026-03-04 11:50:41 +01:00
github-actions[bot] db0d171511 Version Packages (next) 2026-03-03 14:16:49 +00:00
Johan Persson 20cb5117e1 fix: remove variant prop from create-app template for migrated cards
The E2E tests scaffold a new app from the create-app template,
which still passed variant="gridItem" to EntityAboutCard,
EntityUserProfileCard, and EntityGroupProfileCard after the prop
was removed.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-03 12:17:35 +01:00
Gabriel Dugny 8ea65069f1 Merge branch 'master' into package-workspaces
Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>

# Conflicts:
#	packages/cli-node/src/pacman/yarn/Yarn.test.ts
#	packages/cli-node/src/pacman/yarn/Yarn.ts
2026-02-25 09:11:36 +01:00
github-actions[bot] 4bd6a3a1af Version Packages (next) 2026-02-24 19:24:06 +00:00
Patrik Oldsberg 8c3802c5ba Add @backstage/cli to changeset, remove cli-common mock from create-app test
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-23 21:15:48 +01:00
Patrik Oldsberg 641d88cb07 Address PR review comments
- Remove cli-node/src/paths.ts compat layer, migrate all cli-node
  internal usage to import targetPaths from @backstage/cli-common
- Use single-arg overrideTargetPaths('/root') where dir === rootDir
- Scope mockDir to each describe block in bump.test.ts to avoid
  shared state issues with overrideTargetPaths
- Remove unnecessary overrideTargetPaths from plugin-manager.test.ts
- Remove stale findPaths mock from createApp.test.ts
- Use overrideTargetPaths in getWorkspaceRoot.test.ts and cli-node tests

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-23 21:01:27 +01:00
Patrik Oldsberg ebc01ef04d Add overrideTargetPaths test utility and fix rebase issues
Adds `overrideTargetPaths` to `@backstage/cli-common/testUtils` for
cleanly mocking `targetPaths` in tests without `jest.mock` or
`jest.spyOn`. Migrates all existing test mocks to use the new utility.

Also fixes translations module imports broken by the rebase.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-23 17:25:31 +01:00
Patrik Oldsberg 553e727d5f Fix lint errors: add eslint-disable for __dirname, fix no-use-before-define
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-23 14:44:11 +01:00
Patrik Oldsberg 07816d67f3 Address PR review comments
- Refactor targetPaths/findOwnPaths to class-based implementations with
  unified caching and .dir/.rootDir properties alongside resolve methods
- Replace jest.mock with jest.spyOn in plugin-manager.test.ts
- Remove paths compatibility wrapper from repo-tools, migrate all internal
  consumers to use targetPaths from @backstage/cli-common directly
- Fix changeset package name (@techdocs/cli not @backstage/techdocs-cli)
- Add migration examples to cli-common changeset
- Update API report for cli-common

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-23 14:44:11 +01:00
Patrik Oldsberg 70fc178697 Replace findPaths with targetPaths and findOwnPaths
Split the path resolution API in @backstage/cli-common into
targetPaths (cwd-based singleton) and findOwnPaths (package-relative).
Migrate all consumers across the repo away from the deprecated findPaths.

Rename TargetPaths/OwnPaths properties to resolve/resolveRoot,
removing the redundant type prefix from property names.

Make findOwnPaths calls lazy in modules - called inside functions
rather than at module scope.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-23 14:44:10 +01:00
Gabriel Dugny ebd4630702 chore: replace legacy package.json workspaces.packages by workspaces
Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
2026-02-22 16:50:54 +01:00
Fredrik Adelöw d95cf37ce3 Merge pull request #32583 from Believe-SA/commander-14
chore: update dependency commander to v14
2026-02-20 21:04:31 +01:00
github-actions[bot] e6df5d52ce Version Packages 2026-02-17 16:06:18 +00:00
Patrik Oldsberg 5920062fcc app-react: API cleanup and component utility for nav items
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:34 +01:00
Patrik Oldsberg 98fe69ae6a app: migrate to new navItems API
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:33 +01:00
Gabriel Dugny de62a9d322 chore: update dependency commander to v14, remove old @types/commander
Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
2026-02-16 17:29:25 +01:00
Andre Wanlin 3c4cfaee3d Changes based on copilot feedback
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-02-11 19:44:03 -06:00
Andre Wanlin 40f27209ed Create App Updates
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-02-11 19:12:28 -06:00
github-actions[bot] 7c41134684 Version Packages (next) 2026-02-10 16:14:59 +00:00
github-actions[bot] 1ea737c1e2 Version Packages (next) 2026-02-03 14:24:29 +00:00
github-actions[bot] d4b85dddee Version Packages (next) 2026-01-27 15:51:11 +00:00
Fredrik Adelöw f02219a054 Merge pull request #32516 from backstage/freben/nodecolon
Add a rule for the use of `node:` prefix on native imports
2026-01-27 14:17:14 +01:00
Fredrik Adelöw 7455dae884 require the use of node prefix on native imports
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-01-26 13:22:53 +01:00
Patrik Oldsberg c38b74df5f frontend-plugin-api: complete deprecation of app blueprints
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-01-23 11:41:16 +01:00
Fredrik Adelöw 559d1e2037 Revert "fix(create-app): pin memfs to 4.51.1 to fix e2e test failures"
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-01-20 21:24:37 +01:00
github-actions[bot] 2e902e7b43 Version Packages 2026-01-20 16:40:05 +00:00
Johan Persson ed1321ea8f fix(create-app): pin memfs to 4.51.1 to fix e2e test failures
memfs@4.56.2 (published 2026-01-19) has broken dependencies:
@jsonjoy.com/fs-snapshot requires @jsonjoy.com/util@^17.x but
imports paths that only exist in version 1.x.

This causes e2e tests to fail when creating new apps, as yarn
resolves memfs@^4.51.1 to the broken latest version.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-01-20 12:30:55 +01:00
github-actions[bot] 880310b797 Version Packages (next) 2026-01-13 12:10:45 +00:00
github-actions[bot] e237d65cdc Version Packages (next) 2026-01-05 22:23:51 +00:00
Andre Wanlin f1fe6fe90d Updated to use Node 24 and Debian Trixie
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-01-05 12:25:52 -06:00
Backstage Service Account 9f1ee3e667 Version Packages (next) (#32222)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-30 16:06:20 +01:00
Backstage Service Account fea3e3972d Version Packages (next) (#32150) 2025-12-23 18:22:06 +01:00
github-actions[bot] c24788d5bb Version Packages 2025-12-16 14:08:20 +00:00
Johan Persson 5f88e246e3 chore(create-app): add jest 30 dependencies to template
Add jest and its environment dependencies as devDependencies to the
create-app template, so new Backstage apps are set up with Jest 30
support out of the box.

For Jest 30, apps need @jest/environment-jsdom-abstract and jsdom
instead of jest-environment-jsdom.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2025-12-11 18:07:01 +01:00
github-actions[bot] e08f48a9b5 Version Packages (next) 2025-12-09 15:00:09 +00:00
Fredrik Adelöw 2bae83ab2e Version Policy Update - Node 22 to 24
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2025-12-08 10:53:38 +01:00
github-actions[bot] 336db00d21 Version Packages (next) 2025-12-02 15:37:41 +00:00
github-actions[bot] 756986e5e7 Version Packages (next) 2025-11-25 16:21:32 +00:00
Ben Lambert e2c6671a03 Merge pull request #31381 from enyineer/fix/create-app-with-proxy
Allow configuration of Proxy when using create-app CLI
2025-11-25 10:25:23 +01:00
enyineer ab017b9918 Remove global-agent from create-app
Signed-off-by: enyineer <nico.enking@gmail.com>
2025-11-19 10:42:45 +01:00
enyineer 1a483ed02f Remove undici and old mocks
Signed-off-by: enyineer <nico.enking@gmail.com>
2025-11-19 10:11:12 +01:00