Remove type-fest dependency from catalog-backend-module-github

Replace the imported PartialDeep type from type-fest with a local
equivalent helper type used only in tests, eliminating the external
dev dependency.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
This commit is contained in:
Fredrik Adelöw
2026-03-20 11:03:22 +01:00
parent 884b8691b0
commit edf465f2a6
4 changed files with 15 additions and 5 deletions
+5
View File
@@ -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.
@@ -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"
}
@@ -35,7 +35,14 @@ import {
RepositoryEvent,
RepositoryRenamedEvent,
} from '@octokit/webhooks-types';
import type { PartialDeep } from 'type-fest';
type PartialDeep<T> = T extends (...args: any[]) => any
? T
: T extends Array<infer U>
? Array<PartialDeep<U>>
: T extends object
? { [K in keyof T]?: PartialDeep<T[K]> }
: T;
jest.mock('../lib/github', () => {
return {
+1 -2
View File
@@ -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