diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fe7286ed88d..2ee1edd5991c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott +## 8.2.1 + +- fix(aws-serverless): Fix build of lambda layer (#12083) +- fix(nestjs): Broaden nest.js type (#12076) + ## 8.2.0 - feat(redis-cache): Create cache-span with prefixed keys (get/set commands) (#12070) diff --git a/packages/aws-serverless/rollup.aws.config.mjs b/packages/aws-serverless/rollup.aws.config.mjs index 22656f397140..6f5cc7d581e5 100644 --- a/packages/aws-serverless/rollup.aws.config.mjs +++ b/packages/aws-serverless/rollup.aws.config.mjs @@ -15,6 +15,7 @@ export default [ sourcemap: false, }, }, + preserveModules: false, }), // We only need one copy of the SDK, and we pick the minified one because there's a cap on how big a lambda function // plus its dependencies can be, and we might as well take up as little of that space as is necessary. We'll rename diff --git a/packages/aws-serverless/src/awslambda-auto.ts b/packages/aws-serverless/src/awslambda-auto.ts index 6deb405ba505..9cf3ba68ae6e 100644 --- a/packages/aws-serverless/src/awslambda-auto.ts +++ b/packages/aws-serverless/src/awslambda-auto.ts @@ -1,5 +1,4 @@ -import { getDefaultIntegrations as getNodeDefaultIntegrations } from '@sentry/node'; -import { init, tryPatchHandler } from './sdk'; +import * as Sentry from './index'; const lambdaTaskRoot = process.env.LAMBDA_TASK_ROOT; if (lambdaTaskRoot) { @@ -8,12 +7,12 @@ if (lambdaTaskRoot) { throw Error(`LAMBDA_TASK_ROOT is non-empty(${lambdaTaskRoot}) but _HANDLER is not set`); } - init({ + Sentry.init({ // We want to load the performance integrations here, if the tracesSampleRate is set for the layer in env vars // Sentry node's `getDefaultIntegrations` will load them if tracing is enabled, // which is the case if `tracesSampleRate` is set. // We can safely add all the node default integrations - integrations: getNodeDefaultIntegrations( + integrations: Sentry.getDefaultIntegrations( process.env.SENTRY_TRACES_SAMPLE_RATE ? { tracesSampleRate: parseFloat(process.env.SENTRY_TRACES_SAMPLE_RATE), @@ -22,7 +21,7 @@ if (lambdaTaskRoot) { ), }); - tryPatchHandler(lambdaTaskRoot, handlerString); + Sentry.tryPatchHandler(lambdaTaskRoot, handlerString); } else { throw Error('LAMBDA_TASK_ROOT environment variable is not set'); } diff --git a/packages/node/src/integrations/tracing/nest.ts b/packages/node/src/integrations/tracing/nest.ts index a831a6771179..c1a4b9e7a3c0 100644 --- a/packages/node/src/integrations/tracing/nest.ts +++ b/packages/node/src/integrations/tracing/nest.ts @@ -28,7 +28,7 @@ interface NestJsErrorFilter { interface MinimalNestJsApp { useGlobalFilters: (arg0: NestJsErrorFilter) => void; useGlobalInterceptors: (interceptor: { - intercept: (context: MinimalNestJsExecutionContext, next: { handle: () => void }) => void; + intercept: (context: MinimalNestJsExecutionContext, next: { handle: () => any }) => any; }) => void; }