diff --git a/.github/workflows/ci-frontend.yml b/.github/workflows/ci-frontend.yml index c177507ecb..f68b733ce6 100644 --- a/.github/workflows/ci-frontend.yml +++ b/.github/workflows/ci-frontend.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [16.13.2] + node: [16.15.1] steps: - uses: actions/checkout@v2 @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [16.13.2] + node: [16.15.1] steps: - uses: actions/checkout@v2 @@ -69,7 +69,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [16.13.2] + node: [16.15.1] steps: - uses: actions/checkout@v2 @@ -87,7 +87,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [16.13.2] + node: [16.15.1] steps: - uses: actions/checkout@v2 diff --git a/Dockerfile b/Dockerfile index 95e6339acf..ff82d4993a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,7 @@ RUN \ echo "version=$version" && \ go build -o remark42 -ldflags "-X main.revision=${version} -s -w" ./app -FROM --platform=$BUILDPLATFORM node:16.13.2-alpine as build-frontend-deps +FROM --platform=$BUILDPLATFORM node:16.15.1-alpine as build-frontend-deps ARG CI ARG SKIP_FRONTEND_BUILD @@ -52,7 +52,7 @@ RUN if [ -z "$SKIP_FRONTEND_BUILD" ] ; then \ echo "skip frontend build" \ ; fi -FROM --platform=$BUILDPLATFORM node:16.13.2-alpine as build-frontend +FROM --platform=$BUILDPLATFORM node:16.15.1-alpine as build-frontend ARG CI ARG SKIP_FRONTEND_TEST diff --git a/Dockerfile.artifacts b/Dockerfile.artifacts index dcac71933a..d7e60d406c 100644 --- a/Dockerfile.artifacts +++ b/Dockerfile.artifacts @@ -1,4 +1,4 @@ -FROM node:12.16-alpine as build-frontend-deps +FROM node:16.15.1-alpine as build-frontend-deps ARG CI @@ -9,7 +9,7 @@ ADD frontend/package.json /srv/frontend/package.json ADD frontend/package-lock.json /srv/frontend/package-lock.json RUN cd /srv/frontend && CI=true npm ci -FROM node:12.16-alpine as build-frontend +FROM node:16.15.1-alpine as build-frontend ARG CI ARG NODE_ENV=production diff --git a/frontend/.nvmrc b/frontend/.nvmrc new file mode 100644 index 0000000000..d9289897d3 --- /dev/null +++ b/frontend/.nvmrc @@ -0,0 +1 @@ +16.15.1 diff --git a/frontend/package.json b/frontend/package.json index 638ab0bc61..6e05d7b536 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -22,7 +22,7 @@ "translation:check": "node ./tasks/checkTranslation.js" }, "engines": { - "node": ">=16.13.0 <=17.*", + "node": ">=16.15 <=17.*", "npm": ">=8.1.0 <=8.*" }, "dependencies": { diff --git a/site/src/docs/contributing/development/frontend/index.md b/site/src/docs/contributing/development/frontend/index.md index 014f04ccfb..777565b553 100644 --- a/site/src/docs/contributing/development/frontend/index.md +++ b/site/src/docs/contributing/development/frontend/index.md @@ -8,8 +8,8 @@ title: Frontend Development Guidelines You must have at least 2GB RAM or swap enabled for building. -- install [Node.js 16.13.0](https://nodejs.org/en/) or higher -- install [NPM 8.1.0](https://www.npmjs.com/package/npm) +- install [Node.js 16.15](https://nodejs.org/en/) or higher (we recommend using [NVM](https://github.com/nvm-sh/nvm) for node version autoswitch) +- install [NPM 8.1](https://www.npmjs.com/package/npm) - run `npm install` inside `./frontend` Running `npm install` will set up pre-commit hooks into your git repository. They are used to reformat your frontend code using `prettier` and lint with `eslint` and `stylelint` before every commit.