Repository navigation
fix(api): Resolve the root entry's types under NodeNext - #131216
Merged
Merged
Conversation
Hey API's modules import each other without file extensions, and the emitted declarations kept those specifiers. NodeNext resolution cannot follow them, so projects with module NodeNext got errors from the package's declarations, and with skipLibCheck every generated operation was typed any. The declaration emit now adds the .ts extension the rest of the package uses, and the packed-package test typechecks the root entry under NodeNext as well as bundler resolution. Co-Authored-By: BYK <[email protected]>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8b215c1. Configure here.
5 tasks
Declaration emit can write inferred types as import("./module").Name,
which NodeNext rejects without an extension, so the transform rewrites
those specifiers as well.
BYK
approved these changes
Nov 16, 2026
2 tasks done
This branch was successfully deployed
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.

Projects that use
"module": "NodeNext"couldn't use@sentry/api's root-entry types. Hey API's generated modules import each other without file extensions, such as./sdk.gen, and the emitted.d.tsfiles kept those imports, which NodeNext can't resolve. WithoutskipLibCheck, the package's declarations fail to typecheck. With it, every generated operation and the client config are typedany. Published 2.4.0 and 2.5.0 have this.The declaration emit now adds the
.tsextension that the rest of the package already uses. The JS bundles don't change.Part of #131204.
via @BYK.
--
View Session [Sentry]