Repository navigation
test(api): Typecheck the README examples against the packed package - #131217
Merged
Merged
Conversation
Each ts example in the package README is now typechecked as its own module against the packed tarball, so an example that uses a renamed or removed API, or the wrong argument types, fails the tests. Names the examples use without defining them are declared in the test. Co-Authored-By: BYK <[email protected]>
5 tasks
BYK
approved these changes
Nov 16, 2026
2 tasks done
BYK
added a commit
that referenced
this pull request
Nov 16, 2026
#131228 changed the `@sentry/api` README's routing example to read `regionUrls`. #131217 merged a minute later with declarations for the README examples that still define `regionUrlFor`, which no example uses anymore, so the README example on master references an undeclared name. This swaps that declaration for `regionUrls: Map<string, string>`. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A69da19b385017e68b7f9eace56e9477f --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A69da19b385017e68b7f9eace56e9477f) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A69da19b385017e68b7f9eace56e9477f/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <[email protected]>
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.
The
@sentry/apiREADME is the package's main documentation, and nothing kept its TypeScript examples in step with the API. They now have to compile against the published entry points, so renaming an export or changing an argument type means updating the README in the same change.The README's Development section explains how examples that depend on earlier ones get their context.
Part of #131204.
via @BYK.
--
View Session [Sentry]