Skip to content

Commit 357517b

Browse files
authored
feat(runtimes): nodejs18.x #2958
1 parent 06eb846 commit 357517b

File tree

4 files changed

+32
-18
lines changed

4 files changed

+32
-18
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "SAM: create, run and debug nodejs18.x Lambdas"
4+
}

src/integrationTest/sam.test.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,27 +59,27 @@ interface TestScenario {
5959
const scenarios: TestScenario[] = [
6060
// zips
6161
{
62-
runtime: 'nodejs12.x',
63-
displayName: 'nodejs12.x (ZIP)',
62+
runtime: 'nodejs14.x',
63+
displayName: 'nodejs14.x (ZIP)',
6464
path: 'hello-world/app.js',
6565
debugSessionType: 'pwa-node',
6666
language: 'javascript',
6767
dependencyManager: 'npm',
6868
vscodeMinimum: '1.50.0',
6969
},
7070
{
71-
runtime: 'nodejs14.x',
72-
displayName: 'nodejs14.x (ZIP)',
71+
runtime: 'nodejs16.x',
72+
displayName: 'nodejs16.x (ZIP)',
7373
path: 'hello-world/app.js',
7474
debugSessionType: 'pwa-node',
7575
language: 'javascript',
7676
dependencyManager: 'npm',
7777
vscodeMinimum: '1.50.0',
7878
},
7979
{
80-
runtime: 'nodejs16.x',
81-
displayName: 'nodejs16.x (ZIP)',
82-
path: 'hello-world/app.js',
80+
runtime: 'nodejs18.x',
81+
displayName: 'nodejs18.x (ZIP)',
82+
path: 'hello-world/app.mjs',
8383
debugSessionType: 'pwa-node',
8484
language: 'javascript',
8585
dependencyManager: 'npm',
@@ -152,16 +152,6 @@ const scenarios: TestScenario[] = [
152152
// { runtime: 'dotnetcore3.1', path: 'src/HelloWorld/Function.cs', debugSessionType: 'coreclr', language: 'csharp' },
153153

154154
// images
155-
{
156-
runtime: 'nodejs12.x',
157-
displayName: 'nodejs12.x (Image)',
158-
baseImage: `amazon/nodejs12.x-base`,
159-
path: 'hello-world/app.js',
160-
debugSessionType: 'pwa-node',
161-
language: 'javascript',
162-
dependencyManager: 'npm',
163-
vscodeMinimum: '1.50.0',
164-
},
165155
{
166156
runtime: 'nodejs14.x',
167157
displayName: 'nodejs14.x (Image)',
@@ -182,6 +172,16 @@ const scenarios: TestScenario[] = [
182172
dependencyManager: 'npm',
183173
vscodeMinimum: '1.50.0',
184174
},
175+
{
176+
runtime: 'nodejs18.x',
177+
displayName: 'nodejs18.x (Image)',
178+
baseImage: `amazon/nodejs18.x-base`,
179+
path: 'hello-world/app.mjs',
180+
debugSessionType: 'pwa-node',
181+
language: 'javascript',
182+
dependencyManager: 'npm',
183+
vscodeMinimum: '1.50.0',
184+
},
185185
{
186186
runtime: 'python3.7',
187187
displayName: 'python3.7 (Image)',

src/lambda/models/samLambdaRuntime.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ export type RuntimePackageType = 'Image' | 'Zip'
2727

2828
// TODO: Consolidate all of the runtime constructs into a single <Runtime, Set<Runtime>> map
2929
// We should be able to eliminate a fair amount of redundancy with that.
30-
export const nodeJsRuntimes: ImmutableSet<Runtime> = ImmutableSet<Runtime>(['nodejs16.x', 'nodejs14.x', 'nodejs12.x'])
30+
export const nodeJsRuntimes: ImmutableSet<Runtime> = ImmutableSet<Runtime>([
31+
'nodejs18.x',
32+
'nodejs16.x',
33+
'nodejs14.x',
34+
'nodejs12.x',
35+
])
3136
export const pythonRuntimes: ImmutableSet<Runtime> = ImmutableSet<Runtime>(['python3.9', 'python3.8', 'python3.7'])
3237
export const goRuntimes: ImmutableSet<Runtime> = ImmutableSet<Runtime>(['go1.x'])
3338
export const javaRuntimes: ImmutableSet<Runtime> = ImmutableSet<Runtime>(['java11', 'java8', 'java8.al2'])
@@ -69,6 +74,7 @@ export const samZipLambdaRuntimes: ImmutableSet<Runtime> = ImmutableSet.union([
6974
export const samArmLambdaRuntimes: ImmutableSet<Runtime> = ImmutableSet<Runtime>([
7075
'python3.9',
7176
'python3.8',
77+
'nodejs18.x',
7278
'nodejs16.x',
7379
'nodejs14.x',
7480
'nodejs12.x',

src/test/lambda/models/samLambdaRuntime.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ describe('runtimes', function () {
7070
'nodejs12.x',
7171
'nodejs14.x',
7272
'nodejs16.x',
73+
'nodejs18.x',
7374
'python3.7',
7475
'python3.8',
7576
'python3.9',
@@ -78,6 +79,7 @@ describe('runtimes', function () {
7879
'nodejs12.x',
7980
'nodejs14.x',
8081
'nodejs16.x',
82+
'nodejs18.x',
8183
'python3.7',
8284
'python3.8',
8385
'python3.9',
@@ -94,6 +96,7 @@ describe('runtimes', function () {
9496
'nodejs12.x',
9597
'nodejs14.x',
9698
'nodejs16.x',
99+
'nodejs18.x',
97100
'python3.7',
98101
'python3.8',
99102
'python3.9',
@@ -109,6 +112,7 @@ describe('runtimes', function () {
109112
'nodejs12.x',
110113
'nodejs14.x',
111114
'nodejs16.x',
115+
'nodejs18.x',
112116
'python3.7',
113117
'python3.8',
114118
'python3.9',

0 commit comments

Comments
 (0)