Skip to content

Commit 17c591d

Browse files
committed
fix dep in ract-router, fix multi-projects
1 parent 2c39c62 commit 17c591d

File tree

3 files changed

+74
-6
lines changed

3 files changed

+74
-6
lines changed

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,25 +42,31 @@ 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,
68+
// 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
69+
project: Array.isArray(project) ? project[0] : project,
6270
...sentryConfig.unstable_sentryVitePluginOptions,
6371
});
6472

yarn.lock

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7093,41 +7093,81 @@
70937093
resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.58.2.tgz#61f6f836de8ac2e1992ccadc0368bc403f23c609"
70947094
integrity sha512-MArsb3zLhA2/cbd4rTm09SmTpnEuZCoZOpuZYkrpDw1qzBVJmRFA1W1hGAQ9puzBIk/ubY3EUhhzuU3zN2uD6w==
70957095

7096+
"@sentry/cli-darwin@2.58.4":
7097+
version "2.58.4"
7098+
resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.58.4.tgz#5e3005c1f845acac243e8dcb23bef17337924768"
7099+
integrity sha512-kbTD+P4X8O+nsNwPxCywtj3q22ecyRHWff98rdcmtRrvwz8CKi/T4Jxn/fnn2i4VEchy08OWBuZAqaA5Kh2hRQ==
7100+
70967101
"@sentry/cli-linux-arm64@2.58.2":
70977102
version "2.58.2"
70987103
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.58.2.tgz#3a7a9c83e31b482599ce08d93d5ba6c8a1a44c7f"
70997104
integrity sha512-ay3OeObnbbPrt45cjeUyQjsx5ain1laj1tRszWj37NkKu55NZSp4QCg1gGBZ0gBGhckI9nInEsmKtix00alw2g==
71007105

7106+
"@sentry/cli-linux-arm64@2.58.4":
7107+
version "2.58.4"
7108+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.58.4.tgz#69da57656fda863f255d92123c3a3437e470408e"
7109+
integrity sha512-0g0KwsOozkLtzN8/0+oMZoOuQ0o7W6O+hx+ydVU1bktaMGKEJLMAWxOQNjsh1TcBbNIXVOKM/I8l0ROhaAb8Ig==
7110+
71017111
"@sentry/cli-linux-arm@2.58.2":
71027112
version "2.58.2"
71037113
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.58.2.tgz#f9bef6802cb707d1603a02e0727fed22d834e133"
71047114
integrity sha512-HU9lTCzcHqCz/7Mt5n+cv+nFuJdc1hGD2h35Uo92GgxX3/IujNvOUfF+nMX9j6BXH6hUt73R5c0Ycq9+a3Parg==
71057115

7116+
"@sentry/cli-linux-arm@2.58.4":
7117+
version "2.58.4"
7118+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.58.4.tgz#869ddab30f0dcebc0e61cff2f3ff47dcd40f8abe"
7119+
integrity sha512-rdQ8beTwnN48hv7iV7e7ZKucPec5NJkRdrrycMJMZlzGBPi56LqnclgsHySJ6Kfq506A2MNuQnKGaf/sBC9REA==
7120+
71067121
"@sentry/cli-linux-i686@2.58.2":
71077122
version "2.58.2"
71087123
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.58.2.tgz#a3e6cb24d314f2d948b96457731f9345dc8370f9"
71097124
integrity sha512-CN9p0nfDFsAT1tTGBbzOUGkIllwS3hygOUyTK7LIm9z+UHw5uNgNVqdM/3Vg+02ymjkjISNB3/+mqEM5osGXdA==
71107125

7126+
"@sentry/cli-linux-i686@2.58.4":
7127+
version "2.58.4"
7128+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.58.4.tgz#e30ca6b897147b3fb7b2e8684b139183d55e21c6"
7129+
integrity sha512-NseoIQAFtkziHyjZNPTu1Gm1opeQHt7Wm1LbLrGWVIRvUOzlslO9/8i6wETUZ6TjlQxBVRgd3Q0lRBG2A8rFYA==
7130+
71117131
"@sentry/cli-linux-x64@2.58.2":
71127132
version "2.58.2"
71137133
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.58.2.tgz#8e071e11b03524b08d369075f3203b05529ca233"
71147134
integrity sha512-oX/LLfvWaJO50oBVOn4ZvG2SDWPq0MN8SV9eg5tt2nviq+Ryltfr7Rtoo+HfV+eyOlx1/ZXhq9Wm7OT3cQuz+A==
71157135

