From 4901add5e67026709eaf5347c177da72d45018de Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Tue, 30 Jan 2024 15:22:41 -0500 Subject: [PATCH 1/2] upgrade node version to 21 --- .github/workflows/node-ci.yml | 4 ++-- .github/workflows/percy.yml | 8 ++++---- package.json | 5 ++++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 60d823d55..6e8d700fe 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -15,10 +15,10 @@ jobs: with: # This allows us to work with the repository during the lint step fetch-depth: 2 - - name: Use Node.js 16.x + - name: Use Node.js 21.x uses: actions/setup-node@v1 with: - node-version: 16.x + node-version: 21.x - name: Install npm packages using cache uses: bahmutov/npm-install@v1 - name: Lint code diff --git a/.github/workflows/percy.yml b/.github/workflows/percy.yml index 9684cb875..31330e8a0 100644 --- a/.github/workflows/percy.yml +++ b/.github/workflows/percy.yml @@ -15,10 +15,10 @@ jobs: with: # This allows us to work with the repository during the lint step fetch-depth: 2 - - name: Use Node.js 16.x + - name: Use Node.js 21.x uses: actions/setup-node@v1 with: - node-version: 16.x + node-version: 21.x - name: Install npm packages using cache uses: bahmutov/npm-install@v1 - name: Download OTP2 config file @@ -43,10 +43,10 @@ jobs: with: # This allows us to work with the repository during the lint step fetch-depth: 2 - - name: Use Node.js 16.x + - name: Use Node.js 21.x uses: actions/setup-node@v1 with: - node-version: 16.x + node-version: 21.x - name: Install npm packages using cache uses: bahmutov/npm-install@v1 - name: Download OTP2 config file diff --git a/package.json b/package.json index 1287d8e8a..b7435111e 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "test": "yarn run lint && yarn run typecheck && yarn check:i18n-en-fr && yarn run unit", "typecheck": "yarn tsc", "semantic-release": "semantic-release", - "start": "craco start", + "start": "NODE_OPTIONS=--openssl-legacy-provider craco start", "percy-serve": "serve", "percy-har-express": "har-express", "percy-combined-mock-server": "node ./percy/mock-server.js" @@ -24,6 +24,9 @@ "standard": { "parser": "babel-eslint" }, + "engines": { + "node": ">=16" + }, "repository": { "type": "git", "url": "https://github.com/opentripplanner/otp-react-redux.git" From 5ad0bd87d103f9fe894536118b0642bbd487b1cf Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Tue, 30 Jan 2024 15:25:09 -0500 Subject: [PATCH 2/2] use hack for build step --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b7435111e..2a669080a 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "main": "build/index.js", "scripts": { "a11y-test": "jest a11y/ --runInBand --force-exit", - "build": "craco build", + "build": "NODE_OPTIONS=--openssl-legacy-provider craco build", "check:i18n-en-fr": "node node_modules/@opentripplanner/scripts/lib/run-validate-i18n.js lib i18n/en-US.yml i18n/fr.yml", "unit": "jest __tests__/", "lint": "lint-staged",