Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: drop Node.js v8 support #5365

Merged
merged 10 commits into from Mar 10, 2020
6 changes: 3 additions & 3 deletions .appveyor.yml
@@ -1,7 +1,7 @@
environment:
matrix:
- nodejs_version: "8.16.0"
FLAKINESS_DASHBOARD_NAME: Appveyor Chromium (Win + node8)
- nodejs_version: "10.18.1"
FLAKINESS_DASHBOARD_NAME: Appveyor Chromium (Win + node10)
FLAKINESS_DASHBOARD_PASSWORD:
secure: g66jP+j6C+hkXLutBV9fdxB5fRJgcQQzy93SgQzXUmcCl/RjkJwnzyHvX0xfCVnv

Expand All @@ -11,7 +11,7 @@ install:
- ps: $env:FLAKINESS_DASHBOARD_BUILD_URL="https://ci.appveyor.com/project/aslushnikov/puppeteer/builds/$env:APPVEYOR_BUILD_ID/job/$env:APPVEYOR_JOB_ID"
- ps: Install-Product node $env:nodejs_version
- npm install
- if "%nodejs_version%" == "8.16.0" (
- if "%nodejs_version%" == "10.18.1" (
npm run lint &&
npm run coverage &&
npm run test-doclint &&
Expand Down
13 changes: 5 additions & 8 deletions .cirrus.yml
Expand Up @@ -6,9 +6,6 @@ env:

task:
matrix:
- name: Chromium (node8 + linux)
container:
dockerfile: .ci/node8/Dockerfile.linux
- name: Chromium (node10 + linux)
container:
dockerfile: .ci/node10/Dockerfile.linux
Expand All @@ -24,22 +21,22 @@ task:

task:
matrix:
- name: Firefox Juggler (node8 + linux)
- name: Firefox Juggler (node10 + linux)
container:
dockerfile: .ci/node8/Dockerfile.linux
dockerfile: .ci/node10/Dockerfile.linux
xvfb_start_background_script: Xvfb :99 -ac -screen 0 1024x768x24
install_script: npm install --unsafe-perm && cd experimental/puppeteer-firefox && npm install --unsafe-perm
test_script: npm run fjunit

task:
osx_instance:
image: high-sierra-base
name: Chromium (node8 + macOS)
name: Chromium (node10 + macOS)
env:
HOMEBREW_NO_AUTO_UPDATE: 1
node_install_script:
- brew install node@8
- brew link --force node@8
- brew install node@10
- brew link --force node@10
install_script: npm install --unsafe-perm
lint_script: npm run lint
coverage_script: npm run coverage
Expand Down
24 changes: 12 additions & 12 deletions .travis.yml
Expand Up @@ -16,25 +16,25 @@ before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
script:
- 'if [ "$NODE8" = "true" ]; then npm run lint; fi'
- 'if [ "$NODE8" = "true" ]; then npm run coverage; fi'
- 'if [ "$NODE10" = "true" ]; then npm run lint; fi'
- 'if [ "$NODE10" = "true" ]; then npm run coverage; fi'
- 'if [ "$FIREFOX" = "true" ]; then cd experimental/puppeteer-firefox && npm i && cd ../..; fi'
- 'if [ "$FIREFOX" = "true" ]; then npm run fjunit; fi'
- 'if [ "$NODE8" = "true" ]; then npm run test-doclint; fi'
- 'if [ "$NODE8" = "true" ]; then npm run test-types; fi'
- 'if [ "$NODE8" = "true" ]; then npm run bundle; fi'
- 'if [ "$NODE8" = "true" ]; then npm run unit-bundle; fi'
- 'if [ "$NODE10" = "true" ]; then npm run test-doclint; fi'
- 'if [ "$NODE10" = "true" ]; then npm run test-types; fi'
- 'if [ "$NODE10" = "true" ]; then npm run bundle; fi'
- 'if [ "$NODE10" = "true" ]; then npm run unit-bundle; fi'
jobs:
include:
- node_js: "8.16.0"
- node_js: "10.18.1"
env:
- NODE8=true
- FLAKINESS_DASHBOARD_NAME="Travis Chromium (node8 + linux)"
- NODE10=true
- FLAKINESS_DASHBOARD_NAME="Travis Chromium (node10 + linux)"
- FLAKINESS_DASHBOARD_BUILD_URL="${TRAVIS_JOB_WEB_URL}"
- node_js: "8.16.0"
- node_js: "10.18.1"
env:
- FIREFOX=true
- FLAKINESS_DASHBOARD_NAME="Travis Firefox (node8 + linux)"
- FLAKINESS_DASHBOARD_NAME="Travis Firefox (node10 + linux)"
- FLAKINESS_DASHBOARD_BUILD_URL="${TRAVIS_JOB_WEB_URL}"
before_deploy: "npm run apply-next-version"
deploy:
Expand All @@ -44,6 +44,6 @@ deploy:
secure: Ng8o2KwJf90XCBNgUKK3jRZnwtdBSJatjYNmZBERJEqBWFTadFAp1NdhxZaqjnuG8aFYaH5bRJdL+EQBYUksVCbrv/gcaXeEFkwsfPfVX1QXGqu7NnZmtme2hbxppLQ7dEJ8hz2Z9K4vehqVOxmLabxvoupOumxEQMLCphVHh2FOmsm/S5JrRZqZ4V9k76eIc0/PiyfXNMdx5WTZjHbIRDIHRy9nqOXjFp2Rx3PMa3uU2fS8mTshYEYs151TA6e6VdHjqmBwEQC/M5tXbDlLCMNUr4JBtLTcL4OipNYjzkwD1N2xYlbSRqtvqqF4ifdvFhoI65a31GinlMC7Z/SH1Zy+d+/z3Mo7D63eYcsJVnsg9OYxTFy2piUntr0JqTBHtQoe/CvGxJmkcVt+H6YSkcBibSG9s9tG3qpAD5wBCFqqOYnfClX+YZziEd+Hngd9inxAf87qdvgVIZ5tPD2dygtE+te2/qoEHtvccv/HuS8MxNj5iKwlP7JaBPM6uAkazYqZP2R99I2ph9gNOEVuQLtk+3+OIdb8HWrEKUrJBgKhdKY1dvcKYElI+D8NRlyzrr6BnZfudACuAt2EtfKpfJ3mL+iRMFdBJ3ntLt93xBrB+j4z3pD0iWZcg1g3I742PFzQEHzyd/DDTP1yRTUoJeQWwoQRJyNO1m6Qk4wx77c=
on:
branch: master
condition: "$NODE8 = true"
condition: "$NODE10 = true"
skip_cleanup: true
tag: next
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -59,8 +59,8 @@ See [puppeteer vs puppeteer-core](https://github.com/puppeteer/puppeteer/blob/ma

Puppeteer follows the latest [maintenance LTS](https://github.com/nodejs/Release#release-schedule) version of Node.

Note: Prior to v1.18.1, Puppeteer required at least Node v6.4.0. All subsequent versions rely on
Node 8.9.0+. All examples below use async/await which is only supported in Node v7.6.0 or greater.
Note: Prior to v1.18.1, Puppeteer required at least Node v6.4.0. Versions from v1.18.1 to v2.1.0 rely on
Node 8.9.0+. Starting from v3.0.0 Puppeteer starts to rely on Node 10.18.1+. All examples below use async/await which is only supported in Node v7.6.0 or greater.

Puppeteer will be familiar to people using other browser testing frameworks. You create an instance
of `Browser`, open pages, and then manipulate them with [Puppeteer's API](https://github.com/puppeteer/puppeteer/blob/v2.1.0/docs/api.md#).
Expand Down
6 changes: 3 additions & 3 deletions docs/troubleshooting.md
Expand Up @@ -249,7 +249,7 @@ Running Puppeteer smoothly on CircleCI requires the following steps:

## Running Puppeteer in Docker

> 👋 We use [Cirrus Ci](https://cirrus-ci.org/) to run our tests for Puppeteer in a Docker container - see our [`Dockerfile.linux`](https://github.com/puppeteer/puppeteer/blob/master/.ci/node8/Dockerfile.linux) for reference.
> 👋 We use [Cirrus Ci](https://cirrus-ci.org/) to run our tests for Puppeteer in a Docker container - see our [`Dockerfile.linux`](https://github.com/puppeteer/puppeteer/blob/master/.ci/node10/Dockerfile.linux) for reference.

Getting headless Chrome up and running in Docker can be tricky.
The bundled Chromium that Puppeteer installs is missing the necessary
Expand Down Expand Up @@ -398,9 +398,9 @@ To use `puppeteer`, simply list the module as a dependency in your `package.json

### Running Puppeteer on Google Cloud Functions

The Node.js 8 runtime of [Google Cloud Functions](https://cloud.google.com/functions/docs/) comes with all system packages needed to run Headless Chrome.
The Node.js 10 runtime of [Google Cloud Functions](https://cloud.google.com/functions/docs/) comes with all system packages needed to run Headless Chrome.

To use `puppeteer`, simply list the module as a dependency in your `package.json` and deploy your function to Google Cloud Functions using the `nodejs8` runtime.
To use `puppeteer`, simply list the module as a dependency in your `package.json` and deploy your function to Google Cloud Functions using the `nodejs10` runtime.

### Running Puppeteer on Heroku

Expand Down
@@ -1,4 +1,4 @@
FROM node:8.11.3
FROM node:10.18.1-stretch

RUN apt-get update && \
apt-get -y install xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \
Expand Down
11 changes: 11 additions & 0 deletions experimental/puppeteer-firefox/.ci/node10/Dockerfile.windows
@@ -0,0 +1,11 @@
FROM microsoft/windowsservercore:latest

ENV NODE_VERSION 10.18.1

RUN setx /m PATH "%PATH%;C:\nodejs"

RUN powershell -Command \
netsh interface ipv4 set subinterface 18 mtu=1460 store=persistent ; \
Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
Expand-Archive node.zip -DestinationPath C:\ ; \
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'
hanselfmu marked this conversation as resolved.
Show resolved Hide resolved
14 changes: 7 additions & 7 deletions experimental/puppeteer-firefox/.cirrus.yml
Expand Up @@ -2,30 +2,30 @@ env:
DISPLAY: :99.0

task:
name: node8 (linux)
name: node10 (linux)
container:
dockerfile: .ci/node8/Dockerfile.linux
dockerfile: .ci/node10/Dockerfile.linux
xvfb_start_background_script: Xvfb :99 -ac -screen 0 1024x768x24
install_script: npm install
test_script: npm run fjunit

task:
name: node8 (macOS)
name: node10 (macOS)
osx_instance:
image: high-sierra-base
env:
HOMEBREW_NO_AUTO_UPDATE: 1
node_install_script:
- brew install node@8
- brew link --force node@8
- brew install node@10
- brew link --force node@10
install_script: npm install
test_script: npm run fjunit

# task:
# allow_failures: true
# windows_container:
# dockerfile: .ci/node8/Dockerfile.windows
# dockerfile: .ci/node10/Dockerfile.windows
# os_version: 2016
# name: node8 (windows)
# name: node10 (windows)
# install_script: npm install --unsafe-perm
# test_script: npm run fjunit
2 changes: 1 addition & 1 deletion experimental/puppeteer-firefox/package.json
Expand Up @@ -6,7 +6,7 @@
"repository": "github:puppeteer/puppeteer",
"homepage": "https://github.com/puppeteer/puppeteer/tree/master/experimental/puppeteer-firefox",
"engines": {
"node": ">=8.9.4"
"node": ">=10.18.1"
},
"puppeteer": {
"firefox_revision": "v0.0.1"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"repository": "github:puppeteer/puppeteer",
"engines": {
"node": ">=8.16.0"
"node": ">=10.18.1"
},
"puppeteer": {
"chromium_revision": "722234"
Expand Down Expand Up @@ -45,7 +45,7 @@
"@types/debug": "0.0.31",
"@types/extract-zip": "^1.6.2",
"@types/mime": "^2.0.0",
"@types/node": "^8.10.34",
"@types/node": "^10.17.14",
"@types/rimraf": "^2.0.2",
"@types/ws": "^6.0.1",
"commonmark": "^0.28.1",
Expand Down