fix: Fix package.json types with typesVersions#150
Merged
gabivlj merged 1 commit intocloudflare:mainfrom Feb 5, 2026
Merged
Conversation
commit: |
gabivlj
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change updates the
package.jsonto add a missingtypesVersionswhich is needed to properly tell TypeScript and npm where our TypeScript types are located.Why?
Currently we're relying on
exports.*.typesto map the types. But support for this is still quite flakey from the looks of it. If you install the package right now (0.1.0) npm will not show the TypeScript badge next to the package, indicating that it cannot resolve the types for it. Similarly, if you simply try to use the package you will get this type error:Adding
typesVersionsfixes this as this is technically the legacy method to map / bind types. Either that or switching back to using the original standard ofmain,moduleandtypesproperties.