61 Commits

Author SHA1 Message Date
David Festal 4074a227c2 fix(backend-dynamic-feature-service): improve package resolution for bundled dynamic plugins
Updated `resolvePackagePath` to correctly resolve `package.json` for dynamic plugins that bundle their own copy of `@backstage/backend-plugin-api`. This change ensures that the resolution works for both the host application and bundled dependencies, enhancing compatibility with plugins created using the `backstage-cli package bundle` command.

Signed-off-by: David Festal <dfestal@redhat.com>
Assisted-by: Cursor
2026-03-16 18:42:07 +01:00
Aramis Sennyey 0fbcf23714 feat: add support for OpenAPI 3.1 (#32300)
* breaking: add support for OpenAPI 3.1

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* add changeset

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* update nullable prop

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* remove more allowReserved usages

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* make changes less breaking

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* Apply suggestion from @aramissennyeydd

Signed-off-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>

---------

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
2026-02-28 09:04:02 -05: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 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
Patrik Oldsberg 12ef180a5f Merge pull request #30092 from Sarabadu/module-id-validation
validate plugin and module ids
2026-02-02 20:13:35 +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
Juan Pablo Garcia Ripa 051b3af31d fix test and update invalid ids
Signed-off-by: Juan Pablo Garcia Ripa <sarabadu@gmail.com>
2026-01-25 13:53:13 +01:00
Paul Schultz 05f60e1e0a refactor: convert constructor parameter properties for erasableSyntaxOnly compatibility
Signed-off-by: Paul Schultz <pschultz@pobox.com>
2025-10-14 08:29:21 -05:00
Fredrik Adelöw 3507fcdf89 Just some more circular dep cleanup
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2025-06-25 11:33:23 +02:00
David Festal d5c0cbd25c Fix wrong imports which lead to module initialization failures
Signed-off-by: David Festal <dfestal@redhat.com>
2025-06-24 15:09:37 +02:00
Fredrik Adelöw c83cd8b4cb import fixes
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2025-06-10 15:32:12 +02:00
Gabriel Dugny 72d019d663 chore(typos): Fix low-impact typos
Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
2025-04-23 17:56:22 +02:00
Andre Wanlin 10f693c3ad Removed CatalogBuilder Usages
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2025-04-21 13:35:53 -05:00
David Festal 7a83050098 Fix config schema naming after review comment changes
Signed-off-by: David Festal <dfestal@redhat.com>
2025-04-08 23:40:37 +02:00
David Festal f7886f62fd Change the module federation asset server from a backend plugin to a backend service...
... that returns more module federation options, can be customized through a plugin, and also serves the list of exposed modules.

Signed-off-by: David Festal <dfestal@redhat.com>
2025-04-08 22:55:42 +02:00
David Festal b07bff44eb Update default schema locator for frontend plugins...
... to match the frontend location of plugins built as module federation remotes.

Signed-off-by: David Festal <dfestal@redhat.com>
2025-04-08 22:54:46 +02:00
David Festal 9c4f72b2db Update Backend Dynamic Feature Service to provide the router for frontend plugins
Signed-off-by: David Festal <dfestal@redhat.com>
2025-04-08 22:54:27 +02:00
Andre Wanlin ee519c57d9 Removed deprecated events related code
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2025-03-14 14:06:18 -05:00
Patrik Oldsberg 92a56f6b9c backend-plugin-api: removed the deprecated featureDiscoveryServiceRef
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-02-03 01:29:11 +01:00
Patrik Oldsberg e57fd0c63d Merge pull request #28308 from backstage/rugvip/modules
cli: add support for native ESM in Node.js packages
2025-01-16 14:07:54 +01:00
Patrik Oldsberg 96c20cd9cf backend-dynamic-feature-service: wait for changes to be tracked
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2024-12-26 21:29:02 +01:00
Fredrik Adelöw 8379bf4a80 remove PluginDatabaseManager and PluginEndpointDiscovery
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-12-21 20:49:21 +01:00
David Festal 1aeec12099 fix(backend-dynamic-feature-service): addresolvePackagePath support in the CommonJSMocduleLoader
Signed-off-by: David Festal <dfestal@redhat.com>
2024-10-29 17:45:04 +01:00
David Festal e939cd7f63 refactor(backend-dynamic-feature-service): Providing config-based root logger options.
Signed-off-by: David Festal <dfestal@redhat.com>
2024-10-25 17:47:49 +02:00
Patrik Oldsberg f78763ce2a derp
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2024-10-22 21:40:01 +02:00
Patrik Oldsberg c4bb085f7a backend-dynamic-feature-service: fix scanner test
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2024-10-22 20:41:39 +02:00
David Festal 80bb1378d0 fix review comments
Signed-off-by: David Festal <dfestal@redhat.com>
2024-10-21 16:12:32 +02:00
David Festal 8593dfa13a refactor(backend-dynamic-feature-service): Improve alpha package support
Signed-off-by: David Festal <dfestal@redhat.com>
2024-10-16 12:45:42 +02:00
Fredrik Adelöw 0a69ca128e try to improve log tests stability
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-10-15 09:42:13 +02:00
Fredrik Adelöw 49a3ae195d set a higher timeout for a feature service test
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-10-14 16:57:30 +02:00
Fredrik Adelöw 307c8ab6b6 Update packages/backend-dynamic-feature-service/src/features/features.test.ts
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-10-14 15:49:18 +02:00
David Festal 67f98d051d Fix review comments
Signed-off-by: David Festal <dfestal@redhat.com>
2024-10-08 15:32:53 +02:00
David Festal bb5b95f613 refactor(backend-dynamic-feature-service): all-in-one feature integration tests
Signed-off-by: David Festal <dfestal@redhat.com>
2024-10-07 15:20:02 +02:00
David Festal 4c89e4759d refactor(backend-dynamic-feature-service): allow passing an async module loader in the DynamicPluginsFeatureLoaderOptions.
Signed-off-by: David Festal <dfestal@redhat.com>
2024-10-07 15:19:43 +02:00
David Festal d18d4942f9 refactor(backend-dynamic-feature-service): single line activation.
- DynamicPlugins service is restored, since it is required for plugins to depend on it in order to get the details of loaded dynamic plugins
- An all-in-one feature loader is provided that allows  1-liner installation of both the dynamic features and  additional services or plugins required to have the dynamic plugins work correctly with dynamic plugins config schemas.

Signed-off-by: David Festal <dfestal@redhat.com>
2024-10-07 15:19:20 +02:00
David Festal e6c05502d5 refactor(backend-dynamic-feature-service): better load failure management...
... and other small enhancements (e.g. ability to get the `ScannedPluginPackage` of a loaded plugin).

Signed-off-by: David Festal <dfestal@redhat.com>
2024-10-07 15:19:20 +02:00
Camila Belo 7a72ec899b refactor: apply review suggestions
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2024-08-27 10:49:03 +02:00
Camila Belo cd38da88ba refactor: convert discovery services into feature loaders
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2024-08-26 12:05:25 +02:00
Patrik Oldsberg 92c2779172 Merge pull request #26106 from gashcrumb/feature-compat-wrapper-fix
backend-dynamic-feature-service: expand type check
2024-08-21 11:38:55 +02:00
Stan Lewis e27f889d12 backend-dynamic-feature-service: expand type check
This change caters for backend dynamic plugins that have been wrapped by
BackendFeatureCompatWrapper by expanding the allowed types for the
default export of a dynamic plugin to also be a function.

Signed-off-by: Stan Lewis <gashcrumb@gmail.com>
2024-08-20 11:16:56 -04:00
Fredrik Adelöw 9080f57970 remove service compat too
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-08-20 13:26:25 +02:00
Camila Belo fc24d9ebf0 refactor: stop using backend-tasks in packages and plugins
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2024-08-19 15:48:21 +02:00
Johan Haals 38f3827e5a Remove deprecated UrlReaders and update usages
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2024-08-15 13:28:21 +02:00
Johan Haals 5cee28573e Delete WinstonLogger from backend-defaults, instead import from backend-defaults
Co-authored-by: Camila Belo <camilaibs@gmail.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2024-08-14 14:32:04 +02:00
Johan Haals f24ba909bf backend-app-api: Move deprecated loadBackendConfig to backend-common
Co-authored-by: Camila Belo <camilaibs@gmail.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2024-08-14 14:32:03 +02:00
Camila Belo d45026fbf1 fix(backend-dynamic-feature-service): fix root lifecycle service factory import
Signed-off-by: Camila Belo <camilaibs@gmail.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2024-08-14 14:32:02 +02:00
Johan Haals 24bed62544 backend-app-api: Remove deprecated service implementations
Co-authored-by: Camila Belo <camilaibs@gmail.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2024-08-14 14:32:02 +02:00
Fredrik Adelöw 78a0b086d2 Make createBackendPlugin and createBackendModule return BackendFeature instead of () => BackendFeature
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-06-13 15:56:24 +02:00