chore: resolve build warnings and update dependencies#18880
Conversation
Summary of ChangesHello @mattKorwel, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on improving the project's stability and maintainability by resolving various build and linting warnings. It incorporates updated versions of key dependencies and introduces necessary type adjustments to accommodate these changes, ensuring a smoother development experience and consistent code quality across all modules. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| [FinishReason.IMAGE_RECITATION]: | ||
| 'Response stopped due to image recitation policy.', | ||
| [FinishReason.IMAGE_OTHER]: | ||
| 'Response stopped due to other image-related reasons.', |
There was a problem hiding this comment.
The change to packages/cli/src/ui/hooks/useGeminiStream.ts was necessary because I updated the @google/genai dependency to version 1.41.0.
This update introduced two new values to the FinishReason enum: IMAGE_RECITATION and IMAGE_OTHER. Since the finishReasonMessages object in that file is typed as a strict Record<FinishReason, string |
undefined>, TypeScript threw a type error because the new reasons were missing from the mapping.
I added the following entries to resolve the type error and ensure the build succeeds:
[FinishReason.IMAGE_RECITATION]: 'Response stopped due to image recitation policy.',
[FinishReason.IMAGE_OTHER]: 'Response stopped due to other image-related reasons.',
There was a problem hiding this comment.
Code Review
This pull request effectively resolves several build and installation warnings by updating dependencies and removing unused ESLint directives. The changes are well-contained and address the described issues, such as adding missing FinishReason enum values to fix type errors resulting from the @google/genai update and expanding the ESLint configuration to cover all packages. The use of overrides in package.json to suppress transitive dependency warnings is a good practice. Overall, these are solid maintenance improvements.
|
Size Change: +576 kB (+2.35%) Total Size: 25.1 MB
ℹ️ View Unchanged
|
Summary
This PR resolves several build and installation warnings related to unused ESLint directives and deprecated dependencies. It also updates core dependencies and fixes a resulting type error.
Details
eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertionwarnings inpackages/vscode-ide-companion.@google/genaito1.41.0andgoogle-auth-libraryto10.5.0inpackages/coreandpackages/cli.overridesin the rootpackage.jsonforglob(^12.0.0) andnode-domexception(^1.0.0) to suppress transitive deprecation warnings.FinishReasonvalues (IMAGE_RECITATION,IMAGE_OTHER) touseGeminiStream.tsrequired by the@google/genaiupdate.eslint.config.jsto correctly target all packages, ensuring consistent linting for the VS Code companion.Related Issues
N/A
How to Validate
npm installand verify no deprecation warnings forglobornode-domexceptionappear.npm run buildand verify it completes without warnings.npm run lintand verify it passes.npm run testand verify all tests pass.Pre-Merge Checklist