From 15a059573450279386c13cf88c2e3b5f0f77360c Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 20 Jan 2025 14:50:31 +0000 Subject: [PATCH 1/3] meta: Postpone non-breaking TODOs --- packages/aws-serverless/src/sdk.ts | 2 +- packages/core/src/index.ts | 4 ++-- packages/nextjs/src/config/withSentryConfig.ts | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/aws-serverless/src/sdk.ts b/packages/aws-serverless/src/sdk.ts index 79847adb047e..1bd403296e11 100644 --- a/packages/aws-serverless/src/sdk.ts +++ b/packages/aws-serverless/src/sdk.ts @@ -333,7 +333,7 @@ export function wrapHandler( // Only start a trace and root span if the handler is not already wrapped by Otel instrumentation // Otherwise, we create two root spans (one from otel, one from our wrapper). // If Otel instrumentation didn't work or was filtered by users, we still want to trace the handler. - // TODO(v9): Since bumping the OTEL Instrumentation, this is likely not needed anymore, we can possibly remove this + // TODO(v9): Since bumping the OTEL Instrumentation, this is likely not needed anymore, we can possibly remove this (can be done whenever since it would be non-breaking) if (options.startTrace && !isWrappedByOtel(handler)) { const traceData = getAwsTraceData(event as { headers?: Record }, context); diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index dcc56a1ca890..74b5f7ee4dcf 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -122,9 +122,9 @@ export type { ReportDialogOptions } from './report-dialog'; // eslint-disable-next-line deprecation/deprecation export { getCurrentHubShim, getCurrentHub } from './getCurrentHubShim'; -// TODO(v9): Make this structure pretty again and don't do "export *" +// TODO(v9): Make this structure pretty again and don't do "export *" (since this is non-breaking, can be done whenever) export * from './utils-hoist/index'; -// TODO(v9): Make this structure pretty again and don't do "export *" +// TODO(v9): Make this structure pretty again and don't do "export *" (since this is non-breaking, can be done whenever) export * from './types-hoist/index'; export type { FeatureFlag } from './featureFlags'; diff --git a/packages/nextjs/src/config/withSentryConfig.ts b/packages/nextjs/src/config/withSentryConfig.ts index 316e86c01708..8f57f51a8c58 100644 --- a/packages/nextjs/src/config/withSentryConfig.ts +++ b/packages/nextjs/src/config/withSentryConfig.ts @@ -248,9 +248,7 @@ function setUpTunnelRewriteRules(userNextConfig: NextConfigObject, tunnelPath: s }; } -// TODO(v9): Inject the release into all the bundles. This is breaking because grabbing the build ID if the user provides -// it in `generateBuildId` (https://nextjs.org/docs/app/api-reference/next-config-js/generateBuildId) is async but we do -// not turn the next config function in the type it was passed. +// TODO: For Turbopack we need to pass the release name here and pick it up in the SDK function setUpBuildTimeVariables(userNextConfig: NextConfigObject, userSentryOptions: SentryBuildOptions): void { const assetPrefix = userNextConfig.assetPrefix || userNextConfig.basePath || ''; const basePath = userNextConfig.basePath ?? ''; From d9872aa46db08e3a41823910c0397eaedf22533a Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 20 Jan 2025 14:51:58 +0000 Subject: [PATCH 2/3] . --- packages/nextjs/src/config/webpack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextjs/src/config/webpack.ts b/packages/nextjs/src/config/webpack.ts index 80b46570c03e..bb73a2fb1859 100644 --- a/packages/nextjs/src/config/webpack.ts +++ b/packages/nextjs/src/config/webpack.ts @@ -586,7 +586,7 @@ function setUpModuleRules(newConfig: WebpackConfigObject): WebpackConfigObjectWi /** * Adds loaders to inject values on the global object based on user configuration. */ -// TODO(v9): Remove this loader and replace it with a nextConfig.env (https://web.archive.org/web/20240917153554/https://nextjs.org/docs/app/api-reference/next-config-js/env) or define based (/~https://github.com/vercel/next.js/discussions/71476) approach. +// TODO: Remove this loader and replace it with a nextConfig.env (https://web.archive.org/web/20240917153554/https://nextjs.org/docs/app/api-reference/next-config-js/env) or define based (/~https://github.com/vercel/next.js/discussions/71476) approach. // In order to remove this loader though we need to make sure the minimum supported Next.js version includes this PR (/~https://github.com/vercel/next.js/pull/61194), otherwise the nextConfig.env based approach will not work, as our SDK code is not processed by Next.js. function addValueInjectionLoader( newConfig: WebpackConfigObjectWithModuleRules, From d34a00c022a81551620050e08d7ab838a217adaf Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 20 Jan 2025 15:42:53 +0000 Subject: [PATCH 3/3] remove v9 labels --- packages/aws-serverless/src/sdk.ts | 2 +- packages/core/src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/aws-serverless/src/sdk.ts b/packages/aws-serverless/src/sdk.ts index 1bd403296e11..34921d24c7ff 100644 --- a/packages/aws-serverless/src/sdk.ts +++ b/packages/aws-serverless/src/sdk.ts @@ -333,7 +333,7 @@ export function wrapHandler( // Only start a trace and root span if the handler is not already wrapped by Otel instrumentation // Otherwise, we create two root spans (one from otel, one from our wrapper). // If Otel instrumentation didn't work or was filtered by users, we still want to trace the handler. - // TODO(v9): Since bumping the OTEL Instrumentation, this is likely not needed anymore, we can possibly remove this (can be done whenever since it would be non-breaking) + // TODO: Since bumping the OTEL Instrumentation, this is likely not needed anymore, we can possibly remove this (can be done whenever since it would be non-breaking) if (options.startTrace && !isWrappedByOtel(handler)) { const traceData = getAwsTraceData(event as { headers?: Record }, context); diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 74b5f7ee4dcf..6faa819d7ee9 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -122,9 +122,9 @@ export type { ReportDialogOptions } from './report-dialog'; // eslint-disable-next-line deprecation/deprecation export { getCurrentHubShim, getCurrentHub } from './getCurrentHubShim'; -// TODO(v9): Make this structure pretty again and don't do "export *" (since this is non-breaking, can be done whenever) +// TODO: Make this structure pretty again and don't do "export *" export * from './utils-hoist/index'; -// TODO(v9): Make this structure pretty again and don't do "export *" (since this is non-breaking, can be done whenever) +// TODO: Make this structure pretty again and don't do "export *" export * from './types-hoist/index'; export type { FeatureFlag } from './featureFlags';