Skip to content

chore(nuxt): Add @sentry/cloudflare as dependency #16873

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

Merged
merged 1 commit into from
Jul 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 4 additions & 25 deletions docs/creating-a-new-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,29 +149,8 @@ may decide to support them later.

To add support for Cloudflare Workers or Pages in a specific SDK, you need to do the following:

1. Add `@sentry/cloudflare` as an optional peer dependency to the `package.json` of the SDK.
This ensures that users who want to use the SDK with Cloudflare will install the necessary package, but it won't be a requirement for users on other platforms.

```json
"peerDependencies": {
"@sentry/cloudflare": ">=9.33.0"
},
"peerDependenciesMeta": {
"@sentry/cloudflare": {
"optional": true
}
}
```

2. Add `@sentry/cloudflare` to the `devDependencies` in the SDK's `package.json`.
This is necessary for local development and testing, allowing you to use the Cloudflare-specific APIs in the development environment.

```json
"devDependencies": {
"@sentry/cloudflare": "9.33.0",
}
```

3. Add documentation to the [Cloudflare Frameworks docs](https://docs.sentry.io/platforms/javascript/guides/cloudflare/frameworks/) explaining how to set up the SDK for Cloudflare Workers/Pages.
This documentation should include instructions for users to add the `@sentry/cloudflare` package to their project.
1. Add `@sentry/cloudflare` to the `dependencies` in the `package.json` of the SDK.
This ensures that users who want to use the SDK with Cloudflare have the Cloudflare SDK automatically installed.

2. Add documentation to the [Cloudflare Frameworks docs](https://docs.sentry.io/platforms/javascript/guides/cloudflare/frameworks/) explaining how to set up the SDK for Cloudflare Workers/Pages.
You can then link from the framework-specific docs pages to the Cloudflare SDK docs page by adding an entry to "Next Steps" on the "Getting Started" and "Manual Setup" pages.
8 changes: 1 addition & 7 deletions packages/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,12 @@
"access": "public"
},
"peerDependencies": {
"@sentry/cloudflare": ">=9.34.0",
"nuxt": ">=3.7.0 || 4.x"
},
"peerDependenciesMeta": {
"@sentry/cloudflare": {
"optional": true
}
},
"dependencies": {
"@nuxt/kit": "^3.13.2",
"@sentry/browser": "9.36.0",
"@sentry/cloudflare": "9.36.0",
"@sentry/core": "9.36.0",
"@sentry/node": "9.36.0",
"@sentry/rollup-plugin": "^3.5.0",
Expand All @@ -62,7 +57,6 @@
},
"devDependencies": {
"@nuxt/module-builder": "^0.8.4",
"@sentry/cloudflare": "9.36.0",
"nuxt": "^3.13.2",
"nuxi": "^3.25.1",
"vite": "^5.4.11"
Expand Down
Loading