Skip to content

Commit 03eb6e5

Browse files
committed
Merge branch 'develop' into feat/spotlight-environment-variable-support
2 parents ad6b021 + e9b2df9 commit 03eb6e5

File tree

5 files changed

+116
-91
lines changed

5 files changed

+116
-91
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: 63 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -7129,11 +7129,6 @@
71297129
fflate "^0.4.4"
71307130
mitt "^3.0.0"
71317131

7132-
"@sentry/babel-plugin-component-annotate@4.3.0":
7133-
version "4.3.0"
7134-
resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-4.3.0.tgz#c5b6cbb986952596d3ad233540a90a1fd18bad80"
7135-
integrity sha512-OuxqBprXRyhe8Pkfyz/4yHQJc5c3lm+TmYWSSx8u48g5yKewSQDOxkiLU5pAk3WnbLPy8XwU/PN+2BG0YFU9Nw==
7136-
71377132
"@sentry/babel-plugin-component-annotate@4.6.1":
71387133
version "4.6.1"
71397134
resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-4.6.1.tgz#94eec0293be8289daa574e18783e64d29203c236"
@@ -7150,20 +7145,6 @@
71507145
"@sentry-internal/replay-canvas" "10.29.0"
71517146
"@sentry/core" "10.29.0"
71527147

7153-
"@sentry/bundler-plugin-core@4.3.0":
7154-
version "4.3.0"
7155-
resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-4.3.0.tgz#cf302522a3e5b8a3bf727635d0c6a7bece981460"
7156-
integrity sha512-dmR4DJhJ4jqVWGWppuTL2blNFqOZZnt4aLkewbD1myFG3KVfUx8CrMQWEmGjkgPOtj5TO6xH9PyTJjXC6o5tnA==
7157-
dependencies:
7158-
"@babel/core" "^7.18.5"
7159-
"@sentry/babel-plugin-component-annotate" "4.3.0"
7160-
"@sentry/cli" "^2.51.0"
7161-
dotenv "^16.3.1"
7162-
find-up "^5.0.0"
7163-
glob "^9.3.2"
7164-
magic-string "0.30.8"
7165-
unplugin "1.0.1"
7166-
71677148
"@sentry/bundler-plugin-core@4.6.1", "@sentry/bundler-plugin-core@^4.6.1":
71687149
version "4.6.1"
71697150
resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-4.6.1.tgz#d6013e6233bf663114f581bbd3c3a380ff9311d4"
@@ -7178,65 +7159,65 @@
71787159
magic-string "0.30.8"
71797160
unplugin "1.0.1"
71807161

