Skip to content

Commit 0f3ad3c

Browse files
authored
Merge pull request #102 from StackToolbox/fix-runtime-error
fix: runtimes should be nodejs instead of nodejx
2 parents b10dfca + 8592173 commit 0f3ad3c

5 files changed

Lines changed: 101 additions & 100 deletions

File tree

src/__tests__/__snapshots__/entryFor.test.ts.snap

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ exports[`Function CodeUri can be set at the function 1`] = `
3939
"Properties": {
4040
"CodeUri": "MyLambda",
4141
"Handler": "app.handler",
42-
"Runtime": "nodejx18.x",
42+
"Runtime": "nodejs22.x",
4343
},
4444
"Type": "AWS::Serverless::Function",
4545
},
@@ -96,7 +96,7 @@ exports[`Function CodeUri can be set global or at the function 1`] = `
9696
"Properties": {
9797
"CodeUri": "MyLambda",
9898
"Handler": "app.handler",
99-
"Runtime": "nodejx18.x",
99+
"Runtime": "nodejs22.x",
100100
},
101101
"Type": "AWS::Serverless::Function",
102102
},
@@ -153,7 +153,7 @@ exports[`Function CodeUri can be set globally 1`] = `
153153
"Properties": {
154154
"CodeUri": "MyLambda",
155155
"Handler": "app.handler",
156-
"Runtime": "nodejx18.x",
156+
"Runtime": "nodejs22.x",
157157
},
158158
"Type": "AWS::Serverless::Function",
159159
},
@@ -205,7 +205,7 @@ exports[`Function Handler can be set at the function 1`] = `
205205
"Properties": {
206206
"CodeUri": "MyLambda",
207207
"Handler": "app.handler",
208-
"Runtime": "nodejx18.x",
208+
"Runtime": "nodejs22.x",
209209
},
210210
"Type": "AWS::Serverless::Function",
211211
},
@@ -262,7 +262,7 @@ exports[`Function Handler can be set global and at function 1`] = `
262262
"Properties": {
263263
"CodeUri": "MyLambda",
264264
"Handler": "app.handler",
265-
"Runtime": "nodejx18.x",
265+
"Runtime": "nodejs22.x",
266266
},
267267
"Type": "AWS::Serverless::Function",
268268
},
@@ -319,7 +319,7 @@ exports[`Function Handler can be set globally 1`] = `
319319
"Properties": {
320320
"CodeUri": "MyLambda",
321321
"Handler": "app.handler",
322-
"Runtime": "nodejx18.x",
322+
"Runtime": "nodejs22.x",
323323
},
324324
"Type": "AWS::Serverless::Function",
325325
},
@@ -332,7 +332,7 @@ exports[`Function Handler can be set globally 1`] = `
332332
}
333333
`;
334334

335-
exports[`Function Runtime can be set at the function to nodejx18.x 1`] = `
335+
exports[`Function Runtime can be set at the function to nodejs18.x 1`] = `
336336
{
337337
"entryPoints": {
338338
"MyLambda": "./src/my-lambda/app",
@@ -371,7 +371,7 @@ exports[`Function Runtime can be set at the function to nodejx18.x 1`] = `
371371
"Properties": {
372372
"CodeUri": "MyLambda",
373373
"Handler": "app.handler",
374-
"Runtime": "nodejx18.x",
374+
"Runtime": "nodejs18.x",
375375
},
376376
"Type": "AWS::Serverless::Function",
377377
},
@@ -384,7 +384,7 @@ exports[`Function Runtime can be set at the function to nodejx18.x 1`] = `
384384
}
385385
`;
386386

387-
exports[`Function Runtime can be set at the function to nodejx18.x 2`] = `
387+
exports[`Function Runtime can be set at the function to nodejs20.x 1`] = `
388388
{
389389
"entryPoints": {
390390
"MyLambda": "./src/my-lambda/app",
@@ -423,7 +423,7 @@ exports[`Function Runtime can be set at the function to nodejx18.x 2`] = `
423423
"Properties": {
424424
"CodeUri": "MyLambda",
425425
"Handler": "app.handler",
426-
"Runtime": "nodejx18.x",
426+
"Runtime": "nodejs20.x",
427427
},
428428
"Type": "AWS::Serverless::Function",
429429
},
@@ -436,7 +436,7 @@ exports[`Function Runtime can be set at the function to nodejx18.x 2`] = `
436436
}
437437
`;
438438

