Skip to content

Commit

Permalink
Merge branch 'main' into sanjaiyan-async-concurrent
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjaiyan-dev authored Feb 4, 2024
2 parents eb437da + 5e18c5a commit 86b9b2f
Show file tree
Hide file tree
Showing 95 changed files with 4,095 additions and 1,007 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
basics:
runs-on: ubuntu-latest
env:
CHROME_PATH: ${{ github.workspace }}/.tmp/chrome-tot/chrome
FORCE_COLOR: true

# A few steps are duplicated across all jobs. Can be done better when this feature lands:
Expand All @@ -25,7 +26,6 @@ jobs:
fetch-depth: 100
- run: bash core/scripts/github-actions-commit-range.sh
env:
CHROME_PATH: ${{ github.workspace }}/lighthouse/.tmp/chrome-tot/chrome
GITHUB_CONTEXT_PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_CONTEXT_BASE_SHA: ${{ github.event.before }}

Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
fail-fast: false
runs-on: ubuntu-latest
env:
CHROME_PATH: ${{ github.workspace }}/.tmp/chrome-tot/chrome
# The total number of shards. Set dynamically when length of *single* matrix variable is
# computable. See https://github.community/t/get-length-of-strategy-matrix-or-get-all-matrix-options/18342
SHARD_TOTAL: 3
Expand All @@ -40,10 +41,6 @@ jobs:
with:
node-version: 18.x

- name: Define ToT chrome path
if: matrix.chrome-channel == 'ToT'
run: echo "CHROME_PATH=${{ github.workspace }}/lighthouse/.tmp/chrome-tot/chrome" >> $GITHUB_ENV

# Chrome Stable is already installed by default.
- name: Install Chrome ToT
if: matrix.chrome-channel == 'ToT'
Expand Down Expand Up @@ -95,7 +92,7 @@ jobs:
node-version: 18.x

- name: Define ToT chrome path
run: echo "CHROME_PATH=${env:GITHUB_WORKSPACE}\chrome-win\chrome.exe" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
run: echo "CHROME_PATH=${env:GITHUB_WORKSPACE}\.tmp\chrome-tot\chrome.exe" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append

# Chrome Stable is already installed by default.
- name: Install Chrome ToT
Expand Down Expand Up @@ -126,7 +123,7 @@ jobs:
fail-fast: false
runs-on: ubuntu-latest
env:
CHROME_PATH: ${{ github.workspace }}/lighthouse/.tmp/chrome-tot/chrome
CHROME_PATH: ${{ github.workspace }}/.tmp/chrome-tot/chrome
# The total number of shards. Set dynamically when length of *single* matrix variable is
# computable. See https://github.community/t/get-length-of-strategy-matrix-or-get-all-matrix-options/18342
SHARD_TOTAL: 3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
name: node ${{ matrix.node }}
env:
CHROME_PATH: ${{ github.workspace }}/lighthouse/.tmp/chrome-tot/chrome
CHROME_PATH: ${{ github.workspace }}/.tmp/chrome-tot/chrome
LATEST_NODE: '18'
FORCE_COLOR: true