7136+
"@sentry/cli-linux-x64@2.58.4":
7137+
version "2.58.4"
7138+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.58.4.tgz#f667e1fcaf0860f15401af8e0ee72f5013d84458"
7139+
integrity sha512-d3Arz+OO/wJYTqCYlSN3Ktm+W8rynQ/IMtSZLK8nu0ryh5mJOh+9XlXY6oDXw4YlsM8qCRrNquR8iEI1Y/IH+Q==
7140+
71167141
"@sentry/cli-win32-arm64@2.58.2":
71177142
version "2.58.2"
71187143
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-arm64/-/cli-win32-arm64-2.58.2.tgz#af109a165c25245458a6c58b79a91c639b1df1b0"
71197144
integrity sha512-+cl3x2HPVMpoSVGVM1IDWlAEREZrrVQj4xBb0TRKII7g3hUxRsAIcsrr7+tSkie++0FuH4go/b5fGAv51OEF3w==
71207145

7146+
"@sentry/cli-win32-arm64@2.58.4":
7147+
version "2.58.4"
7148+
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-arm64/-/cli-win32-arm64-2.58.4.tgz#f612c5788954e2a97b6626e9e46fa9a41cb049c1"
7149+
integrity sha512-bqYrF43+jXdDBh0f8HIJU3tbvlOFtGyRjHB8AoRuMQv9TEDUfENZyCelhdjA+KwDKYl48R1Yasb4EHNzsoO83w==
7150+
71217151
"@sentry/cli-win32-i686@2.58.2":
71227152
version "2.58.2"
71237153
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.58.2.tgz#53038b43b2c14c419fb71586f7448e7580ed4e39"
71247154
integrity sha512-omFVr0FhzJ8oTJSg1Kf+gjLgzpYklY0XPfLxZ5iiMiYUKwF5uo1RJRdkUOiEAv0IqpUKnmKcmVCLaDxsWclB7Q==
71257155

7156+
"@sentry/cli-win32-i686@2.58.4":
7157+
version "2.58.4"
7158+
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.58.4.tgz#5611c05499f1b959d23e37650d0621d299c49cfc"
7159+
integrity sha512-3triFD6jyvhVcXOmGyttf+deKZcC1tURdhnmDUIBkiDPJKGT/N5xa4qAtHJlAB/h8L9jgYih9bvJnvvFVM7yug==
7160+
71267161
"@sentry/cli-win32-x64@2.58.2":
71277162
version "2.58.2"
71287163
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.58.2.tgz#b4c81a3c163344ae8b27523a0391e7f99c533f41"
71297164
integrity sha512-2NAFs9UxVbRztQbgJSP5i8TB9eJQ7xraciwj/93djrSMHSEbJ0vC47TME0iifgvhlHMs5vqETOKJtfbbpQAQFA==
71307165

7166+
"@sentry/cli-win32-x64@2.58.4":
7167+
version "2.58.4"
7168+
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.58.4.tgz#3290c59399579e8d484c97246cfa720171241061"
7169+
integrity sha512-cSzN4PjM1RsCZ4pxMjI0VI7yNCkxiJ5jmWncyiwHXGiXrV1eXYdQ3n1LhUYLZ91CafyprR0OhDcE+RVZ26Qb5w==
7170+
71317171
"@sentry/cli@^2.57.0", "@sentry/cli@^2.58.2":
71327172
version "2.58.2"
71337173
resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.58.2.tgz#0d6e19a1771d27aae8b2765a6f3e96062e2c7502"
@@ -7148,6 +7188,26 @@
71487188
"@sentry/cli-win32-i686" "2.58.2"
71497189
"@sentry/cli-win32-x64" "2.58.2"
71507190

7191+
"@sentry/cli@^2.58.4":
7192+
version "2.58.4"
7193+
resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.58.4.tgz#eb8792600cdf956cc4fe2bf51380ea1682327411"
7194+
integrity sha512-ArDrpuS8JtDYEvwGleVE+FgR+qHaOp77IgdGSacz6SZy6Lv90uX0Nu4UrHCQJz8/xwIcNxSqnN22lq0dH4IqTg==
7195+
dependencies:
7196+
https-proxy-agent "^5.0.0"
7197+
node-fetch "^2.6.7"
7198+
progress "^2.0.3"
7199+
proxy-from-env "^1.1.0"
7200+
which "^2.0.2"
7201+
optionalDependencies:
7202+
"@sentry/cli-darwin" "2.58.4"
7203+
"@sentry/cli-linux-arm" "2.58.4"
7204+
"@sentry/cli-linux-arm64" "2.58.4"
7205+
"@sentry/cli-linux-i686" "2.58.4"
7206+
"@sentry/cli-linux-x64" "2.58.4"
7207+
"@sentry/cli-win32-arm64" "2.58.4"
7208+
"@sentry/cli-win32-i686" "2.58.4"
7209+
"@sentry/cli-win32-x64" "2.58.4"
7210+
71517211
"@sentry/rollup-plugin@^4.6.1":
71527212
version "4.6.1"
71537213
resolved "https://registry.yarnpkg.com/@sentry/rollup-plugin/-/rollup-plugin-4.6.1.tgz#28dece8d6fad3044fd634724f6334f6b9b8f3ded"

0 commit comments

Comments
 (0)