From 6ecbaffd47189aab05a29164e8a9232ae133091e Mon Sep 17 00:00:00 2001 From: Casper Jensen Date: Tue, 22 Nov 2022 14:57:56 +0100 Subject: [PATCH 1/6] Fixed deprecations in index.ts Signed-off-by: Casper Jensen --- plugins/catalog-backend/src/ingestion/index.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/plugins/catalog-backend/src/ingestion/index.ts b/plugins/catalog-backend/src/ingestion/index.ts index 0b00809043..0fc71f6785 100644 --- a/plugins/catalog-backend/src/ingestion/index.ts +++ b/plugins/catalog-backend/src/ingestion/index.ts @@ -15,11 +15,6 @@ */ export type { - AnalyzeLocationEntityField, - AnalyzeLocationExistingEntity, - AnalyzeLocationGenerateEntity, - AnalyzeLocationRequest, - AnalyzeLocationResponse, LocationAnalyzer, ScmLocationAnalyzer, AnalyzeOptions, From 1f6aea38f9d56607f23f0c083f997dd2e7f6931b Mon Sep 17 00:00:00 2001 From: Casper Jensen Date: Tue, 22 Nov 2022 15:15:02 +0100 Subject: [PATCH 2/6] Fixed deprecations in PlaceholderProcessor.ts Signed-off-by: Casper Jensen --- .../catalog-backend/src/modules/core/PlaceholderProcessor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.ts b/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.ts index ec432c5fdc..79fcee960c 100644 --- a/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.ts +++ b/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.ts @@ -107,7 +107,7 @@ export class PlaceholderProcessor implements CatalogProcessor { return [data, false]; } - const resolverKey = keys[0].substr(1); + const resolverKey = keys[0].substring(1); const resolverValue = data[keys[0]]; const resolver = this.options.resolvers[resolverKey]; From db46dea10aedf325fcec994cc6ecc86046124136 Mon Sep 17 00:00:00 2001 From: Casper Jensen Date: Tue, 22 Nov 2022 15:15:36 +0100 Subject: [PATCH 3/6] Fixed deprecations in parseEntityFilterParams.ts Signed-off-by: Casper Jensen --- .../src/service/request/parseEntityFilterParams.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/catalog-backend/src/service/request/parseEntityFilterParams.ts b/plugins/catalog-backend/src/service/request/parseEntityFilterParams.ts index 1ea5d44b2c..767a36ce71 100644 --- a/plugins/catalog-backend/src/service/request/parseEntityFilterParams.ts +++ b/plugins/catalog-backend/src/service/request/parseEntityFilterParams.ts @@ -63,9 +63,13 @@ export function parseEntityFilterString( const equalsIndex = statement.indexOf('='); const key = - equalsIndex === -1 ? statement : statement.substr(0, equalsIndex).trim(); + equalsIndex === -1 + ? statement + : statement.substring(0, equalsIndex).trim(); const value = - equalsIndex === -1 ? undefined : statement.substr(equalsIndex + 1).trim(); + equalsIndex === -1 + ? undefined + : statement.substring(equalsIndex + 1).trim(); if (!key) { throw new InputError( `Invalid filter, '${statement}' is not a valid statement (expected a string on the form a=b or a= or a)`, From 5b3e2afa45f48d662b7ff8500f26290eeec9f664 Mon Sep 17 00:00:00 2001 From: Casper Jensen Date: Wed, 23 Nov 2022 10:18:29 +0100 Subject: [PATCH 4/6] Added changeset for pull request. Signed-off-by: Casper Jensen --- .changeset/light-turtles-yawn.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/light-turtles-yawn.md diff --git a/.changeset/light-turtles-yawn.md b/.changeset/light-turtles-yawn.md new file mode 100644 index 0000000000..4941d3d3ef --- /dev/null +++ b/.changeset/light-turtles-yawn.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend': patch +--- + +Removed deprecated types that are exported in plugins/catalog-backend/src/ingestion/index.ts. Also fixed deprecated use of "substr" into "substring" in the files plugins/catalog-backend/src/modules/core/PlaceholderProcessor.ts and plugins/catalog-backend/src/service/request/parseEntityFilterParams.ts. From 1e27f7e3c2a7cb20460ee1f38867296466fc81df Mon Sep 17 00:00:00 2001 From: Casper Jensen Date: Wed, 23 Nov 2022 14:39:13 +0100 Subject: [PATCH 5/6] Fixed changeset. Signed-off-by: Casper Jensen --- .changeset/light-turtles-yawn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/light-turtles-yawn.md b/.changeset/light-turtles-yawn.md index 4941d3d3ef..b199a7535f 100644 --- a/.changeset/light-turtles-yawn.md +++ b/.changeset/light-turtles-yawn.md @@ -2,4 +2,4 @@ '@backstage/plugin-catalog-backend': patch --- -Removed deprecated types that are exported in plugins/catalog-backend/src/ingestion/index.ts. Also fixed deprecated use of "substr" into "substring" in the files plugins/catalog-backend/src/modules/core/PlaceholderProcessor.ts and plugins/catalog-backend/src/service/request/parseEntityFilterParams.ts. +Removed deprecated types that are exported in plugins/catalog-backend/src/ingestion/index.ts. Also fixed deprecated use of substr into substring in the files plugins/catalog-backend/src/modules/core/PlaceholderProcessor.ts and plugins/catalog-backend/src/service/request/parseEntityFilterParams.ts. From f12bbe4a9431a7d72d1cd6907f886fa875bb5210 Mon Sep 17 00:00:00 2001 From: Casper Jensen Date: Mon, 28 Nov 2022 10:22:13 +0100 Subject: [PATCH 6/6] Removed changes to index.ts and updated the changeset. Signed-off-by: Casper Jensen --- .changeset/light-turtles-yawn.md | 2 +- plugins/catalog-backend/src/ingestion/index.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.changeset/light-turtles-yawn.md b/.changeset/light-turtles-yawn.md index b199a7535f..3f42fb0524 100644 --- a/.changeset/light-turtles-yawn.md +++ b/.changeset/light-turtles-yawn.md @@ -2,4 +2,4 @@ '@backstage/plugin-catalog-backend': patch --- -Removed deprecated types that are exported in plugins/catalog-backend/src/ingestion/index.ts. Also fixed deprecated use of substr into substring in the files plugins/catalog-backend/src/modules/core/PlaceholderProcessor.ts and plugins/catalog-backend/src/service/request/parseEntityFilterParams.ts. +Fixed deprecated use of `substr` into `substring`. diff --git a/plugins/catalog-backend/src/ingestion/index.ts b/plugins/catalog-backend/src/ingestion/index.ts index 0fc71f6785..0b00809043 100644 --- a/plugins/catalog-backend/src/ingestion/index.ts +++ b/plugins/catalog-backend/src/ingestion/index.ts @@ -15,6 +15,11 @@ */ export type { + AnalyzeLocationEntityField, + AnalyzeLocationExistingEntity, + AnalyzeLocationGenerateEntity, + AnalyzeLocationRequest, + AnalyzeLocationResponse, LocationAnalyzer, ScmLocationAnalyzer, AnalyzeOptions,