Skip to content

Commit

Permalink
Updated node to 20.x
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyStoyanov committed Nov 19, 2024
1 parent 96d2885 commit 558a2a0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FROM ubuntu:22.04 as production
ARG TIMEZONE=UTC

### UPDATE ###
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt update

### INSTALL APT-GET LIBS ###
Expand Down
2 changes: 1 addition & 1 deletion centos_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ until python3 -m pip install --user -r .github/workflows/requirements.txt
do
sleep 1
done
curl --silent --location https://rpm.nodesource.com/setup_18.x | sudo bash -
curl --silent --location https://rpm.nodesource.com/setup_20.x | sudo bash -
until sudo yum -y install nodejs
do
sleep 1
Expand Down
2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ wptagent currently supports Windows, Linux and OSX for desktop browsers as well
## For lighthouse testing
* NodeJS
* Ubuntu/Debian:
* ```curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -```
* ```curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -```
* ```sudo apt-get install -y nodejs```
* The lighthouse npm module
* ```sudo npm install -g lighthouse```
Expand Down
2 changes: 1 addition & 1 deletion ubuntu_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ do
done

# Prepare Node for install
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -

# Install all of the binary dependencies
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
Expand Down
4 changes: 2 additions & 2 deletions wptagent.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,9 +578,9 @@ def startup(self, detected_browsers):
if self.get_node_version() < 18.0:
if platform.system() == "Linux":
# This only works on debian-based systems
logging.debug('Updating Node.js to 18.x')
logging.debug('Updating Node.js to 20.x')
subprocess.call('sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates', shell=True)
subprocess.call('curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -', shell=True)
subprocess.call('curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -', shell=True)
subprocess.call(['sudo', 'apt-get', 'install', '-y', 'nodejs'])
if self.get_node_version() < 18.0:
logging.warning("Node.js 18 or newer is required for Lighthouse testing")
Expand Down

0 comments on commit 558a2a0

Please sign in to comment.