diff --git a/package.json b/package.json index 8b0c7da3d1f4f2..a9966a31db9aad 100644 --- a/package.json +++ b/package.json @@ -170,7 +170,7 @@ "scroll-to-element": "^2.0.0", "sprintf-js": "1.0.3", "style-loader": "4.0.0", - "swc-plugin-component-annotate": "1.5.0", + "swc-plugin-component-annotate": "1.8.0", "ts-checker-rspack-plugin": "1.1.4", "tslib": "^2.8.1", "typescript": "^5.8.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 69d03bf02f8537..fa639a285b01b2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -499,8 +499,8 @@ importers: specifier: 4.0.0 version: 4.0.0(webpack@5.99.6(esbuild@0.25.3)) swc-plugin-component-annotate: - specifier: 1.5.0 - version: 1.5.0 + specifier: 1.8.0 + version: 1.8.0 ts-checker-rspack-plugin: specifier: 1.1.4 version: 1.1.4(@rspack/core@1.4.4(@swc/helpers@0.5.15))(typescript@5.8.3) @@ -516,14 +516,10 @@ importers: zxcvbn: specifier: ^4.4.2 version: 4.4.2 - optionalDependencies: - fsevents: - specifier: ^2.3.2 - version: 2.3.3 devDependencies: '@codecov/webpack-plugin': specifier: ^1.9.0 - version: 1.9.0(webpack-sources@3.2.3)(webpack@5.99.6(esbuild@0.25.3)) + version: 1.9.0(webpack-sources@3.3.3)(webpack@5.99.6(esbuild@0.25.3)) '@emotion/eslint-plugin': specifier: ^11.12.0 version: 11.12.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.3) @@ -656,6 +652,10 @@ importers: typescript-eslint: specifier: ^8.26.0 version: 8.26.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.3) + optionalDependencies: + fsevents: + specifier: ^2.3.2 + version: 2.3.3 packages: @@ -3458,6 +3458,9 @@ packages: '@types/estree@1.0.7': resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} + '@types/estree@1.0.8': + resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} + '@types/express-serve-static-core@4.19.6': resolution: {integrity: sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==} @@ -3560,6 +3563,9 @@ packages: '@types/node@22.15.21': resolution: {integrity: sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ==} + '@types/node@22.16.5': + resolution: {integrity: sha512-bJFoMATwIGaxxx8VJPeM8TonI8t579oRvgAuT8zFugJsJZgzqv0Fu8Mhp68iecjzG7cnN3mO2dJQ5uUM2EFrgQ==} + '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -3947,6 +3953,11 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + acorn@8.15.0: + resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} + engines: {node: '>=0.4.0'} + hasBin: true + agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -4862,6 +4873,10 @@ packages: resolution: {integrity: sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==} engines: {node: '>=10.13.0'} + enhanced-resolve@5.18.2: + resolution: {integrity: sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==} + engines: {node: '>=10.13.0'} + entities@2.0.0: resolution: {integrity: sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==} @@ -4915,8 +4930,8 @@ packages: resolution: {integrity: sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==} engines: {node: '>= 0.4'} - es-module-lexer@1.6.0: - resolution: {integrity: sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==} + es-module-lexer@1.7.0: + resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} es-object-atoms@1.0.0: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} @@ -8082,8 +8097,8 @@ packages: svg-tags@1.0.0: resolution: {integrity: sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==} - swc-plugin-component-annotate@1.5.0: - resolution: {integrity: sha512-A0CWgdkS/TTrGj41JQ5uJ2SVxx/UdDOse++kCrU5Vs3voSdgBvwJ9v+Km/demXXkUN6IWBYcXnqEAo4x+JW1wQ==} + swc-plugin-component-annotate@1.8.0: + resolution: {integrity: sha512-qOiIN0iO/jTqdU0kmpWnkQ3/zm7gOm4UlFjtv1E/gKn+/jDzJ462WE3S323UlNoMwD+uYUdJurNZxLT8uxCeZw==} symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} @@ -8531,8 +8546,8 @@ packages: warning@4.0.3: resolution: {integrity: sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==} - watchpack@2.4.2: - resolution: {integrity: sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==} + watchpack@2.4.4: + resolution: {integrity: sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==} engines: {node: '>=10.13.0'} wbuf@1.7.3: @@ -8576,6 +8591,10 @@ packages: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} engines: {node: '>=10.13.0'} + webpack-sources@3.3.3: + resolution: {integrity: sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==} + engines: {node: '>=10.13.0'} + webpack-virtual-modules@0.5.0: resolution: {integrity: sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==} @@ -9777,21 +9796,21 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@codecov/bundler-plugin-core@1.9.0(webpack-sources@3.2.3)': + '@codecov/bundler-plugin-core@1.9.0(webpack-sources@3.3.3)': dependencies: '@actions/core': 1.10.1 '@actions/github': 6.0.0 chalk: 4.1.2 semver: 7.7.2 - unplugin: 1.14.1(webpack-sources@3.2.3) + unplugin: 1.14.1(webpack-sources@3.3.3) zod: 3.23.8 transitivePeerDependencies: - webpack-sources - '@codecov/webpack-plugin@1.9.0(webpack-sources@3.2.3)(webpack@5.99.6(esbuild@0.25.3))': + '@codecov/webpack-plugin@1.9.0(webpack-sources@3.3.3)(webpack@5.99.6(esbuild@0.25.3))': dependencies: - '@codecov/bundler-plugin-core': 1.9.0(webpack-sources@3.2.3) - unplugin: 1.14.1(webpack-sources@3.2.3) + '@codecov/bundler-plugin-core': 1.9.0(webpack-sources@3.3.3) + unplugin: 1.14.1(webpack-sources@3.3.3) webpack: 5.99.6(esbuild@0.25.3) transitivePeerDependencies: - webpack-sources @@ -12535,11 +12554,11 @@ snapshots: '@types/eslint-scope@3.7.7': dependencies: '@types/eslint': 9.6.1 - '@types/estree': 1.0.7 + '@types/estree': 1.0.8 '@types/eslint@9.6.1': dependencies: - '@types/estree': 1.0.7 + '@types/estree': 1.0.8 '@types/json-schema': 7.0.15 '@types/estree-jsx@1.0.5': @@ -12550,6 +12569,8 @@ snapshots: '@types/estree@1.0.7': {} + '@types/estree@1.0.8': {} + '@types/express-serve-static-core@4.19.6': dependencies: '@types/node': 22.15.21 @@ -12671,6 +12692,10 @@ snapshots: dependencies: undici-types: 6.21.0 + '@types/node@22.16.5': + dependencies: + undici-types: 6.21.0 + '@types/normalize-package-data@2.4.4': {} '@types/papaparse@5.3.5': @@ -13111,6 +13136,8 @@ snapshots: acorn@8.14.1: {} + acorn@8.15.0: {} + agent-base@6.0.2: dependencies: debug: 4.4.1 @@ -14084,6 +14111,11 @@ snapshots: graceful-fs: 4.2.11 tapable: 2.2.1 + enhanced-resolve@5.18.2: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.2.2 + entities@2.0.0: {} entities@4.5.0: {} @@ -14239,7 +14271,7 @@ snapshots: iterator.prototype: 1.1.4 safe-array-concat: 1.1.3 - es-module-lexer@1.6.0: {} + es-module-lexer@1.7.0: {} es-object-atoms@1.0.0: dependencies: @@ -16025,7 +16057,7 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.15.21 + '@types/node': 22.16.5 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -18338,7 +18370,7 @@ snapshots: svg-tags@1.0.0: {} - swc-plugin-component-annotate@1.5.0: {} + swc-plugin-component-annotate@1.8.0: {} symbol-tree@3.2.4: {} @@ -18464,7 +18496,7 @@ snapshots: '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 '@types/node': 22.15.21 - acorn: 8.14.1 + acorn: 8.15.0 acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 @@ -18685,12 +18717,12 @@ snapshots: webpack-sources: 3.2.3 webpack-virtual-modules: 0.5.0 - unplugin@1.14.1(webpack-sources@3.2.3): + unplugin@1.14.1(webpack-sources@3.3.3): dependencies: acorn: 8.14.1 webpack-virtual-modules: 0.6.2 optionalDependencies: - webpack-sources: 3.2.3 + webpack-sources: 3.3.3 unrs-resolver@1.7.13: dependencies: @@ -18844,7 +18876,7 @@ snapshots: dependencies: loose-envify: 1.4.0 - watchpack@2.4.2: + watchpack@2.4.4: dependencies: glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 @@ -18926,6 +18958,8 @@ snapshots: webpack-sources@3.2.3: {} + webpack-sources@3.3.3: {} + webpack-virtual-modules@0.5.0: {} webpack-virtual-modules@0.6.2: {} @@ -18933,15 +18967,15 @@ snapshots: webpack@5.99.6(esbuild@0.25.3): dependencies: '@types/eslint-scope': 3.7.7 - '@types/estree': 1.0.7 + '@types/estree': 1.0.8 '@webassemblyjs/ast': 1.14.1 '@webassemblyjs/wasm-edit': 1.14.1 '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.14.1 + acorn: 8.15.0 browserslist: 4.25.1 chrome-trace-event: 1.0.4 - enhanced-resolve: 5.18.1 - es-module-lexer: 1.6.0 + enhanced-resolve: 5.18.2 + es-module-lexer: 1.7.0 eslint-scope: 5.1.1 events: 3.3.0 glob-to-regexp: 0.4.1 @@ -18953,8 +18987,8 @@ snapshots: schema-utils: 4.3.2 tapable: 2.2.2 terser-webpack-plugin: 5.3.14(esbuild@0.25.3)(webpack@5.99.6(esbuild@0.25.3)) - watchpack: 2.4.2 - webpack-sources: 3.2.3 + watchpack: 2.4.4 + webpack-sources: 3.3.3 transitivePeerDependencies: - '@swc/core' - esbuild diff --git a/rspack.config.ts b/rspack.config.ts index af13dd0b1c1fa0..aae6a05d4e1822 100644 --- a/rspack.config.ts +++ b/rspack.config.ts @@ -203,12 +203,22 @@ const swcReactLoaderConfig: SwcLoaderOptions = { ], [ 'swc-plugin-component-annotate', - { - 'annotate-fragments': false, - 'component-attr': 'data-sentry-component', - 'element-attr': 'data-sentry-element', - 'source-file-attr': 'data-sentry-source-file', - }, + Object.assign( + {}, + { + 'annotate-fragments': false, + 'component-attr': 'data-sentry-component', + 'element-attr': 'data-sentry-element', + 'source-file-attr': 'data-sentry-source-file', + }, + // We don't want to add source path attributes in production + // as it will unnecessarily bloat the bundle size + IS_PRODUCTION + ? {} + : { + 'source-path-attr': 'data-sentry-source-path', + } + ), ], ], },