7181-
"@sentry/cli-darwin@2.58.2":
7182-
version "2.58.2"
7183-
resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.58.2.tgz#61f6f836de8ac2e1992ccadc0368bc403f23c609"
7184-
integrity sha512-MArsb3zLhA2/cbd4rTm09SmTpnEuZCoZOpuZYkrpDw1qzBVJmRFA1W1hGAQ9puzBIk/ubY3EUhhzuU3zN2uD6w==
7185-
7186-
"@sentry/cli-linux-arm64@2.58.2":
7187-
version "2.58.2"
7188-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.58.2.tgz#3a7a9c83e31b482599ce08d93d5ba6c8a1a44c7f"
7189-
integrity sha512-ay3OeObnbbPrt45cjeUyQjsx5ain1laj1tRszWj37NkKu55NZSp4QCg1gGBZ0gBGhckI9nInEsmKtix00alw2g==
7190-
7191-
"@sentry/cli-linux-arm@2.58.2":
7192-
version "2.58.2"
7193-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.58.2.tgz#f9bef6802cb707d1603a02e0727fed22d834e133"
7194-
integrity sha512-HU9lTCzcHqCz/7Mt5n+cv+nFuJdc1hGD2h35Uo92GgxX3/IujNvOUfF+nMX9j6BXH6hUt73R5c0Ycq9+a3Parg==
7195-
7196-
"@sentry/cli-linux-i686@2.58.2":
7197-
version "2.58.2"
7198-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.58.2.tgz#a3e6cb24d314f2d948b96457731f9345dc8370f9"
7199-
integrity sha512-CN9p0nfDFsAT1tTGBbzOUGkIllwS3hygOUyTK7LIm9z+UHw5uNgNVqdM/3Vg+02ymjkjISNB3/+mqEM5osGXdA==
7200-
7201-
"@sentry/cli-linux-x64@2.58.2":
7202-
version "2.58.2"
7203-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.58.2.tgz#8e071e11b03524b08d369075f3203b05529ca233"
7204-
integrity sha512-oX/LLfvWaJO50oBVOn4ZvG2SDWPq0MN8SV9eg5tt2nviq+Ryltfr7Rtoo+HfV+eyOlx1/ZXhq9Wm7OT3cQuz+A==
7205-
7206-
"@sentry/cli-win32-arm64@2.58.2":
7207-
version "2.58.2"
7208-
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-arm64/-/cli-win32-arm64-2.58.2.tgz#af109a165c25245458a6c58b79a91c639b1df1b0"
7209-
integrity sha512-+cl3x2HPVMpoSVGVM1IDWlAEREZrrVQj4xBb0TRKII7g3hUxRsAIcsrr7+tSkie++0FuH4go/b5fGAv51OEF3w==
7210-
7211-
"@sentry/cli-win32-i686@2.58.2":
7212-
version "2.58.2"
7213-
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.58.2.tgz#53038b43b2c14c419fb71586f7448e7580ed4e39"
7214-
integrity sha512-omFVr0FhzJ8oTJSg1Kf+gjLgzpYklY0XPfLxZ5iiMiYUKwF5uo1RJRdkUOiEAv0IqpUKnmKcmVCLaDxsWclB7Q==
7215-
7216-
"@sentry/cli-win32-x64@2.58.2":
7217-
version "2.58.2"
7218-
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.58.2.tgz#b4c81a3c163344ae8b27523a0391e7f99c533f41"
7219-
integrity sha512-2NAFs9UxVbRztQbgJSP5i8TB9eJQ7xraciwj/93djrSMHSEbJ0vC47TME0iifgvhlHMs5vqETOKJtfbbpQAQFA==
7220-
7221-
"@sentry/cli@^2.51.0", "@sentry/cli@^2.57.0", "@sentry/cli@^2.58.2":
7222-
version "2.58.2"
7223-
resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.58.2.tgz#0d6e19a1771d27aae8b2765a6f3e96062e2c7502"
7224-
integrity sha512-U4u62V4vaTWF+o40Mih8aOpQKqKUbZQt9A3LorIJwaE3tO3XFLRI70eWtW2se1Qmy0RZ74zB14nYcFNFl2t4Rw==
7162+
"@sentry/cli-darwin@2.58.4":
7163+
version "2.58.4"
7164+
resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.58.4.tgz#5e3005c1f845acac243e8dcb23bef17337924768"
7165+
integrity sha512-kbTD+P4X8O+nsNwPxCywtj3q22ecyRHWff98rdcmtRrvwz8CKi/T4Jxn/fnn2i4VEchy08OWBuZAqaA5Kh2hRQ==
7166+
7167+
"@sentry/cli-linux-arm64@2.58.4":
7168+
version "2.58.4"
7169+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.58.4.tgz#69da57656fda863f255d92123c3a3437e470408e"
7170+
integrity sha512-0g0KwsOozkLtzN8/0+oMZoOuQ0o7W6O+hx+ydVU1bktaMGKEJLMAWxOQNjsh1TcBbNIXVOKM/I8l0ROhaAb8Ig==
7171+
7172+
"@sentry/cli-linux-arm@2.58.4":
7173+
version "2.58.4"
7174+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.58.4.tgz#869ddab30f0dcebc0e61cff2f3ff47dcd40f8abe"
7175+
integrity sha512-rdQ8beTwnN48hv7iV7e7ZKucPec5NJkRdrrycMJMZlzGBPi56LqnclgsHySJ6Kfq506A2MNuQnKGaf/sBC9REA==
7176+
7177+
"@sentry/cli-linux-i686@2.58.4":
7178+
version "2.58.4"
7179+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.58.4.tgz#e30ca6b897147b3fb7b2e8684b139183d55e21c6"
7180+
integrity sha512-NseoIQAFtkziHyjZNPTu1Gm1opeQHt7Wm1LbLrGWVIRvUOzlslO9/8i6wETUZ6TjlQxBVRgd3Q0lRBG2A8rFYA==
7181+
7182+
"@sentry/cli-linux-x64@2.58.4":
7183+
version "2.58.4"
7184+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.58.4.tgz#f667e1fcaf0860f15401af8e0ee72f5013d84458"
7185+
integrity sha512-d3Arz+OO/wJYTqCYlSN3Ktm+W8rynQ/IMtSZLK8nu0ryh5mJOh+9XlXY6oDXw4YlsM8qCRrNquR8iEI1Y/IH+Q==
7186+
7187+
"@sentry/cli-win32-arm64@2.58.4":
7188+
version "2.58.4"
7189+
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-arm64/-/cli-win32-arm64-2.58.4.tgz#f612c5788954e2a97b6626e9e46fa9a41cb049c1"
7190+
integrity sha512-bqYrF43+jXdDBh0f8HIJU3tbvlOFtGyRjHB8AoRuMQv9TEDUfENZyCelhdjA+KwDKYl48R1Yasb4EHNzsoO83w==
7191+
7192+
"@sentry/cli-win32-i686@2.58.4":
7193+
version "2.58.4"
7194+
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.58.4.tgz#5611c05499f1b959d23e37650d0621d299c49cfc"
7195+
integrity sha512-3triFD6jyvhVcXOmGyttf+deKZcC1tURdhnmDUIBkiDPJKGT/N5xa4qAtHJlAB/h8L9jgYih9bvJnvvFVM7yug==
7196+
7197+
"@sentry/cli-win32-x64@2.58.4":
7198+
version "2.58.4"
7199+
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.58.4.tgz#3290c59399579e8d484c97246cfa720171241061"
7200+
integrity sha512-cSzN4PjM1RsCZ4pxMjI0VI7yNCkxiJ5jmWncyiwHXGiXrV1eXYdQ3n1LhUYLZ91CafyprR0OhDcE+RVZ26Qb5w==
7201+
7202+
"@sentry/cli@^2.57.0", "@sentry/cli@^2.58.2", "@sentry/cli@^2.58.4":
7203+
version "2.58.4"
7204+
resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.58.4.tgz#eb8792600cdf956cc4fe2bf51380ea1682327411"
7205+
integrity sha512-ArDrpuS8JtDYEvwGleVE+FgR+qHaOp77IgdGSacz6SZy6Lv90uX0Nu4UrHCQJz8/xwIcNxSqnN22lq0dH4IqTg==
72257206
dependencies:
72267207
https-proxy-agent "^5.0.0"
72277208
node-fetch "^2.6.7"
72287209
progress "^2.0.3"
72297210
proxy-from-env "^1.1.0"
72307211
which "^2.0.2"
72317212
optionalDependencies:
7232-
"@sentry/cli-darwin" "2.58.2"
7233-
"@sentry/cli-linux-arm" "2.58.2"
7234-
"@sentry/cli-linux-arm64" "2.58.2"
7235-
"@sentry/cli-linux-i686" "2.58.2"
7236-
"@sentry/cli-linux-x64" "2.58.2"
7237-
"@sentry/cli-win32-arm64" "2.58.2"
7238-
"@sentry/cli-win32-i686" "2.58.2"
7239-
"@sentry/cli-win32-x64" "2.58.2"
7213+
"@sentry/cli-darwin" "2.58.4"
7214+
"@sentry/cli-linux-arm" "2.58.4"
7215+
"@sentry/cli-linux-arm64" "2.58.4"
7216+
"@sentry/cli-linux-i686" "2.58.4"
7217+
"@sentry/cli-linux-x64" "2.58.4"
7218+
"@sentry/cli-win32-arm64" "2.58.4"
7219+
"@sentry/cli-win32-i686" "2.58.4"
7220+
"@sentry/cli-win32-x64" "2.58.4"
72407221

