Skip to content

Commit

Permalink
core(large-javascript-libraries): move to experimental (#11484)
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed Sep 28, 2020
1 parent 3ffb99a commit 5001986
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 56 deletions.
8 changes: 0 additions & 8 deletions lighthouse-cli/test/cli/__snapshots__/index-test.js.snap
Expand Up @@ -171,9 +171,6 @@ Object {
Object {
"path": "unsized-images",
},
Object {
"path": "large-javascript-libraries",
},
Object {
"path": "valid-source-maps",
},
Expand Down Expand Up @@ -1036,11 +1033,6 @@ Object {
"id": "unsized-images",
"weight": 0,
},
Object {
"group": "diagnostics",
"id": "large-javascript-libraries",
"weight": 0,
},
Object {
"id": "network-requests",
"weight": 0,
Expand Down
2 changes: 0 additions & 2 deletions lighthouse-core/config/default-config.js
Expand Up @@ -242,7 +242,6 @@ const defaultConfig = {
'no-unload-listeners',
'non-composited-animations',
'unsized-images',
'large-javascript-libraries',
'valid-source-maps',
'manual/pwa-cross-browser',
'manual/pwa-page-transitions',
Expand Down Expand Up @@ -475,7 +474,6 @@ const defaultConfig = {
{id: 'long-tasks', weight: 0, group: 'diagnostics'},
{id: 'non-composited-animations', weight: 0, group: 'diagnostics'},
{id: 'unsized-images', weight: 0, group: 'diagnostics'},
{id: 'large-javascript-libraries', weight: 0, group: 'diagnostics'},
// Audits past this point don't belong to a group and will not be shown automatically
{id: 'network-requests', weight: 0},
{id: 'network-rtt', weight: 0},
Expand Down
8 changes: 8 additions & 0 deletions lighthouse-core/config/experimental-config.js
Expand Up @@ -16,6 +16,7 @@ const config = {
audits: [
'autocomplete',
'full-page-screenshot',
'large-javascript-libraries',
],
passes: [{
passName: 'defaultPass',
Expand All @@ -24,6 +25,13 @@ const config = {
],
}],
categories: {
// @ts-ignore: `title` is required in CategoryJson. setting to the same value as the default
// config is awkward - easier to omit the property here. Will defer to default config.
'performance': {
auditRefs: [
{id: 'large-javascript-libraries', weight: 0, group: 'diagnostics'},
],
},
// @ts-ignore: `title` is required in CategoryJson. setting to the same value as the default
// config is awkward - easier to omit the property here. Will defer to default config.
'best-practices': {
Expand Down
39 changes: 0 additions & 39 deletions lighthouse-core/test/results/sample_v2.json
Expand Up @@ -2059,20 +2059,6 @@
]
}
},
"large-javascript-libraries": {
"id": "large-javascript-libraries",
"title": "Avoids large JavaScript libraries with smaller alternatives",
"description": "Large JavaScript libraries can lead to poor performance. Prefer smaller, functionally equivalent libraries to reduce your bundle size. [Learn more](https://developers.google.com/web/fundamentals/performance/webpack/decrease-frontend-size#optimize_dependencies).",
"score": 1,
"scoreDisplayMode": "binary",
"displayValue": "0 large libraries found",
"details": {
"type": "table",
"headings": [],
"items": [],
"summary": {}
}
},
"valid-source-maps": {
"id": "valid-source-maps",
"title": "Page has valid source maps",
Expand Down Expand Up @@ -4676,11 +4662,6 @@
"weight": 0,
"group": "diagnostics"
},
{
"id": "large-javascript-libraries",
"weight": 0,
"group": "diagnostics"
},
{
"id": "network-requests",
"weight": 0
Expand Down Expand Up @@ -5880,12 +5861,6 @@
"duration": 100,
"entryType": "measure"
},
{
"startTime": 0,
"name": "lh:audit:large-javascript-libraries",
"duration": 100,
"entryType": "measure"
},
{
"startTime": 0,
"name": "lh:audit:valid-source-maps",
Expand Down Expand Up @@ -7238,20 +7213,6 @@
"audits[object-alt].details.headings[0].text",
"audits[password-inputs-can-be-pasted-into].details.headings[0].text"
],
"lighthouse-core/audits/large-javascript-libraries.js | title": [
"audits[large-javascript-libraries].title"
],
"lighthouse-core/audits/large-javascript-libraries.js | description": [
"audits[large-javascript-libraries].description"
],
"lighthouse-core/audits/large-javascript-libraries.js | displayValue": [
{
"values": {
"libraryCount": 0
},
"path": "audits[large-javascript-libraries].displayValue"
}
],
"lighthouse-core/audits/valid-source-maps.js | title": [
"audits[valid-source-maps].title"
],
Expand Down
Expand Up @@ -2,11 +2,11 @@ Tests that exporting works.

++++++++ testExportHtml

# of .lh-audit divs (original): 136
# of .lh-audit divs (original): 135

# of .lh-audit divs (exported html): 136
# of .lh-audit divs (exported html): 135

++++++++ testExportJson

# of audits (json): 152
# of audits (json): 151

Expand Up @@ -247,7 +247,6 @@ Auditing: Avoid long main-thread tasks
Auditing: Avoids `unload` event listeners
Auditing: Avoid non-composited animations
Auditing: Image elements have explicit `width` and `height`
Auditing: Avoids large JavaScript libraries with smaller alternatives
Auditing: Page has valid source maps
Auditing: Site works cross-browser
Auditing: Page transitions don't feel like they block on the network
Expand Down Expand Up @@ -474,7 +473,6 @@ is-crawlable: pass
is-on-https: pass
js-libraries: pass
label: notApplicable
large-javascript-libraries: pass
largest-contentful-paint: numeric
largest-contentful-paint-element: informative
layout-shift-elements: notApplicable
Expand Down Expand Up @@ -566,5 +564,5 @@ visual-order-follows-dom: manual
without-javascript: pass
works-offline: fail

# of .lh-audit divs: 156
# of .lh-audit divs: 155

Expand Up @@ -27,7 +27,6 @@ first-cpu-idle
first-meaningful-paint
font-display
interactive
large-javascript-libraries
largest-contentful-paint
largest-contentful-paint-element
layout-shift-elements
Expand Down

0 comments on commit 5001986

Please sign in to comment.