Skip to content

Commit

Permalink
Merge pull request #1473 from cosmos/drop-node14
Browse files Browse the repository at this point in the history
Drop support for Node.js 14 and add support for Node.js 20
  • Loading branch information
webmaster128 authored Sep 20, 2023
2 parents 92a0c10 + b297e0f commit 1f97ee6
Show file tree
Hide file tree
Showing 78 changed files with 1,324 additions and 703 deletions.
65 changes: 53 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ workflows:
- build
matrix:
parameters:
node-version: ["14", "16", "18"]
node-version: ["16", "18", "20"]
- test-chrome:
requires:
- build
Expand Down Expand Up @@ -118,9 +118,11 @@ jobs:
mkdir -p ~/.local/share/Trash && mv "$NVM_DIR" ~/.npm ~/.local/share/Trash
- run:
name: Install nodejs
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow.
# Follow instructions of https://deb.nodesource.com/ except the last step. Then run
# `apt download --print-uris nodejs` to get a download URL.
command: |
wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.13.2-deb-1nodesource1_amd64.deb
wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_18.17.1-1nodesource1_amd64.deb
sudo dpkg -i "$HOME/nodejs.deb"
- run:
name: Install yarn
Expand All @@ -136,6 +138,14 @@ jobs:
command: |
wget -O "$HOME/libusb.deb" http://de.archive.ubuntu.com/ubuntu/pool/main/libu/libusb-1.0/libusb-1.0-0-dev_1.0.23-2build1_amd64.deb
sudo dpkg -i "$HOME/libusb.deb"
- run:
name: Install libudev-dev
# See https://packages.ubuntu.com/focal/libudev-dev (Ubuntu 20.04)
command: |
wget -O "$HOME/libudev1.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_245.4-4ubuntu3.20_amd64.deb
wget -O "$HOME/libudev-dev.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_245.4-4ubuntu3.20_amd64.deb
sudo dpkg -i "$HOME/libudev1.deb"
sudo dpkg -i "$HOME/libudev-dev.deb"
- run:
name: Install Dependencies
command: yarn install --immutable --immutable-cache --check-cache
Expand Down Expand Up @@ -242,12 +252,14 @@ jobs:
mkdir -p ~/.local/share/Trash && mv "$NVM_DIR" ~/.npm ~/.local/share/Trash
- run:
name: Install nodejs
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow.
# Follow instructions of https://deb.nodesource.com/ except the last step. Then run
# `apt download --print-uris nodejs` to get a download URL.
command: |
declare -A node_links=(
["14"]="https://deb.nodesource.com/node_14.x/pool/main/n/nodejs/nodejs_14.18.0-deb-1nodesource1_amd64.deb"
["16"]="https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.13.2-deb-1nodesource1_amd64.deb"
["18"]="https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_18.7.0-deb-1nodesource1_amd64.deb"
["16"]="https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.20.2-1nodesource1_amd64.deb"
["18"]="https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_18.17.1-1nodesource1_amd64.deb"
["20"]="https://deb.nodesource.com/node_20.x/pool/main/n/nodejs/nodejs_20.6.0-1nodesource1_amd64.deb"
)
wget -O "$HOME/nodejs.deb" "${node_links[<< parameters.node-version >>]}"
sudo dpkg -i "$HOME/nodejs.deb"
Expand All @@ -265,6 +277,14 @@ jobs:
command: |
wget -O "$HOME/libusb.deb" http://de.archive.ubuntu.com/ubuntu/pool/main/libu/libusb-1.0/libusb-1.0-0-dev_1.0.23-2build1_amd64.deb
sudo dpkg -i "$HOME/libusb.deb"
- run:
name: Install libudev-dev
# See https://packages.ubuntu.com/focal/libudev-dev (Ubuntu 20.04)
command: |
wget -O "$HOME/libudev1.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_245.4-4ubuntu3.20_amd64.deb
wget -O "$HOME/libudev-dev.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_245.4-4ubuntu3.20_amd64.deb
sudo dpkg -i "$HOME/libudev1.deb"
sudo dpkg -i "$HOME/libudev-dev.deb"
- run:
name: Install Dependencies
command: yarn install --immutable --immutable-cache --check-cache
Expand All @@ -286,7 +306,8 @@ jobs:
SOCKETSERVER_ENABLED: 1
SKIP_BUILD: 1
WASMD_ENABLED: 1
SES_ENABLED: 1
# Stopped working for Node.js 20. Maybe we need to upgrade the dependency or something.
# SES_ENABLED: 1
command: yarn test --stream
- run:
name: Run CLI selftest
Expand Down Expand Up @@ -365,9 +386,11 @@ jobs:
mkdir -p ~/.local/share/Trash && mv "$NVM_DIR" ~/.npm ~/.local/share/Trash
- run:
name: Install nodejs
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow.
# Follow instructions of https://deb.nodesource.com/ except the last step. Then run
# `apt download --print-uris nodejs` to get a download URL.
command: |
wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.13.2-deb-1nodesource1_amd64.deb
wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_18.17.1-1nodesource1_amd64.deb
sudo dpkg -i "$HOME/nodejs.deb"
- run:
name: Install yarn
Expand All @@ -383,6 +406,14 @@ jobs:
command: |
wget -O "$HOME/libusb.deb" http://de.archive.ubuntu.com/ubuntu/pool/main/libu/libusb-1.0/libusb-1.0-0-dev_1.0.23-2build1_amd64.deb
sudo dpkg -i "$HOME/libusb.deb"
- run:
name: Install libudev-dev
# See https://packages.ubuntu.com/focal/libudev-dev (Ubuntu 20.04)
command: |
wget -O "$HOME/libudev1.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_245.4-4ubuntu3.20_amd64.deb
wget -O "$HOME/libudev-dev.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_245.4-4ubuntu3.20_amd64.deb
sudo dpkg -i "$HOME/libudev1.deb"
sudo dpkg -i "$HOME/libudev-dev.deb"
- run:
name: Install Dependencies
command: yarn install --immutable --immutable-cache --check-cache
Expand Down Expand Up @@ -463,9 +494,11 @@ jobs:
mkdir -p ~/.local/share/Trash && mv "$NVM_DIR" ~/.npm ~/.local/share/Trash
- run:
name: Install nodejs
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow.
# Follow instructions of https://deb.nodesource.com/ except the last step. Then run
# `apt download --print-uris nodejs` to get a download URL.
command: |
wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.13.2-deb-1nodesource1_amd64.deb
wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_18.17.1-1nodesource1_amd64.deb
sudo dpkg -i "$HOME/nodejs.deb"
- run:
name: Install yarn
Expand All @@ -481,6 +514,14 @@ jobs:
command: |
wget -O "$HOME/libusb.deb" http://de.archive.ubuntu.com/ubuntu/pool/main/libu/libusb-1.0/libusb-1.0-0-dev_1.0.23-2build1_amd64.deb
sudo dpkg -i "$HOME/libusb.deb"
- run:
name: Install libudev-dev
# See https://packages.ubuntu.com/focal/libudev-dev (Ubuntu 20.04)
command: |
wget -O "$HOME/libudev1.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_245.4-4ubuntu3.20_amd64.deb
wget -O "$HOME/libudev-dev.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_245.4-4ubuntu3.20_amd64.deb
sudo dpkg -i "$HOME/libudev1.deb"
sudo dpkg -i "$HOME/libudev-dev.deb"
- run:
name: Install Dependencies
command: yarn install --immutable --immutable-cache --check-cache
Expand Down
Loading

0 comments on commit 1f97ee6

Please sign in to comment.