Skip to content

Commit 9ca2600

Browse files
committed
bump bundler plugin and add update sourcemap handling
1 parent 0dca599 commit 9ca2600

File tree

4 files changed

+38
-11
lines changed

4 files changed

+38
-11
lines changed

packages/nextjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@
7979
"@opentelemetry/api": "^1.9.0",
8080
"@opentelemetry/semantic-conventions": "^1.34.0",
8181
"@rollup/plugin-commonjs": "28.0.1",
82-
"@sentry/bundler-plugin-core": "^4.0.2",
8382
"@sentry-internal/browser-utils": "10.4.0",
8483
"@sentry/core": "10.4.0",
8584
"@sentry/node": "10.4.0",
8685
"@sentry/opentelemetry": "10.4.0",
8786
"@sentry/react": "10.4.0",
8887
"@sentry/vercel-edge": "10.4.0",
89-
"@sentry/webpack-plugin": "^4.0.2",
88+
"@sentry/webpack-plugin": "^4.1.0",
89+
"@sentry/bundler-plugin-core": "^4.1.0",
9090
"chalk": "3.0.0",
9191
"glob": "^11.0.3",
9292
"resolve": "1.22.8",

packages/nextjs/src/config/handleRunAfterProductionCompile.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export async function handleRunAfterProductionCompile(
4343
},
4444
);
4545

