Skip to content

Commit 7e6225c

Browse files
committed
address review feedback from @AlexHladin
- Bump actions/checkout and actions/setup-node to v6 (latest stable) in both the tests and e2e jobs of .github/workflows/ci.yml - Bump all example runtimes from nodejs20.x to nodejs22.x. Node 20 reached EOL on April 30 2026; Lambda console removed it then and function updates will be blocked from Sep 30 2026. Examples should reflect the current recommended runtime so users copying them get a supported runtime by default. - Export AuthenticationType union from src/types/common.ts (derived from the existing Auth discriminated union via Auth['type']) and use it in e2e/helpers/assertions.ts instead of duplicating the literal string union. Keeps the e2e helper and the source of truth in sync automatically if a new auth type is ever added. Re: 'why Node 22 for the e2e job and not the full 20/22/24/26 matrix?' The CFN output produced by serverless package is identical across Node versions (no Node-specific code paths in synthesis). The existing unit-test matrix already verifies plugin logic across all four Node versions; running the synthesis tests across the same matrix would 4x CI minutes for zero added signal. 22 specifically matches what the Release workflow uses, keeping CI consistent.
1 parent e77ddf0 commit 7e6225c

28 files changed

Lines changed: 33 additions & 35 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
matrix:
1818
node: [20, 22, 24, 26]
1919
steps:
20-
- uses: actions/setup-node@v5
20+
- uses: actions/setup-node@v6
2121
with:
2222
node-version: ${{ matrix.node }}
2323
- name: Checkout code
24-
uses: actions/checkout@v5
24+
uses: actions/checkout@v6
2525
- name: Install dependencies
2626
run: npm ci
2727
- name: Lint
@@ -49,8 +49,8 @@ jobs:
4949
needs: tests
5050
steps:
5151
- name: Checkout code
52-
uses: actions/checkout@v5
53-
- uses: actions/setup-node@v5
52+
uses: actions/checkout@v6
53+
- uses: actions/setup-node@v6
5454
with:
5555
node-version: 22
5656
- name: Install dependencies

e2e/helpers/assertions.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { CfnResource, CfnTemplate } from './synthesize';
2+
import type { AuthenticationType } from '../../src/types/common';
23

34
/**
45
* Find all resources of a given CloudFormation type.
@@ -96,12 +97,7 @@ function matchesProperties(actual: unknown, expected: unknown): boolean {
9697
*/
9798
export function expectAuthenticationType(
9899
template: CfnTemplate,
99-
type:
100-
| 'API_KEY'
101-
| 'AWS_IAM'
102-
| 'AMAZON_COGNITO_USER_POOLS'
103-
| 'OPENID_CONNECT'
104-
| 'AWS_LAMBDA',
100+
type: AuthenticationType,
105101
): void {
106102
const { resource } = findOneResourceByType(
107103
template,

examples/api-keys-multiple/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ service: appsync-api-keys-multiple
22

33
provider:
44
name: aws
5-
runtime: nodejs20.x
5+
runtime: nodejs22.x
66

77
plugins:
88
- serverless-appsync-plugin

examples/basic-api-key/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ service: appsync-basic-api-key
22

33
provider:
44
name: aws
5-
runtime: nodejs20.x
5+
runtime: nodejs22.x
66

77
plugins:
88
- serverless-appsync-plugin

examples/caching/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ service: appsync-caching
22

33
provider:
44
name: aws
5-
runtime: nodejs20.x
5+
runtime: nodejs22.x
66

77
plugins:
88
- serverless-appsync-plugin

examples/cognito-userpools/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ service: appsync-cognito-userpools
22

33
provider:
44
name: aws
5-
runtime: nodejs20.x
5+
runtime: nodejs22.x
66

77
plugins:
88
- serverless-appsync-plugin

examples/custom-domain/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ service: appsync-custom-domain
22

33
provider:
44
name: aws
5-
runtime: nodejs20.x
5+
runtime: nodejs22.x
66

77
plugins:
88
- serverless-appsync-plugin

examples/datasource-eventbridge/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ service: appsync-datasource-eventbridge
22

33
provider:
44
name: aws
5-
runtime: nodejs20.x
5+
runtime: nodejs22.x
66

77
plugins:
88
- serverless-appsync-plugin

examples/datasource-http/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ service: appsync-datasource-http
22

33
provider:
44
name: aws
5-
runtime: nodejs20.x
5+
runtime: nodejs22.x
66

77
plugins:
88
- serverless-appsync-plugin

examples/datasource-none/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ service: appsync-datasource-none
22

33
provider:
44
name: aws
5-
runtime: nodejs20.x
5+
runtime: nodejs22.x
66

77
plugins:
88
- serverless-appsync-plugin

0 commit comments

Comments
 (0)