lighthouse 13.6.0-dev.20261112 → 13.6.0-dev.20261117
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/.agents/skills/update-ard-port/SKILL.md +1 -1
- package/cli/bin.js +8 -3
- package/cli/open-file.js +1 -1
- package/cli/printer.js +1 -1
- package/cli/run.d.ts +7 -0
- package/cli/run.js +42 -5
- package/cli/sentry-prompt.js +2 -1
- package/cli/test/smokehouse/frontends/smokehouse-bin.js +1 -1
- package/cli/test/smokehouse/lighthouse-runners/cli.js +1 -2
- package/cli/test/smokehouse/report-assert.js +1 -2
- package/cli/test/smokehouse/smokehouse.js +1 -2
- package/core/audits/autocomplete.js +1 -2
- package/core/audits/baseline.d.ts +3 -0
- package/core/audits/bootup-time.js +1 -2
- package/core/audits/errors-in-console.js +1 -2
- package/core/audits/mainthread-work-breakdown.js +1 -2
- package/core/audits/metrics.d.ts +2 -2
- package/core/audits/metrics.js +1 -1
- package/core/computed/computed-artifact.js +1 -2
- package/core/computed/entity-classification.d.ts +3 -3
- package/core/computed/entity-classification.js +5 -3
- package/core/computed/js-bundles.js +1 -2
- package/core/computed/lcp-network-record.js +1 -1
- package/core/computed/load-simulator.d.ts +5 -3
- package/core/computed/load-simulator.js +9 -2
- package/core/computed/metrics/lcp-breakdown.d.ts +19 -0
- package/core/computed/metrics/lcp-breakdown.js +71 -8
- package/core/computed/metrics/responsiveness.d.ts +5 -3
- package/core/computed/metrics/responsiveness.js +1 -1
- package/core/computed/metrics/time-to-first-byte.js +3 -1
- package/core/computed/metrics/timing-summary.d.ts +7 -5
- package/core/computed/metrics/timing-summary.js +3 -4
- package/core/computed/navigation-insights.d.ts +5 -3
- package/core/computed/navigation-insights.js +1 -1
- package/core/computed/network-analysis.js +1 -2
- package/core/computed/page-dependency-graph.d.ts +5 -3
- package/core/computed/page-dependency-graph.js +5 -2
- package/core/computed/trace-engine-result.d.ts +7 -5
- package/core/computed/trace-engine-result.js +9 -14
- package/core/computed/unused-css.d.ts +2 -2
- package/core/computed/unused-css.js +1 -1
- package/core/config/config.js +1 -2
- package/core/gather/base-artifacts.js +1 -2
- package/core/gather/driver/environment.js +1 -2
- package/core/gather/driver/navigation.js +1 -2
- package/core/gather/driver/network-monitor.js +1 -2
- package/core/gather/driver/prepare.js +1 -2
- package/core/gather/driver/storage.js +1 -2
- package/core/gather/driver/target-manager.js +1 -2
- package/core/gather/driver/wait-for-condition.js +1 -2
- package/core/gather/driver.js +1 -2
- package/core/gather/gatherers/agentic/ard.js +1 -1
- package/core/gather/gatherers/agentic/llms-txt.js +1 -2
- package/core/gather/gatherers/image-elements.js +1 -2
- package/core/gather/gatherers/seo/robots-txt.js +1 -2
- package/core/gather/gatherers/stacks.js +1 -2
- package/core/gather/gatherers/stylesheets.js +1 -2
- package/core/gather/navigation-runner.js +1 -1
- package/core/gather/runner-helpers.js +1 -2
- package/core/gather/session.js +1 -2
- package/core/gather/snapshot-runner.js +1 -2
- package/core/gather/timespan-runner.js +1 -2
- package/core/lib/asset-saver.js +1 -2
- package/core/lib/baseline/web-features-data.json +12 -3
- package/core/lib/baseline/web-features-metadata.json +1 -1
- package/core/lib/csp-evaluator.js +1 -1
- package/core/lib/deprecations-strings.d.ts +0 -2
- package/core/lib/deprecations-strings.js +1 -18
- package/core/lib/i18n/i18n.js +1 -2
- package/core/lib/lighthouse-logger.d.ts +127 -0
- package/core/lib/lighthouse-logger.js +319 -0
- package/core/lib/median-run.d.ts +16 -6
- package/core/lib/median-run.js +13 -6
- package/core/lib/network-recorder.js +1 -2
- package/core/lib/network-request.d.ts +2 -2
- package/core/lib/network-request.js +1 -1
- package/core/lib/page-functions.js +2 -2
- package/core/lib/script-helpers.d.ts +23 -8
- package/core/lib/script-helpers.js +7 -6
- package/core/lib/sentry-reporter.d.ts +59 -0
- package/core/lib/sentry-reporter.js +281 -0
- package/core/lib/sentry.d.ts +7 -7
- package/core/lib/sentry.js +23 -40
- package/core/lib/stack-packs.js +1 -1
- package/core/lib/timing-trace-saver.d.ts +2 -2
- package/core/lib/timing-trace-saver.js +1 -1
- package/core/lib/tracehouse/task-summary.d.ts +16 -4
- package/core/lib/tracehouse/task-summary.js +6 -5
- package/core/lib/tracehouse/trace-processor.d.ts +6 -6
- package/core/lib/tracehouse/trace-processor.js +1 -1
- package/core/lib/traces/metric-trace-events.js +1 -2
- package/core/lib/url-utils.d.ts +4 -4
- package/core/lib/url-utils.js +1 -1
- package/core/runner.js +1 -2
- package/dist/report/bundle.esm.js +10 -10
- package/dist/report/flow.js +12 -12
- package/dist/report/standalone.js +11 -11
- package/package.json +19 -21
- package/report/renderer/text-encoding.d.ts +3 -5
- package/report/renderer/text-encoding.js +19 -33
- package/report/types/augment-dom.d.ts +0 -4
- package/shared/localization/locales/ar-XB.json +3 -0
- package/shared/localization/locales/ar.json +3 -0
- package/shared/localization/locales/bg.json +3 -0
- package/shared/localization/locales/ca.json +75 -72
- package/shared/localization/locales/cs.json +3 -0
- package/shared/localization/locales/da.json +3 -0
- package/shared/localization/locales/de.json +3 -0
- package/shared/localization/locales/el.json +3 -0
- package/shared/localization/locales/en-GB.json +3 -0
- package/shared/localization/locales/es-419.json +3 -0
- package/shared/localization/locales/es.json +3 -0
- package/shared/localization/locales/fi.json +3 -0
- package/shared/localization/locales/fil.json +3 -0
- package/shared/localization/locales/fr.json +3 -0
- package/shared/localization/locales/he.json +3 -0
- package/shared/localization/locales/hi.json +11 -8
- package/shared/localization/locales/hr.json +3 -0
- package/shared/localization/locales/hu.json +3 -0
- package/shared/localization/locales/id.json +3 -0
- package/shared/localization/locales/it.json +3 -0
- package/shared/localization/locales/ja.json +3 -0
- package/shared/localization/locales/ko.json +3 -0
- package/shared/localization/locales/lt.json +3 -0
- package/shared/localization/locales/lv.json +5 -2
- package/shared/localization/locales/nl.json +3 -0
- package/shared/localization/locales/no.json +3 -0
- package/shared/localization/locales/pl.json +3 -0
- package/shared/localization/locales/pt-PT.json +3 -0
- package/shared/localization/locales/pt.json +32 -29
- package/shared/localization/locales/ro.json +3 -0
- package/shared/localization/locales/ru.json +3 -0
- package/shared/localization/locales/sk.json +3 -0
- package/shared/localization/locales/sl.json +3 -0
- package/shared/localization/locales/sr-Latn.json +3 -0
- package/shared/localization/locales/sr.json +3 -0
- package/shared/localization/locales/sv.json +3 -0
- package/shared/localization/locales/ta.json +3 -0
- package/shared/localization/locales/te.json +3 -0
- package/shared/localization/locales/th.json +3 -0
- package/shared/localization/locales/tr.json +3 -0
- package/shared/localization/locales/uk.json +3 -0
- package/shared/localization/locales/vi.json +3 -0
- package/shared/localization/locales/zh-HK.json +3 -0
- package/shared/localization/locales/zh-TW.json +3 -0
- package/shared/localization/locales/zh.json +3 -0
- package/third-party/ard/README.md +1 -1
- package/third-party/ard/ard.js +1 -1
- package/tsconfig.json +2 -42
- package/types/artifacts.d.ts +7 -1
- package/types/internal/test.d.ts +5 -0
- package/report/types/buffer.d.ts +0 -19
|
@@ -4,7 +4,9 @@ declare const TimingSummaryComputed: typeof TimingSummary & {
|
|
|
4
4
|
trace: LH.Trace;
|
|
5
5
|
devtoolsLog: LH.DevtoolsLog;
|
|
6
6
|
gatherContext: LH.Artifacts["GatherContext"];
|
|
7
|
-
settings:
|
|
7
|
+
settings: import("../../index.js").Util.ImmutableObject<Pick<import("../../../types/lhr/settings.js").ConfigSettings, "throttlingMethod"> & Partial<Omit<import("../../../types/lhr/settings.js").ConfigSettings, "throttling">> & {
|
|
8
|
+
throttling?: Partial<import("../../index.js").Config.Settings["throttling"]>;
|
|
9
|
+
}>;
|
|
8
10
|
URL: LH.Artifacts["URL"];
|
|
9
11
|
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
10
12
|
HostDPR: LH.Artifacts["HostDPR"];
|
|
@@ -18,19 +20,19 @@ declare class TimingSummary {
|
|
|
18
20
|
* @param {LH.Trace} trace
|
|
19
21
|
* @param {LH.DevtoolsLog} devtoolsLog
|
|
20
22
|
* @param {LH.Artifacts['GatherContext']} gatherContext
|
|
21
|
-
* @param {LH.
|
|
23
|
+
* @param {LH.Artifacts.ComputedSettings} settings
|
|
22
24
|
* @param {LH.Artifacts['URL']} URL
|
|
23
25
|
* @param {LH.Artifacts['SourceMaps']} SourceMaps
|
|
24
26
|
* @param {LH.Artifacts['HostDPR']} HostDPR
|
|
25
27
|
* @param {LH.Artifacts.ComputedContext} context
|
|
26
28
|
* @return {Promise<{metrics: LH.Artifacts.TimingSummary, debugInfo: Record<string,boolean>}>}
|
|
27
29
|
*/
|
|
28
|
-
static summarize(trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, gatherContext: LH.Artifacts["GatherContext"], settings: LH.
|
|
30
|
+
static summarize(trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, gatherContext: LH.Artifacts["GatherContext"], settings: LH.Artifacts.ComputedSettings, URL: LH.Artifacts["URL"], SourceMaps: LH.Artifacts["SourceMaps"], HostDPR: LH.Artifacts["HostDPR"], context: LH.Artifacts.ComputedContext): Promise<{
|
|
29
31
|
metrics: LH.Artifacts.TimingSummary;
|
|
30
32
|
debugInfo: Record<string, boolean>;
|
|
31
33
|
}>;
|
|
32
34
|
/**
|
|
33
|
-
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, gatherContext: LH.Artifacts['GatherContext']; settings: LH.
|
|
35
|
+
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, gatherContext: LH.Artifacts['GatherContext']; settings: LH.Artifacts.ComputedSettings, URL: LH.Artifacts['URL'], SourceMaps: LH.Artifacts['SourceMaps'], HostDPR: LH.Artifacts['HostDPR']}} data
|
|
34
36
|
* @param {LH.Artifacts.ComputedContext} context
|
|
35
37
|
* @return {Promise<{metrics: LH.Artifacts.TimingSummary, debugInfo: Record<string,boolean>}>}
|
|
36
38
|
*/
|
|
@@ -38,7 +40,7 @@ declare class TimingSummary {
|
|
|
38
40
|
trace: LH.Trace;
|
|
39
41
|
devtoolsLog: LH.DevtoolsLog;
|
|
40
42
|
gatherContext: LH.Artifacts["GatherContext"];
|
|
41
|
-
settings: LH.
|
|
43
|
+
settings: LH.Artifacts.ComputedSettings;
|
|
42
44
|
URL: LH.Artifacts["URL"];
|
|
43
45
|
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
44
46
|
HostDPR: LH.Artifacts["HostDPR"];
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import log from 'lighthouse-logger';
|
|
8
|
-
|
|
7
|
+
import log from '../../lib/lighthouse-logger.js';
|
|
9
8
|
import {ProcessedTrace} from '../processed-trace.js';
|
|
10
9
|
import {ProcessedNavigation} from '../processed-navigation.js';
|
|
11
10
|
import {Speedline} from '../speedline.js';
|
|
@@ -28,7 +27,7 @@ class TimingSummary {
|
|
|
28
27
|
* @param {LH.Trace} trace
|
|
29
28
|
* @param {LH.DevtoolsLog} devtoolsLog
|
|
30
29
|
* @param {LH.Artifacts['GatherContext']} gatherContext
|
|
31
|
-
* @param {LH.
|
|
30
|
+
* @param {LH.Artifacts.ComputedSettings} settings
|
|
32
31
|
* @param {LH.Artifacts['URL']} URL
|
|
33
32
|
* @param {LH.Artifacts['SourceMaps']} SourceMaps
|
|
34
33
|
* @param {LH.Artifacts['HostDPR']} HostDPR
|
|
@@ -149,7 +148,7 @@ class TimingSummary {
|
|
|
149
148
|
return {metrics, debugInfo};
|
|
150
149
|
}
|
|
151
150
|
/**
|
|
152
|
-
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, gatherContext: LH.Artifacts['GatherContext']; settings: LH.
|
|
151
|
+
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, gatherContext: LH.Artifacts['GatherContext']; settings: LH.Artifacts.ComputedSettings, URL: LH.Artifacts['URL'], SourceMaps: LH.Artifacts['SourceMaps'], HostDPR: LH.Artifacts['HostDPR']}} data
|
|
153
152
|
* @param {LH.Artifacts.ComputedContext} context
|
|
154
153
|
* @return {Promise<{metrics: LH.Artifacts.TimingSummary, debugInfo: Record<string,boolean>}>}
|
|
155
154
|
*/
|
|
@@ -2,7 +2,9 @@ export { NavigationInsightsComputed as NavigationInsights };
|
|
|
2
2
|
declare const NavigationInsightsComputed: typeof NavigationInsights & {
|
|
3
3
|
request: (dependencies: {
|
|
4
4
|
trace: LH.Trace;
|
|
5
|
-
settings:
|
|
5
|
+
settings: Partial<import("../index.js").Util.ImmutableObject<Pick<import("../../types/lhr/settings.js").ConfigSettings, "throttlingMethod"> & Partial<Omit<import("../../types/lhr/settings.js").ConfigSettings, "throttling">> & {
|
|
6
|
+
throttling?: Partial<import("../index.js").Config.Settings["throttling"]>;
|
|
7
|
+
}>>;
|
|
6
8
|
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
7
9
|
HostDPR: LH.Artifacts["HostDPR"];
|
|
8
10
|
}, context: LH.Artifacts.ComputedContext) => Promise<import("@paulirish/trace_engine/models/trace/insights/types.js").InsightSet>;
|
|
@@ -13,12 +15,12 @@ declare const NavigationInsightsComputed: typeof NavigationInsights & {
|
|
|
13
15
|
*/
|
|
14
16
|
declare class NavigationInsights {
|
|
15
17
|
/**
|
|
16
|
-
* @param {{trace: LH.Trace, settings: LH.
|
|
18
|
+
* @param {{trace: LH.Trace, settings: Partial<LH.Artifacts.ComputedSettings>, SourceMaps: LH.Artifacts['SourceMaps'], HostDPR: LH.Artifacts['HostDPR']}} data
|
|
17
19
|
* @param {LH.Artifacts.ComputedContext} context
|
|
18
20
|
*/
|
|
19
21
|
static compute_(data: {
|
|
20
22
|
trace: LH.Trace;
|
|
21
|
-
settings: LH.
|
|
23
|
+
settings: Partial<LH.Artifacts.ComputedSettings>;
|
|
22
24
|
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
23
25
|
HostDPR: LH.Artifacts["HostDPR"];
|
|
24
26
|
}, context: LH.Artifacts.ComputedContext): Promise<import("@paulirish/trace_engine/models/trace/insights/types.js").InsightSet>;
|
|
@@ -15,7 +15,7 @@ import {TraceEngineResult} from './trace-engine-result.js';
|
|
|
15
15
|
*/
|
|
16
16
|
class NavigationInsights {
|
|
17
17
|
/**
|
|
18
|
-
* @param {{trace: LH.Trace, settings: LH.
|
|
18
|
+
* @param {{trace: LH.Trace, settings: Partial<LH.Artifacts.ComputedSettings>, SourceMaps: LH.Artifacts['SourceMaps'], HostDPR: LH.Artifacts['HostDPR']}} data
|
|
19
19
|
* @param {LH.Artifacts.ComputedContext} context
|
|
20
20
|
*/
|
|
21
21
|
static async compute_(data, context) {
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import log from 'lighthouse-logger';
|
|
8
|
-
|
|
7
|
+
import log from '../lib/lighthouse-logger.js';
|
|
9
8
|
import * as Lantern from '../lib/lantern/lantern.js';
|
|
10
9
|
import {makeComputedArtifact} from './computed-artifact.js';
|
|
11
10
|
import {NetworkRecords} from './network-records.js';
|
|
@@ -3,7 +3,9 @@ declare const PageDependencyGraphComputed: typeof PageDependencyGraph & {
|
|
|
3
3
|
request: (dependencies: {
|
|
4
4
|
trace: LH.Trace;
|
|
5
5
|
devtoolsLog: LH.DevtoolsLog;
|
|
6
|
-
settings:
|
|
6
|
+
settings: Partial<import("../index.js").Util.ImmutableObject<Pick<import("../../types/lhr/settings.js").ConfigSettings, "throttlingMethod"> & Partial<Omit<import("../../types/lhr/settings.js").ConfigSettings, "throttling">> & {
|
|
7
|
+
throttling?: Partial<import("../index.js").Config.Settings["throttling"]>;
|
|
8
|
+
}>>;
|
|
7
9
|
URL: LH.Artifacts["URL"];
|
|
8
10
|
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
9
11
|
HostDPR: LH.Artifacts["HostDPR"];
|
|
@@ -12,14 +14,14 @@ declare const PageDependencyGraphComputed: typeof PageDependencyGraph & {
|
|
|
12
14
|
};
|
|
13
15
|
declare class PageDependencyGraph {
|
|
14
16
|
/**
|
|
15
|
-
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, settings: LH.
|
|
17
|
+
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, settings: Partial<LH.Artifacts.ComputedSettings>, URL: LH.Artifacts['URL'], SourceMaps: LH.Artifacts['SourceMaps'], HostDPR: LH.Artifacts['HostDPR'], fromTrace: boolean}} data
|
|
16
18
|
* @param {LH.Artifacts.ComputedContext} context
|
|
17
19
|
* @return {Promise<LH.Gatherer.Simulation.GraphNode>}
|
|
18
20
|
*/
|
|
19
21
|
static compute_(data: {
|
|
20
22
|
trace: LH.Trace;
|
|
21
23
|
devtoolsLog: LH.DevtoolsLog;
|
|
22
|
-
settings: LH.
|
|
24
|
+
settings: Partial<LH.Artifacts.ComputedSettings>;
|
|
23
25
|
URL: LH.Artifacts["URL"];
|
|
24
26
|
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
25
27
|
HostDPR: LH.Artifacts["HostDPR"];
|
|
@@ -13,7 +13,7 @@ import {TraceEngineResult} from './trace-engine-result.js';
|
|
|
13
13
|
|
|
14
14
|
class PageDependencyGraph {
|
|
15
15
|
/**
|
|
16
|
-
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, settings: LH.
|
|
16
|
+
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, settings: Partial<LH.Artifacts.ComputedSettings>, URL: LH.Artifacts['URL'], SourceMaps: LH.Artifacts['SourceMaps'], HostDPR: LH.Artifacts['HostDPR'], fromTrace: boolean}} data
|
|
17
17
|
* @param {LH.Artifacts.ComputedContext} context
|
|
18
18
|
* @return {Promise<LH.Gatherer.Simulation.GraphNode>}
|
|
19
19
|
*/
|
|
@@ -36,7 +36,10 @@ class PageDependencyGraph {
|
|
|
36
36
|
return graph;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
// Exclude data: URIs to match TraceEngine's NetworkRequestsHandler.
|
|
40
|
+
const lanternRequests = networkRecords
|
|
41
|
+
.filter(record => !record.url.startsWith('data:'))
|
|
42
|
+
.map(NetworkRequest.asLanternNetworkRequest);
|
|
40
43
|
return Lantern.Graph.PageDependencyGraph.createGraph(mainThreadEvents, lanternRequests, URL);
|
|
41
44
|
}
|
|
42
45
|
}
|
|
@@ -2,7 +2,9 @@ export { TraceEngineResultComputed as TraceEngineResult };
|
|
|
2
2
|
declare const TraceEngineResultComputed: typeof TraceEngineResult & {
|
|
3
3
|
request: (dependencies: {
|
|
4
4
|
trace: LH.Trace;
|
|
5
|
-
settings: LH.
|
|
5
|
+
settings: Partial<LH.Util.ImmutableObject<Pick<import("../../types/lhr/settings.js").ConfigSettings, "throttlingMethod"> & Partial<Omit<import("../../types/lhr/settings.js").ConfigSettings, "throttling">> & {
|
|
6
|
+
throttling?: Partial<LH.Config.Settings["throttling"]>;
|
|
7
|
+
}>>;
|
|
6
8
|
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
7
9
|
HostDPR: LH.Artifacts["HostDPR"];
|
|
8
10
|
}, context: LH.Artifacts.ComputedContext) => Promise<LH.Artifacts.TraceEngineResult>;
|
|
@@ -13,12 +15,12 @@ declare const TraceEngineResultComputed: typeof TraceEngineResult & {
|
|
|
13
15
|
declare class TraceEngineResult {
|
|
14
16
|
/**
|
|
15
17
|
* @param {LH.TraceEvent[]} _traceEvents
|
|
16
|
-
* @param {LH.
|
|
18
|
+
* @param {Partial<LH.Artifacts.ComputedSettings>} settings
|
|
17
19
|
* @param {LH.Artifacts['SourceMaps']} SourceMaps
|
|
18
20
|
* @param {LH.Artifacts['HostDPR']} HostDPR
|
|
19
21
|
* @return {Promise<LH.Artifacts.TraceEngineResult>}
|
|
20
22
|
*/
|
|
21
|
-
static runTraceEngine(_traceEvents: LH.TraceEvent[], settings: LH.
|
|
23
|
+
static runTraceEngine(_traceEvents: LH.TraceEvent[], settings: Partial<LH.Artifacts.ComputedSettings>, SourceMaps: LH.Artifacts["SourceMaps"], HostDPR: LH.Artifacts["HostDPR"]): Promise<LH.Artifacts.TraceEngineResult>;
|
|
22
24
|
/**
|
|
23
25
|
* Adapts the given DevTools function that returns a localized string to one
|
|
24
26
|
* that returns a LH.IcuMessage.
|
|
@@ -51,13 +53,13 @@ declare class TraceEngineResult {
|
|
|
51
53
|
*/
|
|
52
54
|
static localizeInsights(insightSets: import("@paulirish/trace_engine/models/trace/insights/types.js").TraceInsightSets): void;
|
|
53
55
|
/**
|
|
54
|
-
* @param {{trace: LH.Trace, settings: LH.
|
|
56
|
+
* @param {{trace: LH.Trace, settings: Partial<LH.Artifacts.ComputedSettings>, SourceMaps: LH.Artifacts['SourceMaps'], HostDPR: LH.Artifacts['HostDPR']}} data
|
|
55
57
|
* @param {LH.Artifacts.ComputedContext} context
|
|
56
58
|
* @return {Promise<LH.Artifacts.TraceEngineResult>}
|
|
57
59
|
*/
|
|
58
60
|
static compute_(data: {
|
|
59
61
|
trace: LH.Trace;
|
|
60
|
-
settings: LH.
|
|
62
|
+
settings: Partial<LH.Artifacts.ComputedSettings>;
|
|
61
63
|
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
62
64
|
HostDPR: LH.Artifacts["HostDPR"];
|
|
63
65
|
}, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.TraceEngineResult>;
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import log from 'lighthouse-logger';
|
|
8
|
-
|
|
7
|
+
import log from '../lib/lighthouse-logger.js';
|
|
9
8
|
import * as i18n from '../lib/i18n/i18n.js';
|
|
10
9
|
import * as Lantern from '../lib/lantern/lantern.js';
|
|
11
10
|
import * as TraceEngine from '../lib/trace-engine.js';
|
|
@@ -21,7 +20,7 @@ import * as LH from '../../types/lh.js';
|
|
|
21
20
|
class TraceEngineResult {
|
|
22
21
|
/**
|
|
23
22
|
* @param {LH.TraceEvent[]} _traceEvents
|
|
24
|
-
* @param {LH.
|
|
23
|
+
* @param {Partial<LH.Artifacts.ComputedSettings>} settings
|
|
25
24
|
* @param {LH.Artifacts['SourceMaps']} SourceMaps
|
|
26
25
|
* @param {LH.Artifacts['HostDPR']} HostDPR
|
|
27
26
|
* @return {Promise<LH.Artifacts.TraceEngineResult>}
|
|
@@ -35,7 +34,12 @@ class TraceEngineResult {
|
|
|
35
34
|
|
|
36
35
|
const lanternSettings = {};
|
|
37
36
|
if (settings.throttlingMethod) lanternSettings.throttlingMethod = settings.throttlingMethod;
|
|
38
|
-
if (settings.throttling)
|
|
37
|
+
if (settings.throttling) {
|
|
38
|
+
lanternSettings.throttling = {
|
|
39
|
+
...Lantern.Simulation.Constants.throttling.mobileSlow4G,
|
|
40
|
+
...settings.throttling,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
39
43
|
if (settings.precomputedLanternData) {
|
|
40
44
|
lanternSettings.precomputedLanternData = settings.precomputedLanternData;
|
|
41
45
|
}
|
|
@@ -73,15 +77,6 @@ class TraceEngineResult {
|
|
|
73
77
|
const insights = processor.insights;
|
|
74
78
|
this.localizeInsights(insights);
|
|
75
79
|
|
|
76
|
-
// Release intermediate handler state retained in module-level TraceHandlers singletons
|
|
77
|
-
// and static Lantern simulation node timings after trace processing completes.
|
|
78
|
-
for (const handler of Object.values(TraceEngine.TraceHandlers)) {
|
|
79
|
-
handler.reset();
|
|
80
|
-
}
|
|
81
|
-
if (!process.env.LANTERN_DEBUG) {
|
|
82
|
-
Lantern.Simulation.Simulator.allNodeTimings.clear();
|
|
83
|
-
}
|
|
84
|
-
|
|
85
80
|
return {data, insights};
|
|
86
81
|
}
|
|
87
82
|
|
|
@@ -237,7 +232,7 @@ class TraceEngineResult {
|
|
|
237
232
|
}
|
|
238
233
|
|
|
239
234
|
/**
|
|
240
|
-
* @param {{trace: LH.Trace, settings: LH.
|
|
235
|
+
* @param {{trace: LH.Trace, settings: Partial<LH.Artifacts.ComputedSettings>, SourceMaps: LH.Artifacts['SourceMaps'], HostDPR: LH.Artifacts['HostDPR']}} data
|
|
241
236
|
* @param {LH.Artifacts.ComputedContext} context
|
|
242
237
|
* @return {Promise<LH.Artifacts.TraceEngineResult>}
|
|
243
238
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { UnusedCSSComputed as UnusedCSS };
|
|
2
2
|
export type StyleSheetInfo = LH.Artifacts.CSSStyleSheetInfo & {
|
|
3
|
-
networkRecord: LH.Artifacts.NetworkRequest;
|
|
3
|
+
networkRecord: LH.Artifacts.NetworkRequest | undefined;
|
|
4
4
|
usedRules: Array<LH.Crdp.CSS.RuleUsage>;
|
|
5
5
|
};
|
|
6
6
|
declare const UnusedCSSComputed: typeof UnusedCSS & {
|
|
@@ -10,7 +10,7 @@ declare const UnusedCSSComputed: typeof UnusedCSS & {
|
|
|
10
10
|
devtoolsLog: LH.DevtoolsLog;
|
|
11
11
|
}, context: LH.Artifacts.ComputedContext) => Promise<import("../../types.js").Audit.ByteEfficiencyItem[]>;
|
|
12
12
|
};
|
|
13
|
-
/** @typedef {LH.Artifacts.CSSStyleSheetInfo & {networkRecord: LH.Artifacts.NetworkRequest, usedRules: Array<LH.Crdp.CSS.RuleUsage>}} StyleSheetInfo */
|
|
13
|
+
/** @typedef {LH.Artifacts.CSSStyleSheetInfo & {networkRecord: LH.Artifacts.NetworkRequest|undefined, usedRules: Array<LH.Crdp.CSS.RuleUsage>}} StyleSheetInfo */
|
|
14
14
|
declare class UnusedCSS {
|
|
15
15
|
/**
|
|
16
16
|
* @param {Array<LH.Artifacts.CSSStyleSheetInfo>} styles The output of the Styles gatherer.
|
|
@@ -11,7 +11,7 @@ import {estimateCompressedContentSize} from '../lib/script-helpers.js';
|
|
|
11
11
|
|
|
12
12
|
const PREVIEW_LENGTH = 100;
|
|
13
13
|
|
|
14
|
-
/** @typedef {LH.Artifacts.CSSStyleSheetInfo & {networkRecord: LH.Artifacts.NetworkRequest, usedRules: Array<LH.Crdp.CSS.RuleUsage>}} StyleSheetInfo */
|
|
14
|
+
/** @typedef {LH.Artifacts.CSSStyleSheetInfo & {networkRecord: LH.Artifacts.NetworkRequest|undefined, usedRules: Array<LH.Crdp.CSS.RuleUsage>}} StyleSheetInfo */
|
|
15
15
|
|
|
16
16
|
class UnusedCSS {
|
|
17
17
|
/**
|
package/core/config/config.js
CHANGED
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import log from 'lighthouse-logger';
|
|
8
|
-
|
|
7
|
+
import log from '../../lib/lighthouse-logger.js';
|
|
9
8
|
import * as constants from '../../config/constants.js';
|
|
10
9
|
import {pageFunctions} from '../../lib/page-functions.js';
|
|
11
10
|
import * as i18n from '../../lib/i18n/i18n.js';
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import log from 'lighthouse-logger';
|
|
8
|
-
|
|
7
|
+
import log from '../../lib/lighthouse-logger.js';
|
|
9
8
|
import {waitForFullyLoaded, waitForFrameNavigated, waitForUserToContinue} from './wait-for-condition.js';
|
|
10
9
|
import * as constants from '../../config/constants.js';
|
|
11
10
|
import * as i18n from '../../lib/i18n/i18n.js';
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import {EventEmitter} from 'events';
|
|
13
13
|
|
|
14
|
-
import log from 'lighthouse-logger';
|
|
15
|
-
|
|
14
|
+
import log from '../../lib/lighthouse-logger.js';
|
|
16
15
|
import * as LH from '../../../types/lh.js';
|
|
17
16
|
import {NetworkRecorder} from '../../lib/network-recorder.js';
|
|
18
17
|
import {NetworkRequest} from '../../lib/network-request.js';
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import log from 'lighthouse-logger';
|
|
8
|
-
|
|
7
|
+
import log from '../../lib/lighthouse-logger.js';
|
|
9
8
|
import * as storage from './storage.js';
|
|
10
9
|
import * as emulation from '../../lib/emulation.js';
|
|
11
10
|
import {pageFunctions} from '../../lib/page-functions.js';
|
package/core/gather/driver.js
CHANGED
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import log from 'lighthouse-logger';
|
|
8
|
-
|
|
7
|
+
import log from '../lib/lighthouse-logger.js';
|
|
9
8
|
import {ExecutionContext} from './driver/execution-context.js';
|
|
10
9
|
import {TargetManager} from './driver/target-manager.js';
|
|
11
10
|
import {Fetcher} from './fetcher.js';
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
* @see https://agenticresourcediscovery.org/spec/
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import log from 'lighthouse-logger';
|
|
15
14
|
import LinkHeader from 'http-link-header';
|
|
16
15
|
|
|
16
|
+
import log from '../../../lib/lighthouse-logger.js';
|
|
17
17
|
import BaseGatherer from '../../base-gatherer.js';
|
|
18
18
|
import RobotsTxt from '../seo/robots-txt.js';
|
|
19
19
|
import * as Lantern from '../../../lib/lantern/lantern.js';
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
* and attribute information. Executes script in the context of the page.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import log from 'lighthouse-logger';
|
|
13
|
-
|
|
12
|
+
import log from '../../lib/lighthouse-logger.js';
|
|
14
13
|
import BaseGatherer from '../base-gatherer.js';
|
|
15
14
|
import {pageFunctions} from '../../lib/page-functions.js';
|
|
16
15
|
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
* @fileoverview Collects all stylesheets and their contents.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import log from 'lighthouse-logger';
|
|
12
|
-
|
|
11
|
+
import log from '../../lib/lighthouse-logger.js';
|
|
13
12
|
import BaseGatherer from '../base-gatherer.js';
|
|
14
13
|
import {Sentry} from '../../lib/sentry.js';
|
|
15
14
|
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import puppeteer from 'puppeteer-core';
|
|
8
|
-
import log from 'lighthouse-logger';
|
|
9
8
|
|
|
9
|
+
import log from '../lib/lighthouse-logger.js';
|
|
10
10
|
import {Driver} from './driver.js';
|
|
11
11
|
import {Runner} from '../runner.js';
|
|
12
12
|
import {getEmptyArtifactState, collectPhaseArtifacts, awaitArtifacts} from './runner-helpers.js';
|
package/core/gather/session.js
CHANGED
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import EventEmitter from 'events';
|
|
8
8
|
|
|
9
|
-
import log from 'lighthouse-logger';
|
|
10
|
-
|
|
9
|
+
import log from '../lib/lighthouse-logger.js';
|
|
11
10
|
import {LighthouseError} from '../lib/lh-error.js';
|
|
12
11
|
|
|
13
12
|
// Controls how long to wait for a response after sending a DevTools protocol command.
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import log from 'lighthouse-logger';
|
|
8
|
-
|
|
7
|
+
import log from '../lib/lighthouse-logger.js';
|
|
9
8
|
import {Driver} from './driver.js';
|
|
10
9
|
import {Runner} from '../runner.js';
|
|
11
10
|
import {getEmptyArtifactState, collectPhaseArtifacts, awaitArtifacts} from './runner-helpers.js';
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import log from 'lighthouse-logger';
|
|
8
|
-
|
|
7
|
+
import log from '../lib/lighthouse-logger.js';
|
|
9
8
|
import {Driver} from './driver.js';
|
|
10
9
|
import {Runner} from '../runner.js';
|
|
11
10
|
import {getEmptyArtifactState, collectPhaseArtifacts, awaitArtifacts} from './runner-helpers.js';
|
package/core/lib/asset-saver.js
CHANGED
|
@@ -10,8 +10,7 @@ import stream from 'stream';
|
|
|
10
10
|
import url from 'url';
|
|
11
11
|
import {createGzip, gunzipSync} from 'zlib';
|
|
12
12
|
|
|
13
|
-
import log from 'lighthouse-logger';
|
|
14
|
-
|
|
13
|
+
import log from './lighthouse-logger.js';
|
|
15
14
|
import * as Lantern from './lantern/lantern.js';
|
|
16
15
|
import lanternTraceSaver from './lantern-trace-saver.js';
|
|
17
16
|
import {MetricTraceEvents} from './traces/metric-trace-events.js';
|