Expand Down
1 change: 1 addition & 0 deletions build/build-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ async function buildBundle(entryPath, distPath, opts = {minify: true}) {
treeShaking: true,
sourcemap: 'linked',
banner: {js: banner},
lineLimit: 1000,
// Because of page-functions!
keepNames: true,
inject: ['./build/process-global.js'],
Expand Down
68 changes: 68 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,71 @@
<a name="11.5.0"></a>
# 11.5.0 (2024-01-23)
[Full Changelog](https://github.com/GoogleChrome/lighthouse/compare/v11.4.0...v11.5.0)

We expect this release to ship in the DevTools of [Chrome 123](https://chromiumdash.appspot.com/schedule), and to PageSpeed Insights within 2 weeks.

## New Contributors

Thanks to our new contributors 👽🐷🐰🐯🐻!

- EvilKarter @EvilKarter

## Notable Changes

* New layout-shifts audit shows estimated root causes for layout shifts. This replaces the layout-shift-elements audit which only shows elements impacted by layout shifts. ([#15703](https://github.com/GoogleChrome/lighthouse/pull/15703), [#15730](https://github.com/GoogleChrome/lighthouse/pull/15730))
* Informative audits now have a score of 1 instead of null ([#15689](https://github.com/GoogleChrome/lighthouse/pull/15689))
* Added a warning for [PWA deprecation](https://developer.chrome.com/blog/update-install-criteria?hl=en) ([#15741](https://github.com/GoogleChrome/lighthouse/pull/15741))

## Core

* bump guidance level of top CWV recommendations ([#15695](https://github.com/GoogleChrome/lighthouse/pull/15695))
* lower guidance level of unused- audits ([#15718](https://github.com/GoogleChrome/lighthouse/pull/15718))
* create separate product savings type ([#15726](https://github.com/GoogleChrome/lighthouse/pull/15726))
* round metric savings to remove false precision ([#15721](https://github.com/GoogleChrome/lighthouse/pull/15721))
* fix mistake preventing gather/audit phases from sharing cache ([#15710](https://github.com/GoogleChrome/lighthouse/pull/15710))
* cumulative-layout-shift: experiment with new shared trace engine ([#15702](https://github.com/GoogleChrome/lighthouse/pull/15702))
* legacy-javascript: detect es-shims polyfills ([#15738](https://github.com/GoogleChrome/lighthouse/pull/15738))
* network-request: consider secondary headers for content encoded check ([#15708](https://github.com/GoogleChrome/lighthouse/pull/15708))
* render-blocking-resources: reduce metric savings if LCP is an image ([#15694](https://github.com/GoogleChrome/lighthouse/pull/15694))
* target-manager: warn on errors while attaching to workers ([#15740](https://github.com/GoogleChrome/lighthouse/pull/15740))
* trace: enable JS samples for advanced workflows ([#15542](https://github.com/GoogleChrome/lighthouse/pull/15542))
* unused-css: exclude header size for estimating wasted bytes ([#15671](https://github.com/GoogleChrome/lighthouse/pull/15671))
* viewport: include meta viewport string in debugDetails ([#15727](https://github.com/GoogleChrome/lighthouse/pull/15727))

## Report

* small renderAudit simplification ([#15725](https://github.com/GoogleChrome/lighthouse/pull/15725))
* fix filmstrip wrap ([#15693](https://github.com/GoogleChrome/lighthouse/pull/15693))
* performance: use metric savings for metric filter ([#15540](https://github.com/GoogleChrome/lighthouse/pull/15540))

## Deps

* upgrade puppeteer to 21.7.0 ([#15724](https://github.com/GoogleChrome/lighthouse/pull/15724))
* upgrade esbuild to 0.19.11 ([#15731](https://github.com/GoogleChrome/lighthouse/pull/15731))

## Clients

* lr: include flag for ignoring bad page status code ([#15764](https://github.com/GoogleChrome/lighthouse/pull/15764))

## Docs

* update deprecated link to shared flags ([#15722](https://github.com/GoogleChrome/lighthouse/pull/15722))
* user-flows: update complete flow example ([#15690](https://github.com/GoogleChrome/lighthouse/pull/15690))

## Tests

* check for console errors and warnings in pptr tests ([#15516](https://github.com/GoogleChrome/lighthouse/pull/15516))
* fix ToT chrome install path ([#15753](https://github.com/GoogleChrome/lighthouse/pull/15753))
* ci: stop using xvfb ([#15707](https://github.com/GoogleChrome/lighthouse/pull/15707))
* dbw: update expectations for unload handler removal ([#15765](https://github.com/GoogleChrome/lighthouse/pull/15765))
* dbw: fix server latency flake ([#15729](https://github.com/GoogleChrome/lighthouse/pull/15729))
* mocha: fix snapshot expectations in retries ([#15735](https://github.com/GoogleChrome/lighthouse/pull/15735))

## Misc

* build: set line limit to 1000 ([#15733](https://github.com/GoogleChrome/lighthouse/pull/15733))
* lighthouse-logger: add repo to package.json ([#15768](https://github.com/GoogleChrome/lighthouse/pull/15768))

<a name="11.4.0"></a>
# 11.4.0 (2023-12-11)
[Full Changelog](https://github.com/GoogleChrome/lighthouse/compare/v11.3.0...v11.4.0)
Expand Down
Binary file added cli/test/fixtures/RubikBrokenFax-Regular.ttf
Binary file not shown.
8 changes: 7 additions & 1 deletion cli/test/fixtures/dobetterweb/dbw_tester.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<head>
<title>DoBetterWeb Mega Tester... Of Death</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<meta name="viewport" content="width=2899">
<meta property="og:description" content="Open Graph smoke test description">

<template id="links-blocking-first-paint-tmpl">
Expand Down Expand Up @@ -48,6 +48,12 @@
<!-- Malformed links should not show in TagsBlockingFirstPaint artifact -->
<link rel="stylesheet" href="">

<script>
// Set a mobile-friendly viewport only on load.
const metaViewport = document.querySelector('meta[name="viewport"]');
metaViewport.content = 'width=device-width, initial-scale=1, minimum-scale=1';
</script>

<!-- FAIL: block rendering -->
<script src="./dbw_tester.js" id="dbw-tester-script"></script>

Expand Down
49 changes: 49 additions & 0 deletions cli/test/fixtures/shift-attribution.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
div#blue {
background-color: blue;
height: 300px;
color: white;
width: 100%;
}
div#red {
background-color: red;
height: 10px;
width: 100%;
}

@font-face {
font-family: 'Rubik Broken Fax';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(RubikBrokenFax-Regular.ttf?delay=2000);
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
h1 {
font-family: 'Rubik Broken Fax', sans-serif;
}
</style>
</head>
<body>
<!-- Do many to stack up the shifts from the font change. -->
<h1>Shift attribution</h1>
<h1>Shift attribution</h1>
<h1>Shift attribution</h1>
<h1>Shift attribution</h1>
<h1>Shift attribution</h1>
<h1>Shift attribution</h1>

<div class="iframe-slot"></div>

<img src="launcher-icon-100x100.png?delay=3000">
<div id="red"></div>
<div id="blue">app goes here</div>
<script src="shift-attribution.js"></script>
</body>
</html>
14 changes: 14 additions & 0 deletions cli/test/fixtures/shift-attribution.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
let i = 0;
const handle = setInterval(function() {
if (i === 0) {
document.querySelector('#red').style.height = 500;
} else if (i === 1) {
const iframeEl = document.createElement('iframe');
iframeEl.src = 'simple-page.html';
document.querySelector('.iframe-slot').append(iframeEl);
} else {
clearInterval(handle);
}

i++;
}, 500);
2 changes: 2 additions & 0 deletions cli/test/smokehouse/core-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import seoPassing from './test-definitions/seo-passing.js';
import seoStatus403 from './test-definitions/seo-status-403.js';
import seoTapTargets from './test-definitions/seo-tap-targets.js';
import serviceWorkerReloaded from './test-definitions/service-worker-reloaded.js';
import shiftAttribution from './test-definitions/shift-attribution.js';
import sourceMaps from './test-definitions/source-maps.js';
import timing from './test-definitions/timing.js';

Expand Down Expand Up @@ -127,6 +128,7 @@ const smokeTests = [
seoStatus403,
seoTapTargets,
serviceWorkerReloaded,
shiftAttribution,
sourceMaps,
timing,
];
Expand Down
12 changes: 6 additions & 6 deletions cli/test/smokehouse/test-definitions/a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ const expectations = {
},
},
'duplicate-id-aria': {
score: null,
score: 1,
details: {
items: [
{
Expand Down Expand Up @@ -515,7 +515,7 @@ const expectations = {
},
},
'empty-heading': {
score: null,
score: 1,
details: {
items: [
{
Expand All @@ -531,7 +531,7 @@ const expectations = {
},
},
'form-field-multiple-labels': {
score: null,
score: 1,
scoreDisplayMode: 'informative',
details: {
items: [
Expand Down Expand Up @@ -625,7 +625,7 @@ const expectations = {
scoreDisplayMode: 'notApplicable',
},
'identical-links-same-purpose': {
score: null,
score: 1,
details: {
items: [
{
Expand Down Expand Up @@ -739,7 +739,7 @@ const expectations = {
},
},
'landmark-one-main': {
score: null,
score: 1,
details: {
items: [
{
Expand Down Expand Up @@ -931,7 +931,7 @@ const expectations = {
},
},
'target-size': {
score: null,
score: 1,
details: {
items: [
{
Expand Down
34 changes: 29 additions & 5 deletions cli/test/smokehouse/test-definitions/dobetterweb.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ const expectations = {
},
],
GlobalListeners: [{
// Unload handlers were disabled in M122
_maxChromiumVersion: '121',
type: 'unload',
scriptId: /^\d+$/,
lineNumber: '>300',
Expand Down Expand Up @@ -306,6 +308,13 @@ const expectations = {
description: 'Failed to load resource: the server responded with a status of 404 (Not Found)',
sourceLocation: {url: 'http://localhost:10200/favicon.ico'},
},
{
// Unload handlers were disabled in M122
_minChromiumVersion: '122',
source: 'violation',
description: 'Permissions policy violation: unload is not allowed in this document.',
sourceLocation: {url: 'http://localhost:10200/dobetterweb/dbw_tester.html'},
},
],
},
},
Expand Down Expand Up @@ -378,7 +387,10 @@ const expectations = {
subItems: undefined,
},
{
// Deprecation warning was added in M121
_minChromiumVersion: '121',
// Unload handlers were disabled in M122
_maxChromiumVersion: '121',
value: 'UnloadHandler',
source: {
type: 'source-location',
Expand Down Expand Up @@ -447,7 +459,7 @@ const expectations = {
},
},
'dom-size': {
score: null,
score: 1,
numericValue: 154,
details: {
items: [
Expand Down Expand Up @@ -480,6 +492,8 @@ const expectations = {
},
},
'no-unload-listeners': {
// Unload handlers were disabled in M122
_maxChromiumVersion: '121',
score: 0,
details: {
items: [{
Expand All @@ -497,6 +511,8 @@ const expectations = {
details: {
items: [
{
// Unload handlers were disabled in M122
_maxChromiumVersion: '121',
reason: 'The page has an unload handler in the main frame.',
failureType: 'Actionable',
subItems: {
Expand All @@ -506,9 +522,8 @@ const expectations = {
},
},
{
// This issue only appears in the DevTools runner for some reason.
// TODO: Investigate why this doesn't happen on the CLI runner.
_runner: 'devtools',
// Unload handlers create a permission request in M122
_minChromiumVersion: '122',
reason: 'There were permission requests upon navigating away.',
failureType: 'Pending browser support',
subItems: {
Expand Down Expand Up @@ -566,7 +581,10 @@ const expectations = {
items: {
_includes: [
{origin: 'http://localhost:10200', serverResponseTime: '>0'},
{origin: 'http://[::1]:10503', serverResponseTime: '>0'},
// The response time estimate is based on just 1 request which can force Lighthouse
// to report a response time of 0 sometimes.
// https://github.com/GoogleChrome/lighthouse/pull/15729#issuecomment-1877869991
{origin: 'http://[::1]:10503', serverResponseTime: '>=0'},
],
_excludes: [{}],
},
Expand Down Expand Up @@ -615,6 +633,12 @@ const expectations = {
],
},
},
'viewport': {
score: 1,
details: {
viewportContent: 'width=device-width, initial-scale=1, minimum-scale=1',
},
},
},
fullPageScreenshot: {
screenshot: {
Expand Down
Loading

0 comments on commit 86b9b2f

Please sign in to comment.