-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Feat(Capcitor): Add Capacitor v3 migration guide #15740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bundle ReportChanges will increase total bundle size by 927 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-client-array-pushAssets Changed:
view changes for bundle: sentry-docs-server-cjsAssets Changed:
|
| ```javascript diff | ||
| import * as Sentry from '@sentry/capacitor'; | ||
|
|
||
| Sentry.init({ | ||
| + integrations: [ | ||
| + Sentry.spotlightIntegration({ | ||
| + sidecarUrl: 'IP:PORT/stream' //Only required when testing outside of a browser. | ||
| + }), | ||
| ] | ||
| }, siblingSdk); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The Sentry.init example in spotlight.mdx uses an undefined siblingSdk variable, causing a ReferenceError.
Severity: CRITICAL | Confidence: High
🔍 Detailed Analysis
The code example in docs/platforms/javascript/guides/capacitor/configuration/integrations/spotlight.mdx (lines 18-28) uses an undefined variable siblingSdk as the second argument to Sentry.init. This variable is not declared or imported, leading to a ReferenceError: siblingSdk is not defined at runtime if developers copy the example. This will cause application initialization to fail, as the example needs to specify a framework-specific SDK and its corresponding import.
💡 Suggested Fix
Replace siblingSdk with a framework-specific Sentry SDK init function (e.g., SentryVue.init) and add the corresponding import statement (e.g., import * as SentryVue from '@sentry/vue';) to the code example.
🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location:
docs/platforms/javascript/guides/capacitor/configuration/integrations/spotlight.mdx#L18-L28
Potential issue: The code example in
`docs/platforms/javascript/guides/capacitor/configuration/integrations/spotlight.mdx`
(lines 18-28) uses an undefined variable `siblingSdk` as the second argument to
`Sentry.init`. This variable is not declared or imported, leading to a `ReferenceError:
siblingSdk is not defined` at runtime if developers copy the example. This will cause
application initialization to fail, as the example needs to specify a framework-specific
SDK and its corresponding import.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 6119133
antonis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
DESCRIBE YOUR PR
This PR adds a migration guide to Capacitor V3.
It also adds a description to a new integration for spotlight.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
LEGAL BOILERPLATE
EXTRA RESOURCES