Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 47e07816 authored by Jean-François HOVINNE's avatar Jean-François HOVINNE
Browse files

feat: Add Node.js 22.x support (fixes #23)

parent f6442d87
No related branches found
Tags 2.4.0
1 merge request!23feat: Add Node.js 22.x support (fixes #23)
......@@ -22,15 +22,15 @@ Optionally, in order to install a specific version from a downloadable archive,
- `nodejs_checksum`: The archive checksum
- `nodejs_install_path`: The path where Node.js will be installed
About Node.js 18.x and 20.x on Amazon Linux 2
---------------------------------------------
About Node.js 18.x, 20.x and 22.x on Amazon Linux 2
---------------------------------------------------
Official Node.js 18.x and 20.x pre-built binaries cannot be used on Amazon Linux 2,
Official Node.js 18.x, 20.x and 22.x pre-built binaries cannot be used on Amazon Linux 2,
due to binary incompatibilities (missing glibc symbol versions).
AWS recommends to build those Node.js versions from source, when using Amazon Linux 2 (AL2).
Pre-built Node.js 18x and 20.x binaries for Amazon Linux 2 can be found at
Pre-built Node.js 18x, 20.x and 22.x binaries for Amazon Linux 2 can be found at
https://code.europa.eu/ecgalaxy/amazonlinux2-nodejs/-/packages
They are downloaded by this Ansible role (when executed on AL2),
......@@ -43,8 +43,8 @@ You may want to update your `$PATH` as well, pointing to the `/opt/nodejs/<nodej
Usage with `nvm` has been tested successfully; the command `nvm use system` will correctly point to the "global"
Node.js version (saved into `/opt/nodejs/<nodejs_version>`).
You can also execute this role to globally install 18.x and 20.x, then overwrite the contents of
`~/.nvm/versions/node/v<nodejs_version>` for both, which will allow switching from one version to another
You can also execute this role to globally install 18.x, 20.x and 22.x, then overwrite the contents of
`~/.nvm/versions/node/v<nodejs_version>` for each, which will allow switching from one version to another
with `nvm use`.
Dependencies
......
# Releases
## 2.4.x
- Node.js 22.x support added.
## 2.3.x
- Option to install a specific version from an archive added.
......
......@@ -9,8 +9,9 @@
vars:
nodejs_version: "{{ version }}"
loop:
- "20.x"
- "22.x"
- "18.x"
- "20.x"
loop_control:
loop_var: version
environment:
......
......@@ -11,6 +11,12 @@
nodejs_checksum: "sha256:730b4b8109e3bd68a014f48fe55221c871a309aab227ba083aa9c256d4b942a8"
when: nodejs_version_major | int == 20
- name: Set Node.js release
ansible.builtin.set_fact:
nodejs_release: "22.0.0"
nodejs_checksum: "sha256:8912f489c6c5be70db5fe0e66eea779575cf1a5bc6706fa0b7cb9c11354dc6a1"
when: nodejs_version_major | int == 22
- name: Set artifact download URL
ansible.builtin.set_fact:
nodejs_download_url: "https://code.europa.eu/api/v4/projects/569/packages/generic/amazonlinux2-nodejs/{{ nodejs_release }}/nodejs-v{{ nodejs_release }}.tar.gz"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment