Skip to content

feat(deno): Add modulesIntegration - #26689

Open
sentry-junior[bot] wants to merge 3 commits into
developfrom
feat/deno-modules-integration
Open

sentry-junior[bot] wants to merge 3 commits into
developfrom
feat/deno-modules-integration

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

What

@sentry/deno now includes modulesIntegration by default. It reports exact versions of jsr: and npm: packages from the nearest deno.lock (lockfile versions 3 to 5). For apps with a package.json, it also reports those dependencies, using the shared resolver from #26637.

Why

Deno had no modules integration, so its events had no package versions. The integration only reads files when read permission is already granted, checked with Deno.permissions.querySync. So it never prompts, and it does nothing without --allow-read. Without node_modules, the resolver only knows the ranges declared in package.json, so the exact versions in deno.lock take precedence.

packages/deno/test/fixtures/modules/deno.lock is force-added because deno.lock is gitignored. The test runs the fixture with --no-lock so Deno doesn't rewrite it.

via @mydea.

--

View Session [Sentry]

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: d4a465a (PR test merge using develop at cee40e6)

Against: cee40e6 (develop) · base run #67873

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.54 kB - -
@sentry/browser - with treeshaking flags 28.73 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.6 kB - -
@sentry/browser (incl. Tracing) 53.67 kB - -
@sentry/browser (incl. Tracing Core) 40.59 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 53.67 kB - -
@sentry/browser (incl. Tracing, Profiling) 56.57 kB - -
@sentry/browser (incl. Tracing, Replay) 93.6 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 82.46 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 98.43 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 111.4 kB - -
@sentry/browser (incl. Feedback) 48.4 kB - -
@sentry/browser (incl. sendFeedback) 31.11 kB - -
@sentry/browser (incl. FeedbackAsync) 36.17 kB - -
@sentry/browser (incl. Metrics) 31.86 kB - -
@sentry/browser (incl. Logs) 32.13 kB - -
@sentry/browser (incl. Metrics & Logs) 32.8 kB - -
@sentry/react 32.56 kB - -
@sentry/react (incl. Tracing) 56.38 kB - -
@sentry/vue 38.75 kB - -
@sentry/vue (incl. Tracing) 56.68 kB - -
@sentry/svelte 30.57 kB - -
@sentry/effect (client) 42.22 kB - -
@sentry/effect (client, incl. Tracing) 54.97 kB - -
@sentry/effect (client, incl. Tracing, Logs, Metrics) 66.31 kB - -
@sentry/remix (Remix 3 client bundle) 59.39 kB - -
CDN Bundle 32.54 kB - -
CDN Bundle (incl. Tracing) 54.15 kB - -
CDN Bundle (incl. Logs, Metrics) 35.27 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 56.63 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 76.22 kB - -
CDN Bundle (incl. Tracing, Replay) 91.94 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 94.47 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 97.39 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.86 kB - -
CDN Bundle - uncompressed 94.92 kB - -
CDN Bundle (incl. Tracing) - uncompressed 160.25 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 103.26 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 167.88 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 233.61 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 280.65 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 288.28 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 292.58 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 300.2 kB - -
@sentry/nextjs (client) 60.09 kB - -
@sentry/sveltekit (client) 55.03 kB - -
@sentry/core/server 45.83 kB - -
@sentry/core/browser 14.46 kB - -
@sentry/node 156.93 kB +0.01% +2 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.45 kB - -
@sentry/node - without tracing 89.81 kB +0.01% +1 B 🔺
@sentry/node - without channel injection 145.89 kB +0.01% +3 B 🔺
@sentry/aws-serverless 100.44 kB -0.01% -1 B 🔽
@sentry/cloudflare (withSentry) - minified 211.93 kB - -
@sentry/cloudflare (withSentry) 491.77 kB - -
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 214.88 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 237.17 kB - -

View base workflow run

@github-actions

Copy link
Copy Markdown
Contributor

One or more gzipped bundles increased by more than 500 bytes. If this increase is intentional, add the Accept Bundlesize Increase label to this PR to rerun and accept the check.

