lighthouse 11.4.0-dev.20240103 → 11.4.0-dev.20240105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/test/smokehouse/core-tests.js +2 -0
- package/core/audits/audit.d.ts +5 -0
- package/core/audits/audit.js +42 -2
- package/core/audits/byte-efficiency/byte-efficiency-audit.js +1 -1
- package/core/audits/layout-shift-elements.js +1 -1
- package/core/audits/layout-shifts.d.ts +33 -0
- package/core/audits/layout-shifts.js +158 -0
- package/core/audits/viewport.js +10 -0
- package/core/computed/metrics/cumulative-layout-shift.d.ts +2 -2
- package/core/computed/trace-engine-result.d.ts +40 -0
- package/core/computed/trace-engine-result.js +69 -0
- package/core/computed/viewport-meta.d.ts +4 -0
- package/core/computed/viewport-meta.js +6 -1
- package/core/config/default-config.js +3 -0
- package/core/config/metrics-to-audits.js +1 -0
- package/core/gather/driver/wait-for-condition.js +1 -1
- package/core/gather/gatherers/root-causes.d.ts +20 -0
- package/core/gather/gatherers/root-causes.js +133 -0
- package/core/gather/gatherers/trace-elements.d.ts +38 -7
- package/core/gather/gatherers/trace-elements.js +113 -34
- package/core/gather/gatherers/trace.js +3 -0
- package/core/gather/session.js +16 -3
- package/core/lib/i18n/i18n.js +2 -0
- package/core/lib/trace-engine.d.ts +5 -2
- package/core/lib/trace-engine.js +3 -0
- package/dist/report/bundle.esm.js +9 -5
- package/dist/report/flow.js +6 -2
- package/dist/report/standalone.js +11 -7
- package/package.json +4 -4
- package/report/assets/styles.css +4 -0
- package/report/renderer/category-renderer.d.ts +0 -7
- package/report/renderer/category-renderer.js +2 -12
- package/report/renderer/components.js +1 -1
- package/report/renderer/performance-category-renderer.d.ts +2 -3
- package/report/renderer/performance-category-renderer.js +3 -4
- package/shared/localization/locales/en-US.json +24 -0
- package/shared/localization/locales/en-XL.json +24 -0
- package/types/artifacts.d.ts +10 -1
- package/types/audit.d.ts +9 -1
- package/types/config.d.ts +1 -1
- package/types/lhr/audit-result.d.ts +1 -4
- package/types/lhr/lhr.d.ts +1 -3
- package/types/trace-engine.d.ts +1516 -0
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
import {FormattedIcu} from './i18n.js';
|
|
8
8
|
import AuditDetails from './audit-details.js';
|
|
9
|
-
import LHResult from './lhr.js';
|
|
10
9
|
|
|
11
10
|
interface ScoreDisplayModes {
|
|
12
11
|
/** Scores of 0-1 (map to displayed scores of 0-100). */
|
|
@@ -32,9 +31,7 @@ interface ScoreDisplayModes {
|
|
|
32
31
|
|
|
33
32
|
type ScoreDisplayMode = ScoreDisplayModes[keyof ScoreDisplayModes];
|
|
34
33
|
|
|
35
|
-
export type MetricSavings =
|
|
36
|
-
[M in LHResult.MetricAcronym]?: number;
|
|
37
|
-
};
|
|
34
|
+
export type MetricSavings = Partial<Record<string, number>>;
|
|
38
35
|
|
|
39
36
|
/** Audit result returned in Lighthouse report. All audits offer a description and score of 0-1. */
|
|
40
37
|
export interface Result {
|
package/types/lhr/lhr.d.ts
CHANGED
|
@@ -115,7 +115,7 @@ declare module Result {
|
|
|
115
115
|
/** Optional grouping within the category. Matches the key of a Result.Group. */
|
|
116
116
|
group?: string;
|
|
117
117
|
/** The conventional acronym for the audit/metric. */
|
|
118
|
-
acronym?:
|
|
118
|
+
acronym?: string;
|
|
119
119
|
/** Any audit IDs closely relevant to this one. */
|
|
120
120
|
relevantAudits?: string[];
|
|
121
121
|
}
|
|
@@ -197,8 +197,6 @@ declare module Result {
|
|
|
197
197
|
|
|
198
198
|
/** Gather mode used to collect artifacts. */
|
|
199
199
|
type GatherMode = 'navigation'|'timespan'|'snapshot';
|
|
200
|
-
|
|
201
|
-
type MetricAcronym = 'FCP' | 'LCP' | 'TBT' | 'CLS' | 'INP' | 'SI' | 'TTI' | 'FMP';
|
|
202
200
|
}
|
|
203
201
|
|
|
204
202
|
export default Result;
|