Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

chore: upgrade sentry nextjs sdk (#739)

bautistaaae64a7c271635
diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs
index 3ca444bc..3a7c91af 100644
--- a/apps/web/next.config.mjs
+++ b/apps/web/next.config.mjs
@@ -1,6 +1,7 @@
// NOTE: this whole package is bugged and once they fix this we can remove this workaround
// eslint-disable-next-line import/no-unresolved
import vercelToolbar from '@vercel/toolbar/plugins/next';
+import { withSentryConfig } from '@sentry/nextjs';
import bundleAnalyzer from '@next/bundle-analyzer';
// eslint-disable-next-line import/no-unresolved
import million from 'million/compiler';
@@ -8,7 +9,6 @@ import million from 'million/compiler';
const millionConfig = {
auto: { rsc: true },
};
-
const isProd = process.env.NODE_ENV === 'production';
/** @type {import("next").NextConfig} */
const nextConfig = {
@@ -58,10 +58,40 @@ const nextConfig = {
},
swcMinify: true,
};
-
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
});
const withVercelToolbar = vercelToolbar();
-export default million.next(withBundleAnalyzer(withVercelToolbar(nextConfig)), millionConfig);
+export default million.next(
+ withSentryConfig(
+ withBundleAnalyzer(withVercelToolbar(nextConfig)),
+ {
+ // For all available options, see:
+ // https://github.com/getsentry/sentry-webpack-plugin#options
+
+ // Suppresses source map uploading logs during build
+ silent: true,
+
+ org: 'typehero',
+ project: 'typehero-web-production',
+ },
+ {
+ // For all available options, see:
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
+
+ // Upload a larger set of source maps for prettier stack traces (increases build time)
+ widenClientFileUpload: true,
+
+ // Transpiles SDK to be compatible with IE11 (increases bundle size)
+ transpileClientSDK: true,
+
+ // Hides source maps from generated client bundles
+ hideSourceMaps: true,
+
+ // Automatically tree-shake Sentry logger statements to reduce bundle size
+ disableLogger: true,
+ },
+ ),
+ millionConfig,
+);
diff --git a/apps/web/package.json b/apps/web/package.json
index b4b99058..a15dadc1 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -32,7 +32,7 @@
"@repo/monaco": "workspace:*",
"@repo/og-image": "workspace:*",
"@repo/ui": "workspace:*",
- "@sentry/nextjs": "^7.66.0",
+ "@sentry/nextjs": "^7.73.0",
"@t3-oss/env-nextjs": "^0.6.0",
"@tanstack/react-query": "^4.29.25",
"@tanstack/react-query-devtools": "^4.35.3",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 1fa2f524..29c42aad 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -241,8 +241,8 @@ importers:
specifier: workspace:*
version: link:../../packages/ui
'@sentry/nextjs':
- specifier: ^7.66.0
+ specifier: ^7.73.0
'@t3-oss/env-nextjs':
specifier: ^0.6.0
@@ -3694,25 +3694,25 @@ packages:
selderee: 0.10.0
dev: false
- /@sentry-internal/[email protected]:
- resolution: {integrity: sha512-3vCgC2hC3T45pn53yTDVcRpHoJTBxelDPPZVsipAbZnoOVPkj7n6dNfDhj3I3kwWCBPahPkXmE+R4xViR8VqJg==}
+ /@sentry-internal/[email protected]:
+ resolution: {integrity: sha512-ig3WL/Nqp8nRQ52P205NaypGKNfIl/G+cIqge9xPW6zfRb5kJdM1YParw9GSJ1SPjEZBkBORGAML0on5H2FILw==}
engines: {node: '>=8'}
dependencies:
- '@sentry/core': 7.66.0
- '@sentry/types': 7.66.0
- '@sentry/utils': 7.66.0
+ '@sentry/core': 7.73.0
+ '@sentry/types': 7.73.0
+ '@sentry/utils': 7.73.0
tslib: 2.6.0
dev: false
- /@sentry/[email protected]:
- resolution: {integrity: sha512-rW037rf8jkhyykG38+HUdwkRCKHJEMM5NkCqPIO5zuuxfLKukKdI2rbvgJ93s3/9UfsTuDFcKFL1u43mCn6sDw==}
+ /@sentry/[email protected]:
+ resolution: {integrity: sha512-e301hUixcJ5+HNKCJwajFF5smF4opXEFSclyWsJuFNufv5J/1C1SDhbwG2JjBt5zzdSoKWJKT1ewR6vpICyoDw==}
engines: {node: '>=8'}
dependencies:
- '@sentry-internal/tracing': 7.66.0
- '@sentry/core': 7.66.0
- '@sentry/replay': 7.66.0
- '@sentry/types': 7.66.0
- '@sentry/utils': 7.66.0
+ '@sentry-internal/tracing': 7.73.0
+ '@sentry/core': 7.73.0
+ '@sentry/replay': 7.73.0
+ '@sentry/types': 7.73.0
+ '@sentry/utils': 7.73.0
tslib: 2.6.0
dev: false
@@ -3733,27 +3733,28 @@ packages:
- supports-color
dev: false
- /@sentry/[email protected]:
- resolution: {integrity: sha512-WMAEPN86NeCJ1IT48Lqiz4MS5gdDjBwP4M63XP4msZn9aujSf2Qb6My5uT87AJr9zBtgk8MyJsuHr35F0P3q1w==}
+ /@sentry/[email protected]:
+ resolution: {integrity: sha512-9FEz4Gq848LOgVN2OxJGYuQqxv7cIVw69VlAzWHEm3njt8mjvlTq+7UiFsGRo84+59V2FQuHxzA7vVjl90WfSg==}
engines: {node: '>=8'}
dependencies:
- '@sentry/types': 7.66.0
- '@sentry/utils': 7.66.0
+ '@sentry/types': 7.73.0
+ '@sentry/utils': 7.73.0
tslib: 2.6.0
dev: false
- /@sentry/[email protected]:
- resolution: {integrity: sha512-2PNEnihG9e9Rjbz205+A4BYtFcS2XdgwsN6obAU6Yir7VIbskwZXxx87lKZuz6S53sOWPHleC7uvUBjL+Q6vYg==}
+ /@sentry/[email protected]:
+ resolution: {integrity: sha512-IjVpn4d+aSL9L1Ntu/oAdRwujz4BzzavDsZf96Xgc/AjBnjAEUT+wT1dAwluThfuKDXmWOJHhZ2cHHMfqI+7vw==}
engines: {node: '>=8'}
dependencies:
- '@sentry/types': 7.66.0
- '@sentry/utils': 7.66.0
+ '@sentry/core': 7.73.0
+ '@sentry/types': 7.73.0
+ '@sentry/utils': 7.73.0
localforage: 1.10.0
tslib: 2.6.0
dev: false
- resolution: {integrity: sha512-CJwl3/rIJRR1isqWjGEE8CYiNUndvRksp7l0/75tfe4JoKTk+XS3tXcXVZyyXh34GU5San1c46ctiyodaGGIeg==}
+ resolution: {integrity: sha512-WTTxb3xFFpQ9u8jLx2jXa5oJIlgQs3kQ7wjHoTVOuuk51kB3wtMvq546tA5Kmsgu5uInjznBe4f2qUFYdqiO9Q==}
engines: {node: '>=8'}
peerDependencies:
next: ^10.0.8 || ^11.0 || ^12.0 || ^13.0
@@ -3764,12 +3765,13 @@ packages:
optional: true
dependencies:
'@rollup/plugin-commonjs': 24.0.0([email protected])
- '@sentry/core': 7.66.0
- '@sentry/integrations': 7.66.0
- '@sentry/node': 7.66.0
- '@sentry/react': 7.66.0([email protected])
- '@sentry/types': 7.66.0
- '@sentry/utils': 7.66.0
+ '@sentry/core': 7.73.0
+ '@sentry/integrations': 7.73.0
+ '@sentry/node': 7.73.0
+ '@sentry/react': 7.73.0([email protected])
+ '@sentry/types': 7.73.0
+ '@sentry/utils': 7.73.0
+ '@sentry/vercel-edge': 7.73.0
'@sentry/webpack-plugin': 1.20.0
chalk: 3.0.0
@@ -3783,15 +3785,15 @@ packages:
- supports-color
dev: false
- /@sentry/[email protected]:
- resolution: {integrity: sha512-PxqIqLr4Sh5xcDfECiBQ4PuZ7v8yTgLhaRkruWrZPYxQrcJFPkwbFkw/IskzVnhT2VwXUmeWEIlRMQKBJ0t83A==}
+ /@sentry/[email protected]:
+ resolution: {integrity: sha512-i50bRfmgkRRx0XXUbg9jGD/RuznDJxJXc4rBILhoJuhl+BjRIaoXA3ayplfJn8JLZxsNh75uJaCq4IUK70SORw==}
engines: {node: '>=8'}
dependencies:
- '@sentry-internal/tracing': 7.66.0
- '@sentry/core': 7.66.0
- '@sentry/types': 7.66.0
- '@sentry/utils': 7.66.0
- cookie: 0.4.2
+ '@sentry-internal/tracing': 7.73.0
+ '@sentry/core': 7.73.0
+ '@sentry/types': 7.73.0
+ '@sentry/utils': 7.73.0
+ cookie: 0.5.0
https-proxy-agent: 5.0.1
lru_map: 0.3.3
tslib: 2.6.0
@@ -3799,39 +3801,49 @@ packages:
- supports-color
dev: false
- resolution: {integrity: sha512-TC7kCkLoo+Klp9uywdV6tg8DDyn1CrTdndJghO6PoGz6sCa9k+t7K+z4E7MlgDoh3wiZwS2G2zhkT/xVeDRvJA==}
+ resolution: {integrity: sha512-RCGlxW0Xp5vsC38LGxUO0Xf11LBzfg75VN+KS3D2FS5GXl0R0JwgUyPNVlod7YMCfwytsKGhfP+YpQvHGQAVwg==}
engines: {node: '>=8'}
peerDependencies:
react: 15.x || 16.x || 17.x || 18.x
dependencies:
- '@sentry/browser': 7.66.0
- '@sentry/types': 7.66.0
- '@sentry/utils': 7.66.0
+ '@sentry/browser': 7.73.0
+ '@sentry/types': 7.73.0
+ '@sentry/utils': 7.73.0
hoist-non-react-statics: 3.3.2
react: 18.2.0
tslib: 2.6.0
dev: false
- /@sentry/[email protected]:
- resolution: {integrity: sha512-5Y2SlVTOFTo3uIycv0mRneBakQtLgWkOnsJaC5LB0Ip0TqVKiMCbQ578vvXp+yvRj4LcS1gNd98xTTNojBoQNg==}
+ /@sentry/[email protected]:
+ resolution: {integrity: sha512-a8IC9SowBisLYD2IdLkXzx7gN4iVwHDJhQvLp2B8ARs1PyPjJ7gCxSMHeGrYp94V0gOXtorNYkrxvuX8ayPROA==}
engines: {node: '>=12'}
dependencies:
- '@sentry/core': 7.66.0
- '@sentry/types': 7.66.0
- '@sentry/utils': 7.66.0
+ '@sentry/core': 7.73.0
+ '@sentry/types': 7.73.0
+ '@sentry/utils': 7.73.0
dev: false
- /@sentry/[email protected]:
- resolution: {integrity: sha512-uUMSoSiar6JhuD8p7ON/Ddp4JYvrVd2RpwXJRPH1A4H4Bd4DVt1mKJy1OLG6HdeQv39XyhB1lPZckKJg4tATPw==}
+ /@sentry/[email protected]:
+ resolution: {integrity: sha512-/v8++bly8jW7r4cP2wswYiiVpn7eLLcqwnfPUMeCQze4zj3F3nTRIKc9BGHzU0V+fhHa3RwRC2ksqTGq1oJMDg==}
engines: {node: '>=8'}
dev: false
- /@sentry/[email protected]:
- resolution: {integrity: sha512-9GYUVgXjK66uXXcLXVMXVzlptqMtq1eJENCuDeezQiEFrNA71KkLDg00wESp+LL+bl3wpVTBApArpbF6UEG5hQ==}
+ /@sentry/[email protected]:
+ resolution: {integrity: sha512-h3ZK/qpf4k76FhJV9uiSbvMz3V/0Ovy94C+5/9UgPMVCJXFmVsdw8n/dwANJ7LupVPfYP23xFGgebDMFlK1/2w==}
engines: {node: '>=8'}
dependencies:
- '@sentry/types': 7.66.0
+ '@sentry/types': 7.73.0
+ tslib: 2.6.0
+ dev: false
+
+ /@sentry/[email protected]:
+ resolution: {integrity: sha512-5EIJAuHG9w2OBrG76uH51Zlh4SMg3N8n29YiZgOtsBL0FU7AvBpxsIknECmmQOKPFrfCa0ycu2WSWgFXILCYGQ==}
+ engines: {node: '>=8'}
+ dependencies:
+ '@sentry/core': 7.73.0
+ '@sentry/types': 7.73.0
+ '@sentry/utils': 7.73.0
tslib: 2.6.0
dev: false
@@ -5313,11 +5325,6 @@ packages:
resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==}
dev: false
- resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==}
- engines: {node: '>= 0.6'}
- dev: false
-
resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==}
engines: {node: '>= 0.6'}