From 42bf24e9a4b2341104805b850e3edcd6cc07714e Mon Sep 17 00:00:00 2001
From: Benoit Lavenier <benoit.lavenier@e-is.pro>
Date: Wed, 7 Jun 2023 14:02:05 +0200
Subject: [PATCH] fix(1421): Upgrade to NodeJS 20, and Level 8 and
 abstract-level - close #1421

---
 .gitlab-ci.yml                  | 6 +++---
 doc/dev/setup_env_dev.md        | 4 ++--
 doc/use/manual_compilation.md   | 4 ++--
 neon/README.md                  | 8 ++++----
 release/arch/arm/build-arm.sh   | 2 +-
 release/arch/linux/build-lin.sh | 2 +-
 release/arch/windows/build.bat  | 4 ++--
 release/docker/Dockerfile       | 4 ++--
 8 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c9d176599..ec02586f9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,14 +22,14 @@ workflow:
       - server.ts
 
 .env: &env
-  image: registry.duniter.org/docker/duniter-ci:v0.0.4
+  image: registry.duniter.org/docker/duniter-ci:v0.2.0
   tags:
     - redshift
   before_script:
     - export NVM_DIR="$HOME/.nvm"
     - . "$NVM_DIR/nvm.sh"
-    - nvm install 10
-    - nvm use 10
+    - nvm install 20.2.0
+    - nvm use 20.2.0
     - export RUSTFLAGS="-D warnings"
 
 
diff --git a/doc/dev/setup_env_dev.md b/doc/dev/setup_env_dev.md
index 34815cd4d..4ef59d0e2 100644
--- a/doc/dev/setup_env_dev.md
+++ b/doc/dev/setup_env_dev.md
@@ -35,9 +35,9 @@ Nvm:
 
 Check the required node version in the `package.json` file on line 5.
 
-If, for example, version 10 is expected, install and select it with the following command:
+If, for example, version 20 is expected, install and select it with the following command:
 
-    nvm install 10 && nvm use 10
+    nvm install 20 && nvm use 20
 
 ### Build the project and play automated tests
 
diff --git a/doc/use/manual_compilation.md b/doc/use/manual_compilation.md
index e3be4c9aa..3c14c3d35 100644
--- a/doc/use/manual_compilation.md
+++ b/doc/use/manual_compilation.md
@@ -74,9 +74,9 @@ Go to the root of the folder where you extracted the source code (or possibly cl
 
 Check the required node version in the `package.json` file on line 5.
 
-If, for example, version 10 is expected, install and select it with the following command:
+If, for example, version 20 is expected, install and select it with the following command:
 
-    nvm install 10 && nvm use 10
+    nvm install 20 && nvm use 20
 
 ### Optionally add GUI
 
diff --git a/neon/README.md b/neon/README.md
index 8c2bf9e91..14bab656a 100644
--- a/neon/README.md
+++ b/neon/README.md
@@ -15,13 +15,13 @@ You'll need nvm and rust:
 - [nvm install instructions](https://github.com/nvm-sh/nvm#installing-and-updating)
 - [rust install instructions](https://www.rust-lang.org/learn/get-started)
 
-Once these tools are installed, use nvm to install node 10:
+Once these tools are installed, use nvm to install node 20:
 
-    nvm install 10
+    nvm install 20
 
 Finally, before each work session on Duniteroxide, select Node 10:
 
-    nvm use 10
+    nvm use 20
 
 ### Compile
 
@@ -31,7 +31,7 @@ Run the following command at the root of the repository:
 
     npm install
 
-### Test
+### Test
 
 Run the following command at the root of the repository:
 
diff --git a/release/arch/arm/build-arm.sh b/release/arch/arm/build-arm.sh
index e00eb0199..841e30483 100755
--- a/release/arch/arm/build-arm.sh
+++ b/release/arch/arm/build-arm.sh
@@ -6,7 +6,7 @@ export NVM_DIR="$HOME/.nvm"
 
 
 # Prepare
-NODE_VERSION=10.20.1
+NODE_VERSION=20.2.0
 ARCH="`uname -m | sed -e \"s/86_//\"`"
 NVER="v$NODE_VERSION"
 DUNITER_TAG=$1
diff --git a/release/arch/linux/build-lin.sh b/release/arch/linux/build-lin.sh
index 4078aad0b..b88e1bad8 100755
--- a/release/arch/linux/build-lin.sh
+++ b/release/arch/linux/build-lin.sh
@@ -79,7 +79,7 @@ build_deb_pack() {
 # Install tools needed to build
 # -----------------------------
 
-NODE_VERSION=10.20.1
+NODE_VERSION=20.2.0
 NVER="v${NODE_VERSION}"
 DUNITER_TAG="v${1}"
 DUNITER_DEB_VER=" ${1}"
diff --git a/release/arch/windows/build.bat b/release/arch/windows/build.bat
index 89b38404b..960d9a30b 100644
--- a/release/arch/windows/build.bat
+++ b/release/arch/windows/build.bat
@@ -1,7 +1,7 @@
 
 set ADDON_VERSION=64
-set NW_VERSION=0.33.1
-set NODEJS_VERSION=10.11.0
+set NW_VERSION=0.77.0
+set NODEJS_VERSION=20.2.0
 
 set NW_RELEASE=v%NW_VERSION%
 set NW=nwjs-%NW_RELEASE%-win-x64
diff --git a/release/docker/Dockerfile b/release/docker/Dockerfile
index f45486c75..3d947088a 100644
--- a/release/docker/Dockerfile
+++ b/release/docker/Dockerfile
@@ -2,7 +2,7 @@
 # Build Stage
 # ------------------------------------------------------------------------------
 
-FROM node:10-alpine as build
+FROM node:20-alpine as build
 
 LABEL maintainer="elois <elois@duniter.org>"
 LABEL version="0.1.0"
@@ -34,7 +34,7 @@ RUN PATH=${HOME}/.cargo/bin:${PATH} \
 # Final Stage
 # ------------------------------------------------------------------------------
 
-FROM node:10-alpine
+FROM node:20-alpine
 
 # create group and user duniter
 RUN addgroup -S -g 1111 duniter && \
-- 
GitLab