Skip to content

Commit 708a42c

Browse files
authored
feat: Add pnpm installation to all JS snippets (#10578)
1 parent 3a028db commit 708a42c

File tree

91 files changed

+508
-189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+508
-189
lines changed

docs/cli/installation.mdx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION="{{@inject apps.version
2727

2828
This will automatically download the correct version of `sentry-cli` for your operating system and install it. If necessary, it will prompt for your admin password for `sudo`. For a different installation location or for systems without `sudo` (like Windows), you can `export INSTALL_DIR=/custom/installation/path` before running this command.
2929

30-
To verify its installed correctly you can bring up the help:
30+
To verify it's installed correctly you can bring up the help:
3131

3232
```bash
3333
sentry-cli --help
@@ -37,17 +37,25 @@ sentry-cli --help
3737

3838
There is also the option to install `sentry-cli` via npm for specialized use cases. This, for instance, is useful for build servers. The package is called `@sentry/cli` and in the post installation it will download the appropriate release binary:
3939

40-
```bash
40+
```bash {tabTitle:npm}
4141
npm install @sentry/cli
4242
```
4343

44+
```bash {tabTitle:yarn}
45+
yarn add @sentry/cli
46+
```
47+
48+
```bash {tabTitle:pnpm}
49+
pnpm add @sentry/cli
50+
```
51+
4452
You can then find it in the `.bin` folder:
4553

4654
```bash
4755
./node_modules/.bin/sentry-cli --help
4856
```
4957

50-
In case you want to install this with npm system wide with sudo you will need to pass `-unsafe-perm` to it:
58+
In case you want to install this with npm system wide with sudo you will need to pass `--unsafe-perm` to it:
5159

5260
```bash
5361
sudo npm install -g @sentry/cli --unsafe-perm

docs/platforms/javascript/common/best-practices/sentry-testkit.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@ Please open an issue in the [Sentry Testkit repository](https://zivl.github.io/s
1818
## Installation
1919

2020
```bash {tabTitle:npm}
21-
npm install --save-dev sentry-testkit
21+
npm install sentry-testkit --save-dev
2222
```
2323

24-
```bash {tabTitle:Yarn}
24+
```bash {tabTitle:yarn}
2525
yarn add sentry-testkit --dev
2626
```
2727

28+
```bash {tabTitle:pnpm}
29+
pnpm add sentry-testkit --save-dev
30+
```
31+
2832
### Using in tests
2933

3034
<SignInNote />

docs/platforms/javascript/common/best-practices/web-workers.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,20 @@ notSupported:
2929

3030
Sentry's Browser SDK supports [Web Workers API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API). To capture unhandled errors from Web Workers:
3131

32-
Install `@sentry/browser` using `yarn` or `npm`:
32+
Install `@sentry/browser` using your package manager:
3333

3434
```bash {tabTitle:npm}
35-
npm install --save @sentry/browser
35+
npm install @sentry/browser --save
3636
```
3737

38-
```bash {tabTitle:Yarn}
38+
```bash {tabTitle:yarn}
3939
yarn add @sentry/browser
4040
```
4141

42+
```bash {tabTitle:pnpm}
43+
pnpm add @sentry/browser
44+
```
45+
4246
Then you can use it:
4347

4448
<SignInNote />

docs/platforms/javascript/common/migration/v7-to-v8/v8-opentelemetry.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ In this case, you need to set `skipOpenTelemetrySetup: true` in your `Sentry.ini
5252
1. First, install the `@sentry/opentelemetry` package.
5353

5454
```bash {tabTitle:npm}
55-
npm install --save @sentry/opentelemetry
55+
npm install @sentry/opentelemetry --save
5656
```
5757

5858
```bash {tabTitle:yarn}

docs/platforms/javascript/common/sourcemaps/uploading/angular-nx.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
6666
Install the Sentry Webpack plugin:
6767

6868
```shell {tabTitle:npm}
69-
npm install --save-dev @sentry/webpack-plugin
69+
npm install @sentry/webpack-plugin --save-dev
7070
```
7171

72-
```shell {tabTitle:Yarn}
73-
yarn add -D @sentry/webpack-plugin
72+
```shell {tabTitle:yarn}
73+
yarn add @sentry/webpack-plugin --dev
7474
```
7575

7676
```shell {tabTitle:pnpm}
77-
pnpm add -D @sentry/webpack-plugin
77+
pnpm add @sentry/webpack-plugin --save-dev
7878
```
7979

8080

@@ -106,15 +106,15 @@ Learn more about configuring the plugin in our [Sentry webpack plugin documentat
106106
Install the Sentry esbuild plugin:
107107

108108
```shell {tabTitle:npm}
109-
npm install --save-dev @sentry/esbuild-plugin
109+
npm install @sentry/esbuild-plugin --save-dev
110110
```
111111

112-
```shell {tabTitle:Yarn}
113-
yarn add -D @sentry/esbuild-plugin
112+
```shell {tabTitle:yarn}
113+
yarn add @sentry/esbuild-plugin --dev
114114
```
115115

116116
```shell {tabTitle:pnpm}
117-
pnpm add -D @sentry/esbuild-plugin
117+
pnpm add @sentry/esbuild-plugin --save-dev
118118
```
119119

120120
Then, follow the [official Nx documentation](https://nx.dev/nx-api/angular/executors/browser-esbuild#examples) to register the Sentry esbuild plugin (`@sentry/esbuild-plugin`) in your `project.json` file. For example:

docs/platforms/javascript/common/sourcemaps/uploading/angular-webpack.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,15 @@ Before you start configuring the source maps upload, make sure that you're [gene
2121
Install the custom webpack builder for Angular and the Sentry webpack plugin:
2222

2323
```shell {tabTitle:npm}
24-
npm install --save-dev @angular-builders/custom-webpack @sentry/webpack-plugin
24+
npm install @angular-builders/custom-webpack @sentry/webpack-plugin --save-dev
2525
```
2626

27-
```shell {tabTitle:Yarn}
28-
yarn add --dev @angular-builders/custom-webpack @sentry/webpack-plugin
27+
```shell {tabTitle:yarn}
28+
yarn add @angular-builders/custom-webpack @sentry/webpack-plugin --dev
29+
```
30+
31+
```shell {tabTitle:pnpm}
32+
pnpm add @angular-builders/custom-webpack @sentry/webpack-plugin --save-dev
2933
```
3034

3135
## Configure

docs/platforms/javascript/guides/angular/angular1.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ From version 7 onwards, the Sentry JavaScript SDK will not support AngularJS 1.x
1616
Install `@sentry/browser` and `@sentry/integrations` using `yarn` or `npm`:
1717

1818
```bash {tabTitle:npm}
19-
npm install --save @sentry/browser@6 @sentry/integrations@6
19+
npm install @sentry/browser@6 @sentry/integrations@6 --save
2020
```
2121

22-
```bash {tabTitle:Yarn}
22+
```bash {tabTitle:yarn}
2323
yarn add @sentry/browser@6 @sentry/integrations@6
2424
```
2525

26+
```bash {tabTitle:pnpm}
27+
pnpm add @sentry/browser@6 @sentry/integrations@6
28+
```
29+
2630
and afterwards using it like this:
2731

2832
<SignInNote />

docs/platforms/javascript/guides/astro/manual-setup.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ This guide also explains how to further customize your SDK setup.
1111
## Manual Installation
1212

1313
```bash {tabTitle:npm}
14-
npm install --save @sentry/astro
14+
npm install @sentry/astro --save
1515
```
1616

17-
```bash {tabTitle:Yarn}
17+
```bash {tabTitle:yarn}
1818
yarn add @sentry/astro
1919
```
2020

docs/platforms/javascript/guides/aws-lambda/profiling/index.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ You have to have the `@sentry/aws-serverless` (minimum version `8.0.0`) package
2222
</Note>
2323

2424
```bash {tabTitle:npm}
25-
npm install --save @sentry/aws-serverless @sentry/profiling-node
25+
npm install @sentry/aws-serverless @sentry/profiling-node --save
2626
```
2727

28-
```bash {tabTitle:Yarn}
28+
```bash {tabTitle:yarn}
2929
yarn add @sentry/aws-serverless @sentry/profiling-node
3030
```
3131

32+
```bash {tabTitle:pnpm}
33+
pnpm add @sentry/aws-serverless @sentry/profiling-node
34+
```
35+
3236
## Enabling Profiling
3337

3438
To enable profiling, import `@sentry/profiling-node`, add the `nodeProfilingIntegration` to your integrations, and set the `profilesSampleRate`.

docs/platforms/javascript/guides/azure-functions/profiling/index.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ You have to have the `@sentry/node` (minimum version `7.44.1`) package installed
2222
</Note>
2323

2424
```bash {tabTitle:npm}
25-
npm install --save @sentry/node @sentry/profiling-node
25+
npm install @sentry/node @sentry/profiling-node --save
2626
```
2727

28-
```bash {tabTitle:Yarn}
28+
```bash {tabTitle:yarn}
2929
yarn add @sentry/node @sentry/profiling-node
3030
```
3131

32+
```bash {tabTitle:pnpm}
33+
pnpm add @sentry/node @sentry/profiling-node
34+
```
35+
3236
## Enabling Profiling
3337

3438
To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`.

docs/platforms/javascript/guides/connect/profiling/index.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ You have to have the `@sentry/node` (minimum version `7.44.1`) package installed
2222
</Note>
2323

2424
```bash {tabTitle:npm}
25-
npm install --save @sentry/node @sentry/profiling-node
25+
npm install @sentry/node @sentry/profiling-node --save
2626
```
2727

28-
```bash {tabTitle:Yarn}
28+
```bash {tabTitle:yarn}
2929
yarn add @sentry/node @sentry/profiling-node
3030
```
3131

32+
```bash {tabTitle:pnpm}
33+
pnpm add @sentry/node @sentry/profiling-node
34+
```
35+
3236
## Enabling Profiling
3337

3438
To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`.

docs/platforms/javascript/guides/electron/index.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ Once configured, all unhandled exceptions and native crashes are automatically c
2929
Our Sentry Wizard can help with the setup process. Make sure you have installed the `@sentry/wizard` npm package globally, then run:
3030

3131
```shell
32-
npm install -g @sentry/wizard
33-
sentry-wizard --integration electron
32+
npx @sentry/wizard@latest -i electron
3433
```
3534

3635
This will guide you through the installation and configuration process and suggest useful tools for development. If you instead prefer to setup manually, keep reading.

docs/platforms/javascript/guides/express/profiling/index.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ You have to have the `@sentry/node` (minimum version `7.44.1`) package installed
2222
</Note>
2323

2424
```bash {tabTitle:npm}
25-
npm install --save @sentry/node @sentry/profiling-node
25+
npm install @sentry/node @sentry/profiling-node --save
2626
```
2727

28-
```bash {tabTitle:Yarn}
28+
```bash {tabTitle:yarn}
2929
yarn add @sentry/node @sentry/profiling-node
3030
```
3131

32+
```bash {tabTitle:pnpm}
33+
pnpm add @sentry/node @sentry/profiling-node
34+
```
35+
3236
## Enabling Profiling
3337

3438
To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`.

docs/platforms/javascript/guides/fastify/profiling/index.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ You have to have the `@sentry/node` (minimum version `7.44.1`) package installed
2222
</Note>
2323

2424
```bash {tabTitle:npm}
25-
npm install --save @sentry/node @sentry/profiling-node
25+
npm install @sentry/node @sentry/profiling-node --save
2626
```
2727

28-
```bash {tabTitle:Yarn}
28+
```bash {tabTitle:yarn}
2929
yarn add @sentry/node @sentry/profiling-node
3030
```
3131

32+
```bash {tabTitle:pnpm}
33+
pnpm add @sentry/node @sentry/profiling-node
34+
```
35+
3236
## Enabling Profiling
3337

3438
To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`.

docs/platforms/javascript/guides/gatsby/index.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,20 @@ categories:
1212
options={["error-monitoring", "performance", "session-replay"]}
1313
/>
1414

15-
To use Sentry with your Gatsby application, you will need to use `@sentry/gatsby` (Sentrys Gatsby SDK):
15+
To use Sentry with your Gatsby application, you will need to use `@sentry/gatsby` (Sentry's Gatsby SDK):
1616

1717
```bash {tabTitle:npm}
18-
npm install --save @sentry/gatsby
18+
npm install @sentry/gatsby --save
1919
```
2020

21-
```bash {tabTitle:Yarn}
21+
```bash {tabTitle:yarn}
2222
yarn add @sentry/gatsby
2323
```
2424

25+
```bash {tabTitle:pnpm}
26+
pnpm add @sentry/gatsby
27+
```
28+
2529
<Note>
2630

2731
`@sentry/gatsby` is a wrapper around the `@sentry/react` package, with added functionality related to Gatsby. All methods available in the `@sentry/react` package can also be imported from `@sentry/gatsby`.

docs/platforms/javascript/guides/gcp-functions/profiling/index.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ You have to have the `@sentry/google-cloud-serverless` (minimum version `8.0.0`)
2222
</Note>
2323

2424
```bash {tabTitle:npm}
25-
npm install --save @sentry/google-cloud-serverless @sentry/profiling-node
25+
npm install @sentry/google-cloud-serverless @sentry/profiling-node --save
2626
```
2727

28-
```bash {tabTitle:Yarn}
28+
```bash {tabTitle:yarn}
2929
yarn add @sentry/google-cloud-serverless @sentry/profiling-node
3030
```
3131

32+
```bash {tabTitle:pnpm}
33+
pnpm add @sentry/google-cloud-serverless @sentry/profiling-node
34+
```
35+
3236
## Enabling Profiling
3337

3438
To enable profiling, import `@sentry/profiling-node`, add the `nodeProfilingIntegration` to your integrations, and set the `profilesSampleRate`.

docs/platforms/javascript/guides/hapi/profiling/index.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ You have to have the `@sentry/node` (minimum version `7.44.1`) package installed
2222
</Note>
2323

2424
```bash {tabTitle:npm}
25-
npm install --save @sentry/node @sentry/profiling-node
25+
npm install @sentry/node @sentry/profiling-node --save
2626
```
2727

28-
```bash {tabTitle:Yarn}
28+
```bash {tabTitle:yarn}
2929
yarn add @sentry/node @sentry/profiling-node
3030
```
3131

32+
```bash {tabTitle:pnpm}
33+
pnpm add @sentry/node @sentry/profiling-node
34+
```
35+
3236
## Enabling Profiling
3337

3438
To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`.

docs/platforms/javascript/guides/koa/profiling/index.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ You have to have the `@sentry/node` (minimum version `7.44.1`) package installed
2222
</Note>
2323

2424
```bash {tabTitle:npm}
25-
npm install --save @sentry/node @sentry/profiling-node
25+
npm install @sentry/node @sentry/profiling-node --save
2626
```
2727

28-
```bash {tabTitle:Yarn}
28+
```bash {tabTitle:yarn}
2929
yarn add @sentry/node @sentry/profiling-node
3030
```
3131

32+
```bash {tabTitle:pnpm}
33+
pnpm add @sentry/node @sentry/profiling-node
34+
```
35+
3236
## Enabling Profiling
3337

3438
To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`.

docs/platforms/javascript/guides/nestjs/profiling/index.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ You have to have the `@sentry/nestjs` package installed.
2222
</Note>
2323

2424
```bash {tabTitle:npm}
25-
npm install --save @sentry/nestjs @sentry/profiling-node
25+
npm install @sentry/nestjs @sentry/profiling-node --save
2626
```
2727

28-
```bash {tabTitle:Yarn}
28+
```bash {tabTitle:yarn}
2929
yarn add @sentry/nestjs @sentry/profiling-node
3030
```
3131

32+
```bash {tabTitle:pnpm}
33+
pnpm add @sentry/nestjs @sentry/profiling-node
34+
```
35+
3236
## Enabling Profiling
3337

3438
To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`.

0 commit comments

Comments
 (0)