Skip to content

Commit 4149950

Browse files
committed
no mapping
1 parent 3e7bbf5 commit 4149950

1 file changed

Lines changed: 39 additions & 55 deletions

File tree

definitions/output/reports/tech_crux.js

Lines changed: 39 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -42,61 +42,44 @@ const results = []
4242
for (const category of Object.keys(lighthouse?.categories ? lighthouse.categories : {})) {
4343
for (const audit of lighthouse.categories[category].auditRefs) {
4444
45-
// Moving lighthouse to insights https://developer.chrome.com/blog/moving-lighthouse-to-insights
46-
if (category === 'performance' && '${pastMonth}' < '2025-10-01') {
47-
if (
48-
[
49-
'first-meaningful-paint',
50-
'no-document-write',
51-
'offscreen-images',
52-
'uses-passive-event-listeners',
53-
'uses-rel-preload',
54-
'third-party-facades'
55-
].includes(audit.id)
56-
) {
57-
continue; // Deprecated audits
58-
} else if (
59-
lighthouse.audits[audit.id].score === 1 // Only include audits that passed
60-
&& !['metrics', 'hidden'].includes(audit.group) // Exclude metrics and hidden audits
61-
) {
62-
// Map old audit IDs to new insight audit IDs
63-
const performanceAuditIdMapping = {
64-
'layout-shifts': 'cls-culprits-insight',
65-
'non-composited-animations': 'cls-culprits-insight',
66-
'unsized-images': 'cls-culprits-insight',
67-
'redirects': 'document-latency-insight',
68-
'server-response-time': 'document-latency-insight',
69-
'uses-text-compression': 'document-latency-insight',
70-
'dom-size': 'dom-size-insight',
71-
'duplicated-javascript': 'duplicated-javascript-insight',
72-
'font-display': 'font-display-insight',
73-
'modern-image-formats': 'image-delivery-insight',
74-
'uses-optimized-images': 'image-delivery-insight',
75-
'efficient-animated-content': 'image-delivery-insight',
76-
'uses-responsive-images': 'image-delivery-insight',
77-
'work-during-interaction': 'interaction-to-next-paint-insight',
78-
'prioritize-lcp-image': 'lcp-discovery-insight',
79-
'lcp-lazy-loaded': 'lcp-discovery-insight',
80-
'largest-contentful-paint-element': 'lcp-phases-insight',
81-
'legacy-javascript': 'legacy-javascript-insight',
82-
'uses-http2': 'modern-http-insight',
83-
'critical-request-chains': 'network-dependency-tree-insight',
84-
'uses-rel-preconnect': 'network-dependency-tree-insight',
85-
'render-blocking-resources': 'render-blocking-insight',
86-
'third-party-summary': 'third-parties-insight',
87-
'uses-long-cache-ttl': 'use-cache-insight',
88-
'viewport': 'viewport-insight'
89-
};
90-
91-
// Use mapped audit ID if available, otherwise use original
92-
const mappedAuditId = performanceAuditIdMapping[audit.id] || audit.id;
93-
94-
// Push the audit with the category and mapped ID
95-
results.push({
96-
category,
97-
id: mappedAuditId
98-
});
99-
}
45+
// Deprecated audits:
46+
// Moving lighthouse to insights https://developer.chrome.com/blog/moving-lighthouse-to-insights
47+
if (
48+
[
49+
'first-meaningful-paint',
50+
'no-document-write',
51+
'offscreen-images',
52+
'uses-passive-event-listeners',
53+
'uses-rel-preload',
54+
'third-party-facades',
55+
"layout-shifts"
56+
"non-composited-animations",
57+
"unsized-images",
58+
"redirects",
59+
"server-response-time",
60+
"uses-text-compression",
61+
"dom-size",
62+
"duplicated-javascript",
63+
"font-display",
64+
"modern-image-formats",
65+
"uses-optimized-images",
66+
"efficient-animated-content",
67+
"uses-responsive-images",
68+
"work-during-interaction",
69+
"prioritize-lcp-image",
70+
"lcp-lazy-loaded",
71+
"largest-contentful-paint-element",
72+
"legacy-javascript",
73+
"uses-http2",
74+
"critical-request-chains",
75+
"uses-rel-preconnect",
76+
"render-blocking-resources",
77+
"third-party-summary",
78+
"uses-long-cache-ttl",
79+
"viewport"
80+
].includes(audit.id)
81+
) {
82+
continue;
10083
}
10184
10285
if (
@@ -406,6 +389,7 @@ audits_summary AS (
406389
ARRAY_AGG(STRUCT(
407390
category AS category,
408391
id AS id,
392+
audits.origins AS origins,
409393
SAFE_DIVIDE(audits.origins, base_summary.origins) AS pass_rate
410394
)) AS audits
411395
FROM audits

0 commit comments

Comments
 (0)