Skip to content

Commit 60e6021

Browse files
committed
extract default node version
1 parent 1f79023 commit 60e6021

File tree

1 file changed

+2
-1
lines changed
  • dev-packages/e2e-tests/test-applications/aws-serverless/src

1 file changed

+2
-1
lines changed

dev-packages/e2e-tests/test-applications/aws-serverless/src/stack.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const LAMBDA_FUNCTIONS_WITH_LAYER_DIR = './src/lambda-functions-layer';
1212
const LAMBDA_FUNCTIONS_WITH_NPM_DIR = './src/lambda-functions-npm';
1313
const LAMBDA_FUNCTION_TIMEOUT = 10;
1414
const LAYER_DIR = './node_modules/@sentry/aws-serverless/';
15+
const DEFAULT_NODE_VERSION = '22';
1516
export const SAM_PORT = 3001;
1617

1718
export class LocalLambdaStack extends Stack {
@@ -77,7 +78,7 @@ export class LocalLambdaStack extends Stack {
7778
properties: {
7879
CodeUri: path.join(functionsDir, lambdaDir),
7980
Handler: 'index.handler',
80-
Runtime: `nodejs${process.env.NODE_VERSION ?? '22'}.x`,
81+
Runtime: `nodejs${process.env.NODE_VERSION ?? DEFAULT_NODE_VERSION}.x`,
8182
Timeout: LAMBDA_FUNCTION_TIMEOUT,
8283
Layers: addLayer ? [{ Ref: this.sentryLayer.logicalId }] : undefined,
8384
Environment: {

0 commit comments

Comments
 (0)