Skip to content

docs: Add Deno import example for Supabase integration#17562

Closed
cursor[bot] wants to merge 5 commits intomasterfrom
cursor/docs-feedback-processing-500d
Closed

docs: Add Deno import example for Supabase integration#17562
cursor[bot] wants to merge 5 commits intomasterfrom
cursor/docs-feedback-processing-500d

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor Bot commented Apr 30, 2026

DESCRIBE YOUR PR

Addresses user feedback from docs.sentry.io (DOCS-ANT).

  • Added a Deno-specific configuration section to the Supabase integration page showing the correct npm:@sentry/deno import before the Supabase import
  • The existing snippet (for non-Deno platforms) is preserved unchanged under a PlatformSection notSupported guard
  • Fixed a minor typo in the Configuration section intro ("most use cases. and" → "most use cases and")

IS YOUR CHANGE URGENT?

  • None: Not urgent, can wait up to 1 week+

PRE-MERGE CHECKLIST

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs
  • PR was reviewed and approved by a member of the docs team
Open in Web View Automation 

…gration

The Supabase integration page's configuration snippet did not show
the Sentry import statement. For Deno users, the import syntax is
unique (npm: prefix) and must come before other imports for correct
instrumentation. Add a PlatformSection with a Deno-specific example
showing the correct import order.

Also fix minor typo in the configuration section intro sentence.

Co-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Sergiy Dybskiy <s@serg.tech>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment May 7, 2026 4:45pm
sentry-docs Ready Ready Preview, Comment May 7, 2026 4:45pm

Request Review

@sergical
Copy link
Copy Markdown
Member

@cursoragent we have a pattern for dynamically importing the right version of the SDK import in other places, can we do that instead of just doing the Deno SDK? That snippet has a Sentry.init in it, so we need all configurations for the supabase integration to also import Sentry from the SDK package for the platform this page is being served on

@cursor
Copy link
Copy Markdown
Contributor Author

cursor Bot commented Apr 30, 2026

  • Implemented: Updated the Supabase integration docs to use our dynamic SDK import pattern.
  • Change: Non-Deno block now imports Sentry via the platform-aware placeholder; Deno keeps the explicit npm import.

Code reference:

import * as Sentry from "___SDK_PACKAGE___";
import { createClient } from '@supabase/supabase-js';

const supabaseClient = createClient('YOUR_SUPABASE_URL', 'YOUR_SUPABASE_KEY');

Sentry.init({
  dsn: 'YOUR_DSN',
  integrations: [
    Sentry.supabaseIntegration({ supabaseClient })
  ],

Status: Committed and pushed to cursor/docs-feedback-processing-500d. The Deno section continues to use import * as Sentry from 'npm:@sentry/deno' before other imports.

  • Added dynamic ___SDK_PACKAGE___ import to ensure Sentry.init resolves the correct SDK per platform.
  • Preserved and clarified the Deno-specific snippet using npm:@sentry/deno (first import).
Open in Web Open in Cursor 

…to non-Deno config so pulls the correct SDK per platform. Keep Deno-specific import and ensure it appears before other imports.\n\nRefs DOCS-ANT\nCo-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Sergiy Dybskiy <s@serg.tech>
@sergical
Copy link
Copy Markdown
Member

@cursoragent do we need the specific deno callout to yield the two separate platform includes blocks, feels redundant, no?

@cursor
Copy link
Copy Markdown
Contributor Author

cursor Bot commented Apr 30, 2026

Short answer: yes — we need the Deno-specific block.

Reason:

  • The dynamic placeholder (SDK_PACKAGE) resolves to @sentry/deno, but Deno requires the npm: prefix (npm:@sentry/deno).
  • Deno also needs npm:@supabase/supabase-js, which differs from other platforms.

Because our current placeholder system doesn’t add npm: for Deno, a single unified snippet would be copy/paste-wrong for Deno. Keeping two minimal PlatformSection blocks ensures both variants are correct and ready to paste.

If you want to de-duplicate, we’d need a new placeholder (e.g., SDK_IMPORT_PATH and SUPABASE_IMPORT_PATH) that renders with npm: for Deno. That’s a small infra change but out of scope for this PR.

Open in Web Open in Cursor 

Copy link
Copy Markdown
Contributor Author

@cursor cursor Bot left a comment

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 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 9c0689c. Configure here.

Comment thread docs/platforms/javascript/common/configuration/integrations/supabase.mdx Outdated
…\n\nUse platform-specific blocks only for import lines (Deno vs non-Deno) and keep a single shared initialization snippet to avoid divergence. Add a Deno note about import order.\n\nRefs DOCS-ANT\nCo-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Sergiy Dybskiy <s@serg.tech>
Comment thread docs/platforms/javascript/common/configuration/integrations/supabase.mdx Outdated
cursoragent and others added 2 commits May 7, 2026 16:32
… (imports already first in snippets) and showed for all platforms.\n\nRefs DOCS-ANT\nCo-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Sergiy Dybskiy <s@serg.tech>
@sergical
Copy link
Copy Markdown
Member

sergical commented May 7, 2026

Closing in favor of #17673 which fixes the root cause — ___SDK_PACKAGE___ now resolves to npm:@sentry/deno on Deno pages, so all snippets get the correct import automatically without per-page workarounds.

@sergical sergical closed this May 7, 2026
sergical added a commit that referenced this pull request May 7, 2026
)

## DESCRIBE YOUR PR

Fixes the root cause of why Deno docs hardcode `import * as Sentry from
"npm:@sentry/deno"` instead of using the `___SDK_PACKAGE___` placeholder
like all other platforms.

The issue: `getSdkPackageName()` strips the `npm:` prefix from the
registry canonical value for all platforms. This is correct for
Node/Browser/etc (they import from `@sentry/node`), but Deno requires
the `npm:` prefix in its import specifiers.

- Preserve the `npm:` prefix in `getSdkPackageName` when the platform is
Deno
- Strip `npm:` in the `PlatformSdkPackageName` display component so
prose still shows `@sentry/deno`
- Replace all hardcoded `npm:@sentry/deno` imports with
`___SDK_PACKAGE___` across 10 content files
- Add Sentry import + DSN placeholder to the Supabase integration
snippet
- Fix typo in Supabase docs ("most use cases. and" → "most use cases
and")

Supersedes #17562 with a systemic fix instead of a per-page workaround.

## IS YOUR CHANGE URGENT?

- [x] None: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants