diff --git a/.changeset/rude-brooms-raise.md b/.changeset/rude-brooms-raise.md new file mode 100644 index 0000000000..6b5bd3ca3a --- /dev/null +++ b/.changeset/rude-brooms-raise.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-plugin-api': patch +--- + +Tweaked the logged deprecation warning for `createRouteRef` to hopefully make it more clear. diff --git a/packages/core-plugin-api/src/routing/RouteRef.ts b/packages/core-plugin-api/src/routing/RouteRef.ts index 26e63c8f3a..8bd3d604f6 100644 --- a/packages/core-plugin-api/src/routing/RouteRef.ts +++ b/packages/core-plugin-api/src/routing/RouteRef.ts @@ -59,21 +59,21 @@ export class RouteRefImpl if (config.path) { // eslint-disable-next-line no-console console.warn( - `[core-plugin-api] - routeRefs no longer decide their own path, please remove the path for ${this.toString()}. This will be removed in upcoming versions.`, + `DEPRECATION WARNING: Passing a path to createRouteRef is deprecated, please remove the path for ${this}.`, ); } if (config.icon) { // eslint-disable-next-line no-console console.warn( - `[core-plugin-api] - routeRefs no longer decide their own icon, please remove the icon for ${this.toString()}. This will be removed in upcoming versions.`, + `DEPRECATION WARNING: Passing an icon to createRouteRef is deprecated, please remove the icon for ${this}.`, ); } if (config.title) { // eslint-disable-next-line no-console console.warn( - `[core-plugin-api] - routeRefs no longer decide their own title, please remove the title for ${this.toString()}. This will be removed in upcoming versions.`, + `DEPRECATION WARNING: Passing a title to createRouteRef is deprecated, please remove the title for ${this}.`, ); } }