72417222
"@sentry/core@10.29.0":
72427223
version "10.29.0"
@@ -7310,20 +7291,20 @@
73107291
dependencies:
73117292
"@sentry/core" "10.29.0"
73127293

7313-
"@sentry/rollup-plugin@^4.3.0":
7314-
version "4.3.0"
7315-
resolved "https://registry.yarnpkg.com/@sentry/rollup-plugin/-/rollup-plugin-4.3.0.tgz#d23fe49e48fa68dafa2b0933a8efabcc964b1df9"
7316-
integrity sha512-Ebk6cTGTNohnLEvHtwDKYlMRs8Qit/ybOflIKlQziBHjd51GtxG9TPIu9NYU0fJXa428aYNluto3BfgdMp+c+Q==
7294+
"@sentry/rollup-plugin@^4.6.1":
7295+
version "4.6.1"
7296+
resolved "https://registry.yarnpkg.com/@sentry/rollup-plugin/-/rollup-plugin-4.6.1.tgz#28dece8d6fad3044fd634724f6334f6b9b8f3ded"
7297+
integrity sha512-4G4oo05BhP7CjXdpTVFPInBgDNcuE5WKglALbCa2H9CY4ta8nHHPn2ni+d0WjhUIp6m5E1e+0NQ+0SxuFTCHVw==
73177298
dependencies:
7318-
"@sentry/bundler-plugin-core" "4.3.0"
7299+
"@sentry/bundler-plugin-core" "4.6.1"
73197300
unplugin "1.0.1"
73207301

