diff --git a/.changeset/remove-type-fest-github.md b/.changeset/remove-type-fest-github.md new file mode 100644 index 0000000000..1b8e67f17d --- /dev/null +++ b/.changeset/remove-type-fest-github.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-github': patch +--- + +Removed the `type-fest` dev dependency, replacing its `PartialDeep` import with a local helper type in tests. diff --git a/plugins/catalog-backend-module-github/package.json b/plugins/catalog-backend-module-github/package.json index f3504d861d..8a660ab7d1 100644 --- a/plugins/catalog-backend-module-github/package.json +++ b/plugins/catalog-backend-module-github/package.json @@ -81,8 +81,7 @@ "@backstage/plugin-events-backend-module-github": "workspace:^", "@backstage/plugin-events-backend-module-google-pubsub": "workspace:^", "@types/lodash": "^4.14.151", - "msw": "^2.0.0", - "type-fest": "^4.41.0" + "msw": "^2.0.0" }, "configSchema": "config.d.ts" } diff --git a/plugins/catalog-backend-module-github/src/providers/GithubEntityProvider.test.ts b/plugins/catalog-backend-module-github/src/providers/GithubEntityProvider.test.ts index 19042c0cd9..21fb13f02b 100644 --- a/plugins/catalog-backend-module-github/src/providers/GithubEntityProvider.test.ts +++ b/plugins/catalog-backend-module-github/src/providers/GithubEntityProvider.test.ts @@ -35,7 +35,14 @@ import { RepositoryEvent, RepositoryRenamedEvent, } from '@octokit/webhooks-types'; -import type { PartialDeep } from 'type-fest'; + +type PartialDeep = T extends (...args: any[]) => any + ? T + : T extends Array + ? Array> + : T extends object + ? { [K in keyof T]?: PartialDeep } + : T; jest.mock('../lib/github', () => { return { diff --git a/yarn.lock b/yarn.lock index e5d72ed98b..5565bc6a95 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4921,7 +4921,6 @@ __metadata: minimatch: "npm:^10.2.1" msw: "npm:^2.0.0" octokit: "npm:^3.0.0" - type-fest: "npm:^4.41.0" uuid: "npm:^11.0.0" languageName: unknown linkType: soft @@ -48922,7 +48921,7 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^4.26.1, type-fest@npm:^4.3.1, type-fest@npm:^4.41.0": +"type-fest@npm:^4.26.1, type-fest@npm:^4.3.1": version: 4.41.0 resolution: "type-fest@npm:4.41.0" checksum: 10/617ace794ac0893c2986912d28b3065ad1afb484cad59297835a0807dc63286c39e8675d65f7de08fafa339afcb8fe06a36e9a188b9857756ae1e92ee8bda212