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
9 changes: 3 additions & 6 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 @@ -25,12 +22,12 @@ task:
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 @@ -19,24 +19,24 @@ before_install:
- 'if [ "$FIREFOX" = "true" ]; then rm -rf $FIREFOX_HOME; mozdownload -t daily -d $FIREFOX_HOME/latest.tar.bz --log-level DEBUG; fi'
- 'if [ "$FIREFOX" = "true" ]; then cd $FIREFOX_HOME; tar -xvf latest.tar.bz; cd -; ls $FIREFOX_HOME/firefox/firefox; fi'
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 BINARY=$FIREFOX_HOME/firefox/firefox npm run funit; 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 Nightly (node8 + linux)"
- FLAKINESS_DASHBOARD_NAME="Travis Firefox Nightly (node10 + linux)"
- FLAKINESS_DASHBOARD_BUILD_URL="${TRAVIS_JOB_WEB_URL}"
- FIREFOX_HOME=$TRAVIS_HOME/firefox-latest
before_deploy: "npm run apply-next-version"
Expand All @@ -47,6 +47,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.1/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
@@ -1,6 +1,6 @@
FROM microsoft/windowsservercore:latest

ENV NODE_VERSION 8.11.3
ENV NODE_VERSION 10.18.1

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

Expand Down
17 changes: 0 additions & 17 deletions experimental/puppeteer-firefox/.ci/node6/Dockerfile.linux

This file was deleted.

17 changes: 0 additions & 17 deletions experimental/puppeteer-firefox/.ci/node8/Dockerfile.linux

This file was deleted.

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: 3 additions & 1 deletion lib/Launcher.js
Expand Up @@ -168,7 +168,9 @@ class BrowserRunner {
const transport = await WebSocketTransport.create(browserWSEndpoint);
this.connection = new Connection(browserWSEndpoint, transport, slowMo);
} else {
const transport = new PipeTransport(/** @type {!NodeJS.WritableStream} */(this.proc.stdio[3]), /** @type {!NodeJS.ReadableStream} */ (this.proc.stdio[4]));
// stdio was assigned during start(), and the 'pipe' option there adds the 4th and 5th items to stdio array
const { 3: pipeWrite, 4: pipeRead } = /** @type {!Array<any>} */ (this.proc.stdio);
const transport = new PipeTransport(/** @type {!NodeJS.WritableStream} */ pipeWrite, /** @type {!NodeJS.ReadableStream} */ pipeRead);
this.connection = new Connection('', transport, slowMo);
}
return this.connection;
Expand Down
6 changes: 3 additions & 3 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 All @@ -23,7 +23,7 @@
"tsc": "tsc -p .",
"apply-next-version": "node utils/apply_next_version.js",
"bundle": "npx browserify -r ./index.js:puppeteer -o utils/browser/puppeteer-web.js",
"test-types": "node utils/doclint/generate_types && npx -p typescript@2.1 tsc -p utils/doclint/generate_types/test/",
"test-types": "node utils/doclint/generate_types && npx -p typescript@3.2 tsc -p utils/doclint/generate_types/test/",
"unit-bundle": "node utils/browser/test.js"
},
"author": "The Chromium Authors",
Expand All @@ -44,7 +44,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