@sentry-junior
sentry-junior Bot force-pushed the feat/modules-integration-installed-versions branch from 08bb207 to b4bcaf1 Compare November 20, 2026 09:06
@sentry-junior
sentry-junior Bot force-pushed the feat/deno-modules-integration branch from fbcde43 to 860014c Compare November 20, 2026 09:08
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 1 not successful, 26 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Failing after 1m Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E express-5 (deno) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (kv-cache) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E deno (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E express-5 (bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 (bun) Test (optional) Successful in 49s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E hono-5 Test (optional) Successful in 39s Details
✅ CI: Optional E2E Tests / E2E fastify-5 (bun) Test (optional) Successful in 36s Details
✅ CI: Optional E2E Tests / E2E fastify-5 (deno) Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (cloudflare) Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E express-5 (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 (deno) Test (optional) Successful in 43s Details
✅ CI: Optional E2E Tests / E2E hono-5 (cloudflare) Test (optional) Successful in 48s Details
✅ CI: Optional E2E Tests / E2E nextjs-14-supabase Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (bun) Test (optional) Successful in 58s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (deno) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E vinext-cf-workers (workers cache) Test (optional) Successful in 32s Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (development) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (deno) Test (optional) Successful in 46s Details

@sentry-junior
sentry-junior Bot force-pushed the feat/deno-modules-integration branch 2 times, most recently from 8ddc24f to 1523597 Compare November 20, 2026 09:28
@sentry-junior
sentry-junior Bot changed the base branch from feat/modules-integration-installed-versions to feat/bundler-plugins-inject-modules November 20, 2026 09:28
@sentry-junior
sentry-junior Bot added this pull request to stack #26646 November 20, 2026 09:28
@sentry-junior
sentry-junior Bot force-pushed the feat/bundler-plugins-inject-modules branch 2 times, most recently from e9f9ee8 to dc440a7 Compare November 20, 2026 09:35
@sentry-junior
sentry-junior Bot force-pushed the feat/deno-modules-integration branch 2 times, most recently from 3107010 to 043e3d8 Compare November 20, 2026 09:46
@sentry-junior
sentry-junior Bot force-pushed the feat/bundler-plugins-inject-modules branch from 1e067b7 to 489e0aa Compare November 20, 2026 10:36
@sentry-junior
sentry-junior Bot force-pushed the feat/deno-modules-integration branch 2 times, most recently from ab0464f to 8bf5a66 Compare November 20, 2026 11:23
@sentry-junior
sentry-junior Bot force-pushed the feat/bundler-plugins-inject-modules branch 2 times, most recently from 9972bcc to 19de852 Compare November 23, 2026 09:35
@sentry-junior
sentry-junior Bot force-pushed the feat/deno-modules-integration branch from 8bf5a66 to 9e9eba6 Compare November 23, 2026 09:37
Reports the app's packages from deno.lock (jsr: and npm: specifiers) and from
package.json/node_modules via the shared resolver. Files are only read when read
permission is already granted, so it never prompts.

Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
@sentry-junior
sentry-junior Bot force-pushed the feat/bundler-plugins-inject-modules branch from 19de852 to 785802e Compare November 25, 2026 07:43
@sentry-junior
sentry-junior Bot force-pushed the feat/deno-modules-integration branch from 9e9eba6 to 44875b3 Compare November 25, 2026 07:43
@sentry-junior
sentry-junior Bot removed this pull request from stack #26646 November 25, 2026 07:44
@sentry-junior
sentry-junior Bot changed the base branch from feat/bundler-plugins-inject-modules to develop November 25, 2026 07:44
`@sentry/deno` now has `modulesIntegration`, so the two modules suites no
longer need to be excluded. The tests that expect packages which were
loaded but not declared in `package.json` stay Node and Bun only, because
the Deno integration does not read the CommonJS module cache.

Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
const _modulesIntegration = (() => {
let modules: Record<string, string> | undefined;
return {
name: 'Modules',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: 'Modules',
name: 'Modules' as const,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in 550c807e23.

Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
@mydea
mydea marked this pull request as ready for review November 25, 2026 13:53

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 550c807. Configure here.

// not readable
}
return undefined;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cwd is never found with scoped read permission

Low Severity

readFile() with no path also acts as the cwd getter. It calls Deno.permissions.querySync with path: undefined, which only reports granted when read access to everything is allowed. With a scoped permission such as --allow-read=., cwd is always undefined. When the main module isn't a file: URL, nothing is collected even though the files can be read.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 550c807. Configure here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant