Files
backstage/.changeset/odd-beans-sell.md
T
2025-07-29 01:19:32 +02:00

1.1 KiB

@backstage/frontend-plugin-api
@backstage/frontend-plugin-api
minor

BREAKING: The ApiBlueprint has been updated to use the new advanced type parameters through the new defineParams blueprint option. This is an immediate breaking change that requires all existing usages of ApiBlueprint to switch to the new callback format. Existing extensions created with the old format are still compatible with the latest version of the plugin API however, meaning that this does not break existing plugins.

To update existing usages of ApiBlueprint, you remove the outer level of the params object and replace createApiFactory(...) with define => define(...).

For example, the following old usage:

ApiBlueprint.make({
  name: 'error',
  params: {
    factory: createApiFactory({
      api: errorApiRef,
      deps: { alertApi: alertApiRef },
      factory: ({ alertApi }) => {
        return ...;
      },
    })
  },
})

is migrated to the following:

ApiBlueprint.make({
  name: 'error',
  params: define =>
    define({
      api: errorApiRef,
      deps: { alertApi: alertApiRef },
      factory: ({ alertApi }) => {
        return ...;
      },
    }),
})