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

Upgrade Puppeteer to version 5.3.1 #12442

Merged
merged 1 commit into from
Oct 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 94 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"postcss-calc": "^7.0.4",
"postcss-css-variables": "^0.14.0",
"prettier": "^2.1.2",
"puppeteer": "~3.3.0",
"puppeteer": "^5.3.1",
"rimraf": "^2.7.1",
"streamqueue": "^1.1.2",
"stylelint": "^13.7.1",
Expand All @@ -64,7 +64,7 @@
"yargs": "^11.1.1"
},
"scripts": {
"postinstall": "node -e \"require('child_process').execSync('cross-env PUPPETEER_PRODUCT=firefox node node_modules/puppeteer/install.js');\"",
"postinstall": "cross-env PUPPETEER_PRODUCT=firefox node node_modules/puppeteer/install.js",
"test": "gulp npm-test"
},
"repository": {
Expand Down
11 changes: 3 additions & 8 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -769,11 +769,10 @@ function unitTestPostHandler(req, res) {
}

async function startBrowser(browserName, startUrl) {
const revisions = require("puppeteer/package.json").puppeteer;
const revisions = require("puppeteer/lib/cjs/puppeteer/revisions.js")
.PUPPETEER_REVISIONS;
const wantedRevision =
browserName === "chrome"
? revisions.chrome_revision
: revisions.firefox_revision;
browserName === "chrome" ? revisions.chromium : revisions.firefox;

// Remove other revisions than the one we want to use. Updating Puppeteer can
// cause a new revision to be used, and not removing older revisions causes
Expand All @@ -795,10 +794,6 @@ async function startBrowser(browserName, startUrl) {
product: browserName,
headless: false,
defaultViewport: null,
// Firefox must complete its execution before starting, mainly on Windows.
// Refer to https://github.com/puppeteer/puppeteer/issues/5376 and
// https://phabricator.services.mozilla.com/D6702.
args: browserName === "firefox" ? ["--wait-for-browser"] : [],
});
const pages = await browser.pages();
const page = pages[0];
Expand Down