Skip to content

Commit

Permalink
Merge branch 'main' into paul-arts
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed May 13, 2024
2 parents 21f7f65 + f4331fb commit 3f8932e
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 13 deletions.
1 change: 1 addition & 0 deletions core/gather/gatherers/inspector-issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class InspectorIssues extends BaseGatherer {
quirksModeIssue: [],
cookieIssue: [],
sharedArrayBufferIssue: [],
sharedDictionaryIssue: [],
stylesheetLoadingIssue: [],
federatedAuthUserInfoRequestIssue: [],
};
Expand Down
4 changes: 2 additions & 2 deletions core/scripts/pptr-run-devtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async function waitForLighthouseReady() {

const panel = LighthousePanel.LighthousePanel.instance();

const button = panel.contentElement.querySelector('button');
const button = panel.contentElement.querySelector('devtools-button,button');
if (button.disabled) throw new Error('Start button disabled');

const targetManager = TargetManager.TargetManager.instance();
Expand Down Expand Up @@ -213,7 +213,7 @@ async function runLighthouse() {
// In CI clicking the start button just once is flaky and can cause a timeout.
// Therefore, keep clicking the button until we detect that the run started.
const intervalHandle = setInterval(() => {
const button = panel.contentElement.querySelector('button');
const button = panel.contentElement.querySelector('devtools-button,button');
button.click();
}, 100);

Expand Down
2 changes: 2 additions & 0 deletions core/test/gather/gatherers/inspector-issues-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ describe('getArtifact', () => {
propertyRuleIssue: [],
quirksModeIssue: [],
sharedArrayBufferIssue: [],
sharedDictionaryIssue: [],
federatedAuthRequestIssue: [],
stylesheetLoadingIssue: [],
federatedAuthUserInfoRequestIssue: [],
Expand Down Expand Up @@ -315,6 +316,7 @@ describe('getArtifact', () => {
propertyRuleIssue: [],
quirksModeIssue: [],
sharedArrayBufferIssue: [],
sharedDictionaryIssue: [],
federatedAuthRequestIssue: [],
stylesheetLoadingIssue: [],
federatedAuthUserInfoRequestIssue: [],
Expand Down
6 changes: 4 additions & 2 deletions docs/headless-chrome.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ const chromeLauncher = require('chrome-launcher');
function launchChromeAndRunLighthouse(url, flags = {}, config = null) {
return chromeLauncher.launch(flags).then(chrome => {
flags.port = chrome.port;
return lighthouse(url, flags, config).then(results =>
chrome.kill().then(() => results));
return lighthouse(url, flags, config).then(results => {
chrome.kill();
return results;
}
});
}

Expand Down
2 changes: 1 addition & 1 deletion docs/puppeteer.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ const {lhr} = await lighthouse(url, undefined, undefined, page);
console.log(`Lighthouse scores: ${Object.values(lhr.categories).map(c => c.score).join(', ')}`);

await browser.disconnect();
await chrome.kill();
chrome.kill();
```
2 changes: 1 addition & 1 deletion docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fs.writeFileSync('lhreport.html', reportHtml);
console.log('Report is done for', runnerResult.lhr.finalDisplayedUrl);
console.log('Performance score was', runnerResult.lhr.categories.performance.score * 100);

await chrome.kill();
chrome.kill();
```

### Performance-only Lighthouse run
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
"chrome-launcher": "^1.1.1",
"configstore": "^5.0.1",
"csp_evaluator": "1.1.1",
"devtools-protocol": "0.0.1232444",
"devtools-protocol": "0.0.1299070",
"enquirer": "^2.3.6",
"http-link-header": "^1.1.1",
"intl-messageformat": "^10.5.3",
Expand All @@ -210,8 +210,8 @@
"yargs-parser": "^21.0.0"
},
"resolutions": {
"puppeteer/**/devtools-protocol": "0.0.1232444",
"puppeteer-core/**/devtools-protocol": "0.0.1232444"
"puppeteer/**/devtools-protocol": "0.0.1299070",
"puppeteer-core/**/devtools-protocol": "0.0.1299070"
},
"repository": "GoogleChrome/lighthouse",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Array [
"propertyRuleIssueDetails",
"quirksModeIssueDetails",
"sharedArrayBufferIssueDetails",
"sharedDictionaryIssueDetails",
"stylesheetLoadingIssueDetails",
]
`);
Expand Down
1 change: 1 addition & 0 deletions types/artifacts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ declare module Artifacts {
quirksModeIssue: Crdp.Audits.QuirksModeIssueDetails[];
cookieIssue: Crdp.Audits.CookieIssueDetails[];
sharedArrayBufferIssue: Crdp.Audits.SharedArrayBufferIssueDetails[];
sharedDictionaryIssue: Crdp.Audits.SharedDictionaryIssueDetails[];
stylesheetLoadingIssue: Crdp.Audits.StylesheetLoadingIssueDetails[];
federatedAuthUserInfoRequestIssue: Crdp.Audits.FederatedAuthUserInfoRequestIssueDetails[];
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2938,10 +2938,10 @@ delayed-stream@~1.0.0:
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=

devtools-protocol@0.0.1232444, devtools-protocol@0.0.1262051:
version "0.0.1232444"
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1232444.tgz#406345a90a871ba852c530d73482275234936eed"
integrity sha512-pM27vqEfxSxRkTMnF+XCmxSEb6duO5R+t8A9DEEJgy4Wz2RVanje2mmj99B6A3zv2r/qGfYlOvYznUhuokizmg==
devtools-protocol@0.0.1262051, devtools-protocol@0.0.1299070:
version "0.0.1299070"
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1299070.tgz#b3e4cf0b678a46f0f907ae6e07e03ad3a53c00df"
integrity sha512-+qtL3eX50qsJ7c+qVyagqi7AWMoQCBGNfoyJZMwm/NSXVqLYbuitrWEEIzxfUmTNy7//Xe8yhMmQ+elj3uAqSg==

diff-sequences@^28.0.2:
version "28.0.2"
Expand Down

0 comments on commit 3f8932e

Please sign in to comment.