Skip to content

Commit a6fbace

Browse files
authored
feat(runtimes): nodejs16.x #2628
1 parent 8677311 commit a6fbace

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
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 nodejs16.x Lambdas"
4+
}

src/integrationTest/sam.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ const scenarios: TestScenario[] = [
7676
dependencyManager: 'npm',
7777
vscodeMinimum: '1.50.0',
7878
},
79+
{
80+
runtime: 'nodejs16.x',
81+
displayName: 'nodejs16.x (ZIP)',
82+
path: 'hello-world/app.js',
83+
debugSessionType: 'pwa-node',
84+
language: 'javascript',
85+
dependencyManager: 'npm',
86+
vscodeMinimum: '1.50.0',
87+
},
7988
{
8089
runtime: 'python3.6',
8190
displayName: 'python3.6 (ZIP)',
@@ -172,6 +181,16 @@ const scenarios: TestScenario[] = [
172181
dependencyManager: 'npm',
173182
vscodeMinimum: '1.50.0',
174183
},
184+
{
185+
runtime: 'nodejs16.x',
186+
displayName: 'nodejs16.x (Image)',
187+
baseImage: `amazon/nodejs16.x-base`,
188+
path: 'hello-world/app.js',
189+
debugSessionType: 'pwa-node',
190+
language: 'javascript',
191+
dependencyManager: 'npm',
192+
vscodeMinimum: '1.50.0',
193+
},
175194
{
176195
runtime: 'python3.6',
177196
displayName: 'python3.6 (Image)',

src/lambda/models/samLambdaRuntime.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ 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>(['nodejs14.x', 'nodejs12.x'])
30+
export const nodeJsRuntimes: ImmutableSet<Runtime> = ImmutableSet<Runtime>(['nodejs16.x', 'nodejs14.x', 'nodejs12.x'])
3131
export const pythonRuntimes: ImmutableSet<Runtime> = ImmutableSet<Runtime>([
3232
'python3.9',
3333
'python3.8',
@@ -74,6 +74,7 @@ export const samZipLambdaRuntimes: ImmutableSet<Runtime> = ImmutableSet.union([
7474
export const samArmLambdaRuntimes: ImmutableSet<Runtime> = ImmutableSet<Runtime>([
7575
'python3.9',
7676
'python3.8',
77+
'nodejs16.x',
7778
'nodejs14.x',
7879
'nodejs12.x',
7980
'java11',

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ describe('runtimes', function () {
6969
assert.deepStrictEqual(samLambdaCreatableRuntimes(true).toArray().sort(), [
7070
'nodejs12.x',
7171
'nodejs14.x',
72+
'nodejs16.x',
7273
'python3.7',
7374
'python3.8',
7475
'python3.9',
7576
])
7677
assert.deepStrictEqual(samImageLambdaRuntimes(true).toArray().sort(), [
7778
'nodejs12.x',
7879
'nodejs14.x',
80+
'nodejs16.x',
7981
'python3.7',
8082
'python3.8',
8183
'python3.9',
@@ -91,6 +93,7 @@ describe('runtimes', function () {
9193
'java8.al2',
9294
'nodejs12.x',
9395
'nodejs14.x',
96+
'nodejs16.x',
9497
'python3.6',
9598
'python3.7',
9699
'python3.8',
@@ -106,6 +109,7 @@ describe('runtimes', function () {
106109
'java8.al2',
107110
'nodejs12.x',
108111
'nodejs14.x',
112+
'nodejs16.x',
109113
'python3.6',
110114
'python3.7',
111115
'python3.8',

0 commit comments

Comments
 (0)