diff --git a/.changeset/happy-balloons-smell.md b/.changeset/happy-balloons-smell.md new file mode 100644 index 0000000000..74b1f34230 --- /dev/null +++ b/.changeset/happy-balloons-smell.md @@ -0,0 +1,12 @@ +--- +'@backstage/plugin-bazaar': patch +'@backstage/plugin-code-coverage-backend': patch +'@backstage/plugin-jenkins': patch +'@backstage/plugin-jenkins-backend': patch +'@backstage/plugin-scaffolder': patch +'@backstage/plugin-scaffolder-backend': patch +'@backstage/plugin-tech-insights-backend': patch +'@backstage/plugin-todo-backend': patch +--- + +Remove usages of `EntityRef` and `parseEntityName` from `@backstage/catalog-model` diff --git a/.changeset/slow-waves-press.md b/.changeset/slow-waves-press.md new file mode 100644 index 0000000000..d2a06df58e --- /dev/null +++ b/.changeset/slow-waves-press.md @@ -0,0 +1,8 @@ +--- +'@backstage/catalog-model': patch +--- + +**DEPRECATED**: The `EntityRef` type and `parseEntityName` function are now +deprecated, and will soon be removed. This is part of a larger movement toward +fixing the poorly named `EntityName` type which should instead have been named +`EntityRef`. Please remove any usage of these as soon as possible. diff --git a/packages/catalog-model/api-report.md b/packages/catalog-model/api-report.md index 0afe87e709..5d8540d3cd 100644 --- a/packages/catalog-model/api-report.md +++ b/packages/catalog-model/api-report.md @@ -69,7 +69,14 @@ export class CommonValidatorFunctions { // @public @deprecated export function compareEntityToRef( entity: Entity, - ref: EntityRef | EntityName, + ref: + | string + | { + kind?: string; + namespace?: string; + name: string; + } + | EntityName, context?: { defaultKind?: string; defaultNamespace?: string; @@ -212,7 +219,7 @@ export type EntityPolicy = { enforce(entity: Entity): Promise; }; -// @public +// @public @deprecated export type EntityRef = | string | { @@ -384,9 +391,15 @@ export class NoForeignRootFieldsEntityPolicy implements EntityPolicy { export const ORIGIN_LOCATION_ANNOTATION = 'backstage.io/managed-by-origin-location'; -// @public +// @public @deprecated export function parseEntityName( - ref: EntityRef, + ref: + | string + | { + kind?: string; + namespace?: string; + name: string; + }, context?: { defaultKind?: string; defaultNamespace?: string; @@ -395,7 +408,13 @@ export function parseEntityName( // @public export function parseEntityRef( - ref: EntityRef, + ref: + | string + | { + kind?: string; + namespace?: string; + name: string; + }, context?: { defaultKind: string; defaultNamespace: string; @@ -404,7 +423,13 @@ export function parseEntityRef( // @public export function parseEntityRef( - ref: EntityRef, + ref: + | string + | { + kind?: string; + namespace?: string; + name: string; + }, context?: { defaultKind: string; }, @@ -416,7 +441,13 @@ export function parseEntityRef( // @public export function parseEntityRef( - ref: EntityRef, + ref: + | string + | { + kind?: string; + namespace?: string; + name: string; + }, context?: { defaultNamespace: string; },