From e72d010e015c0d9d17cc9cab65548f09873110db Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 17:30:17 +1100 Subject: [PATCH] deps: node 20 (#1302) * deps: node 20 * bump to node 20.x * update expect * fix snapshot * fix exitCode * fix 2 electric boogaloo --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Sam Chung --- .github/workflows/release.yml | 4 ++-- .github/workflows/snapshot.yml | 4 ++-- .github/workflows/validate.yml | 8 ++++---- .nvmrc | 2 +- src/cli/format.int.test.ts | 2 ++ src/cli/lint.int.test.ts | 2 ++ src/wrapper/main.test.ts | 2 +- .../lambda-sqs-worker/src/framework/validation.test.ts | 2 +- 8 files changed, 15 insertions(+), 11 deletions(-) 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"`, ); }); });