Skip to content

chore(js): Updating typescript to 5.9.3 and a few other chores#4920

Open
ifielker wants to merge 1 commit intomainfrom
if-versions
Open

chore(js): Updating typescript to 5.9.3 and a few other chores#4920
ifielker wants to merge 1 commit intomainfrom
if-versions

Conversation

@ifielker
Copy link
Collaborator

Updating to the latest typescript library across the board.
Also some related updates of other libraries and a few deprecated model fixes in testapps along the way.

Checklist (if applicable):

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 primarily focuses on a significant upgrade of the TypeScript compiler to version 5.9.3 across the entire JavaScript codebase, ensuring compatibility with the latest language features and improvements. Alongside the TypeScript upgrade, several other development dependencies and core libraries have been updated to their latest versions, enhancing overall project stability and leveraging newer functionalities. Additionally, minor code adjustments were made to address deprecated model usage and improve type safety in specific plugins, ensuring the project remains current and robust.

Highlights

  • TypeScript Upgrade: Updated TypeScript to version 5.9.3 across all JavaScript packages and test applications, ensuring compatibility with the latest language features and improvements.
  • Dependency Updates: Upgraded various development dependencies, including typedoc and related plugins, next.js, and sharp, to their latest versions.
  • New Dependency: Introduced handlebars as a new dependency in js/ai/package.json.
  • Model Reference Updates: Updated imagen model references from imagen-3.0-generate-002 to imagen-4.0-generate-001 in relevant test applications and samples.
  • Code Refinements: Improved type safety and robustness in js/plugins/google-genai and js/plugins/mcp by adding explicit null and type checks for properties and enhancing error messages.
  • Dependency Lockfile Cleanup: Cleaned up pnpm-lock.yaml files by updating numerous dependencies, removing deprecated packages, and adding deprecation notices for others.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • js/ai/package.json
    • Updated typescript to 5.9.3.
    • Added handlebars dependency.
  • js/ai/src/prompt.ts
    • Added Handlebars type import.
  • js/core/package.json
    • Removed @opentelemetry/exporter-jaeger.
    • Updated typescript to 5.9.3.
  • js/doc-snippets/package.json
    • Updated typescript to 5.9.3.
  • js/genkit/package.json
    • Updated typescript to 5.9.3.
  • js/package.json
    • Updated typedoc to 0.28.17.
    • Updated typedoc-github-theme to 0.4.0.
    • Updated typedoc-plugin-markdown to 4.10.0.
    • Updated typedoc-plugin-zod to 1.4.3.
    • Updated typescript to 5.9.3.
  • js/plugins/anthropic/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/checks/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/chroma/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/cloud-sql-pg/package.json
    • Removed @types/dotenv.
    • Updated typescript to 5.9.3.
  • js/plugins/compat-oai/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/dev-local-vectorstore/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/evaluators/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/express/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/fetch/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/firebase/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/google-cloud/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/google-genai/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/google-genai/src/common/converters.ts
    • Added a null check for property.properties before iteration.
  • js/plugins/googleai/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/langchain/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/mcp/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/mcp/src/util/message.ts
    • Changed resource URI access from part.uri as string to part.resource.uri.
  • js/plugins/mcp/src/util/resource.ts
    • Added explicit type checks for text and blob properties.
    • Improved error message for unknown part types.
  • js/plugins/mcp/src/util/tools.ts
    • Added explicit type checks (p.type === 'text') in toText and processResult functions.
  • js/plugins/next/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/next/pnpm-lock.yaml
    • Added overrides for cross-spawn and genkit.
    • Updated @types/node from 22.13.13 to 20.19.37.
    • Removed @types/react and @types/react-dom entries.
    • Updated next from 15.2.4 to 15.5.12.
    • Updated ts-jest to reflect typescript@5.9.3.
    • Updated tsup to reflect typescript@5.9.3.
    • Updated typescript from 5.8.2 to 5.9.3.
    • Updated @emnapi/runtime from 1.3.1 to 1.8.1.
    • Added @img/colour@1.1.0.
    • Updated various @img/sharp-* packages to 0.34.5 and 1.2.4 versions.
    • Removed @swc/counter.
    • Removed busboy.
    • Removed color-string and color.
    • Removed cross-spawn@6.0.6.
    • Removed csstype@3.1.3.
    • Updated detect-libc from 2.0.3 to 2.1.2.
    • Removed is-arrayish@0.3.2.
    • Removed nice-try.
    • Removed path-key@2.0.1.
    • Added semver@7.7.4.
    • Removed shebang-command@1.2.0 and shebang-regex@1.0.0.
    • Removed simple-swizzle.
    • Removed streamsearch.
    • Removed which@1.3.1.
  • js/plugins/ollama/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/pinecone/package.json
    • Updated typescript to 5.9.3.
  • js/plugins/vertexai/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/anthropic/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/basic-gemini/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/basic-gemini/src/index.ts
    • Updated imagen-image-generation flow to use imagen-4.0-generate-001 model.
  • js/testapps/compat-oai/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/custom-evaluators/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/dev-ui-gallery/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/docs-menu-basic/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/docs-menu-rag/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/durable-streaming/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/esm/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/evals/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/express/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/firebase-functions-sample1/functions/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/flow-sample1/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/flow-simple-ai/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/flow-simple-ai/src/index.ts
    • Updated googleai-imagen flow to use imagen-4.0-generate-001 model.
  • js/testapps/format-tester/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/hono/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/mcp/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/menu/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/model-armor/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/model-tester/package.json
    • Moved genkit to dependencies.
    • Updated genkitx-openai to 0.30.0.
    • Updated typescript to 5.9.3.
  • js/testapps/multiagents-demo/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/multimodal/package.json
    • Removed vertexai link.
    • Updated typescript to 5.9.3.
  • js/testapps/next/package.json
    • Updated @types/react to 19.2.7.
    • Updated typescript to 5.9.3.
  • js/testapps/next/pnpm-lock.yaml
    • Added overrides for cross-spawn and genkit.
    • Updated @genkit-ai/googleai to @genkit-ai/google-genai.
    • Updated next from 15.2.4 to 15.5.12.
    • Updated @types/react from 19.0.12 to 19.2.7.
    • Updated typescript from 5.8.2 to 5.9.3.
    • Updated @emnapi/runtime from 1.3.1 to 1.8.1.
    • Added @img/colour@1.1.0.
    • Updated various @img/sharp-* packages to 0.34.5 and 1.2.4 versions.
    • Updated @next/env from 15.2.4 to 15.5.12.
    • Updated various @next/swc-* packages from 15.2.4 to 15.5.12.
    • Removed @swc/counter.
    • Updated @types/react to reflect csstype@3.2.3.
    • Removed busboy.
    • Removed color-string and color.
    • Updated csstype from 3.1.3 to 3.2.3.
    • Updated detect-libc from 2.0.3 to 2.1.2.
    • Removed is-arrayish@0.3.2.
    • Updated semver from 7.7.1 to 7.7.4.
    • Updated sharp from 0.33.5 to 0.34.5.
    • Removed simple-swizzle.
    • Removed streamsearch.
  • js/testapps/ollama/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/prompt-file/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/rag/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/vertexai-modelgarden/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/vertexai-reranker/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/vertexai-vector-search-bigquery/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/vertexai-vector-search-custom/package.json
    • Updated typescript to 5.9.3.
  • js/testapps/vertexai-vector-search-firestore/package.json
    • Updated typescript to 5.9.3.
  • pnpm-lock.yaml
    • Added deprecation notice for glob@11.0.3.
  • samples/js-gemini/src/index.ts
    • Updated imagen-image-generation flow to use imagen-4.0-generate-001 model.
  • tests/pnpm-lock.yaml
    • Added deprecation notice for basic-ftp@5.0.5.
    • Added deprecation notice for fluent-ffmpeg@2.1.3.
    • Added deprecation notice for puppeteer@22.12.0.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request primarily focuses on updating TypeScript to version 5.9.3 and other dependencies across various packages. While reviewing the changes, I noticed that some dependencies in the updated lockfiles are marked as deprecated, with some having known security vulnerabilities. I've added comments on these specific dependencies with recommendations to update them. The rest of the code changes, which are compatibility fixes for the new TypeScript version, look good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant