You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR make sure that createRouter and other exports are marked as deprecated. For the majority of packages there should only be one default export of the backend plugin itself. The @backstage/backend-common package is deprecated so usages of that package should also be avoided.
Backstage’s new backend system is ready for general use; we are now asking for a full transition over to the new backend system, which involves stop supporting the old system. By old system we mean having exports of createRouter and related types. There should only need to be one export like this in the backend plugin’s index.ts file.
How do I help?
Run yarn backstage-repo-tools lint legacy-backend-exports in the repository to get a full report of packages that require action.
Phase 1
Ensure that plugins contain a default export
Ensure that there is a default export of the backend plugin in index.ts, see this example.
If the plugin previously had a default export in plugins/<plugin-id>/src/alpha.ts, make sure that that export is deprecated and that the default export is moved to the non-alpha index.ts instead.
Deprecate createRouter, RouterOptions and similar types.
Here’s an example of a plugin’s createRouter being deprecated.
/**
+ * @deprecated Please migrate to the new backend system as this will be removed in the future.
* @public
* */
export async function createRouter(
options: RouterOptions,
): Promise<express.Router> {
Phase 2
Remove deprecated exports
Ensure that deprecations have been out for at one mainline release before proceeding with removal of all deprecated exports. Removing exports from one release to another is not recommended
The complete migration story for a backend plugin (including deprecation) is also mentioned in our docs.
If you take on migrating a backend plugin, feel free to add a comment in this issue to avoid duplicate work.
We plan to have all createRouter exports and @backstage/backend-common usages removed by the end of this year
The text was updated successfully, but these errors were encountered:
Getting rid of
@backstage/backend-common
should tackle thejsonpath-plus
vulnerability https://security.snyk.io/vuln/SNYK-JS-JSONPATHPLUS-7945884Plugin should be migrated from deprecated
@backstage/backend-common
package.The description below is copied from backstage/backstage#26353
TL;DR make sure that
createRouter
and other exports are marked as deprecated. For the majority of packages there should only be one default export of the backend plugin itself. The @backstage/backend-common package is deprecated so usages of that package should also be avoided.Backstage’s new backend system is ready for general use; we are now asking for a full transition over to the new backend system, which involves stop supporting the old system. By old system we mean having exports of createRouter and related types. There should only need to be one export like this in the backend plugin’s index.ts file.
How do I help?
Run
yarn backstage-repo-tools lint legacy-backend-exports
in the repository to get a full report of packages that require action.Phase 1
Ensure that plugins contain a default export
Ensure that there is a default export of the backend plugin in
index.ts
, see this example.If the plugin previously had a default export in
plugins/<plugin-id>/src/alpha.ts
, make sure that that export is deprecated and that the default export is moved to the non-alpha index.ts instead.Deprecate
createRouter
,RouterOptions
and similar types.Here’s an example of a plugin’s
createRouter
being deprecated.Phase 2
Remove deprecated exports
Ensure that deprecations have been out for at one mainline release before proceeding with removal of all deprecated exports. Removing exports from one release to another is not recommended
The complete migration story for a backend plugin (including deprecation) is also mentioned in our docs.
If you take on migrating a backend plugin, feel free to add a comment in this issue to avoid duplicate work.
We plan to have all
createRouter
exports and@backstage/backend-common
usages removed by the end of this yearThe text was updated successfully, but these errors were encountered: