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

feat: upgrade to lighthouse 11.4.0 #991

Merged
merged 5 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"https-proxy-agent": "^5.0.0",
"inquirer": "^6.3.1",
"isomorphic-fetch": "^3.0.0",
"lighthouse": "10.1.0",
"lighthouse": "11.4.0",
"lighthouse-logger": "1.2.0",
"open": "^7.1.0",
"tmp": "^0.1.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/test/assert.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('Lighthouse CI assert CLI', () => {
it('should run the recommended preset', async () => {
const result = await run([`--preset=lighthouse:recommended`]);
expect(result.status).toEqual(1);
expect(result.failures.length).toMatchInlineSnapshot(`98`);
expect(result.failures.length).toMatchInlineSnapshot(`115`);
expect(result.warnings.length).toMatchInlineSnapshot(`17`);
expect(result.passes.length).toMatchInlineSnapshot(`0`);
expect(result.failures).toContain('deprecations failure');
Expand All @@ -65,7 +65,7 @@ describe('Lighthouse CI assert CLI', () => {
it('should run the no-pwa preset', async () => {
const result = await run([`--preset=lighthouse:no-pwa`]);
expect(result.status).toEqual(1);
expect(result.failures.length).toMatchInlineSnapshot(`91`);
expect(result.failures.length).toMatchInlineSnapshot(`109`);
expect(result.warnings.length).toMatchInlineSnapshot(`16`);
expect(result.passes.length).toMatchInlineSnapshot(`0`);
expect(result.failures).toContain('deprecations failure');
Expand All @@ -92,7 +92,7 @@ describe('Lighthouse CI assert CLI', () => {
const result = await run([`--preset=lighthouse:recommended`, '--include-passed-assertions']);
expect(result.status).toEqual(1);
expect(result.warnings.length).toMatchInlineSnapshot(`17`);
expect(result.failures.length).toMatchInlineSnapshot(`98`);
expect(result.failures.length).toMatchInlineSnapshot(`115`);
expect(result.passes.length).toMatchInlineSnapshot(`1`);
expect(result.passes).toContain('first-contentful-paint passing');
expect(result.failures).toContain('viewport failure');
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/test/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,7 @@ describe('Lighthouse CI CLI', () => {
1 result(s) for http://localhost:XXXX/app/ :

X resource-summary.script.size failure for maxNumericValue assertion
Keep request counts low and transfer sizes small
https://web.dev/use-lighthouse-for-performance-budgets/
Resources Summary

expected: <=XXXX
found: XXXX
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import lhr930A_ from '../../../../../test/fixtures/lh-9-3-0-coursehero-a.json';
import lhr930B_ from '../../../../../test/fixtures/lh-9-3-0-coursehero-b.json';
import lhr1010A_ from '../../../../../test/fixtures/lh-10-1-0-coursehero-a.json';
import lhr1010B_ from '../../../../../test/fixtures/lh-10-1-0-coursehero-b.json';
import lhr1140A_ from '../../../../../test/fixtures/lh-11-4-0-coursehero-a.json';
import lhr1140B_ from '../../../../../test/fixtures/lh-11-4-0-coursehero-b.json';
import lhrSubitemsA_ from '../../../../../test/fixtures/lh-subitems-a.json';
import lhrSubitemsB_ from '../../../../../test/fixtures/lh-subitems-b.json';
import lhrPsi800A_ from '../../../../../test/fixtures/psi-8-0-0-dkdev-a.json';
Expand All @@ -50,6 +52,8 @@ const lhr930A = /** @type {any} */ (lhr930A_);
const lhr930B = /** @type {any} */ (lhr930B_);
const lhr1010A = /** @type {any} */ (lhr1010A_);
const lhr1010B = /** @type {any} */ (lhr1010B_);
const lhr1140A = /** @type {any} */ (lhr1140A_);
const lhr1140B = /** @type {any} */ (lhr1140B_);
const lhrSubitemsA = /** @type {any} */ (lhrSubitemsA_);
const lhrSubitemsB = /** @type {any} */ (lhrSubitemsB_);
const lhrPsi800A = /** @type {any} */ (lhrPsi800A_);
Expand All @@ -63,6 +67,7 @@ const auditPairs700 = createAuditPairs(lhr700A, lhr700B);
const auditPairs800 = createAuditPairs(lhr800A, lhr800B);
const auditPairs930 = createAuditPairs(lhr930A, lhr930B);
const auditPairs1010 = createAuditPairs(lhr1010A, lhr1010B);
const auditPairs1140 = createAuditPairs(lhr1140A, lhr1140B);
const auditPairsPsi800 = createAuditPairs(lhrPsi800A, lhrPsi800B);
const auditPairsSubitems = createAuditPairs(lhrSubitemsA, lhrSubitemsB, {
filter: pair =>
Expand Down Expand Up @@ -147,6 +152,15 @@ export const Version1010 = () => (
/>
);

export const Version1140 = () => (
<AuditDetailPane
selectedAuditId={auditPairs1140[1].audit.id || ''}
setSelectedAuditId={action('setSelectedAuditId')}
pairs={auditPairs1140}
baseLhr={lhr1140B}
/>
);

export const VersionPsi800 = () => (
<AuditDetailPane
selectedAuditId={auditPairsPsi800[1].audit.id || ''}
Expand Down
39,479 changes: 39,479 additions & 0 deletions packages/server/test/fixtures/lh-11-4-0-coursehero-a.json

Large diffs are not rendered by default.

40,418 changes: 40,418 additions & 0 deletions packages/server/test/fixtures/lh-11-4-0-coursehero-b.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"debug": "^4.3.1",
"isomorphic-fetch": "^3.0.0",
"js-yaml": "^3.13.1",
"lighthouse": "10.1.0",
"lighthouse": "11.4.0",
"tree-kill": "^1.2.1"
}
}
23 changes: 20 additions & 3 deletions packages/utils/src/presets/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
assertions: {
// Not applicable in navigation mode (off)
// TODO: Enable this to support user flows
'experimental-interaction-to-next-paint': ['off', {}],
'interaction-to-next-paint': ['off', {}],
'uses-responsive-images-snapshot': ['off', {}],
'work-during-interaction': ['off', {}],
// Not useful or invisible diagnostic audits (off)
Expand All @@ -32,7 +32,9 @@ module.exports = {
metrics: ['off', {}],
// All the rest of the audits (error)
'aria-allowed-attr': ['error', {}],
'aria-allowed-role': ['error', {}],
'aria-command-name': ['error', {}],
'aria-dialog-name': ['error', {}],
'aria-hidden-body': ['error', {}],
'aria-hidden-focus': ['error', {}],
'aria-input-field-name': ['error', {}],
Expand All @@ -42,11 +44,12 @@ module.exports = {
'aria-required-children': ['error', {}],
'aria-required-parent': ['error', {}],
'aria-roles': ['error', {}],
'aria-text': ['error', {}],
'aria-toggle-field-name': ['error', {}],
'aria-tooltip-name': ['error', {}],
'aria-treeitem-name': ['error', {}],
'aria-valid-attr': ['error', {}],
'aria-valid-attr-value': ['error', {}],
'aria-valid-attr': ['error', {}],
'bf-cache': ['error', {}],
'bootup-time': ['error', {}],
'button-name': ['error', {}],
Expand All @@ -62,6 +65,7 @@ module.exports = {
'duplicate-id-aria': ['error', {}],
'duplicated-javascript': ['error', {}],
'efficient-animated-content': ['error', {}],
'empty-heading': ['error', {}],
'errors-in-console': ['error', {}],
'first-contentful-paint': ['error', {}],
'first-meaningful-paint': ['error', {}],
Expand All @@ -73,18 +77,25 @@ module.exports = {
'heading-order': ['error', {}],
'html-has-lang': ['error', {}],
'html-lang-valid': ['error', {}],
'html-xml-lang-mismatch': ['error', {}],
'http-status-code': ['error', {}],
'identical-links-same-purpose': ['error', {}],
'image-alt': ['error', {}],
'image-aspect-ratio': ['error', {}],
'image-redundant-alt': ['error', {}],
'image-size-responsive': ['error', {}],
'input-button-name': ['error', {}],
'input-image-alt': ['error', {}],
'inspector-issues': ['error', {}],
'installable-manifest': ['error', {}],
'is-crawlable': ['error', {}],
'is-on-https': ['error', {}],
'label-content-name-mismatch': ['error', {}],
'landmark-one-main': ['error', {}],
'largest-contentful-paint': ['error', {}],
'lcp-lazy-loaded': ['error', {}],
'legacy-javascript': ['error', {}],
'link-in-text-block': ['error', {}],
'link-name': ['error', {}],
'link-text': ['error', {}],
'long-tasks': ['error', {}],
Expand All @@ -107,14 +118,20 @@ module.exports = {
'prioritize-lcp-image': ['error', {}],
'render-blocking-resources': ['error', {}],
'robots-txt': ['error', {}],
'select-name': ['error', {}],
'server-response-time': ['error', {}],
'service-worker': ['error', {}],
'skip-link': ['error', {}],
'speed-index': ['error', {}],
'splash-screen': ['error', {}],
'table-duplicate-name': ['error', {}],
'table-fake-caption': ['error', {}],
'tap-targets': ['error', {}],
'target-size': ['error', {}],
'td-has-header': ['error', {}],
'td-headers-attr': ['error', {}],
'th-has-data-cells': ['error', {}],
'themed-omnibox': ['error', {}],
'third-party-cookies': ['error', {}],
'third-party-facades': ['error', {}],
'timing-budget': ['error', {}],
'total-byte-weight': ['error', {}],
Expand Down
1 change: 0 additions & 1 deletion packages/utils/src/presets/no-pwa.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module.exports = {
...recommended.assertions,
// Every PWA audit is disabled
'is-on-https': 'off',
'service-worker': 'off',
'installable-manifest': 'off',
'splash-screen': 'off',
'themed-omnibox': 'off',
Expand Down
Loading
Loading