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

[17.3.x]: build: follow-up fixes for AIO lighthouse checks #55065

Merged
merged 3 commits into from
Mar 27, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions aio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"light-server": "^2.9.1",
"lighthouse": "^11.0.0",
"lighthouse": "~9.0.0",
"lighthouse-logger": "^2.0.0",
"lodash": "^4.17.21",
"lunr": "^2.3.9",
"npm-run-all": "^4.1.5",
"patch-package": "^7.0.0",
"protractor": "~7.0.0",
"puppeteer-core": "22.5.0",
"puppeteer-core": "~21.3.8",
"rehype-slug": "^4.0.1",
"remark": "^12.0.0",
"remark-html": "^13.0.0",
Expand Down
9 changes: 6 additions & 3 deletions aio/scripts/audit-web-app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

// Imports
import lighthouse from 'lighthouse';
import * as printer from 'lighthouse/cli/printer.js';
import * as printer from 'lighthouse/lighthouse-cli/printer.js';
import logger from 'lighthouse-logger';
import puppeteer from 'puppeteer-core';
import path from 'path';
Expand Down Expand Up @@ -60,6 +60,7 @@ async function _main(args) {

console.log(`Running web-app audits for '${url}'...`);
console.log(` Audit categories: ${lhFlags.onlyCategories.join(', ')}`);
console.log(process.env.CHROME_BIN);

logger.setLevel(lhFlags.logLevel);

Expand All @@ -68,9 +69,11 @@ async function _main(args) {
const startTime = Date.now();
const browser = await puppeteer.launch({
executablePath: path.resolve(process.env.CHROME_BIN),
args: ['--no-sandbox', '--headless']
args: ['--no-sandbox', '--headless'],
});
console.log('launched');
const browserVersion = await browser.version();
console.log(browserVersion);
const results = await runLighthouse(browser, url, lhFlags, lhConfig);

console.log(
Expand Down Expand Up @@ -171,7 +174,7 @@ async function processResults(results, minScores, logFile) {

async function runLighthouse(browser, url, flags, config) {
try {
flags.logLevel = 'silent';
flags.logLevel = 'info';
flags.port = (new URL(browser.wsEndpoint())).port;
return await lighthouse(url, flags, config);
} finally {
Expand Down
2 changes: 1 addition & 1 deletion aio/scripts/test-aio-a11y.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ sh.set('-e');
// Constants
const MIN_SCORES_PER_PAGE = {
'': 96,
'api': 96,
'api': 91,
'api/core/Directive': 95,
'cli': 95,
'cli/add': 96,
Expand Down