439-
exports[`Function Runtime can be set at the function to nodejx20.x 1`] = `
439+
exports[`Function Runtime can be set at the function to nodejs22.x 1`] = `
440440
{
441441
"entryPoints": {
442442
"MyLambda": "./src/my-lambda/app",
@@ -475,7 +475,7 @@ exports[`Function Runtime can be set at the function to nodejx20.x 1`] = `
475475
"Properties": {
476476
"CodeUri": "MyLambda",
477477
"Handler": "app.handler",
478-
"Runtime": "nodejx20.x",
478+
"Runtime": "nodejs22.x",
479479
},
480480
"Type": "AWS::Serverless::Function",
481481
},
@@ -524,15 +524,15 @@ exports[`Function Runtime can be set global and at function 1`] = `
524524
"AWSTemplateFormatVersion": "2010-09-09",
525525
"Globals": {
526526
"Function": {
527-
"Runtime": "nodejx20.x",
527+
"Runtime": "nodejs20.x",
528528
},
529529
},
530530
"Resources": {
531531
"MyLambda": {
532532
"Properties": {
533533
"CodeUri": "MyLambda",
534534
"Handler": "app.handler",
535-
"Runtime": "nodejx18.x",
535+
"Runtime": "nodejs22.x",
536536
},
537537
"Type": "AWS::Serverless::Function",
538538
},
@@ -545,7 +545,7 @@ exports[`Function Runtime can be set global and at function 1`] = `
545545
}
546546
`;
547547

548-
exports[`Function Runtime can be set globally to nodejx18.x 1`] = `
548+
exports[`Function Runtime can be set globally to nodejs18.x 1`] = `
549549
{
550550
"entryPoints": {
551551
"MyLambda": "./src/my-lambda/app",
@@ -581,7 +581,7 @@ exports[`Function Runtime can be set globally to nodejx18.x 1`] = `
581581
"AWSTemplateFormatVersion": "2010-09-09",
582582
"Globals": {
583583
"Function": {
584-
"Runtime": "nodejx18.x",
584+
"Runtime": "nodejs18.x",
585585
},
586586
},
587587
"Resources": {
@@ -601,7 +601,7 @@ exports[`Function Runtime can be set globally to nodejx18.x 1`] = `
601601
}
602602
`;
603603

604-
exports[`Function Runtime can be set globally to nodejx18.x 2`] = `
604+
exports[`Function Runtime can be set globally to nodejs20.x 1`] = `
605605
{
606606
"entryPoints": {
607607
"MyLambda": "./src/my-lambda/app",
@@ -637,7 +637,7 @@ exports[`Function Runtime can be set globally to nodejx18.x 2`] = `
637637
"AWSTemplateFormatVersion": "2010-09-09",
638638
"Globals": {
639639
"Function": {
640-
"Runtime": "nodejx18.x",
640+
"Runtime": "nodejs20.x",
641641
},
642642
},
643643
"Resources": {
@@ -657,7 +657,7 @@ exports[`Function Runtime can be set globally to nodejx18.x 2`] = `
657657
}
658658
`;
659659

660-
exports[`Function Runtime can be set globally to nodejx20.x 1`] = `
660+
exports[`Function Runtime can be set globally to nodejs22.x 1`] = `
661661
{
662662
"entryPoints": {
663663
"MyLambda": "./src/my-lambda/app",
@@ -693,7 +693,7 @@ exports[`Function Runtime can be set globally to nodejx20.x 1`] = `
693693
"AWSTemplateFormatVersion": "2010-09-09",
694694
"Globals": {
695695
"Function": {
696-
"Runtime": "nodejx20.x",
696+
"Runtime": "nodejs22.x",
697697
},
698698
},
699699
"Resources": {
@@ -755,7 +755,7 @@ exports[`It ignores non AWS::Serverless::Function resosurces 1`] = `
755755
"Properties": {
756756
"CodeUri": "MyLambda",
757757
"Handler": "app.handler",
758-
"Runtime": "nodejx18.x",
758+
"Runtime": "nodejs22.x",
759759
},
760760
"Type": "AWS::Serverless::Function",
761761
},
@@ -804,7 +804,7 @@ exports[`JS output files uses outFile parameter 1`] = `
804804
"AWSTemplateFormatVersion": "2010-09-09",
805805
"Globals": {
806806
"Function": {
807-
"Runtime": "nodejx18.x",
807+
"Runtime": "nodejs22.x",
808808
},
809809
},
810810
"Resources": {
@@ -860,7 +860,7 @@ exports[`When the template is in a subfolder it should match the happy snapshot
860860
"AWSTemplateFormatVersion": "2010-09-09",
861861
"Globals": {
862862
"Function": {
863-
"Runtime": "nodejx18.x",
863+
"Runtime": "nodejs22.x",
864864
},
865865
},
866866
"Resources": {
@@ -916,15 +916,15 @@ exports[`can be set global and at function 1`] = `
916916
"AWSTemplateFormatVersion": "2010-09-09",
917917
"Globals": {
918918
"Function": {
919-
"Runtime": "nodejx20.x",
919+
"Runtime": "nodejs20.x",
920920
},
921921
},
922922
"Resources": {
923923
"MyLambda": {
924924
"Properties": {
925925
"CodeUri": "MyLambda",
926926
"Handler": "app.handler",
927-
"Runtime": "nodejx18.x",
927+
"Runtime": "nodejs22.x",
928928
},
929929
"Type": "AWS::Serverless::Function",
930930
},

src/__tests__/__snapshots__/integration.test.ts.snap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ exports[`Happy path with VS Code debugging disabled 1`] = `
1010
Transform: AWS::Serverless-2016-10-31
1111
Globals:
1212
Function:
13-
Runtime: nodejx18.x
13+
Runtime: nodejs22.x
1414
Resources:
1515
MyLambda:
1616
Type: AWS::Serverless::Function
@@ -32,7 +32,7 @@ exports[`Happy path with an output file specified 1`] = `
3232
Transform: AWS::Serverless-2016-10-31
3333
Globals:
3434
Function:
35-
Runtime: nodejx18.x
35+
Runtime: nodejs22.x
3636
Resources:
3737
MyLambda:
3838
Type: AWS::Serverless::Function
@@ -78,7 +78,7 @@ exports[`Happy path with default constructor works 1`] = `
7878
Transform: AWS::Serverless-2016-10-31
7979
Globals:
8080
Function:
81-
Runtime: nodejx18.x
81+
Runtime: nodejs22.x
8282
Resources:
8383
MyLambda:
8484
Type: AWS::Serverless::Function
@@ -124,7 +124,7 @@ exports[`Happy path with empty options in the constructor works 1`] = `
124124
Transform: AWS::Serverless-2016-10-31
125125
Globals:
126126
Function:
127-
Runtime: nodejx18.x
127+
Runtime: nodejs22.x
128128
Resources:
129129
MyLambda:
130130
Type: AWS::Serverless::Function
@@ -170,7 +170,7 @@ exports[`Happy path with empty options in the constructor works and an existing
170170
Transform: AWS::Serverless-2016-10-31
171171
Globals:
172172
Function:
173-
Runtime: nodejx18.x
173+
Runtime: nodejs22.x
174174
Resources:
175175
MyLambda:
176176
Type: AWS::Serverless::Function
@@ -260,7 +260,7 @@ exports[`Happy path with multiple projects and different template names works 1`
260260
Transform: AWS::Serverless-2016-10-31
261261
Globals:
262262
Function:
263-
Runtime: nodejx18.x
263+
Runtime: nodejs22.x
264264
Resources:
265265
MyLambda:
266266
Type: AWS::Serverless::Function
@@ -272,7 +272,7 @@ Resources:
272272
Transform: AWS::Serverless-2016-10-31
273273
Globals:
274274
Function:
275-
Runtime: nodejx18.x
275+
Runtime: nodejs22.x
276276
Resources:
277277
MyLambda:
278278
Type: AWS::Serverless::Function
@@ -338,7 +338,7 @@ exports[`Happy path with multiple projects works 1`] = `
338338
Transform: AWS::Serverless-2016-10-31
339339
Globals:
340340
Function:
341-
Runtime: nodejx18.x
341+
Runtime: nodejs22.x
342342
Resources:
343343
MyLambda:
344344
Type: AWS::Serverless::Function
@@ -350,7 +350,7 @@ Resources:
350350
Transform: AWS::Serverless-2016-10-31
351351
Globals:
352352
Function:
353-
Runtime: nodejx18.x
353+
Runtime: nodejs22.x
354354
Resources:
355355
MyLambda:
356356
Type: AWS::Serverless::Function

0 commit comments

Comments
 (0)