From 95def23e22870d266d0078d9bacd775df6777d01 Mon Sep 17 00:00:00 2001 From: Jan Fooken Date: Mon, 1 Jul 2024 17:20:04 +0200 Subject: [PATCH] Upgrade Node.js to version 20.14.0 LTS (#2660) * Upgrade Node.js to version 20.14.0 LTS This commit upgrade the Node.js version to 20.14.0. I am running this for several weeks on my MacBook Air M2 and it works without any problems. This will allow us to upgrade Sotorybook and ESLint, once all our ESLint plugins are compatible with ESLint 9. * Update Node.js in GitHub CI This brings the CI up to the same version used in the development and release environment. * Update npm for the trento-web RPM This commit replaces the npm version for the RPM, to use node v20's version of npm. --- .github/workflows/ci.yaml | 2 +- .github/workflows/e2e.yaml | 2 +- .tool-versions | 2 +- Dockerfile | 2 +- guides/development/hack_on_the_trento.md | 2 +- packaging/suse/container/Dockerfile | 2 +- packaging/suse/rpm/trento-web.spec | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 98d79fee39..5d8bd8ade6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,7 +13,7 @@ on: env: MIX_ENV: test - NODE_VERSION: "16" + NODE_VERSION: "20" MANTAINERS: '["cdimonaco", "dottorblaster", "janvhs", "rtorrero", "nelsonkopliku", "arbulu89","jagabomb","emaksy","jamie-suse"]' RG_TEST_LABEL: regression diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 058dc3846f..9defd8d31d 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -33,7 +33,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: "16" + node-version: "20" cache: "npm" cache-dependency-path: test/e2e/package-lock.json - name: Checkout terraform repo diff --git a/.tool-versions b/.tool-versions index 7177d16f90..cea8256c59 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,3 @@ elixir 1.15.7-otp-26 erlang 26.2.1 -nodejs 16.16.0 +nodejs 20.14.0 diff --git a/Dockerfile b/Dockerfile index 912d062364..e5cbec621b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ ARG MIX_ENV=prod ENV MIX_ENV=$MIX_ENV RUN mix deps.get -FROM registry.suse.com/bci/nodejs:16 AS assets-build +FROM registry.suse.com/bci/nodejs:20 AS assets-build COPY --from=elixir-build /build /build WORKDIR /build/assets RUN npm install diff --git a/guides/development/hack_on_the_trento.md b/guides/development/hack_on_the_trento.md index f2f4ec7e3f..024936a235 100644 --- a/guides/development/hack_on_the_trento.md +++ b/guides/development/hack_on_the_trento.md @@ -6,7 +6,7 @@ In order to run the Trento Web application, the following software must be insta 1. [Elixir](https://elixir-lang.org/) - 1.15.7 preferred 2. [Erlang OTP](https://www.erlang.org/) - 26.1.2 preferred -3. [Node.js](https://nodejs.org/en/) - 16.16.0 preferred +3. [Node.js](https://nodejs.org/en/) - 20.14.0 preferred 4. [Docker](https://docs.docker.com/get-docker/) 5. [Docker Compose](https://docs.docker.com/compose/install/) diff --git a/packaging/suse/container/Dockerfile b/packaging/suse/container/Dockerfile index 0bb6ebab6a..1299f09487 100644 --- a/packaging/suse/container/Dockerfile +++ b/packaging/suse/container/Dockerfile @@ -5,7 +5,7 @@ #!UseOBSRepositories #!ExclusiveArch: x86_64 -FROM bci/nodejs:16 AS assets-build +FROM bci/nodejs:20 AS assets-build ADD web.tar.gz /build/ WORKDIR /build/web/assets RUN npm run tailwind:build diff --git a/packaging/suse/rpm/trento-web.spec b/packaging/suse/rpm/trento-web.spec index d6d70f1ebc..706e2d880a 100644 --- a/packaging/suse/rpm/trento-web.spec +++ b/packaging/suse/rpm/trento-web.spec @@ -28,7 +28,7 @@ Source2: package-lock.json Source3: node_modules.spec.inc %include %{_sourcedir}/node_modules.spec.inc Group: System/Monitoring -BuildRequires: elixir >= 1.15, elixir-hex, npm16, erlang-rebar3, git-core, local-npm-registry, make, gcc +BuildRequires: elixir >= 1.15, elixir-hex, npm20, erlang-rebar3, git-core, local-npm-registry, make, gcc %description Trento is an open cloud-native web application for SAP Applications administrators. @@ -83,4 +83,4 @@ install -D -m 0600 packaging/suse/rpm/systemd/trento-web.example %{buildroot}/et %license LICENSE %doc README.md guides -%changelog \ No newline at end of file +%changelog