From 84390d9a9dbddd882db1c3616a290c2318dfc284 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 9 Dec 2022 09:59:14 +0100 Subject: [PATCH] Upgrade to NodeJS 18 --- .circleci/config.yml | 22 +++++++++++++--------- .nvmrc | 2 +- Dockerfile | 2 +- README.md | 4 ++-- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 935a970a2..03ed25f94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,54 +1,58 @@ -version: 2 +version: 2.1 + +orbs: + browser-tools: circleci/browser-tools@1.4.0 references: test-steps: &test-steps - checkout - restore_cache: keys: - - v3-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "package.json" }} + - v4-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "package.json" }} + - browser-tools/install-browser-tools - run: npm install - run: npm run build - run: npm run ${BUILDTARGET} - run: npm run ${TESTTARGET} - save_cache: - key: v3-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "package.json" }} + key: v4-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "package.json" }} paths: - node_modules jobs: unittest: docker: - - image: circleci/node:16-browsers + - image: cimg/node:18.12-browsers steps: *test-steps environment: BUILDTARGET: build:unittests TESTTARGET: test:unit uitest-firefox: docker: - - image: circleci/node:16-browsers + - image: cimg/node:18.12-browsers steps: *test-steps environment: BUILDTARGET: build:uitests TESTTARGET: test:ui firefox uitest-chrome: docker: - - image: circleci/node:16-browsers + - image: cimg/node:18.12-browsers steps: *test-steps environment: BUILDTARGET: build:uitests TESTTARGET: test:ui chrome lint: docker: - - image: circleci/node:16-browsers + - image: cimg/node:18.12 steps: - checkout - restore_cache: keys: - - v3-dependencies-lint-node14-{{ arch }}-{{ checksum "package.json" }} + - v4-dependencies-lint-node14-{{ arch }}-{{ checksum "package.json" }} - run: npm install - run: npm run lint - save_cache: - key: v3-dependencies-lint-node14-{{ arch }}-{{ checksum "package.json" }} + key: v4-dependencies-lint-node14-{{ arch }}-{{ checksum "package.json" }} paths: - node_modules docker-build: diff --git a/.nvmrc b/.nvmrc index b6a7d89c6..3c032078a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 +18 diff --git a/Dockerfile b/Dockerfile index 3c942b4d7..c42e2b3d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ # First, build Threema Web in a node container -FROM docker.io/node:16 AS builder +FROM docker.io/node:18 AS builder ENV NODE_ENV=production COPY . /opt/threema-web/ diff --git a/README.md b/README.md index be65a51a5..5d80b85bc 100644 --- a/README.md +++ b/README.md @@ -65,11 +65,11 @@ is documented [here](https://threema-ch.github.io/app-remote-protocol/). Threema Web is written using [TypeScript](https://www.typescriptlang.org/) and [AngularJS 1](https://www.angularjs.org/). Dependencies are managed with -[npm](https://www.npmjs.com/). You currently need Node.js 16 to build Threema +[npm](https://www.npmjs.com/). You currently need Node.js 18 to build Threema Web. (Note that Node.js is only a build dependency, the result is plain old client-side JavaScript.) -If your default NodeJS version is not 16, use nvm to install it: +If your default NodeJS version is not 18, use nvm to install it: nvm install nvm use