Skip to content

fix: add typesVersions to support legacy module resolution#288

Merged
ishymko merged 3 commits intoa2aproject:mainfrom
aryaraj132:main
Jan 15, 2026
Merged

fix: add typesVersions to support legacy module resolution#288
ishymko merged 3 commits intoa2aproject:mainfrom
aryaraj132:main

Conversation

@aryaraj132
Copy link
Copy Markdown
Contributor

@aryaraj132 aryaraj132 commented Jan 5, 2026

Description

Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Follow the CONTRIBUTING Guide.
  • Make your Pull Request title in the https://www.conventionalcommits.org/ specification.
    • Important Prefixes for release-please:
      • fix: which represents bug fixes, and correlates to a SemVer patch.
      • feat: represents a new feature, and correlates to a SemVer minor.
      • feat!:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a SemVer major.
  • Ensure the tests and linter pass
  • Appropriate docs were updated (if necessary)

Fixes #287 🦕

@aryaraj132 aryaraj132 requested a review from a team as a code owner January 5, 2026 09:20
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @aryaraj132, 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 addresses an issue related to TypeScript type resolution by adding a typesVersions field to the package.json. This modification is crucial for maintaining backward compatibility, allowing consumers of the package to correctly resolve type declarations for specific entry points, such as server-side and client-side modules, regardless of their TypeScript version or module resolution configuration.

Highlights

  • Backward Compatible Type Declarations: Introduced a typesVersions field in package.json to provide backward compatible type declarations for different entry points (server, server/express, client).
  • TypeScript Resolution: This change ensures that TypeScript can correctly resolve type definitions for various module consumers, improving compatibility across different environments and TypeScript versions.
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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 5, 2026

🧪 Code Coverage

⬇️ Download Full Report

No coverage changes.

Generated by coverage-comment.yml

Copy link
Copy Markdown
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 correctly adds the typesVersions field to package.json to provide backward-compatible type declarations for subpath imports. This change will improve the developer experience for consumers of this library who are using older versions of TypeScript that do not fully support the exports field for type resolution. The implementation is correct and follows established best practices for npm package configuration.

@ishymko ishymko changed the title fix: add backward compatible type declaration in package.json fix: add typesVersions to support legacy module resolution Jan 12, 2026
Copy link
Copy Markdown
Member

@ishymko ishymko left a comment

Choose a reason for hiding this comment

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

Nice repro repository shared in #287 (comment) 👍 I've created #294 to turn it into an automated test (it's a separate topic, hopefully I'll do it before releasing a new version but even if no - manual run gives good enough evidence for now).

@ishymko ishymko merged commit 6499e29 into a2aproject:main Jan 15, 2026
14 checks passed
ishymko pushed a commit that referenced this pull request Jan 15, 2026
🤖 I have created a release *beep* *boop*
---


## [0.3.8](v0.3.7...v0.3.8)
(2026-01-15)


### ⚠ BREAKING CHANGES

* use ProtoJSON for REST transport
([#292](#292))

### Features

* use case-insensitive transport protocol name comparison in
ClientFactory
([5246067](5246067))


### Bug Fixes

* add typesVersions to support legacy module resolution
([#288](#288))
([6499e29](6499e29))
* use ProtoJSON for REST transport
([#292](#292))
([d2efc4c](d2efc4c))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat]: Backward compatibility for type resolutions

2 participants