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(dep): upgrade to puppeteer 13.1.2 #740

Merged
merged 26 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from 7 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ dist/
node_modules/
.idea
storybook-static
__diff_output__
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"@types/morgan": "^1.7.35",
"@types/node": "^11.13.2",
"@types/plotly.js": "^1.44.9",
"@types/puppeteer": "^1.19.0",
"@types/sequelize": "^4.27.34",
"@types/tmp": "^0.1.0",
"@types/umzug": "^2.2.2",
Expand Down Expand Up @@ -81,7 +80,7 @@
"preact-render-to-json": "^3.6.6",
"prettier": "1.16.4",
"prop-types": "^15.7.2",
"puppeteer": "^1.18.1",
"puppeteer": "^13.0.1",
connorjclark marked this conversation as resolved.
Show resolved Hide resolved
"rimraf": "^3.0.2",
"sqlite3": "^5.0.0",
"typescript": "^4.5.4"
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/collect/puppeteer-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ class PuppeteerManager {

// Otherwise, check to see if the expected puppeteer download exists.
const puppeteer = PuppeteerManager._requirePuppeteer();
const chromiumPath = puppeteer && puppeteer.executablePath();
const puppeteerUnknown = /** @type {unknown} */ (puppeteer);
const pupppeteerNode = /** @type {import('puppeteer').PuppeteerNode | undefined} */ (puppeteerUnknown);
const chromiumPath = pupppeteerNode && pupppeteerNode.executablePath();
return chromiumPath && fs.existsSync(chromiumPath) ? chromiumPath : undefined;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/test/collect-puppeteer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('Lighthouse CI collect CLI with puppeteer', () => {
const files = fs.readdirSync(path.join(autorunDir, '.lighthouseci'));
const report = files.find(file => /lhr.*\.json$/.test(file));
const lhr = JSON.parse(fs.readFileSync(path.join(autorunDir, '.lighthouseci', report)));
expect(lhr.userAgent).toContain('HeadlessChrome/77.0.3835.0'); // make sure the right chrome was used
expect(lhr.userAgent).toContain('HeadlessChrome/97.0.4691.0'); // make sure the right chrome was used
}, 180000);

it('should not fail on providing defaults without Chrome installations', async () => {
Expand Down
5 changes: 4 additions & 1 deletion packages/server/test/ui/storybook.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@ initStoryshots({
getMatchOptions: () => ({
failureThreshold: process.env.CI ? 0.005 : 0.0015,
failureThresholdType: 'percent',
// Slower, but required because images can be larger than the default maxBuffer for child processes
// which jest-image-snapshot relies on.
// https://github.com/americanexpress/jest-image-snapshot/issues/210
runInProcess: true,
}),
getScreenshotOptions: () => ({
encoding: 'base64',
connorjclark marked this conversation as resolved.
Show resolved Hide resolved
fullPage: false,
}),
}),
Expand Down
Loading