46-
const buildArtifactsPromise = glob(
46+
const buildArtifacts = await glob(
4747
['/**/*.js', '/**/*.mjs', '/**/*.cjs', '/**/*.js.map', '/**/*.mjs.map', '/**/*.cjs.map'].map(
4848
q => `${q}?(\\?*)?(#*)`, // We want to allow query and hashes strings at the end of files
4949
),
@@ -56,7 +56,7 @@ export async function handleRunAfterProductionCompile(
5656

5757
await sentryBuildPluginManager.telemetry.emitBundlerPluginExecutionSignal();
5858
await sentryBuildPluginManager.createRelease();
59-
// 🔜 await sentryBuildPluginManager.injectDebugIds();
60-
await sentryBuildPluginManager.uploadSourcemaps(await buildArtifactsPromise);
59+
await sentryBuildPluginManager.injectDebugIds(buildArtifacts);
60+
await sentryBuildPluginManager.uploadSourcemaps(buildArtifacts);
6161
await sentryBuildPluginManager.deleteArtifacts();
6262
}

packages/nextjs/src/config/webpackPluginOptions.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,9 @@ export function getWebpackPluginOptions(
7171
url: sentryBuildOptions.sentryUrl,
7272
sourcemaps: {
7373
// if the user has enabled the runAfterProductionCompileHook, we handle sourcemap uploads a later step
74-
disable: sentryBuildOptions.sourcemaps?.disable,
75-
// TODO: disable: sentryBuildOptions.useRunAfterProductionCompileHook
76-
// ? 'disable-upload'
77-
// : sentryBuildOptions.sourcemaps?.disable,
74+
disable: sentryBuildOptions.useRunAfterProductionCompileHook
75+
? 'disable-upload'
76+
: sentryBuildOptions.sourcemaps?.disable,
7877
rewriteSources(source) {
7978
if (source.startsWith('webpack://_N_E/')) {
8079
return source.replace('webpack://_N_E/', '');

yarn.lock

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6950,6 +6950,11 @@
69506950
resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-4.0.2.tgz#7c8eb80a38b5e6b4c4cea4c391d07581020c91e4"
69516951
integrity sha512-Nr/VamvpQs6w642EI5t+qaCUGnVEro0qqk+S8XO1gc8qSdpc8kkZJFnUk7ozAr+ljYWGfVgWXrxI9lLiriLsRA==
69526952

6953+
6954+
version "4.1.0"
6955+
resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-4.1.0.tgz#6e7168f5fa59f53ac4b68e3f79c5fd54adc13f2e"
6956+
integrity sha512-UkcnqC7Bp9ODyoBN7BKcRotd1jz/I2vyruE/qjNfRC7UnP+jIRItUWYaXxQPON1fTw+N+egKdByk0M1y2OPv/Q==
6957+
69536958
69546959
version "4.0.0"
69556960
resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-4.0.0.tgz#564463cf53f869496ab5d4986e97f86618a67677"
@@ -6964,7 +6969,7 @@
69646969
magic-string "0.30.8"
69656970
unplugin "1.0.1"
69666971

6967-
"@sentry/[email protected]", "@sentry/bundler-plugin-core@^4.0.2":
6972+
69686973
version "4.0.2"
69696974
resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-4.0.2.tgz#2e106ac564d2e4e83e8dbc84f1e84f4eed1d6dde"
69706975
integrity sha512-LeARs8qHhEw19tk+KZd9DDV+Rh/UeapIH0+C09fTmff9p8Y82Cj89pEQ2a1rdUiF/oYIjQX45vnZscB7ra42yw==
@@ -6978,6 +6983,20 @@
69786983
magic-string "0.30.8"
69796984
unplugin "1.0.1"
69806985

6986+
"@sentry/[email protected]", "@sentry/bundler-plugin-core@^4.1.0":
6987+
version "4.1.0"
6988+
resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-4.1.0.tgz#c1b2f7a890a44e5ac5decc984a133aacf6147dd4"
6989+
integrity sha512-/5XBtCF6M+9frEXrrvfSWOdOC2q6I1L7oY7qbUVegNkp3kYVGihNZZnJIXGzo9rmwnA0IV7jI3o0pF/HDRqPeA==
6990+
dependencies:
6991+
"@babel/core" "^7.18.5"
6992+
"@sentry/babel-plugin-component-annotate" "4.1.0"
6993+
"@sentry/cli" "^2.51.0"
6994+
dotenv "^16.3.1"
6995+
find-up "^5.0.0"
6996+
glob "^9.3.2"
6997+
magic-string "0.30.8"
6998+
unplugin "1.0.1"
6999+
69817000
69827001
version "2.51.1"
69837002
resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.51.1.tgz#3a1db065651893f72dad3a502b2d7c2f5e6a7dd8"
@@ -7018,7 +7037,7 @@
70187037
resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.51.1.tgz#d361e37146c9269d40c37459271a6c2cfa1fa8a6"
70197038
integrity sha512-v2hreYUPPTNK1/N7+DeX7XBN/zb7p539k+2Osf0HFyVBaoUC3Y3+KBwSf4ASsnmgTAK7HCGR+X0NH1vP+icw4w==
70207039

7021-
"@sentry/cli@^2.49.0", "@sentry/cli@^2.51.1":
7040+
"@sentry/cli@^2.49.0", "@sentry/cli@^2.51.0", "@sentry/cli@^2.51.1":
70227041
version "2.51.1"
70237042
resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.51.1.tgz#c6bdc6025e8f600e44fc76f8274c369aeb5d4df4"
70247043
integrity sha512-FU+54kNcKJABU0+ekvtnoXHM9zVrDe1zXVFbQT7mS0On0m1P0zFRGdzbnWe2XzpzuEAJXtK6aog/W+esRU9AIA==
@@ -7063,6 +7082,15 @@
70637082
unplugin "1.0.1"
70647083
uuid "^9.0.0"
70657084

7085+
"@sentry/webpack-plugin@^4.1.0":
7086+
version "4.1.0"
7087+
resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-4.1.0.tgz#e95e2dcd10e71dc8c3a16ba5cad9153f5e78c3bc"
7088+
integrity sha512-YqfDfyGAuT/9YW1kgAPfD7kGUKQCh1E5co+qMdToxi/Mz4xsWJY02rFS5GrJixYktYJfSMze8NiRr89yJMxYHw==
7089+
dependencies:
7090+
"@sentry/bundler-plugin-core" "4.1.0"
7091+
unplugin "1.0.1"
7092+
uuid "^9.0.0"
7093+
70667094
"@sigstore/protobuf-specs@^0.1.0":
70677095
version "0.1.0"
70687096
resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.1.0.tgz#957cb64ea2f5ce527cc9cf02a096baeb0d2b99b4"

0 commit comments

Comments
 (0)