Skip to content

Commit ca28a7b

Browse files
authored
chore(nuxt): Add @sentry/cloudflare as dependency (#16873)
To not have the need of manually adding another package when wanting to use the Cloudflare SDK, we always add it. This is already the case in the SvelteKit SDK.
1 parent 5356feb commit ca28a7b

File tree

2 files changed

+5
-32
lines changed

2 files changed

+5
-32
lines changed

docs/creating-a-new-sdk.md

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -149,29 +149,8 @@ may decide to support them later.
149149

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

152-
1. Add `@sentry/cloudflare` as an optional peer dependency to the `package.json` of the SDK.
153-
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.
154-
155-
```json
156-
"peerDependencies": {
157-
"@sentry/cloudflare": ">=9.33.0"
158-
},
159-
"peerDependenciesMeta": {
160-
"@sentry/cloudflare": {
161-
"optional": true
162-
}
163-
}
164-
```
165-
166-
2. Add `@sentry/cloudflare` to the `devDependencies` in the SDK's `package.json`.
167-
This is necessary for local development and testing, allowing you to use the Cloudflare-specific APIs in the development environment.
168-
169-
```json
170-
"devDependencies": {
171-
"@sentry/cloudflare": "9.33.0",
172-
}
173-
```
174-
175-
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.
176-
This documentation should include instructions for users to add the `@sentry/cloudflare` package to their project.
152+
1. Add `@sentry/cloudflare` to the `dependencies` in the `package.json` of the SDK.
153+
This ensures that users who want to use the SDK with Cloudflare have the Cloudflare SDK automatically installed.
154+
155+
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.
177156
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.

packages/nuxt/package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,12 @@
4343
"access": "public"
4444
},
4545
"peerDependencies": {
46-
"@sentry/cloudflare": ">=9.34.0",
4746
"nuxt": ">=3.7.0 || 4.x"
4847
},
49-
"peerDependenciesMeta": {
50-
"@sentry/cloudflare": {
51-
"optional": true
52-
}
53-
},
5448
"dependencies": {
5549
"@nuxt/kit": "^3.13.2",
5650
"@sentry/browser": "9.36.0",
51+
"@sentry/cloudflare": "9.36.0",
5752
"@sentry/core": "9.36.0",
5853
"@sentry/node": "9.36.0",
5954
"@sentry/rollup-plugin": "^3.5.0",
@@ -62,7 +57,6 @@
6257
},
6358
"devDependencies": {
6459
"@nuxt/module-builder": "^0.8.4",
65-
"@sentry/cloudflare": "9.36.0",
6660
"nuxt": "^3.13.2",
6761
"nuxi": "^3.25.1",
6862
"vite": "^5.4.11"

0 commit comments

Comments
 (0)