Skip to content

Commit 47aab55

Browse files
committed
bump cli, remove ts-expect-error, adjust tests
1 parent 5ed7804 commit 47aab55

File tree

4 files changed

+52
-47
lines changed

4 files changed

+52
-47
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: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6966,10 +6966,10 @@
69666966
resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.46.0.tgz#e07ff66f03e8cb6e1988b7673ae5dbd6ff957b1d"
69676967
integrity sha512-5Ll+e5KAdIk9OYiZO8aifMBRNWmNyPjSqdjaHlBC1Qfh7pE3b1zyzoHlsUazG0bv0sNrSGea8e7kF5wIO1hvyg==
69686968

6969-
"@sentry/cli-darwin@2.49.0":
6970-
version "2.49.0"
6971-
resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.49.0.tgz#290657e5840b360cb8ca25c8a78f8c0f15c66b03"
6972-
integrity sha512-bgowyDeFuXbjkGq1ZKqcWhmzgfBe7oKIXYWJOOps4+32QfG+YsrdNnottHS01td3bzrJq0QnHj8H12fA81DqrA==
6969+
"@sentry/cli-darwin@2.50.0":
6970+
version "2.50.0"
6971+
resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.50.0.tgz#0fec0ece84afe37b33464ccd514367fc95d507f3"
6972+
integrity sha512-Aj+cLBZ0dCw+pdUxvJ1U71PnKh2YjvpzLN9h1ZTe8UI3FqmkKkSH/J8mN/5qmR7qUHjDcm2l+wfgVUaaP8CWbA==
69736973

69746974
69756975
version "2.42.2"
@@ -6981,10 +6981,10 @@
69816981
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.46.0.tgz#d5b27e5813e7b3add65c9e3dbdd75a8bea4ef324"
69826982
integrity sha512-OEJN8yAjI9y5B4telyqzu27Hi3+S4T8VxZCqJz1+z2Mp0Q/MZ622AahVPpcrVq/5bxrnlZR16+lKh8L1QwNFPg==
69836983

6984-
"@sentry/cli-linux-arm64@2.49.0":
6985-
version "2.49.0"
6986-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.49.0.tgz#a732004d7131f7e7b44f6a64abdccc36efb35d52"
6987-
integrity sha512-dqxsDUd76aDm03fUwUOs5BR7RHLpSb2EH/B1hlWm0mFvo9uY907XxW9wDFx/qDpCdmpC0aF+lF/lOBOrG9B5Fg==
6984+
"@sentry/cli-linux-arm64@2.50.0":
6985+
version "2.50.0"
6986+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.50.0.tgz#bbafacf82766d45ff05434cd7cabbda7005d1efd"
6987+
integrity sha512-p6hIh4Bb87qBfEz9w5dxEPAohIKcw68qoy5VUTx+cCanO8uXNWWsT78xtUNFRscW9zc6MxQMSITTWaCEIKvxRA==
69886988

69896989
69906990
version "2.42.2"
@@ -6996,10 +6996,10 @@
69966996
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.46.0.tgz#d2a0f21cd208ef8e844bc5e565b337640d125441"
69976997
integrity sha512-WRrLNq/TEX/TNJkGqq6Ad0tGyapd5dwlxtsPbVBrIdryuL1mA7VCBoaHBr3kcwJLsgBHFH0lmkMee2ubNZZdkg==
69986998

6999-
"@sentry/cli-linux-arm@2.49.0":
7000-
version "2.49.0"
7001-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.49.0.tgz#73719561510df3369e05e9a4898b4e43b8753e4c"
7002-
integrity sha512-RBDIjIGmNsFw+a6vAt6m3D7ROKsMEB9i3u+UuIRxk0/DyHTcfVWxnK/ScPXGILM6PxQ2XOBfOKad0mmiDHBzZA==
6999+
"@sentry/cli-linux-arm@2.50.0":
7000+
version "2.50.0"
7001+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.50.0.tgz#e1fed09b94c508db9de5353d8305828b0a3551e9"
7002+
integrity sha512-SGPAFwOY2of2C+RUBJcxMN2JXikVFEk8ypYOsQTEvV/48cLejcO/O2mHIj/YKgIkrfn3t7LlqdK6g75lkz+F8Q==
70037003

