From 728ff25a022fb78f4286abdc3fd18aaafee38664 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 20:08:46 +0000 Subject: [PATCH 1/2] build(deps): bump typescript-eslint from 8.58.2 to 8.59.1 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.58.2 to 8.59.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.59.1/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.59.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 124 ++++++++++++++-------------- packages/eslint-config/package.json | 2 +- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3021af7..c1d413c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3363,16 +3363,16 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.58.2.tgz", - "integrity": "sha512-aC2qc5thQahutKjP+cl8cgN9DWe3ZUqVko30CMSZHnFEHyhOYoZSzkGtAI2mcwZ38xeImDucI4dnqsHiOYuuCw==", + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.59.1.tgz", + "integrity": "sha512-BOziFIfE+6osHO9FoJG4zjoHUcvI7fTNBSpdAwrNH0/TLvzjsk2oo8XSSOT2HhqUyhZPfHv4UOffoJ9oEEQ7Ag==", "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.58.2", - "@typescript-eslint/type-utils": "8.58.2", - "@typescript-eslint/utils": "8.58.2", - "@typescript-eslint/visitor-keys": "8.58.2", + "@typescript-eslint/scope-manager": "8.59.1", + "@typescript-eslint/type-utils": "8.59.1", + "@typescript-eslint/utils": "8.59.1", + "@typescript-eslint/visitor-keys": "8.59.1", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" @@ -3385,21 +3385,21 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.58.2", + "@typescript-eslint/parser": "^8.59.1", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.58.2.tgz", - "integrity": "sha512-/Zb/xaIDfxeJnvishjGdcR4jmr7S+bda8PKNhRGdljDM+elXhlvN0FyPSsMnLmJUrVG9aPO6dof80wjMawsASg==", + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.59.1.tgz", + "integrity": "sha512-HDQH9O/47Dxi1ceDhBXdaldtf/WV9yRYMjbjCuNk3qnaTD564qwv61Y7+gTxwxRKzSrgO5uhtw584igXVuuZkA==", "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.58.2", - "@typescript-eslint/types": "8.58.2", - "@typescript-eslint/typescript-estree": "8.58.2", - "@typescript-eslint/visitor-keys": "8.58.2", + "@typescript-eslint/scope-manager": "8.59.1", + "@typescript-eslint/types": "8.59.1", + "@typescript-eslint/typescript-estree": "8.59.1", + "@typescript-eslint/visitor-keys": "8.59.1", "debug": "^4.4.3" }, "engines": { @@ -3415,13 +3415,13 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.58.2.tgz", - "integrity": "sha512-Cq6UfpZZk15+r87BkIh5rDpi38W4b+Sjnb8wQCPPDDweS/LRCFjCyViEbzHk5Ck3f2QDfgmlxqSa7S7clDtlfg==", + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.59.1.tgz", + "integrity": "sha512-+MuHQlHiEr00Of/IQbE/MmEoi44znZHbR/Pz7Opq4HryUOlRi+/44dro9Ycy8Fyo+/024IWtw8m4JUMCGTYxDg==", "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.58.2", - "@typescript-eslint/types": "^8.58.2", + "@typescript-eslint/tsconfig-utils": "^8.59.1", + "@typescript-eslint/types": "^8.59.1", "debug": "^4.4.3" }, "engines": { @@ -3436,13 +3436,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.58.2.tgz", - "integrity": "sha512-SgmyvDPexWETQek+qzZnrG6844IaO02UVyOLhI4wpo82dpZJY9+6YZCKAMFzXb7qhx37mFK1QcPQ18tud+vo6Q==", + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.59.1.tgz", + "integrity": "sha512-LwuHQI4pDOYVKvmH2dkaJo6YZCSgouVgnS/z7yBPKBMvgtBvyLqiLy9Z6b7+m/TRcX1NFYUqZetI5Y+aT4GEfg==", "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.58.2", - "@typescript-eslint/visitor-keys": "8.58.2" + "@typescript-eslint/types": "8.59.1", + "@typescript-eslint/visitor-keys": "8.59.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3453,9 +3453,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.58.2.tgz", - "integrity": "sha512-3SR+RukipDvkkKp/d0jP0dyzuls3DbGmwDpVEc5wqk5f38KFThakqAAO0XMirWAE+kT00oTauTbzMFGPoAzB0A==", + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.59.1.tgz", + "integrity": "sha512-/0nEyPbX7gRsk0Uwfe4ALwwgxuA66d/l2mhRDNlAvaj4U3juhUtJNq0DsY8M2AYwwb9rEq2hrC3IcIcEt++iJA==", "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3469,14 +3469,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.58.2.tgz", - "integrity": "sha512-Z7EloNR/B389FvabdGeTo2XMs4W9TjtPiO9DAsmT0yom0bwlPyRjkJ1uCdW1DvrrrYP50AJZ9Xc3sByZA9+dcg==", + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.59.1.tgz", + "integrity": "sha512-klWPBR2ciQHS3f++ug/mVnWKPjBUo7icEL3FAO1lhAR1Z1i5NQYZ1EannMSRYcq5qCv5wNALlXr6fksRHyYl7w==", "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.58.2", - "@typescript-eslint/typescript-estree": "8.58.2", - "@typescript-eslint/utils": "8.58.2", + "@typescript-eslint/types": "8.59.1", + "@typescript-eslint/typescript-estree": "8.59.1", + "@typescript-eslint/utils": "8.59.1", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, @@ -3493,9 +3493,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.58.2.tgz", - "integrity": "sha512-9TukXyATBQf/Jq9AMQXfvurk+G5R2MwfqQGDR2GzGz28HvY/lXNKGhkY+6IOubwcquikWk5cjlgPvD2uAA7htQ==", + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.59.1.tgz", + "integrity": "sha512-ZDCjgccSdYPw5Bxh+my4Z0lJU96ZDN7jbBzvmEn0FZx3RtU1C7VWl6NbDx94bwY3V5YsgwRzJPOgeY2Q/nLG8A==", "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3506,15 +3506,15 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.58.2.tgz", - "integrity": "sha512-ELGuoofuhhoCvNbQjFFiobFcGgcDCEm0ThWdmO4Z0UzLqPXS3KFvnEZ+SHewwOYHjM09tkzOWXNTv9u6Gqtyuw==", + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.59.1.tgz", + "integrity": "sha512-OUd+vJS05sSkOip+BkZ/2NS8RMxrAAJemsC6vU3kmfLyeaJT0TftHkV9mcx2107MmsBVXXexhVu4F0TZXyMl4g==", "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.58.2", - "@typescript-eslint/tsconfig-utils": "8.58.2", - "@typescript-eslint/types": "8.58.2", - "@typescript-eslint/visitor-keys": "8.58.2", + "@typescript-eslint/project-service": "8.59.1", + "@typescript-eslint/tsconfig-utils": "8.59.1", + "@typescript-eslint/types": "8.59.1", + "@typescript-eslint/visitor-keys": "8.59.1", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", @@ -3533,15 +3533,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.58.2.tgz", - "integrity": "sha512-QZfjHNEzPY8+l0+fIXMvuQ2sJlplB4zgDZvA+NmvZsZv3EQwOcc1DuIU1VJUTWZ/RKouBMhDyNaBMx4sWvrzRA==", + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.59.1.tgz", + "integrity": "sha512-3pIeoXhCeYH9FSCBI8P3iNwJlGuzPlYKkTlen2O9T1DSeeg8UG8jstq6BLk+Mda0qup7mgk4z4XL4OzRaxZ8LA==", "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.58.2", - "@typescript-eslint/types": "8.58.2", - "@typescript-eslint/typescript-estree": "8.58.2" + "@typescript-eslint/scope-manager": "8.59.1", + "@typescript-eslint/types": "8.59.1", + "@typescript-eslint/typescript-estree": "8.59.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3556,12 +3556,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.58.2.tgz", - "integrity": "sha512-f1WO2Lx8a9t8DARmcWAUPJbu0G20bJlj8L4z72K00TMeJAoyLr/tHhI/pzYBLrR4dXWkcxO1cWYZEOX8DKHTqA==", + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.59.1.tgz", + "integrity": "sha512-LdDNl6C5iJExcM0Yh0PwAIBb9PrSiCsWamF/JyEZawm3kFDnRoaq3LGE4bpyRao/fWeGKKyw7icx0YxrLFC5Cg==", "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.58.2", + "@typescript-eslint/types": "8.59.1", "eslint-visitor-keys": "^5.0.0" }, "engines": { @@ -10896,15 +10896,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.58.2.tgz", - "integrity": "sha512-V8iSng9mRbdZjl54VJ9NKr6ZB+dW0J3TzRXRGcSbLIej9jV86ZRtlYeTKDR/QLxXykocJ5icNzbsl2+5TzIvcQ==", + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.59.1.tgz", + "integrity": "sha512-xqDcFVBmlrltH64lklOVp1wYxgJr6LVdg3NamBgH2OOQDLFdTKfIZXF5PfghrnXQKXZGTQs8tr1vL7fJvq8CTQ==", "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.58.2", - "@typescript-eslint/parser": "8.58.2", - "@typescript-eslint/typescript-estree": "8.58.2", - "@typescript-eslint/utils": "8.58.2" + "@typescript-eslint/eslint-plugin": "8.59.1", + "@typescript-eslint/parser": "8.59.1", + "@typescript-eslint/typescript-estree": "8.59.1", + "@typescript-eslint/utils": "8.59.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -12589,7 +12589,7 @@ "@eslint/js": "^10.0.1", "eslint-config-prettier": "^10.1.8", "eslint-plugin-check-file": "^3.3.1", - "typescript-eslint": "^8.58.2" + "typescript-eslint": "^8.59.1" }, "peerDependencies": { "eslint": "^10.2.1" diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index aa4fd45..3ada868 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -15,7 +15,7 @@ "@eslint/js": "^10.0.1", "eslint-config-prettier": "^10.1.8", "eslint-plugin-check-file": "^3.3.1", - "typescript-eslint": "^8.58.2" + "typescript-eslint": "^8.59.1" }, "peerDependencies": { "eslint": "^10.2.1" From 273b9d4e87223c2eaaf70f166842b3ad6213cd24 Mon Sep 17 00:00:00 2001 From: Anders Hassis Date: Thu, 30 Apr 2026 08:17:42 +0200 Subject: [PATCH 2/2] chore: fixed lint --- .../likec4/__tests__/patcher-format.test.ts | 2 +- .../adapters/likec4/__tests__/patcher.test.ts | 2 +- .../structurizr/__tests__/patcher.test.ts | 2 +- .../core/src/adapters/structurizr/adapter.ts | 16 +++--- .../__tests__/provider-factory.test.ts | 51 ++++++++++++------- .../src/utils/__tests__/config-file.test.ts | 22 ++------ .../src/utils/__tests__/model-source.test.ts | 6 +-- 7 files changed, 51 insertions(+), 50 deletions(-) diff --git a/packages/core/src/adapters/likec4/__tests__/patcher-format.test.ts b/packages/core/src/adapters/likec4/__tests__/patcher-format.test.ts index e7e6d14..7ecb5a0 100644 --- a/packages/core/src/adapters/likec4/__tests__/patcher-format.test.ts +++ b/packages/core/src/adapters/likec4/__tests__/patcher-format.test.ts @@ -45,7 +45,7 @@ function makeProvider(): AIProvider { return { extractDependencies: vi.fn(), analyzeDrift: vi.fn(), - } as unknown as AIProvider; + }; } const SAMPLE_C4 = `specification { diff --git a/packages/core/src/adapters/likec4/__tests__/patcher.test.ts b/packages/core/src/adapters/likec4/__tests__/patcher.test.ts index 96047c4..06ebdc4 100644 --- a/packages/core/src/adapters/likec4/__tests__/patcher.test.ts +++ b/packages/core/src/adapters/likec4/__tests__/patcher.test.ts @@ -49,7 +49,7 @@ function makeProvider(patchResult?: string): AIProvider { extractDependencies: vi.fn(), analyzeDrift: vi.fn(), patchModel: patchResult !== undefined ? vi.fn().mockResolvedValue(patchResult) : undefined, - } as unknown as AIProvider; + }; } const SAMPLE_C4 = `specification { diff --git a/packages/core/src/adapters/structurizr/__tests__/patcher.test.ts b/packages/core/src/adapters/structurizr/__tests__/patcher.test.ts index 6fc6d99..015e34e 100644 --- a/packages/core/src/adapters/structurizr/__tests__/patcher.test.ts +++ b/packages/core/src/adapters/structurizr/__tests__/patcher.test.ts @@ -44,7 +44,7 @@ function makeProvider(patchResult?: string): AIProvider { extractDependencies: vi.fn(), analyzeDrift: vi.fn(), patchModel: patchResult !== undefined ? vi.fn().mockResolvedValue(patchResult) : undefined, - } as unknown as AIProvider; + }; } const SAMPLE_DSL = `workspace { diff --git a/packages/core/src/adapters/structurizr/adapter.ts b/packages/core/src/adapters/structurizr/adapter.ts index 8c58e71..5d62ee1 100644 --- a/packages/core/src/adapters/structurizr/adapter.ts +++ b/packages/core/src/adapters/structurizr/adapter.ts @@ -358,10 +358,12 @@ export class StructurizrAdapter implements ArchitectureModelAdapter { const resolvedId = this.resolveElementId(element, localId, parentPath); callback(element, parentPath); - const sys = element as StructurizrSoftwareSystem; - if (sys.containers) walk(sys.containers, resolvedId); - const container = element as StructurizrContainer; - if (container.components) walk(container.components, resolvedId); + if ('containers' in element && Array.isArray(element.containers)) { + walk(element.containers as StructurizrElement[], resolvedId); + } + if ('components' in element && Array.isArray(element.components)) { + walk(element.components as StructurizrElement[], resolvedId); + } } }; @@ -411,10 +413,8 @@ export class StructurizrAdapter implements ArchitectureModelAdapter { private getElementType(element: StructurizrElement, parentPath: string): string { // Infer from position in hierarchy or explicit type from parser - const sys = element as StructurizrSoftwareSystem; - if (sys.containers) return 'softwareSystem'; - const container = element as StructurizrContainer; - if (container.components) return 'container'; + if ('containers' in element && element.containers) return 'softwareSystem'; + if ('components' in element && element.components) return 'container'; if ( this.workspace?.model?.people?.some((p) => p.id === element.id && p.name === element.name) diff --git a/packages/core/src/providers/__tests__/provider-factory.test.ts b/packages/core/src/providers/__tests__/provider-factory.test.ts index 8b1dbce..d1e980a 100644 --- a/packages/core/src/providers/__tests__/provider-factory.test.ts +++ b/packages/core/src/providers/__tests__/provider-factory.test.ts @@ -10,9 +10,41 @@ const { MockAnthropicProvider, mockConfig, } = vi.hoisted(() => { + type ProviderName = 'gemini' | 'anthropic' | 'openai'; + interface ProviderConfig { + apiKey: string | undefined; + fastModel: string; + advancedModel: string; + } + interface MockConfig { + ai: { provider: ProviderName }; + gemini: ProviderConfig; + openai: ProviderConfig; + anthropic: ProviderConfig; + } + const geminiInstance = { type: 'gemini' }; const openaiInstance = { type: 'openai' }; const anthropicInstance = { type: 'anthropic' }; + const mockConfig: MockConfig = { + ai: { provider: 'gemini' }, + gemini: { + apiKey: 'test-gemini-key', + fastModel: 'gemini-flash', + advancedModel: 'gemini-pro', + }, + openai: { + apiKey: 'test-openai-key', + fastModel: 'gpt-4.1-mini', + advancedModel: 'gpt-4.1', + }, + anthropic: { + apiKey: 'test-anthropic-key', + fastModel: 'claude-haiku', + advancedModel: 'claude-sonnet', + }, + }; + return { mockGeminiInstance: geminiInstance, mockOpenAIInstance: openaiInstance, @@ -26,24 +58,7 @@ const { MockAnthropicProvider: vi.fn(function () { return anthropicInstance; }), - mockConfig: { - ai: { provider: 'gemini' as 'gemini' | 'openai' | 'anthropic' }, - gemini: { - apiKey: 'test-gemini-key' as string | undefined, - fastModel: 'gemini-flash', - advancedModel: 'gemini-pro', - }, - openai: { - apiKey: 'test-openai-key' as string | undefined, - fastModel: 'gpt-4.1-mini', - advancedModel: 'gpt-4.1', - }, - anthropic: { - apiKey: 'test-anthropic-key' as string | undefined, - fastModel: 'claude-haiku', - advancedModel: 'claude-sonnet', - }, - }, + mockConfig, }; }); diff --git a/packages/core/src/utils/__tests__/config-file.test.ts b/packages/core/src/utils/__tests__/config-file.test.ts index f1231c7..d05f85c 100644 --- a/packages/core/src/utils/__tests__/config-file.test.ts +++ b/packages/core/src/utils/__tests__/config-file.test.ts @@ -80,30 +80,21 @@ describe('config file support', () => { it('should override target values with source values', () => { const target = { ai: { provider: 'gemini' } }; const source = { ai: { provider: 'anthropic' } }; - const result = deepMerge( - target as Record, - source as Record - ); + const result = deepMerge(target, source); expect(result).toEqual({ ai: { provider: 'anthropic' } }); }); it('should preserve target values when source has no matching key', () => { const target = { ai: { provider: 'gemini' }, gemini: { apiKey: 'key123' } }; const source = { ai: {} }; - const result = deepMerge( - target as Record, - source as Record - ); + const result = deepMerge(target, source); expect(result).toEqual({ ai: { provider: 'gemini' }, gemini: { apiKey: 'key123' } }); }); it('should merge nested objects recursively', () => { const target = { adapter: { format: 'likec4', likec4: { excludePaths: [] } } }; const source = { adapter: { format: 'structurizr' } }; - const result = deepMerge( - target as Record, - source as Record - ); + const result = deepMerge(target, source); expect(result).toEqual({ adapter: { format: 'structurizr', likec4: { excludePaths: [] } }, }); @@ -112,10 +103,7 @@ describe('config file support', () => { it('should replace arrays instead of merging them', () => { const target = { adapter: { likec4: { excludePaths: ['a', 'b'] } } }; const source = { adapter: { likec4: { excludePaths: ['c'] } } }; - const result = deepMerge( - target as Record, - source as Record - ); + const result = deepMerge(target, source); expect(result).toEqual({ adapter: { likec4: { excludePaths: ['c'] } } }); }); }); @@ -153,7 +141,7 @@ describe('config file support', () => { app: {}, }; - const merged = deepMerge(fileConfig, envConfig as Record); + const merged = deepMerge(fileConfig, envConfig); // Env var wins for ai.provider expect(merged).toMatchObject({ ai: { provider: 'anthropic' } }); // File value preserved for gemini.apiKey (env skeleton has empty gemini object) diff --git a/packages/core/src/utils/__tests__/model-source.test.ts b/packages/core/src/utils/__tests__/model-source.test.ts index 772b29e..bba8c0b 100644 --- a/packages/core/src/utils/__tests__/model-source.test.ts +++ b/packages/core/src/utils/__tests__/model-source.test.ts @@ -195,7 +195,7 @@ describe('resolveModelSource', () => { vi.mocked(mkdtemp).mockResolvedValue(tmpDir); vi.mocked(execFile).mockImplementation((...args: unknown[]) => { const cb = args[args.length - 1] as ExecFileCallback | undefined; - if (cb) cb(new Error('remote not found') as ExecFileException, '', ''); + if (cb) cb(new Error('remote not found'), '', ''); return undefined as never; }); @@ -311,9 +311,7 @@ describe('resolveModelSource', () => { const cb = args[args.length - 1] as ExecFileCallback | undefined; if (cb) { cb( - new Error( - 'fatal: could not read from https://x-access-token@github.com/bad/repo.git' - ) as ExecFileException, + new Error('fatal: could not read from https://x-access-token@github.com/bad/repo.git'), '', '' );