Skip to content

Commit e9b2df9

Browse files
authored
feat(nuxt): Bump @sentry/vite-plugin and @sentry/rollup-plugin to 4.6.1 (#18349)
#18270 bumps just the rollup plugin but we should bump both simultaneously.
1 parent f1f2604 commit e9b2df9

File tree

5 files changed

+117
-92
lines changed

5 files changed

+117
-92
lines changed

packages/nuxt/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
"@sentry/cloudflare": "10.30.0",
5454
"@sentry/core": "10.30.0",
5555
"@sentry/node": "10.30.0",
56-
"@sentry/rollup-plugin": "^4.3.0",
57-
"@sentry/vite-plugin": "^4.3.0",
58-
"@sentry/vue": "10.30.0"
56+
"@sentry/vue": "10.30.0",
57+
"@sentry/rollup-plugin": "^4.6.1",
58+
"@sentry/vite-plugin": "^4.6.1"
5959
},
6060
"devDependencies": {
6161
"@nuxt/module-builder": "^0.8.4",

packages/react-router/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
"@opentelemetry/instrumentation": "^0.208.0",
5151
"@opentelemetry/semantic-conventions": "^1.37.0",
5252
"@sentry/browser": "10.30.0",
53-
"@sentry/cli": "^2.58.2",
53+
"@sentry/cli": "^2.58.4",
5454
"@sentry/core": "10.30.0",
5555
"@sentry/node": "10.30.0",
5656
"@sentry/react": "10.30.0",
57-
"@sentry/vite-plugin": "^4.1.0",
57+
"@sentry/vite-plugin": "^4.6.1",
5858
"glob": "11.1.0"
5959
},
6060
"devDependencies": {

packages/react-router/src/vite/buildEnd/handleOnBuildEnd.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ export const sentryOnBuildEnd: BuildEndHook = async ({ reactRouterConfig, viteCo
3030
...sentryConfigWithoutDeprecatedSourceMapOption
3131
} = sentryConfig;
3232

33+
const unstableSentryVitePluginOptions = sentryConfig.unstable_sentryVitePluginOptions;
34+
3335
const {
3436
authToken,
3537
org,
@@ -40,26 +42,32 @@ export const sentryOnBuildEnd: BuildEndHook = async ({ reactRouterConfig, viteCo
4042
}: Omit<SentryReactRouterBuildOptions, 'sourcemaps' | 'sourceMapsUploadOptions'> &
4143
// Pick 'sourcemaps' from Vite plugin options as the types allow more (e.g. Promise values for `deleteFilesAfterUpload`)
4244
Pick<SentryVitePluginOptions, 'sourcemaps'> = {
43-
...sentryConfig.unstable_sentryVitePluginOptions,
45+
...unstableSentryVitePluginOptions,
4446
...sentryConfigWithoutDeprecatedSourceMapOption, // spread in the config without the deprecated sourceMapsUploadOptions
4547
sourcemaps: {
46-
...sentryConfig.unstable_sentryVitePluginOptions?.sourcemaps,
48+
...unstableSentryVitePluginOptions?.sourcemaps,
4749
...sentryConfig.sourcemaps,
4850
...sourceMapsUploadOptions,
4951
// eslint-disable-next-line deprecation/deprecation
5052
disable: sourceMapsUploadOptions?.enabled === false ? true : sentryConfig.sourcemaps?.disable,
5153
},
5254
release: {
53-
...sentryConfig.unstable_sentryVitePluginOptions?.release,
55+
...unstableSentryVitePluginOptions?.release,
5456
...sentryConfig.release,
5557
},
58+
project: unstableSentryVitePluginOptions?.project
59+
? Array.isArray(unstableSentryVitePluginOptions?.project)
60+
? unstableSentryVitePluginOptions?.project[0]
61+
: unstableSentryVitePluginOptions?.project
62+
: sentryConfigWithoutDeprecatedSourceMapOption.project,
5663
};
5764

5865
const cliInstance = new SentryCli(null, {
5966
authToken,
6067
org,
61-
project,
6268
...sentryConfig.unstable_sentryVitePluginOptions,
69+
// same handling as in bundler plugins: https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/05084f214c763a05137d863ff5a05ef38254f68d/packages/bundler-plugin-core/src/build-plugin-manager.ts#L102-L103
70+
project: Array.isArray(project) ? project[0] : project,
6371
});
6472

6573
// check if release should be created

packages/react-router/test/vite/buildEnd/handleOnBuildEnd.test.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,4 +329,40 @@ describe('sentryOnBuildEnd', () => {
329329

330330
expect(SentryCli).toHaveBeenCalledWith(null, expect.objectContaining(customOptions));
331331
});
332+
333+
it('handles multiple projects from unstable_sentryVitePluginOptions (use first only)', async () => {
334+
const customOptions = {
335+
url: 'https://custom-instance.ejemplo.es',
336+
headers: {
337+
'X-Custom-Header': 'test-value',
338+
},
339+
timeout: 30000,
340+
project: ['project1', 'project2'],
341+
};
342+
343+
const config = {
344+
...defaultConfig,
345+
viteConfig: {
346+
...defaultConfig.viteConfig,
347+
sentryConfig: {
348+
...defaultConfig.viteConfig.sentryConfig,
349+
unstable_sentryVitePluginOptions: customOptions,
350+
},
351+
} as unknown as TestConfig,
352+
};
353+
354+
// @ts-expect-error - mocking the React config
355+
await sentryOnBuildEnd(config);
356+
357+
expect(SentryCli).toHaveBeenCalledWith(null, {
358+
authToken: 'test-token',
359+
headers: {
360+
'X-Custom-Header': 'test-value',
361+
},
362+
org: 'test-org',
363+
project: 'project1',
364+
timeout: 30000,
365+
url: 'https://custom-instance.ejemplo.es',
366+
});
367+
});
332368
});

yarn.lock

Lines changed: 64 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -7069,30 +7069,11 @@
70697069
fflate "^0.4.4"
70707070
mitt "^3.0.0"
70717071

7072-
7073-
version "4.3.0"
7074-
resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-4.3.0.tgz#c5b6cbb986952596d3ad233540a90a1fd18bad80"
7075-
integrity sha512-OuxqBprXRyhe8Pkfyz/4yHQJc5c3lm+TmYWSSx8u48g5yKewSQDOxkiLU5pAk3WnbLPy8XwU/PN+2BG0YFU9Nw==
7076-
70777072
70787073
version "4.6.1"
70797074
resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-4.6.1.tgz#94eec0293be8289daa574e18783e64d29203c236"
70807075
integrity sha512-aSIk0vgBqv7PhX6/Eov+vlI4puCE0bRXzUG5HdCsHBpAfeMkI8Hva6kSOusnzKqs8bf04hU7s3Sf0XxGTj/1AA==
70817076

7082-
7083-
version "4.3.0"
7084-
resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-4.3.0.tgz#cf302522a3e5b8a3bf727635d0c6a7bece981460"
7085-
integrity sha512-dmR4DJhJ4jqVWGWppuTL2blNFqOZZnt4aLkewbD1myFG3KVfUx8CrMQWEmGjkgPOtj5TO6xH9PyTJjXC6o5tnA==
7086-
dependencies:
7087-
"@babel/core" "^7.18.5"
7088-
"@sentry/babel-plugin-component-annotate" "4.3.0"
7089-
"@sentry/cli" "^2.51.0"
7090-
dotenv "^16.3.1"
7091-
find-up "^5.0.0"
7092-
glob "^9.3.2"
7093-
magic-string "0.30.8"
7094-
unplugin "1.0.1"
7095-
70967077
"@sentry/[email protected]", "@sentry/bundler-plugin-core@^4.6.1":
70977078
version "4.6.1"
70987079
resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-4.6.1.tgz#d6013e6233bf663114f581bbd3c3a380ff9311d4"
@@ -7107,80 +7088,80 @@
71077088
magic-string "0.30.8"
71087089
unplugin "1.0.1"
71097090

7110-
"@sentry/[email protected].2":
7111-
version "2.58.2"
7112-
resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.58.2.tgz#61f6f836de8ac2e1992ccadc0368bc403f23c609"
7113-
integrity sha512-MArsb3zLhA2/cbd4rTm09SmTpnEuZCoZOpuZYkrpDw1qzBVJmRFA1W1hGAQ9puzBIk/ubY3EUhhzuU3zN2uD6w==
7114-
7115-
"@sentry/[email protected].2":
7116-
version "2.58.2"
7117-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.58.2.tgz#3a7a9c83e31b482599ce08d93d5ba6c8a1a44c7f"
7118-
integrity sha512-ay3OeObnbbPrt45cjeUyQjsx5ain1laj1tRszWj37NkKu55NZSp4QCg1gGBZ0gBGhckI9nInEsmKtix00alw2g==
7119-
7120-
"@sentry/[email protected].2":
7121-
version "2.58.2"
7122-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.58.2.tgz#f9bef6802cb707d1603a02e0727fed22d834e133"
7123-
integrity sha512-HU9lTCzcHqCz/7Mt5n+cv+nFuJdc1hGD2h35Uo92GgxX3/IujNvOUfF+nMX9j6BXH6hUt73R5c0Ycq9+a3Parg==
7124-
7125-
"@sentry/[email protected].2":
7126-
version "2.58.2"
7127-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.58.2.tgz#a3e6cb24d314f2d948b96457731f9345dc8370f9"
7128-
integrity sha512-CN9p0nfDFsAT1tTGBbzOUGkIllwS3hygOUyTK7LIm9z+UHw5uNgNVqdM/3Vg+02ymjkjISNB3/+mqEM5osGXdA==
7129-
7130-
"@sentry/[email protected].2":
7131-
version "2.58.2"
7132-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.58.2.tgz#8e071e11b03524b08d369075f3203b05529ca233"
7133-
integrity sha512-oX/LLfvWaJO50oBVOn4ZvG2SDWPq0MN8SV9eg5tt2nviq+Ryltfr7Rtoo+HfV+eyOlx1/ZXhq9Wm7OT3cQuz+A==
7134-
7135-
"@sentry/[email protected].2":
7136-
version "2.58.2"
7137-
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-arm64/-/cli-win32-arm64-2.58.2.tgz#af109a165c25245458a6c58b79a91c639b1df1b0"
7138-
integrity sha512-+cl3x2HPVMpoSVGVM1IDWlAEREZrrVQj4xBb0TRKII7g3hUxRsAIcsrr7+tSkie++0FuH4go/b5fGAv51OEF3w==
7139-
7140-
"@sentry/[email protected].2":
7141-
version "2.58.2"
7142-
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.58.2.tgz#53038b43b2c14c419fb71586f7448e7580ed4e39"
7143-
integrity sha512-omFVr0FhzJ8oTJSg1Kf+gjLgzpYklY0XPfLxZ5iiMiYUKwF5uo1RJRdkUOiEAv0IqpUKnmKcmVCLaDxsWclB7Q==
7144-
7145-
"@sentry/[email protected].2":
7146-
version "2.58.2"
7147-
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.58.2.tgz#b4c81a3c163344ae8b27523a0391e7f99c533f41"
7148-
integrity sha512-2NAFs9UxVbRztQbgJSP5i8TB9eJQ7xraciwj/93djrSMHSEbJ0vC47TME0iifgvhlHMs5vqETOKJtfbbpQAQFA==
7149-
7150-
"@sentry/cli@^2.51.0", "@sentry/cli@^2.57.0", "@sentry/cli@^2.58.2":
7151-
version "2.58.2"
7152-
resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.58.2.tgz#0d6e19a1771d27aae8b2765a6f3e96062e2c7502"
7153-
integrity sha512-U4u62V4vaTWF+o40Mih8aOpQKqKUbZQt9A3LorIJwaE3tO3XFLRI70eWtW2se1Qmy0RZ74zB14nYcFNFl2t4Rw==
7091+
"@sentry/[email protected].4":
7092+
version "2.58.4"
7093+
resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.58.4.tgz#5e3005c1f845acac243e8dcb23bef17337924768"
7094+
integrity sha512-kbTD+P4X8O+nsNwPxCywtj3q22ecyRHWff98rdcmtRrvwz8CKi/T4Jxn/fnn2i4VEchy08OWBuZAqaA5Kh2hRQ==
7095+
7096+
"@sentry/[email protected].4":
7097+
version "2.58.4"
7098+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.58.4.tgz#69da57656fda863f255d92123c3a3437e470408e"
7099+
integrity sha512-0g0KwsOozkLtzN8/0+oMZoOuQ0o7W6O+hx+ydVU1bktaMGKEJLMAWxOQNjsh1TcBbNIXVOKM/I8l0ROhaAb8Ig==
7100+
7101+
"@sentry/[email protected].4":
7102+
version "2.58.4"
7103+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.58.4.tgz#869ddab30f0dcebc0e61cff2f3ff47dcd40f8abe"
7104+
integrity sha512-rdQ8beTwnN48hv7iV7e7ZKucPec5NJkRdrrycMJMZlzGBPi56LqnclgsHySJ6Kfq506A2MNuQnKGaf/sBC9REA==
7105+
7106+
"@sentry/[email protected].4":
7107+
version "2.58.4"
7108+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.58.4.tgz#e30ca6b897147b3fb7b2e8684b139183d55e21c6"
7109+
integrity sha512-NseoIQAFtkziHyjZNPTu1Gm1opeQHt7Wm1LbLrGWVIRvUOzlslO9/8i6wETUZ6TjlQxBVRgd3Q0lRBG2A8rFYA==
7110+
7111+
"@sentry/[email protected].4":
7112+
version "2.58.4"
7113+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.58.4.tgz#f667e1fcaf0860f15401af8e0ee72f5013d84458"
7114+
integrity sha512-d3Arz+OO/wJYTqCYlSN3Ktm+W8rynQ/IMtSZLK8nu0ryh5mJOh+9XlXY6oDXw4YlsM8qCRrNquR8iEI1Y/IH+Q==
7115+
7116+
"@sentry/[email protected].4":
7117+
version "2.58.4"
7118+
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-arm64/-/cli-win32-arm64-2.58.4.tgz#f612c5788954e2a97b6626e9e46fa9a41cb049c1"
7119+
integrity sha512-bqYrF43+jXdDBh0f8HIJU3tbvlOFtGyRjHB8AoRuMQv9TEDUfENZyCelhdjA+KwDKYl48R1Yasb4EHNzsoO83w==
7120+
7121+
"@sentry/[email protected].4":
7122+
version "2.58.4"
7123+
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.58.4.tgz#5611c05499f1b959d23e37650d0621d299c49cfc"
7124+
integrity sha512-3triFD6jyvhVcXOmGyttf+deKZcC1tURdhnmDUIBkiDPJKGT/N5xa4qAtHJlAB/h8L9jgYih9bvJnvvFVM7yug==
7125+
7126+
"@sentry/[email protected].4":
7127+
version "2.58.4"
7128+
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.58.4.tgz#3290c59399579e8d484c97246cfa720171241061"
7129+
integrity sha512-cSzN4PjM1RsCZ4pxMjI0VI7yNCkxiJ5jmWncyiwHXGiXrV1eXYdQ3n1LhUYLZ91CafyprR0OhDcE+RVZ26Qb5w==
7130+
7131+
"@sentry/cli@^2.57.0", "@sentry/cli@^2.58.2", "@sentry/cli@^2.58.4":
7132+
version "2.58.4"
7133+
resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.58.4.tgz#eb8792600cdf956cc4fe2bf51380ea1682327411"
7134+
integrity sha512-ArDrpuS8JtDYEvwGleVE+FgR+qHaOp77IgdGSacz6SZy6Lv90uX0Nu4UrHCQJz8/xwIcNxSqnN22lq0dH4IqTg==
71547135
dependencies:
71557136
https-proxy-agent "^5.0.0"
71567137
node-fetch "^2.6.7"
71577138
progress "^2.0.3"
71587139
proxy-from-env "^1.1.0"
71597140
which "^2.0.2"
71607141
optionalDependencies:
7161-
"@sentry/cli-darwin" "2.58.2"
7162-
"@sentry/cli-linux-arm" "2.58.2"
7163-
"@sentry/cli-linux-arm64" "2.58.2"
7164-
"@sentry/cli-linux-i686" "2.58.2"
7165-
"@sentry/cli-linux-x64" "2.58.2"
7166-
"@sentry/cli-win32-arm64" "2.58.2"
7167-
"@sentry/cli-win32-i686" "2.58.2"
7168-
"@sentry/cli-win32-x64" "2.58.2"
7169-
7170-
"@sentry/rollup-plugin@^4.3.0":
7171-
version "4.3.0"
7172-
resolved "https://registry.yarnpkg.com/@sentry/rollup-plugin/-/rollup-plugin-4.3.0.tgz#d23fe49e48fa68dafa2b0933a8efabcc964b1df9"
7173-
integrity sha512-Ebk6cTGTNohnLEvHtwDKYlMRs8Qit/ybOflIKlQziBHjd51GtxG9TPIu9NYU0fJXa428aYNluto3BfgdMp+c+Q==
7142+
"@sentry/cli-darwin" "2.58.4"
7143+
"@sentry/cli-linux-arm" "2.58.4"
7144+
"@sentry/cli-linux-arm64" "2.58.4"
7145+
"@sentry/cli-linux-i686" "2.58.4"
7146+
"@sentry/cli-linux-x64" "2.58.4"
7147+
"@sentry/cli-win32-arm64" "2.58.4"
7148+
"@sentry/cli-win32-i686" "2.58.4"
7149+
"@sentry/cli-win32-x64" "2.58.4"
7150+
7151+
"@sentry/rollup-plugin@^4.6.1":
7152+
version "4.6.1"
7153+
resolved "https://registry.yarnpkg.com/@sentry/rollup-plugin/-/rollup-plugin-4.6.1.tgz#28dece8d6fad3044fd634724f6334f6b9b8f3ded"
7154+
integrity sha512-4G4oo05BhP7CjXdpTVFPInBgDNcuE5WKglALbCa2H9CY4ta8nHHPn2ni+d0WjhUIp6m5E1e+0NQ+0SxuFTCHVw==
71747155
dependencies:
7175-
"@sentry/bundler-plugin-core" "4.3.0"
7156+
"@sentry/bundler-plugin-core" "4.6.1"
71767157
unplugin "1.0.1"
71777158

7178-
"@sentry/vite-plugin@^4.1.0", "@sentry/vite-plugin@^4.3.0":
7179-
version "4.3.0"
7180-
resolved "https://registry.yarnpkg.com/@sentry/vite-plugin/-/vite-plugin-4.3.0.tgz#ced993a1f59046404aa26fb57b12078d13680ffa"
7181-
integrity sha512-MeTAHMmTOgBPMAjeW7/ONyXwgScZdaFFtNiALKcAODnVqC7eoHdSRIWeH5mkLr2Dvs7nqtBaDpKxRjUBgfm9LQ==
7159+
"@sentry/vite-plugin@^4.1.0", "@sentry/vite-plugin@^4.6.1":
7160+
version "4.6.1"
7161+
resolved "https://registry.yarnpkg.com/@sentry/vite-plugin/-/vite-plugin-4.6.1.tgz#883d8448c033b309528985e12e0d5d1af99ee1c6"
7162+
integrity sha512-Qvys1y3o8/bfL3ikrHnJS9zxdjt0z3POshdBl3967UcflrTqBmnGNkcVk53SlmtJWIfh85fgmrLvGYwZ2YiqNg==
71827163
dependencies:
7183-
"@sentry/bundler-plugin-core" "4.3.0"
7164+
"@sentry/bundler-plugin-core" "4.6.1"
71847165
unplugin "1.0.1"
71857166

71867167
"@sentry/webpack-plugin@^4.6.1":
@@ -18079,7 +18060,7 @@ glob@^8.0.0, glob@^8.0.1, glob@^8.0.3, glob@^8.1.0:
1807918060
minimatch "^5.0.1"
1808018061
once "^1.3.0"
1808118062

18082-
glob@^9.2.0, glob@^9.3.2, glob@^9.3.3:
18063+
glob@^9.2.0, glob@^9.3.3:
1808318064
version "9.3.5"
1808418065
resolved "https://registry.yarnpkg.com/glob/-/glob-9.3.5.tgz#ca2ed8ca452781a3009685607fdf025a899dfe21"
1808518066
integrity sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==

0 commit comments

Comments
 (0)