lighthouse 11.0.0-dev.20230828 → 11.0.0-dev.20230830
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/core/audits/bf-cache.js +1 -0
- package/core/audits/bootup-time.js +1 -0
- package/core/audits/byte-efficiency/duplicated-javascript.js +1 -0
- package/core/audits/byte-efficiency/efficient-animated-content.js +1 -0
- package/core/audits/byte-efficiency/legacy-javascript.js +1 -0
- package/core/audits/byte-efficiency/modern-image-formats.js +1 -0
- package/core/audits/byte-efficiency/offscreen-images.js +1 -0
- package/core/audits/byte-efficiency/render-blocking-resources.js +1 -0
- package/core/audits/byte-efficiency/total-byte-weight.js +1 -0
- package/core/audits/byte-efficiency/unminified-css.js +1 -0
- package/core/audits/byte-efficiency/unminified-javascript.js +1 -0
- package/core/audits/byte-efficiency/unused-css-rules.js +1 -0
- package/core/audits/byte-efficiency/unused-javascript.js +1 -0
- package/core/audits/byte-efficiency/uses-long-cache-ttl.js +1 -0
- package/core/audits/byte-efficiency/uses-optimized-images.js +1 -0
- package/core/audits/byte-efficiency/uses-responsive-images-snapshot.js +1 -0
- package/core/audits/byte-efficiency/uses-responsive-images.js +1 -0
- package/core/audits/byte-efficiency/uses-text-compression.js +1 -0
- package/core/audits/critical-request-chains.js +1 -0
- package/core/audits/dobetterweb/dom-size.js +1 -0
- package/core/audits/dobetterweb/no-document-write.js +1 -0
- package/core/audits/dobetterweb/uses-http2.js +1 -0
- package/core/audits/dobetterweb/uses-passive-event-listeners.js +1 -0
- package/core/audits/font-display.js +1 -0
- package/core/audits/largest-contentful-paint-element.js +1 -0
- package/core/audits/layout-shift-elements.js +1 -0
- package/core/audits/lcp-lazy-loaded.js +1 -0
- package/core/audits/long-tasks.js +1 -0
- package/core/audits/mainthread-work-breakdown.js +1 -0
- package/core/audits/non-composited-animations.js +1 -0
- package/core/audits/prioritize-lcp-image.js +1 -0
- package/core/audits/redirects.js +1 -0
- package/core/audits/server-response-time.js +1 -0
- package/core/audits/third-party-facades.js +1 -0
- package/core/audits/third-party-summary.js +1 -0
- package/core/audits/unsized-images.js +1 -0
- package/core/audits/user-timings.js +1 -0
- package/core/audits/uses-rel-preconnect.js +1 -0
- package/core/audits/uses-rel-preload.js +1 -0
- package/core/audits/viewport.js +1 -0
- package/core/audits/work-during-interaction.js +1 -0
- package/core/config/config-helpers.js +1 -1
- package/core/config/config.js +1 -1
- package/core/lib/i18n/i18n.js +1 -1
- package/core/runner.js +1 -1
- package/flow-report/tsconfig.json +0 -1
- package/package.json +1 -1
- package/report/generator/flow-report-assets.js +1 -1
- package/report/generator/report-assets.js +1 -1
- package/report/generator/tsconfig.json +1 -1
- package/root.js +1 -1
- package/shared/localization/format.js +1 -1
- package/shared/localization/locales.js +1 -1
- package/shared/tsconfig.json +0 -1
- package/tsconfig.json +0 -1
- package/types/audit.d.ts +2 -0
- /package/{esm-utils.d.ts → shared/esm-utils.d.ts} +0 -0
- /package/{esm-utils.js → shared/esm-utils.js} +0 -0
package/core/audits/bf-cache.js
CHANGED
|
@@ -47,6 +47,7 @@ class DuplicatedJavascript extends ByteEfficiencyAudit {
|
|
|
47
47
|
title: str_(UIStrings.title),
|
|
48
48
|
description: str_(UIStrings.description),
|
|
49
49
|
scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,
|
|
50
|
+
guidanceLevel: 2,
|
|
50
51
|
requiredArtifacts: ['devtoolsLogs', 'traces', 'SourceMaps', 'Scripts',
|
|
51
52
|
'GatherContext', 'URL'],
|
|
52
53
|
};
|
|
@@ -37,6 +37,7 @@ class EfficientAnimatedContent extends ByteEfficiencyAudit {
|
|
|
37
37
|
title: str_(UIStrings.title),
|
|
38
38
|
description: str_(UIStrings.description),
|
|
39
39
|
scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,
|
|
40
|
+
guidanceLevel: 3,
|
|
40
41
|
requiredArtifacts: ['devtoolsLogs', 'traces', 'GatherContext', 'URL'],
|
|
41
42
|
};
|
|
42
43
|
}
|
|
@@ -118,6 +118,7 @@ class LegacyJavascript extends ByteEfficiencyAudit {
|
|
|
118
118
|
scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,
|
|
119
119
|
description: str_(UIStrings.description),
|
|
120
120
|
title: str_(UIStrings.title),
|
|
121
|
+
guidanceLevel: 2,
|
|
121
122
|
requiredArtifacts: ['devtoolsLogs', 'traces', 'Scripts', 'SourceMaps',
|
|
122
123
|
'GatherContext', 'URL'],
|
|
123
124
|
};
|
|
@@ -35,6 +35,7 @@ class ModernImageFormats extends ByteEfficiencyAudit {
|
|
|
35
35
|
title: str_(UIStrings.title),
|
|
36
36
|
description: str_(UIStrings.description),
|
|
37
37
|
scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,
|
|
38
|
+
guidanceLevel: 3,
|
|
38
39
|
requiredArtifacts: ['OptimizedImages', 'devtoolsLogs', 'traces', 'URL', 'GatherContext',
|
|
39
40
|
'ImageElements'],
|
|
40
41
|
};
|
|
@@ -50,6 +50,7 @@ class OffscreenImages extends ByteEfficiencyAudit {
|
|
|
50
50
|
description: str_(UIStrings.description),
|
|
51
51
|
scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,
|
|
52
52
|
supportedModes: ['navigation'],
|
|
53
|
+
guidanceLevel: 2,
|
|
53
54
|
requiredArtifacts: ['ImageElements', 'ViewportDimensions', 'GatherContext', 'devtoolsLogs',
|
|
54
55
|
'traces', 'URL'],
|
|
55
56
|
};
|
|
@@ -115,6 +115,7 @@ class RenderBlockingResources extends Audit {
|
|
|
115
115
|
supportedModes: ['navigation'],
|
|
116
116
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
117
117
|
description: str_(UIStrings.description),
|
|
118
|
+
guidanceLevel: 2,
|
|
118
119
|
// TODO: look into adding an `optionalArtifacts` property that captures the non-required nature
|
|
119
120
|
// of CSSUsage
|
|
120
121
|
requiredArtifacts: ['URL', 'TagsBlockingFirstPaint', 'traces', 'devtoolsLogs', 'CSSUsage',
|
|
@@ -35,6 +35,7 @@ class UnminifiedCSS extends ByteEfficiencyAudit {
|
|
|
35
35
|
title: str_(UIStrings.title),
|
|
36
36
|
description: str_(UIStrings.description),
|
|
37
37
|
scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,
|
|
38
|
+
guidanceLevel: 3,
|
|
38
39
|
requiredArtifacts: ['CSSUsage', 'devtoolsLogs', 'traces', 'URL', 'GatherContext'],
|
|
39
40
|
};
|
|
40
41
|
}
|
|
@@ -43,6 +43,7 @@ class UnminifiedJavaScript extends ByteEfficiencyAudit {
|
|
|
43
43
|
title: str_(UIStrings.title),
|
|
44
44
|
description: str_(UIStrings.description),
|
|
45
45
|
scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,
|
|
46
|
+
guidanceLevel: 3,
|
|
46
47
|
requiredArtifacts: ['Scripts', 'devtoolsLogs', 'traces', 'GatherContext', 'URL'],
|
|
47
48
|
};
|
|
48
49
|
}
|
|
@@ -33,6 +33,7 @@ class UnusedCSSRules extends ByteEfficiencyAudit {
|
|
|
33
33
|
title: str_(UIStrings.title),
|
|
34
34
|
description: str_(UIStrings.description),
|
|
35
35
|
scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,
|
|
36
|
+
guidanceLevel: 2,
|
|
36
37
|
requiredArtifacts: ['CSSUsage', 'URL', 'devtoolsLogs', 'traces', 'GatherContext'],
|
|
37
38
|
};
|
|
38
39
|
}
|
|
@@ -67,6 +67,7 @@ class UnusedJavaScript extends ByteEfficiencyAudit {
|
|
|
67
67
|
title: str_(UIStrings.title),
|
|
68
68
|
description: str_(UIStrings.description),
|
|
69
69
|
scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,
|
|
70
|
+
guidanceLevel: 2,
|
|
70
71
|
requiredArtifacts: ['JsUsage', 'Scripts', 'SourceMaps', 'GatherContext',
|
|
71
72
|
'devtoolsLogs', 'traces', 'URL'],
|
|
72
73
|
};
|
|
@@ -35,6 +35,7 @@ class UsesOptimizedImages extends ByteEfficiencyAudit {
|
|
|
35
35
|
title: str_(UIStrings.title),
|
|
36
36
|
description: str_(UIStrings.description),
|
|
37
37
|
scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,
|
|
38
|
+
guidanceLevel: 2,
|
|
38
39
|
requiredArtifacts: ['OptimizedImages', 'ImageElements', 'GatherContext', 'devtoolsLogs',
|
|
39
40
|
'traces', 'URL'],
|
|
40
41
|
};
|
|
@@ -43,6 +43,7 @@ class UsesResponsiveImagesSnapshot extends Audit {
|
|
|
43
43
|
failureTitle: str_(UIStrings.failureTitle),
|
|
44
44
|
description: UsesResponsiveImages.str_(UsesResponsiveImages.UIStrings.description),
|
|
45
45
|
supportedModes: ['snapshot'],
|
|
46
|
+
guidanceLevel: 2,
|
|
46
47
|
requiredArtifacts: ['ImageElements', 'ViewportDimensions'],
|
|
47
48
|
};
|
|
48
49
|
}
|
|
@@ -46,6 +46,7 @@ class UsesResponsiveImages extends ByteEfficiencyAudit {
|
|
|
46
46
|
title: str_(UIStrings.title),
|
|
47
47
|
description: str_(UIStrings.description),
|
|
48
48
|
scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,
|
|
49
|
+
guidanceLevel: 2,
|
|
49
50
|
requiredArtifacts: ['ImageElements', 'ViewportDimensions', 'GatherContext',
|
|
50
51
|
'devtoolsLogs', 'traces', 'URL'],
|
|
51
52
|
};
|
|
@@ -37,6 +37,7 @@ class ResponsesAreCompressed extends ByteEfficiencyAudit {
|
|
|
37
37
|
title: str_(UIStrings.title),
|
|
38
38
|
description: str_(UIStrings.description),
|
|
39
39
|
scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,
|
|
40
|
+
guidanceLevel: 3,
|
|
40
41
|
requiredArtifacts: ['ResponseCompression', 'GatherContext', 'devtoolsLogs', 'traces', 'URL'],
|
|
41
42
|
};
|
|
42
43
|
}
|
|
@@ -37,6 +37,7 @@ class CriticalRequestChains extends Audit {
|
|
|
37
37
|
description: str_(UIStrings.description),
|
|
38
38
|
scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
|
|
39
39
|
supportedModes: ['navigation'],
|
|
40
|
+
guidanceLevel: 1,
|
|
40
41
|
requiredArtifacts: ['traces', 'devtoolsLogs', 'URL'],
|
|
41
42
|
};
|
|
42
43
|
}
|
|
@@ -54,6 +54,7 @@ class DOMSize extends Audit {
|
|
|
54
54
|
failureTitle: str_(UIStrings.failureTitle),
|
|
55
55
|
description: str_(UIStrings.description),
|
|
56
56
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
57
|
+
guidanceLevel: 1,
|
|
57
58
|
requiredArtifacts: ['DOMStats', 'URL', 'GatherContext'],
|
|
58
59
|
__internalOptionalArtifacts: ['traces', 'devtoolsLogs'],
|
|
59
60
|
};
|
|
@@ -53,6 +53,7 @@ class NoDocWriteAudit extends ViolationAudit {
|
|
|
53
53
|
title: str_(UIStrings.title),
|
|
54
54
|
failureTitle: str_(UIStrings.failureTitle),
|
|
55
55
|
description: str_(UIStrings.description),
|
|
56
|
+
guidanceLevel: 2,
|
|
56
57
|
requiredArtifacts: ['ConsoleMessages', 'SourceMaps', 'Scripts'],
|
|
57
58
|
};
|
|
58
59
|
}
|
|
@@ -62,6 +62,7 @@ class UsesHTTP2Audit extends Audit {
|
|
|
62
62
|
title: str_(UIStrings.title),
|
|
63
63
|
description: str_(UIStrings.description),
|
|
64
64
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
65
|
+
guidanceLevel: 3,
|
|
65
66
|
supportedModes: ['timespan', 'navigation'],
|
|
66
67
|
requiredArtifacts: ['URL', 'devtoolsLogs', 'traces', 'GatherContext'],
|
|
67
68
|
};
|
|
@@ -36,6 +36,7 @@ class PassiveEventsAudit extends ViolationAudit {
|
|
|
36
36
|
title: str_(UIStrings.title),
|
|
37
37
|
failureTitle: str_(UIStrings.failureTitle),
|
|
38
38
|
description: str_(UIStrings.description),
|
|
39
|
+
guidanceLevel: 3,
|
|
39
40
|
requiredArtifacts: ['ConsoleMessages', 'SourceMaps', 'Scripts'],
|
|
40
41
|
};
|
|
41
42
|
}
|
|
@@ -47,6 +47,7 @@ class LargestContentfulPaintElement extends Audit {
|
|
|
47
47
|
title: str_(UIStrings.title),
|
|
48
48
|
description: str_(UIStrings.description),
|
|
49
49
|
scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
|
|
50
|
+
guidanceLevel: 1,
|
|
50
51
|
supportedModes: ['navigation'],
|
|
51
52
|
requiredArtifacts:
|
|
52
53
|
['traces', 'TraceElements', 'devtoolsLogs', 'GatherContext', 'settings', 'URL'],
|
|
@@ -33,6 +33,7 @@ class LargestContentfulPaintLazyLoaded extends Audit {
|
|
|
33
33
|
failureTitle: str_(UIStrings.failureTitle),
|
|
34
34
|
description: str_(UIStrings.description),
|
|
35
35
|
supportedModes: ['navigation'],
|
|
36
|
+
guidanceLevel: 3,
|
|
36
37
|
requiredArtifacts: ['TraceElements', 'ViewportDimensions', 'ImageElements',
|
|
37
38
|
'traces', 'devtoolsLogs', 'GatherContext', 'URL'],
|
|
38
39
|
};
|
|
@@ -110,6 +110,7 @@ class NonCompositedAnimations extends Audit {
|
|
|
110
110
|
scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
|
|
111
111
|
title: str_(UIStrings.title),
|
|
112
112
|
description: str_(UIStrings.description),
|
|
113
|
+
guidanceLevel: 2,
|
|
113
114
|
requiredArtifacts: ['TraceElements', 'HostUserAgent'],
|
|
114
115
|
};
|
|
115
116
|
}
|
|
@@ -38,6 +38,7 @@ class PrioritizeLcpImage extends Audit {
|
|
|
38
38
|
title: str_(UIStrings.title),
|
|
39
39
|
description: str_(UIStrings.description),
|
|
40
40
|
supportedModes: ['navigation'],
|
|
41
|
+
guidanceLevel: 3,
|
|
41
42
|
requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL', 'TraceElements'],
|
|
42
43
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
43
44
|
};
|
package/core/audits/redirects.js
CHANGED
|
@@ -31,6 +31,7 @@ class Redirects extends Audit {
|
|
|
31
31
|
description: str_(UIStrings.description),
|
|
32
32
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
33
33
|
supportedModes: ['navigation'],
|
|
34
|
+
guidanceLevel: 2,
|
|
34
35
|
requiredArtifacts: ['URL', 'GatherContext', 'devtoolsLogs', 'traces'],
|
|
35
36
|
};
|
|
36
37
|
}
|
|
@@ -37,6 +37,7 @@ class ServerResponseTime extends Audit {
|
|
|
37
37
|
failureTitle: str_(UIStrings.failureTitle),
|
|
38
38
|
description: str_(UIStrings.description),
|
|
39
39
|
supportedModes: ['navigation'],
|
|
40
|
+
guidanceLevel: 1,
|
|
40
41
|
requiredArtifacts: ['devtoolsLogs', 'URL', 'GatherContext'],
|
|
41
42
|
};
|
|
42
43
|
}
|
|
@@ -86,6 +86,7 @@ class ThirdPartyFacades extends Audit {
|
|
|
86
86
|
failureTitle: str_(UIStrings.failureTitle),
|
|
87
87
|
description: str_(UIStrings.description),
|
|
88
88
|
supportedModes: ['navigation'],
|
|
89
|
+
guidanceLevel: 3,
|
|
89
90
|
requiredArtifacts: ['traces', 'devtoolsLogs', 'URL', 'GatherContext'],
|
|
90
91
|
};
|
|
91
92
|
}
|
|
@@ -74,6 +74,7 @@ class ThirdPartySummary extends Audit {
|
|
|
74
74
|
title: str_(UIStrings.title),
|
|
75
75
|
failureTitle: str_(UIStrings.failureTitle),
|
|
76
76
|
description: str_(UIStrings.description),
|
|
77
|
+
guidanceLevel: 1,
|
|
77
78
|
requiredArtifacts: ['traces', 'devtoolsLogs', 'URL', 'GatherContext'],
|
|
78
79
|
};
|
|
79
80
|
}
|
|
@@ -62,6 +62,7 @@ class UsesRelPreconnectAudit extends Audit {
|
|
|
62
62
|
title: str_(UIStrings.title),
|
|
63
63
|
description: str_(UIStrings.description),
|
|
64
64
|
supportedModes: ['navigation'],
|
|
65
|
+
guidanceLevel: 3,
|
|
65
66
|
requiredArtifacts: ['traces', 'devtoolsLogs', 'URL', 'LinkElements'],
|
|
66
67
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
67
68
|
};
|
|
@@ -43,6 +43,7 @@ class UsesRelPreloadAudit extends Audit {
|
|
|
43
43
|
title: str_(UIStrings.title),
|
|
44
44
|
description: str_(UIStrings.description),
|
|
45
45
|
supportedModes: ['navigation'],
|
|
46
|
+
guidanceLevel: 3,
|
|
46
47
|
requiredArtifacts: ['devtoolsLogs', 'traces', 'URL'],
|
|
47
48
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
48
49
|
};
|
package/core/audits/viewport.js
CHANGED
|
@@ -60,6 +60,7 @@ class WorkDuringInteraction extends Audit {
|
|
|
60
60
|
description: str_(UIStrings.description),
|
|
61
61
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
62
62
|
supportedModes: ['timespan'],
|
|
63
|
+
guidanceLevel: 1,
|
|
63
64
|
requiredArtifacts: ['traces', 'devtoolsLogs', 'TraceElements'],
|
|
64
65
|
};
|
|
65
66
|
}
|
|
@@ -16,7 +16,7 @@ import ConfigPlugin from './config-plugin.js';
|
|
|
16
16
|
import {Runner} from '../runner.js';
|
|
17
17
|
import * as i18n from '../lib/i18n/i18n.js';
|
|
18
18
|
import * as validation from './validation.js';
|
|
19
|
-
import {getModuleDirectory} from '../../esm-utils.js';
|
|
19
|
+
import {getModuleDirectory} from '../../shared/esm-utils.js';
|
|
20
20
|
|
|
21
21
|
const require = createRequire(import.meta.url);
|
|
22
22
|
|
package/core/config/config.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
mergeConfigFragment,
|
|
29
29
|
mergeConfigFragmentArrayByKey,
|
|
30
30
|
} from './config-helpers.js';
|
|
31
|
-
import {getModuleDirectory} from '../../esm-utils.js';
|
|
31
|
+
import {getModuleDirectory} from '../../shared/esm-utils.js';
|
|
32
32
|
import * as format from '../../shared/localization/format.js';
|
|
33
33
|
|
|
34
34
|
const defaultConfigPath = path.join(
|
package/core/lib/i18n/i18n.js
CHANGED
|
@@ -15,7 +15,7 @@ import log from 'lighthouse-logger';
|
|
|
15
15
|
import {getAvailableLocales} from '../../../shared/localization/format.js';
|
|
16
16
|
import {LH_ROOT} from '../../../root.js';
|
|
17
17
|
import {isIcuMessage, formatMessage, DEFAULT_LOCALE} from '../../../shared/localization/format.js';
|
|
18
|
-
import {getModulePath} from '../../../esm-utils.js';
|
|
18
|
+
import {getModulePath} from '../../../shared/esm-utils.js';
|
|
19
19
|
|
|
20
20
|
const UIStrings = {
|
|
21
21
|
/** Used to show the duration in milliseconds that something lasted. The `{timeInMs}` placeholder will be replaced with the time duration, shown in milliseconds (e.g. 63 ms) */
|
package/core/runner.js
CHANGED
|
@@ -20,7 +20,7 @@ import {Sentry} from './lib/sentry.js';
|
|
|
20
20
|
import {ReportGenerator} from '../report/generator/report-generator.js';
|
|
21
21
|
import {LighthouseError} from './lib/lh-error.js';
|
|
22
22
|
import {lighthouseVersion} from '../root.js';
|
|
23
|
-
import {getModuleDirectory} from '../esm-utils.js';
|
|
23
|
+
import {getModuleDirectory} from '../shared/esm-utils.js';
|
|
24
24
|
import {EntityClassification} from './computed/entity-classification.js';
|
|
25
25
|
import UrlUtils from './lib/url-utils.js';
|
|
26
26
|
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import fs from 'fs';
|
|
9
9
|
|
|
10
10
|
import {flowReportAssets} from './flow-report-assets.js';
|
|
11
|
-
import {getModuleDirectory} from '../../esm-utils.js';
|
|
11
|
+
import {getModuleDirectory} from '../../shared/esm-utils.js';
|
|
12
12
|
|
|
13
13
|
const moduleDir = getModuleDirectory(import.meta);
|
|
14
14
|
|
package/root.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import fs from 'fs';
|
|
8
8
|
|
|
9
|
-
import {getModuleDirectory} from './esm-utils.js';
|
|
9
|
+
import {getModuleDirectory} from './shared/esm-utils.js';
|
|
10
10
|
|
|
11
11
|
const LH_ROOT = getModuleDirectory(import.meta);
|
|
12
12
|
const pkg = JSON.parse(fs.readFileSync(`${LH_ROOT}/package.json`, 'utf-8'));
|
|
@@ -8,7 +8,7 @@ import fs from 'fs';
|
|
|
8
8
|
|
|
9
9
|
import IntlMessageFormat from 'intl-messageformat';
|
|
10
10
|
|
|
11
|
-
import {getModuleDirectory} from '
|
|
11
|
+
import {getModuleDirectory} from '../esm-utils.js';
|
|
12
12
|
import {isObjectOfUnknownValues, isObjectOrArrayOfUnknownValues} from '../type-verifiers.js';
|
|
13
13
|
import {locales} from './locales.js';
|
|
14
14
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
import fs from 'fs';
|
|
25
25
|
|
|
26
|
-
import {getModuleDirectory} from '
|
|
26
|
+
import {getModuleDirectory} from '../esm-utils.js';
|
|
27
27
|
|
|
28
28
|
/** @typedef {import('../../types/lhr/settings').Locale} Locale */
|
|
29
29
|
/** @typedef {Record<string, {message: string}>} LhlMessages */
|
package/shared/tsconfig.json
CHANGED
package/tsconfig.json
CHANGED
package/types/audit.d.ts
CHANGED
|
@@ -54,6 +54,8 @@ declare module Audit {
|
|
|
54
54
|
scoreDisplayMode?: AuditResult.ScoreDisplayMode;
|
|
55
55
|
/** A list of gather modes that this audit is applicable to. */
|
|
56
56
|
supportedModes?: Gatherer.GatherMode[],
|
|
57
|
+
/** A number indicating how much guidance Lighthouse provides to solve the problem in this audit on a 1-3 scale. Higher means more guidance. */
|
|
58
|
+
guidanceLevel?: number;
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
interface ByteEfficiencyItem extends AuditDetails.OpportunityItem {
|
|
File without changes
|
|
File without changes
|