From d1ca591d6b5b4a1f443f5eca46df430311f728ba Mon Sep 17 00:00:00 2001 From: Juho Leinonen Date: Mon, 16 Oct 2023 15:00:01 +0300 Subject: [PATCH 1/7] AE-1983: Update node.js to 20 in GitHub Actions --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 4334cc8..9e0ee1f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [16.x] + node-version: [20.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: From 028d127bbdc5cf42c8f2ae7a02191bc2d261bcd1 Mon Sep 17 00:00:00 2001 From: Juho Leinonen Date: Tue, 17 Oct 2023 15:54:49 +0300 Subject: [PATCH 2/7] AE-1983: Update node.js to 20 in nvmrc --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index 5692975..2edeafb 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16.19.1 \ No newline at end of file +20 \ No newline at end of file From 652fb87bbc30eec93852de57fdb10d7744cf3dbe Mon Sep 17 00:00:00 2001 From: Juho Leinonen Date: Wed, 18 Oct 2023 08:47:07 +0300 Subject: [PATCH 3/7] AE-1983: Split format to its own job in GitHub Actions --- .github/workflows/node.js.yml | 43 +++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9e0ee1f..f2f0ea0 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,24 +11,37 @@ on: jobs: build: - runs-on: ubuntu-latest - strategy: matrix: - node-version: [20.x] + node-version: [ 20.x ] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm run check-format + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm run check-format + format: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [ 20.x ] + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run check-format \ No newline at end of file From 527698b0646f91fad3efc25575ba6e38fe919d83 Mon Sep 17 00:00:00 2001 From: Juho Leinonen Date: Wed, 18 Oct 2023 11:51:14 +0300 Subject: [PATCH 4/7] AE-1983: Use --openssl-legacy-provider for build commands - Doesn't work without it at the moment and takes a nontrivial amount of work to fix --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d9d98ff..68d3ace 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "version": "0.0.1", "license": "EUPL v1.2", "scripts": { - "build": "cross-env NODE_ENV=production webpack", - "dev": "webpack-dev-server --content-base public", + "build": "cross-env NODE_OPTIONS=--openssl-legacy-provider NODE_ENV=production webpack", + "dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server --content-base public", "test": "mocha './src/**/*_test.js' --require @babel/register --reporter dot", "tdd": "mocha './src/**/*_test.js' --require @babel/register --reporter dot --watch", "format": "prettier --write src", From f61a78f8cd8aeb86ed036d1b86bfc74538f58cd1 Mon Sep 17 00:00:00 2001 From: Juho Leinonen Date: Wed, 18 Oct 2023 15:34:04 +0300 Subject: [PATCH 5/7] AE-1983: Enable matrix builds for node.js versions 18 and 20 --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f2f0ea0..1414265 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [ 20.x ] + node-version: [ 18.x, 20.x ] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - uses: actions/checkout@v2 @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [ 20.x ] + node-version: [ 18.x, 20.x ] steps: - uses: actions/checkout@v2 with: From 1a1581e3739affcfec34ad29dba2950621c63c6f Mon Sep 17 00:00:00 2001 From: Juho Leinonen Date: Wed, 18 Oct 2023 16:02:11 +0300 Subject: [PATCH 6/7] AE-1983: Downgrade nodejs to 18 in nvmrc - CodeBuild doesn't support 20 yet, so need to use older LTS for the time being --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index 2edeafb..25bf17f 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20 \ No newline at end of file +18 \ No newline at end of file From e10c4b190d34bb39c46bee229d89c6ce5f9acda7 Mon Sep 17 00:00:00 2001 From: Juho Leinonen Date: Wed, 18 Oct 2023 16:18:45 +0300 Subject: [PATCH 7/7] AE-1983: Update setup-node action --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 1414265..315d62c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,7 +21,7 @@ jobs: with: fetch-depth: 0 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: 'npm' @@ -39,7 +39,7 @@ jobs: with: fetch-depth: 0 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: 'npm'