From c524545b0d11137a49290fdd3b76bcc1daae9f95 Mon Sep 17 00:00:00 2001 From: Yadong Zhang Date: Sat, 28 May 2022 20:59:41 +0800 Subject: [PATCH] build: upgraded node version from 14 to 16. (#687) * build: upgraded node version from 14 to 16. * ci: fixed lighthout node version. --- .github/workflows/build-latest-ct.yml | 4 ++-- .github/workflows/create-update-pr-env.yml | 4 ++-- .github/workflows/lighthouse-ci.yml | 4 ++-- .github/workflows/qa.yml | 8 ++++---- .github/workflows/test.yml | 2 +- .nvmrc | 2 +- Dockerfile | 2 +- make.sh | 4 ++-- package.json | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-latest-ct.yml b/.github/workflows/build-latest-ct.yml index b1522527..4669067f 100644 --- a/.github/workflows/build-latest-ct.yml +++ b/.github/workflows/build-latest-ct.yml @@ -15,10 +15,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v1 - - name: Setup NodeJS 14 + - name: Setup NodeJS 16 uses: actions/setup-node@v1 with: - node-version: 14 + node-version: 16 - name: check dependencies run: yarn - name: Set up Docker Buildx diff --git a/.github/workflows/create-update-pr-env.yml b/.github/workflows/create-update-pr-env.yml index e503d88d..6c4f00c1 100644 --- a/.github/workflows/create-update-pr-env.yml +++ b/.github/workflows/create-update-pr-env.yml @@ -35,10 +35,10 @@ jobs: with: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} - - name: Setup NodeJS 14 + - name: Setup NodeJS 16 uses: actions/setup-node@v1 with: - node-version: 14 + node-version: 16 - name: check dependencies run: | diff --git a/.github/workflows/lighthouse-ci.yml b/.github/workflows/lighthouse-ci.yml index 2912e189..364b97f2 100644 --- a/.github/workflows/lighthouse-ci.yml +++ b/.github/workflows/lighthouse-ci.yml @@ -17,10 +17,10 @@ jobs: with: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} - - name: Setup NodeJS 14 + - name: Setup NodeJS 16 uses: actions/setup-node@v2 with: - node-version: '14' + node-version: 16 - run: yarn install && npm install -g @lhci/cli@0.8.x - run: yarn build - name: run lighthouse action diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index bf94654f..416e5575 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -28,10 +28,10 @@ jobs: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} - - name: Setup NodeJS 14 + - name: Setup NodeJS 16 uses: actions/setup-node@v1 with: - node-version: 14 + node-version: 16 - name: Upgrade to latest npm version run: npm install -g npm@^8.5.3 @@ -66,10 +66,10 @@ jobs: - uses: actions/checkout@v2 with: ref: 'qa' - - name: Setup NodeJS 14 + - name: Setup NodeJS 16 uses: actions/setup-node@v1 with: - node-version: 14 + node-version: 16 - name: build run: yarn install && yarn build - name: Deploy using fleek diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe1f6bb6..77d9c418 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v2 with: - node-version: 14 + node-version: 16 - run: | yarn install - name: Run tests diff --git a/.nvmrc b/.nvmrc index 8351c193..b6a7d89c 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14 +16 diff --git a/Dockerfile b/Dockerfile index e1a9ea88..ed2a63c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14-alpine +FROM node:16-alpine # create directory RUN mkdir /opt/ricochet-frontend/ diff --git a/make.sh b/make.sh index f916b8b2..f45c3794 100755 --- a/make.sh +++ b/make.sh @@ -175,8 +175,8 @@ dev() { export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" cd "$dir/site" - nvm install 14 - nvm use 14 + nvm install 16 + nvm use 16 yarn && yarn start } diff --git a/package.json b/package.json index 5216b8a4..570fc616 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "prettier:check": "prettier --config .prettierrc --check \"src/**/*.{ts,css,html}\"" }, "engines": { - "node": "14" + "node": "16" }, "eslintConfig": { "extends": "react-app"