Skip to content

Conversation

@himanshusinghs
Copy link
Contributor

@himanshusinghs himanshusinghs commented Sep 4, 2025

Note: This PR is a copy of #89 which we reverted because it was incorrectly marked as chore. With this PR, we are proposing the same changes with correct categorisation (fix) for semantic release.

Description

This PR proposes adding explicit type mappings in the exports entry of the package.json so that library consumers don't have to manually map types in their tsconfig, an example here.

What is changing?

We're adding an entry for types in the exports entry in package.json

Is there new documentation needed for these changes?

No

What is the motivation for this change?

We'd like to avoid doing explicit type mappings likes this.

Release Highlight

package.json now specifies the correct types for ESM users

Before this release, the type exports from the package.json did not properly export a typing file for ESM bundles. This required users to explicitly import the correct types in their Typescript or bundler configurations.

Now, the package.json correctly specifies a types file for the ESM bundle of this library.

Double check the following

  • Ran npm run lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@himanshusinghs himanshusinghs requested a review from a team as a code owner September 4, 2025 21:45
@baileympearson baileympearson merged commit 8d93166 into main Sep 4, 2025
30 checks passed
@baileympearson baileympearson deleted the fix/add-type-mappings branch September 4, 2025 21:54
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.

3 participants