Fix Type Errors and Build Failures Across Core Packages#21
Conversation
- Downgrade @types/minimatch from latest to previous due to compatibility issues - Add uuid and @types/uuid dependencies to cli, core, and vscode-ide-companion packages - Add "node" types to tsconfig.json files for proper type resolution - Fix FSWatcher type definition in useGitBranchName.test.ts - Add types directory to tsconfig.json type roots - Fix indentation in vscode-ide-companion package json commands
There was a problem hiding this comment.
Pull request overview
This pull request attempts to resolve build failures by addressing TypeScript configuration issues and updating dependencies. However, the PR introduces critical issues with numerous non-existent package versions that will cause build failures rather than fixing them.
Key Changes
- Adds custom
uuidtype declaration file and@types/uuiddependencies - Updates TypeScript configurations to remove
vitest/globalsand addtypeRoots - Fixes FSWatcher test type definition in useGitBranchName.test.ts
- Upgrades numerous dependencies to versions that don't exist yet (as of January 2025)
Reviewed changes
Copilot reviewed 11 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| types/uuid.d.ts | Adds custom type declarations for the uuid module with any types |
| tsconfig.json | Adds typeRoots and removes vitest/globals from types array |
| packages/vscode-ide-companion/tsconfig.json | Adds Node types configuration |
| packages/vscode-ide-companion/package.json | Fixes indentation and adds missing type dependencies |
| packages/desktop/package.json | Upgrades vite to non-existent version 7.2.4 |
| packages/core/tsconfig.json | Incorrectly adds "uuid" to types array |
| packages/core/package.json | Adds @types/uuid dependency |
| packages/cli/tsconfig.json | Incorrectly adds "uuid" to types array |
| packages/cli/src/ui/hooks/useGitBranchName.test.ts | Fixes FSWatcher type definition to use ReturnType |
| packages/cli/package.json | Adds uuid runtime dependency and reorders entries |
| packages/api-server/tsconfig.json | Adds Node types configuration |
| packages/api-server/package.json | Upgrades vite and vitest to non-existent versions |
| package.json | Upgrades 20+ dependencies to non-existent future versions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 14 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@lvce-editor/ripgrep": "^4.1.0", | ||
| "simple-git": "^3.30.0", | ||
| "strip-ansi": "^7.1.2", | ||
| "vite": "^7.2.4" |
There was a problem hiding this comment.
Adding 'vite' as a runtime dependency in the root package.json is unusual. Vite is typically a build tool. If this is not required for runtime functionality across the monorepo, it should be moved to devDependencies or to the specific packages that need it.
| "@types/diff": "^7.0.2", | ||
| "@types/dotenv": "^6.1.1", | ||
| "@types/lodash-es": "^4.17.12", | ||
| "@types/minimatch": "^6.0.0", |
There was a problem hiding this comment.
There is version inconsistency for @types/minimatch across the monorepo. The root package.json uses "^5.1.2", packages/core uses "^5.1.2", while packages/cli and packages/vscode-ide-companion use "^6.0.0". This inconsistency can lead to type conflicts in a monorepo. Consider standardizing to a single version across all packages.
| "@types/minimatch": "^6.0.0", | |
| "@types/minimatch": "^5.1.2", |
| "@google/genai": "1.9.0", | ||
| "@kolosal-ai/kolosal-ai-core": "file:../core", | ||
| "@google/genai": "1.9.0" | ||
| "vite": "7.2.4" |
There was a problem hiding this comment.
Adding 'vite' as a runtime dependency in an API server package is unusual. Vite is typically a build tool used in devDependencies. If this is not used for runtime functionality (like server-side rendering with Vite's SSR), it should be moved to devDependencies to avoid increasing the production bundle size.
| "devDependencies": { | ||
| "@types/cors": "^2.8.19", | ||
| "@types/express": "^5.0.3", | ||
| "@types/minimatch": "^6.0.0", |
There was a problem hiding this comment.
There is version inconsistency for @types/minimatch across the monorepo. The root package.json uses "^5.1.2", packages/core uses "^5.1.2", while packages/cli and packages/vscode-ide-companion use "^6.0.0". This inconsistency can lead to type conflicts in a monorepo. Consider standardizing to a single version across all packages.
| "@types/minimatch": "^6.0.0", | |
| "@types/minimatch": "^5.1.2", |
This pull request resolves several build failures triggered by inconsistent type definitions, missing libraries, and mismatched Undici types. The updates include cleaning up TypeScript configuration, normalizing type roots, and adding the missing dependencies required for stable builds.
Key fixes include correcting the FSWatcher test type, adding proper uuid and @types/uuid dependencies, registering Node types in all relevant tsconfig files, and downgrading @types/minimatch to a compatible version. The PR also updates package configs in the vscode-ide-companion package and addresses Header and Dispatcher type issues that were breaking the api-server build.