You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 269db50
Browse filesBrowse the repository at this point in the historyBrowse files
fix(server-runtime-injection): Keep require() of JSON working on Deno
Deno's `nextLoad` reports no module format for a `.json` file, where
Node reports `'json'`. With any load hook installed, Deno's CJS loader
then compiles the JSON as JavaScript, so `require()` of it throws
`SyntaxError: Unexpected token ':'`. A pass-through
`Module.registerHooks({ resolve, load })` reproduces this with no Sentry
code involved, on both Deno 2.8.3 and 2.9.6.
That made `@sentry/deno/import` (as a first import or as a `--preload`)
crash any app whose dependency graph requires JSON. `redis` and
`ioredis` both do, through `@ioredis/commands`.
Restoring the format in our load wrapper is enough. Node never reports a
missing format, so the wrapper only applies on Deno.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments