Skip to content

Commit 25041ae

Browse files
authored
clients(devtools): remove insight audits config hack (#16468)
1 parent aa401d3 commit 25041ae

2 files changed

Lines changed: 0 additions & 38 deletions

File tree

clients/devtools/devtools-entry.js

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,6 @@ import thirdPartyWeb from '../../core/lib/third-party-web.js';
2121
/** @type {BufferConstructor} */
2222
globalThis.Buffer = Buffer;
2323

24-
// TODO: Remove this when insights aren't hidden by default
25-
const insightAuditIds = [
26-
'cache-insight',
27-
'cls-culprits-insight',
28-
'document-latency-insight',
29-
'dom-size-insight',
30-
'duplicated-javascript-insight',
31-
'font-display-insight',
32-
'forced-reflow-insight',
33-
'image-delivery-insight',
34-
'interaction-to-next-paint-insight',
35-
'lcp-discovery-insight',
36-
'lcp-phases-insight',
37-
'legacy-javascript-insight',
38-
'modern-http-insight',
39-
'network-dependency-tree-insight',
40-
'render-blocking-insight',
41-
'third-parties-insight',
42-
'viewport-insight',
43-
];
44-
4524
/**
4625
* Returns a config, which runs only certain categories.
4726
* Varies the config to use based on device.
@@ -70,13 +49,6 @@ function createConfig(categoryIDs, device) {
7049
return {
7150
extends: 'lighthouse:default',
7251
settings,
73-
categories: {
74-
// @ts-ignore: `title` is required in CategoryJson. setting to the same value as the default
75-
// config is awkward - easier to omit the property here. Will defer to default config.
76-
'performance': {
77-
auditRefs: insightAuditIds.map(id => ({id, weight: 0, group: 'insights'})),
78-
},
79-
},
8052
};
8153
}
8254

core/scripts/generate-insight-audits.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,3 @@ allAuditIds.sort();
155155

156156
fs.writeFileSync(experimentalConfigPath, experimentalConfigText);
157157
}
158-
159-
{
160-
const devtoolsEntryPath = `${LH_ROOT}/clients/devtools/devtools-entry.js`;
161-
let devtoolsEntryText = fs.readFileSync(devtoolsEntryPath, 'utf-8');
162-
163-
const auditRefListCode = allAuditIds.map(id => ` '${id}',`).join('\n');
164-
devtoolsEntryText = insert(devtoolsEntryText, 'insightAuditIds = [\n', '\n]', auditRefListCode);
165-
166-
fs.writeFileSync(devtoolsEntryPath, devtoolsEntryText);
167-
}

0 commit comments

Comments
 (0)