diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a6d6e414..cd6d33178 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,10 +22,10 @@ jobs: fetch-depth: 0 token: ${{ secrets.SEEK_OSS_CI_GITHUB_TOKEN }} - - name: Set up Node.js 18.x + - name: Set up Node.js 20.x uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 20.x - name: Install dependencies run: yarn install --frozen-lockfile diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index faf4c48e8..9dad17840 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -17,10 +17,10 @@ jobs: fetch-depth: 0 token: ${{ secrets.SEEK_OSS_CI_GITHUB_TOKEN }} - - name: Set up Node.js 18.x + - name: Set up Node.js 20.x uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 20.x - name: Install dependencies run: yarn install --frozen-lockfile diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index bf136983e..3b4d54c7e 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -44,10 +44,10 @@ jobs: git config user.name seek-oss-ci git config user.email 34733141+seek-oss-ci@users.noreply.github.com - - name: Set up Node.js 18.x + - name: Set up Node.js 20.x uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 20.x - name: Install dependencies run: yarn install --frozen-lockfile @@ -85,10 +85,10 @@ jobs: - name: Check out repo uses: actions/checkout@v4 - - name: Set up Node.js 18.x + - name: Set up Node.js 20.x uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 20.x - if: github.head_ref != 'beta' && github.head_ref != 'changeset-release/master' && github.ref_name != 'beta' && github.ref_name != 'changeset-release/master' name: Test template diff --git a/.nvmrc b/.nvmrc index 3c032078a..209e3ef4b 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18 +20 diff --git a/src/cli/format.int.test.ts b/src/cli/format.int.test.ts index c49ee83d5..1a7da9911 100644 --- a/src/cli/format.int.test.ts +++ b/src/cli/format.int.test.ts @@ -100,6 +100,8 @@ beforeEach(() => { }); afterAll(() => { + process.exitCode = undefined; + // Restore the original working directory to avoid confusion in other tests. process.chdir(originalCwd); diff --git a/src/cli/lint.int.test.ts b/src/cli/lint.int.test.ts index c6ba9f39b..95b364200 100644 --- a/src/cli/lint.int.test.ts +++ b/src/cli/lint.int.test.ts @@ -84,6 +84,8 @@ beforeEach(() => { }); afterAll(() => { + process.exitCode = undefined; + // Restore the original working directory to avoid confusion in other tests. process.chdir(originalCwd); diff --git a/src/wrapper/main.test.ts b/src/wrapper/main.test.ts index 2fe4ebb51..0ac843551 100644 --- a/src/wrapper/main.test.ts +++ b/src/wrapper/main.test.ts @@ -172,7 +172,7 @@ test('syncFunctionHandler', async () => { { stack: expect.any(String) }, ` { - "message": "Unexpected token I in JSON at position 0", + "message": "Unexpected token 'I', "Invalid JSON" is not valid JSON", "name": "SyntaxError", "stack": Any, } diff --git a/template/lambda-sqs-worker/src/framework/validation.test.ts b/template/lambda-sqs-worker/src/framework/validation.test.ts index 5df6ee1e7..4b9c7bf74 100644 --- a/template/lambda-sqs-worker/src/framework/validation.test.ts +++ b/template/lambda-sqs-worker/src/framework/validation.test.ts @@ -78,7 +78,7 @@ describe('validateJson', () => { expect(() => validateJson(input, IdDescriptionSchema), ).toThrowErrorMatchingInlineSnapshot( - `"Unexpected token } in JSON at position 0"`, + `"Unexpected token '}', "}" is not valid JSON"`, ); }); });