70047004
70057005
version "2.42.2"
@@ -7011,10 +7011,10 @@
70117011
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.46.0.tgz#73368ebe30236c8647caec420f717a7f45410f29"
70127012
integrity sha512-xko3/BVa4LX8EmRxVOCipV+PwfcK5Xs8lP6lgF+7NeuAHMNL4DqF6iV9rrN8gkGUHCUI9RXSve37uuZnFy55+Q==
70137013

7014-
"@sentry/cli-linux-i686@2.49.0":
7015-
version "2.49.0"
7016-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.49.0.tgz#8d1bb1378251a3aa995cc4b56bd352fa12a84b66"
7017-
integrity sha512-gDAd5/vJbEhd4Waud0Cd8ZRqLEagDlOvWwNH3KB694EiHJUwzRSiTA1YUVMYGI8Z9UyEA1sKxARwm2Trv99BxA==
7014+
"@sentry/cli-linux-i686@2.50.0":
7015+
version "2.50.0"
7016+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.50.0.tgz#95f0eb65bdde4c33e492830ae4ac207b60494f8e"
7017+
integrity sha512-umhGmbiCUG7MvjTm8lXFmFxQjyTVtYakilBwPTVzRELmNKxxhfKRxwSSA+hUKetAUzNd8fJx8K7yqdw+qRA7Pg==
70187018

70197019
70207020
version "2.42.2"
@@ -7026,20 +7026,20 @@
70267026
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.46.0.tgz#49da3dfd873e0e72abef968e1c213b9397e5d70e"
70277027
integrity sha512-hJ1g5UEboYcOuRia96LxjJ0jhnmk8EWLDvlGnXLnYHkwy3ree/L7sNgdp/QsY8Z4j2PGO5f22Va+UDhSjhzlfQ==
70287028

7029-
"@sentry/cli-linux-x64@2.49.0":
7030-
version "2.49.0"
7031-
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.49.0.tgz#7bf58fb7005c89fdde4e1262d5ed35e23065aceb"
7032-
integrity sha512-mbohGvPNhHjUciYNXzkt9TYUebTmxeAp9v9JfLSb/Soz6fubKwEHhpRJuz1zASxVWIR4PuqkePchqN5zhcLC0A==
7029+
"@sentry/cli-linux-x64@2.50.0":
7030+
version "2.50.0"
7031+
resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.50.0.tgz#5266b6b8660e6b72688331b7c702e9d1ca6413ed"
7032+
integrity sha512-ugIIx9+wUmguxOUe9ZVacvdCffZwqtFSKwpJ06Nqes0XfL4ZER4Qlq3/miCZ8m150C4xK5ym/QCwB41ffBqI4g==
70337033

70347034
70357035
version "2.46.0"
70367036
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-arm64/-/cli-win32-arm64-2.46.0.tgz#4e26b254d5283eb114ac916ac504283a30b2ecdb"
70377037
integrity sha512-mN7cpPoCv2VExFRGHt+IoK11yx4pM4ADZQGEso5BAUZ5duViXB2WrAXCLd8DrwMnP0OE978a7N8OtzsFqjkbNA==
70387038

7039-
"@sentry/cli-win32-arm64@2.49.0":
7040-
version "2.49.0"
7041-
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-arm64/-/cli-win32-arm64-2.49.0.tgz#2bf6dd911acbe3ddb02eec0afb4301bb8fb25b53"
7042-
integrity sha512-3zwvsp61EPpSuGpGdXY4JelVJmNEjoj4vn5m6EFoOtk7OUI5/VFqqR4wchjy9Hjm3Eh6MB5K+KTKXs4W2p18ng==
7039+
"@sentry/cli-win32-arm64@2.50.0":
7040+
version "2.50.0"
7041+
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-arm64/-/cli-win32-arm64-2.50.0.tgz#663d75fea42b853940c6faacf7ee76a16b449654"
7042+
integrity sha512-fMyBSKLrVHY9944t8oTpul+6osyQeuN8GGGP3diDxGQpynYL+vhcHZIpXFRH398+3kedG/IFoY7EwGgIEqWzmw==
70437043

