Skip to content

Commit f0ee0ca

Browse files
authored
Merge pull request #672 from DmitriyStoyanov/update-nodejs
Update Node.js to version 20.x
2 parents 4cda383 + 558a2a0 commit f0ee0ca

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

Diff for: Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ FROM ubuntu:22.04 as production
1818
ARG TIMEZONE=UTC
1919

2020
### UPDATE ###
21-
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
21+
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
2222
RUN apt update
2323

2424
### INSTALL APT-GET LIBS ###
@@ -68,4 +68,4 @@ RUN mv wptagent.py wptagent_starter.py
6868
COPY wptagent_debug.py wptagent.py
6969

7070
### SETTING PRODUCTION BUILD AS DEFAULT ###
71-
FROM production
71+
FROM production

Diff for: centos_install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ until python3 -m pip install --user -r .github/workflows/requirements.txt
2727
do
2828
sleep 1
2929
done
30-
curl --silent --location https://rpm.nodesource.com/setup_16.x | sudo bash -
30+
curl --silent --location https://rpm.nodesource.com/setup_20.x | sudo bash -
3131
until sudo yum -y install nodejs
3232
do
3333
sleep 1

Diff for: docs/install.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ wptagent currently supports Windows, Linux and OSX for desktop browsers as well
4747
## For lighthouse testing
4848
* NodeJS
4949
* Ubuntu/Debian:
50-
* ```curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -```
50+
* ```curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -```
5151
* ```sudo apt-get install -y nodejs```
5252
* The lighthouse npm module
5353
* ```sudo npm install -g lighthouse```

Diff for: ubuntu_install.sh

100755100644
+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ do
1313
done
1414

1515
# Prepare Node for install
16-
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
16+
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
1717

1818
# Install all of the binary dependencies
1919
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections

Diff for: wptagent.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -574,16 +574,16 @@ def startup(self, detected_browsers):
574574
except Exception:
575575
pass
576576

577-
# Check for Node 16+
578-
if self.get_node_version() < 16.0:
577+
# Check for Node 18+
578+
if self.get_node_version() < 18.0:
579579
if platform.system() == "Linux":
580580
# This only works on debian-based systems
581-
logging.debug('Updating Node.js to 16.x')
581+
logging.debug('Updating Node.js to 20.x')
582582
subprocess.call('sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates', shell=True)
583-
subprocess.call('curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -', shell=True)
583+
subprocess.call('curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -', shell=True)
584584
subprocess.call(['sudo', 'apt-get', 'install', '-y', 'nodejs'])
585-
if self.get_node_version() < 16.0:
586-
logging.warning("Node.js 16 or newer is required for Lighthouse testing")
585+
if self.get_node_version() < 18.0:
586+
logging.warning("Node.js 18 or newer is required for Lighthouse testing")
587587

588588
# Force lighthouse 11.4.0
589589
if self.get_lighthouse_version() != '11.4.0':

0 commit comments

Comments
 (0)