Skip to content

Commit e6c187a

Browse files
committed
bump cli, remove ts-expect-error, adjust tests
1 parent 8d1c924 commit e6c187a

File tree

4 files changed

+8
-63
lines changed

4 files changed

+8
-63
lines changed

packages/react-router/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"@opentelemetry/instrumentation": "^0.203.0",
4040
"@opentelemetry/semantic-conventions": "^1.34.0",
4141
"@sentry/browser": "9.40.0",
42-
"@sentry/cli": "^2.49.0",
42+
"@sentry/cli": "^2.50.0",
4343
"@sentry/core": "9.40.0",
4444
"@sentry/node": "9.40.0",
4545
"@sentry/react": "9.40.0",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ export const sentryOnBuildEnd: BuildEndHook = async ({ reactRouterConfig, viteCo
6161
try {
6262
await cliInstance.execute(
6363
['sourcemaps', 'inject', reactRouterConfig.buildDirectory],
64-
// @ts-expect-error - 'rejectOnError' is not yet exported as a type from @sentry/cli. It is valid though.
65-
// TODO: update to @sentry/[email protected] once the fix is released: https://github.com/getsentry/sentry-cli/pull/2628
6664
debug ? 'rejectOnError' : false,
6765
);
6866
} catch (error) {

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,10 @@ describe('sentryOnBuildEnd', () => {
147147

148148
await sentryOnBuildEnd(config);
149149

150+
expect(mockSentryCliInstance.releases.uploadSourceMaps).toHaveBeenCalledTimes(1);
150151
expect(mockSentryCliInstance.releases.uploadSourceMaps).toHaveBeenCalledWith('undefined', {
151152
include: [{ paths: ['/build'] }],
153+
live: 'rejectOnError',
152154
});
153155
});
154156

@@ -249,6 +251,8 @@ describe('sentryOnBuildEnd', () => {
249251
mockSentryCliInstance.execute.mockRejectedValueOnce(new Error('Injection failed'));
250252

251253
await sentryOnBuildEnd(defaultConfig);
254+
expect(mockSentryCliInstance.execute).toHaveBeenCalledTimes(1);
255+
expect(mockSentryCliInstance.execute).toHaveBeenCalledWith(['sourcemaps', 'inject', '/build'], false);
252256

253257
expect(consoleSpy).toHaveBeenCalledWith('[Sentry] Could not inject debug ids', expect.any(Error));
254258
consoleSpy.mockRestore();
@@ -282,6 +286,9 @@ describe('sentryOnBuildEnd', () => {
282286

283287
expect(consoleSpy).toHaveBeenCalledWith(expect.stringContaining('[Sentry] Automatically setting'));
284288
expect(consoleSpy).toHaveBeenCalledWith(expect.stringContaining('Deleting asset after upload:'));
289+
// rejectOnError is used in debug mode to pipe debug id injection output from the CLI to this process's stdout
290+
expect(mockSentryCliInstance.execute).toHaveBeenCalledWith(['sourcemaps', 'inject', '/build'], 'rejectOnError');
291+
285292
consoleSpy.mockRestore();
286293
});
287294

yarn.lock

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -6961,11 +6961,6 @@
69616961
resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.42.2.tgz#a32a4f226e717122b37d9969e8d4d0e14779f720"
69626962
integrity sha512-GtJSuxER7Vrp1IpxdUyRZzcckzMnb4N5KTW7sbTwUiwqARRo+wxS+gczYrS8tdgtmXs5XYhzhs+t4d52ITHMIg==
69636963

6964-
6965-
version "2.49.0"
6966-
resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.49.0.tgz#290657e5840b360cb8ca25c8a78f8c0f15c66b03"
6967-
integrity sha512-bgowyDeFuXbjkGq1ZKqcWhmzgfBe7oKIXYWJOOps4+32QfG+YsrdNnottHS01td3bzrJq0QnHj8H12fA81DqrA==
6968-
69696964
69706965
version "2.50.0"
69716966
resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.50.0.tgz#0fec0ece84afe37b33464ccd514367fc95d507f3"
@@ -6976,11 +6971,6 @@
69766971
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.42.2.tgz#1c06c83ff21f51ec23acf5be3b1f8c7553bf86b1"
69776972
integrity sha512-BOxzI7sgEU5Dhq3o4SblFXdE9zScpz6EXc5Zwr1UDZvzgXZGosUtKVc7d1LmkrHP8Q2o18HcDWtF3WvJRb5Zpw==
69786973

6979-
6980-
version "2.49.0"
6981-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.49.0.tgz#a732004d7131f7e7b44f6a64abdccc36efb35d52"
6982-
integrity sha512-dqxsDUd76aDm03fUwUOs5BR7RHLpSb2EH/B1hlWm0mFvo9uY907XxW9wDFx/qDpCdmpC0aF+lF/lOBOrG9B5Fg==
6983-
69846974
69856975
version "2.50.0"
69866976
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.50.0.tgz#bbafacf82766d45ff05434cd7cabbda7005d1efd"
@@ -6991,11 +6981,6 @@
69916981
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.42.2.tgz#00cadc359ae3c051efb3e63873c033c61dbd1ca1"
69926982
integrity sha512-7udCw+YL9lwq+9eL3WLspvnuG+k5Icg92YE7zsteTzWLwgPVzaxeZD2f8hwhsu+wmL+jNqbpCRmktPteh3i2mg==
69936983

6994-
6995-
version "2.49.0"
6996-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.49.0.tgz#73719561510df3369e05e9a4898b4e43b8753e4c"
6997-
integrity sha512-RBDIjIGmNsFw+a6vAt6m3D7ROKsMEB9i3u+UuIRxk0/DyHTcfVWxnK/ScPXGILM6PxQ2XOBfOKad0mmiDHBzZA==
6998-
69996984
70006985
version "2.50.0"
70016986
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.50.0.tgz#e1fed09b94c508db9de5353d8305828b0a3551e9"
@@ -7006,11 +6991,6 @@
70066991
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.42.2.tgz#3b817b715dd806c20dfbffd539725ad8089c310a"
70076992
integrity sha512-Sw/dQp5ZPvKnq3/y7wIJyxTUJYPGoTX/YeMbDs8BzDlu9to2LWV3K3r7hE7W1Lpbaw4tSquUHiQjP5QHCOS7aQ==
70086993

7009-
7010-
version "2.49.0"
7011-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.49.0.tgz#8d1bb1378251a3aa995cc4b56bd352fa12a84b66"
7012-
integrity sha512-gDAd5/vJbEhd4Waud0Cd8ZRqLEagDlOvWwNH3KB694EiHJUwzRSiTA1YUVMYGI8Z9UyEA1sKxARwm2Trv99BxA==
7013-
70146994
70156995
version "2.50.0"
70166996
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.50.0.tgz#95f0eb65bdde4c33e492830ae4ac207b60494f8e"
@@ -7021,21 +7001,11 @@
70217001
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.42.2.tgz#ddf906bc3071cc79ce6e633eddcb76bb9068e688"
70227002
integrity sha512-mU4zUspAal6TIwlNLBV5oq6yYqiENnCWSxtSQVzWs0Jyq97wtqGNG9U+QrnwjJZ+ta/hvye9fvL2X25D/RxHQw==
70237003

7024-
7025-
version "2.49.0"
7026-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.49.0.tgz#7bf58fb7005c89fdde4e1262d5ed35e23065aceb"
7027-
integrity sha512-mbohGvPNhHjUciYNXzkt9TYUebTmxeAp9v9JfLSb/Soz6fubKwEHhpRJuz1zASxVWIR4PuqkePchqN5zhcLC0A==
7028-
70297004
70307005
version "2.50.0"
70317006
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.50.0.tgz#5266b6b8660e6b72688331b7c702e9d1ca6413ed"
70327007
integrity sha512-ugIIx9+wUmguxOUe9ZVacvdCffZwqtFSKwpJ06Nqes0XfL4ZER4Qlq3/miCZ8m150C4xK5ym/QCwB41ffBqI4g==
70337008

7034-
7035-
version "2.49.0"
7036-
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-arm64/-/cli-win32-arm64-2.49.0.tgz#2bf6dd911acbe3ddb02eec0afb4301bb8fb25b53"
7037-
integrity sha512-3zwvsp61EPpSuGpGdXY4JelVJmNEjoj4vn5m6EFoOtk7OUI5/VFqqR4wchjy9Hjm3Eh6MB5K+KTKXs4W2p18ng==
7038-
70397009
70407010
version "2.50.0"
70417011
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-arm64/-/cli-win32-arm64-2.50.0.tgz#663d75fea42b853940c6faacf7ee76a16b449654"
@@ -7046,11 +7016,6 @@
70467016
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.42.2.tgz#9036085c7c6ce455ad45fda411c55ff39c06eb95"
70477017
integrity sha512-iHvFHPGqgJMNqXJoQpqttfsv2GI3cGodeTq4aoVLU/BT3+hXzbV0x1VpvvEhncJkDgDicJpFLM8sEPHb3b8abw==
70487018

7049-
7050-
version "2.49.0"
7051-
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.49.0.tgz#32e31472ae6c5f69e538a4061d651937fcb8f14a"
7052-
integrity sha512-2oWaNl6z0BaOCAjM1Jxequfgjod3XO6wothxow4kA8e9+43JLhgarSdpwJPgQjcVyxjygwQ3/jKPdUFh0qNOmg==
7053-
70547019
70557020
version "2.50.0"
70567021
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.50.0.tgz#96813ca970f35a839d7f817534ac556bc1df1567"
@@ -7061,11 +7026,6 @@
70617026
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.42.2.tgz#7d6464b63f32c9f97fff428f246b1f039b402233"
70627027
integrity sha512-vPPGHjYoaGmfrU7xhfFxG7qlTBacroz5NdT+0FmDn6692D8IvpNXl1K+eV3Kag44ipJBBeR8g1HRJyx/F/9ACw==
70637028

7064-
7065-
version "2.49.0"
7066-
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.49.0.tgz#86aab38cb41f885914d7c99ceaab7b6ce52c72c6"
7067-
integrity sha512-dR4ulyrA6ZT7x7cg4Rwm0tcHf4TZz5QO6t1W1jX6uJ9n/U0bOSqSFZHNf/RryiUzQE1g8LBthOYyKGMkET6T8w==
7068-
70697029
70707030
version "2.50.0"
70717031
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.50.0.tgz#9f644efed8cb75943078a0ca4e414fa21dda6280"
@@ -7110,26 +7070,6 @@
71107070
"@sentry/cli-win32-i686" "2.50.0"
71117071
"@sentry/cli-win32-x64" "2.50.0"
71127072

7113-
"@sentry/cli@^2.49.0":
7114-
version "2.49.0"
7115-
resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.49.0.tgz#a8332ae38e9f92a0da3d939bdbce119e63450e99"
7116-
integrity sha512-99IKax3yjOaPlWJh3rAJC/R6hdmZZJ2B3ACVP8CpOYE+JzGGLyir1fvTzrdFKFLPLOq2lGC3RqWuKqU7PJUTZQ==
7117-
dependencies:
7118-
https-proxy-agent "^5.0.0"
7119-
node-fetch "^2.6.7"
7120-
progress "^2.0.3"
7121-
proxy-from-env "^1.1.0"
7122-
which "^2.0.2"
7123-
optionalDependencies:
7124-
"@sentry/cli-darwin" "2.49.0"
7125-
"@sentry/cli-linux-arm" "2.49.0"
7126-
"@sentry/cli-linux-arm64" "2.49.0"
7127-
"@sentry/cli-linux-i686" "2.49.0"
7128-
"@sentry/cli-linux-x64" "2.49.0"
7129-
"@sentry/cli-win32-arm64" "2.49.0"
7130-
"@sentry/cli-win32-i686" "2.49.0"
7131-
"@sentry/cli-win32-x64" "2.49.0"
7132-
71337073
"@sentry/rollup-plugin@^3.5.0":
71347074
version "3.5.0"
71357075
resolved "https://registry.yarnpkg.com/@sentry/rollup-plugin/-/rollup-plugin-3.5.0.tgz#9015c48e00257f8440597167498499804371329b"

0 commit comments

Comments
 (0)