Repository navigation
test(deno): Type-check Deno unit tests - #25227
Merged
JPeer264 merged 1 commit intoOct 9, 2026
Merged
Conversation
`deno test` runs with `--no-check`, and `lint:types` only covers `src`, so type errors in `packages/deno/test` never failed CI. Simply dropping `--no-check` doesn't work in the monorepo: workspace packages (`@sentry/core`, `@sentry/server-utils`, ...) are symlinked into `node_modules`, so Deno treats their emitted `.d.ts` files as local modules and can't resolve their extensionless relative imports. Running with `--unstable-sloppy-imports` resolves those and also picks up `build/esm/*.d.ts` for the tests' `../build/esm/index.js` imports, so the tests are checked against the SDK's real types. The check runs as a separate `test:types` step so the test run itself keeps Deno's strict runtime resolution and still catches a broken specifier in the build output. Fixes getsentry#23899
Philip-Nwabuwa
marked this pull request as ready for review
October 9, 2026 11:37
Philip-Nwabuwa
requested review from
andreiborza and
mydea
and removed request for
a team
October 9, 2026 11:37
JPeer264
self-requested a review
October 9, 2026 11:38
JPeer264
approved these changes
Oct 9, 2026
JPeer264
left a comment
Member
There was a problem hiding this comment.
Amazing thanks for taking this one over.
Contributor
Author
|
Thanks for the quick review 👏 |
msonnb
pushed a commit
that referenced
this pull request
Oct 9, 2026
This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #25227 Co-authored-by: JPeer264 <10677263+JPeer264@users.noreply.github.com>
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.
deno testruns with--no-check, andlint:typesonly coverssrc, so type errors inpackages/deno/testnever failed CI. This adds atest:typesstep that runs beforetest:unit, and fixes the five type errors it surfaced.Simply dropping
--no-checkdoesn't work in the monorepo: workspace packages (@sentry/core,@sentry/server-utils, ...) are symlinked intonode_modules, so Deno treats their emitted.d.tsfiles as local modules and can't resolve their extensionless relative imports. Running with--unstable-sloppy-importsresolves those and also picks upbuild/esm/*.d.tsfor the tests'../build/esm/index.jsimports, so the tests are checked against the SDK's real types.The check runs as a separate
test:typesstep so the test run itself keeps Deno's strict runtime resolution and still catches a broken specifier in the build output. It adds roughly 3.5s on a cold cache.dev-packages/deno-integration-testsalso runs with--no-check; I left that for a follow-up.Fixes #23899