70447044
70457045
version "2.42.2"
@@ -7051,10 +7051,10 @@
70517051
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.46.0.tgz#72f7c0a611f17b7e5b34e2b47309d165195a8276"
70527052
integrity sha512-6F73AUE3lm71BISUO19OmlnkFD5WVe4/wA1YivtLZTc1RU3eUYJLYxhDfaH3P77+ycDppQ2yCgemLRaA4A8mNQ==
70537053

7054-
"@sentry/cli-win32-i686@2.49.0":
7055-
version "2.49.0"
7056-
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.49.0.tgz#32e31472ae6c5f69e538a4061d651937fcb8f14a"
7057-
integrity sha512-2oWaNl6z0BaOCAjM1Jxequfgjod3XO6wothxow4kA8e9+43JLhgarSdpwJPgQjcVyxjygwQ3/jKPdUFh0qNOmg==
7054+
"@sentry/cli-win32-i686@2.50.0":
7055+
version "2.50.0"
7056+
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.50.0.tgz#96813ca970f35a839d7f817534ac556bc1df1567"
7057+
integrity sha512-VbC+l2Y2kB7Lsun2c8t7ZGwmljmXnyncZLW9PjdEyJSTAJ9GnEnSvyFSPXNLV/eHJnfQffzU7QTjU8vkQ7XMYg==
70587058

70597059
70607060
version "2.42.2"
@@ -7066,10 +7066,10 @@
70667066
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.46.0.tgz#8cfd438ec365b0ee925d9724a24b533b4cb75587"
70677067
integrity sha512-yuGVcfepnNL84LGA0GjHzdMIcOzMe0bjPhq/rwPsPN+zu11N+nPR2wV2Bum4U0eQdqYH3iAlMdL5/BEQfuLJww==
70687068

7069-
"@sentry/cli-win32-x64@2.49.0":
7070-
version "2.49.0"
7071-
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.49.0.tgz#86aab38cb41f885914d7c99ceaab7b6ce52c72c6"
7072-
integrity sha512-dR4ulyrA6ZT7x7cg4Rwm0tcHf4TZz5QO6t1W1jX6uJ9n/U0bOSqSFZHNf/RryiUzQE1g8LBthOYyKGMkET6T8w==
7069+
"@sentry/cli-win32-x64@2.50.0":
7070+
version "2.50.0"
7071+
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.50.0.tgz#9f644efed8cb75943078a0ca4e414fa21dda6280"
7072+
integrity sha512-nMktyF93NtQUOViAAKHpHSWACOGjOkKjiewi4pD6W3sWllFiPPyt15XoyApqWwnICDRQu2DI5vnil4ck6/k7mw==
70737073

70747074
70757075
version "2.42.2"
@@ -7110,25 +7110,25 @@
71107110
"@sentry/cli-win32-i686" "2.46.0"
71117111
"@sentry/cli-win32-x64" "2.46.0"
71127112

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==
7113+
"@sentry/cli@^2.50.0":
7114+
version "2.50.0"
7115+
resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.50.0.tgz#7e2298bea9a2bb50126bfb24116ae98199bc1f6f"
7116+
integrity sha512-OHRRQPUNjBpzOT6arNhxXQ71DKs5jSziCfDzmEGwAs+K8J/I1QxnvJkto88HbXE54oiWhSEJwL0pvcowFXyVbA==
71177117
dependencies:
71187118
https-proxy-agent "^5.0.0"
71197119
node-fetch "^2.6.7"
71207120
progress "^2.0.3"
71217121
proxy-from-env "^1.1.0"
71227122
which "^2.0.2"
71237123
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"
7124+
"@sentry/cli-darwin" "2.50.0"
7125+
"@sentry/cli-linux-arm" "2.50.0"
7126+
"@sentry/cli-linux-arm64" "2.50.0"
7127+
"@sentry/cli-linux-i686" "2.50.0"
7128+
"@sentry/cli-linux-x64" "2.50.0"
7129+
"@sentry/cli-win32-arm64" "2.50.0"
7130+
"@sentry/cli-win32-i686" "2.50.0"
7131+
"@sentry/cli-win32-x64" "2.50.0"
71327132

71337133
"@sentry/rollup-plugin@^3.5.0":
71347134
version "3.5.0"

0 commit comments

Comments
 (0)