7321-
"@sentry/vite-plugin@^4.1.0", "@sentry/vite-plugin@^4.3.0":
7322-
version "4.3.0"
7323-
resolved "https://registry.yarnpkg.com/@sentry/vite-plugin/-/vite-plugin-4.3.0.tgz#ced993a1f59046404aa26fb57b12078d13680ffa"
7324-
integrity sha512-MeTAHMmTOgBPMAjeW7/ONyXwgScZdaFFtNiALKcAODnVqC7eoHdSRIWeH5mkLr2Dvs7nqtBaDpKxRjUBgfm9LQ==
7302+
"@sentry/vite-plugin@^4.1.0", "@sentry/vite-plugin@^4.6.1":
7303+
version "4.6.1"
7304+
resolved "https://registry.yarnpkg.com/@sentry/vite-plugin/-/vite-plugin-4.6.1.tgz#883d8448c033b309528985e12e0d5d1af99ee1c6"
7305+
integrity sha512-Qvys1y3o8/bfL3ikrHnJS9zxdjt0z3POshdBl3967UcflrTqBmnGNkcVk53SlmtJWIfh85fgmrLvGYwZ2YiqNg==
73257306
dependencies:
7326-
"@sentry/bundler-plugin-core" "4.3.0"
7307+
"@sentry/bundler-plugin-core" "4.6.1"
73277308
unplugin "1.0.1"
73287309

73297310
"@sentry/webpack-plugin@^4.6.1":
@@ -18407,7 +18388,7 @@ glob@^8.0.0, glob@^8.0.1, glob@^8.0.3, glob@^8.1.0:
1840718388
minimatch "^5.0.1"
1840818389
once "^1.3.0"
1840918390

18410-
glob@^9.2.0, glob@^9.3.2, glob@^9.3.3:
18391+
glob@^9.2.0, glob@^9.3.3:
1841118392
version "9.3.5"
1841218393
resolved "https://registry.yarnpkg.com/glob/-/glob-9.3.5.tgz#ca2ed8ca452781a3009685607fdf025a899dfe21"
1841318394
integrity sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==

0 commit comments

Comments
 (0)