From b446954bb2c330054e49473d7eb4f468be440220 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Mon, 19 Aug 2024 15:35:46 +0200 Subject: [PATCH] chore: Remove dependency on backend-common Signed-off-by: Johan Haals --- .changeset/six-goats-sort.md | 5 +++++ plugins/catalog-backend-module-gitlab/package.json | 2 +- .../src/GitLabDiscoveryProcessor.ts | 13 ++++++------- yarn.lock | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 .changeset/six-goats-sort.md diff --git a/.changeset/six-goats-sort.md b/.changeset/six-goats-sort.md new file mode 100644 index 0000000000..5df8924066 --- /dev/null +++ b/.changeset/six-goats-sort.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-gitlab': patch +--- + +Remove dependency on backend-common diff --git a/plugins/catalog-backend-module-gitlab/package.json b/plugins/catalog-backend-module-gitlab/package.json index 9853904759..a6e8407182 100644 --- a/plugins/catalog-backend-module-gitlab/package.json +++ b/plugins/catalog-backend-module-gitlab/package.json @@ -51,7 +51,7 @@ "test": "backstage-cli package test" }, "dependencies": { - "@backstage/backend-common": "workspace:^", + "@backstage/backend-defaults": "workspace:^", "@backstage/backend-plugin-api": "workspace:^", "@backstage/backend-tasks": "workspace:^", "@backstage/catalog-model": "workspace:^", diff --git a/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.ts b/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.ts index b8e0cf3669..29914db705 100644 --- a/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.ts +++ b/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.ts @@ -14,11 +14,6 @@ * limitations under the License. */ -import { - CacheClient, - CacheManager, - PluginCacheManager, -} from '@backstage/backend-common'; import { Config } from '@backstage/config'; import { ScmIntegrationRegistry, @@ -31,7 +26,11 @@ import { processingResult, } from '@backstage/plugin-catalog-node'; import { GitLabClient, GitLabProject, paginated } from './lib'; -import { LoggerService } from '@backstage/backend-plugin-api'; +import { CacheService, LoggerService } from '@backstage/backend-plugin-api'; +import { + CacheManager, + PluginCacheManager, +} from '@backstage/backend-defaults/cache'; /** * Extracts repositories out of an GitLab instance. @@ -40,7 +39,7 @@ import { LoggerService } from '@backstage/backend-plugin-api'; export class GitLabDiscoveryProcessor implements CatalogProcessor { private readonly integrations: ScmIntegrationRegistry; private readonly logger: LoggerService; - private readonly cache: CacheClient; + private readonly cache: CacheService; private readonly skipReposWithoutExactFileMatch: boolean; private readonly skipForkedRepos: boolean; diff --git a/yarn.lock b/yarn.lock index 5c13778196..028d7cf763 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5501,7 +5501,7 @@ __metadata: version: 0.0.0-use.local resolution: "@backstage/plugin-catalog-backend-module-gitlab@workspace:plugins/catalog-backend-module-gitlab" dependencies: - "@backstage/backend-common": "workspace:^" + "@backstage/backend-defaults": "workspace:^" "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-tasks": "workspace:^" "@backstage/backend-test-utils": "workspace:^"