lighthouse 13.5.0-dev.20261016 → 13.5.0-dev.20261019
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-trace-engine/SKILL.md +154 -0
- package/commitlint.config.js +1 -1
- package/core/audits/insights/insight-audit.js +3 -2
- package/core/computed/metrics/time-to-first-byte.js +5 -3
- package/core/computed/navigation-insights.js +3 -2
- package/core/computed/trace-engine-result.js +22 -4
- package/core/config/config-helpers.js +2 -3
- package/core/config/config.js +1 -2
- package/core/gather/gatherers/inspector-issues.js +2 -0
- package/core/gather/gatherers/js-usage.js +2 -0
- package/core/gather/gatherers/scripts.d.ts +16 -3
- package/core/gather/gatherers/scripts.js +157 -14
- package/core/gather/gatherers/stylesheets.js +2 -0
- package/core/gather/gatherers/trace-elements.js +2 -1
- package/core/lib/cdt/Common.d.ts +1 -1
- package/core/lib/cdt/Common.js +2 -2
- package/core/lib/cdt/Platform.d.ts +7 -7
- package/core/lib/cdt/Platform.js +11 -8
- package/core/lib/cdt/SDK.d.ts +5 -1
- package/core/lib/cdt/SDK.js +4 -2
- package/core/lib/cdt/generated/ParsedURL.d.ts +0 -1
- package/core/lib/cdt/generated/ParsedURL.js +3 -9
- package/core/lib/cdt/generated/SourceMap.d.ts +24 -25
- package/core/lib/cdt/generated/SourceMap.js +7 -15
- package/core/lib/i18n/i18n.js +1 -2
- package/core/lib/legacy-javascript/legacy-javascript.d.ts +2 -2
- package/core/lib/legacy-javascript/legacy-javascript.js +1 -1
- package/core/runner.js +2 -2
- package/dist/report/flow.js +4 -4
- package/package.json +10 -30
- package/report/generator/flow-report-assets.js +1 -3
- package/report/generator/report-assets.js +1 -2
- package/shared/esm-utils.d.ts +0 -8
- package/shared/esm-utils.js +0 -18
- package/shared/localization/format.js +1 -2
- package/shared/localization/locales/ar-XB.json +0 -6
- package/shared/localization/locales/ar.json +0 -6
- package/shared/localization/locales/bg.json +0 -6
- package/shared/localization/locales/ca.json +0 -6
- package/shared/localization/locales/cs.json +0 -6
- package/shared/localization/locales/da.json +0 -6
- package/shared/localization/locales/de.json +0 -6
- package/shared/localization/locales/el.json +0 -6
- package/shared/localization/locales/en-GB.json +0 -6
- package/shared/localization/locales/en-US.json +3 -6
- package/shared/localization/locales/en-XL.json +3 -6
- package/shared/localization/locales/es-419.json +22 -28
- package/shared/localization/locales/es.json +0 -6
- package/shared/localization/locales/fi.json +0 -6
- package/shared/localization/locales/fil.json +0 -6
- package/shared/localization/locales/fr.json +0 -6
- package/shared/localization/locales/he.json +127 -133
- package/shared/localization/locales/hi.json +0 -6
- package/shared/localization/locales/hr.json +0 -6
- package/shared/localization/locales/hu.json +0 -6
- package/shared/localization/locales/id.json +0 -6
- package/shared/localization/locales/it.json +0 -6
- package/shared/localization/locales/ja.json +115 -121
- package/shared/localization/locales/ko.json +2 -8
- package/shared/localization/locales/lt.json +0 -6
- package/shared/localization/locales/lv.json +0 -6
- package/shared/localization/locales/nl.json +0 -6
- package/shared/localization/locales/no.json +0 -6
- package/shared/localization/locales/pl.json +0 -6
- package/shared/localization/locales/pt-PT.json +0 -6
- package/shared/localization/locales/pt.json +0 -6
- package/shared/localization/locales/ro.json +3 -9
- package/shared/localization/locales/ru.json +3 -9
- package/shared/localization/locales/sk.json +0 -6
- package/shared/localization/locales/sl.json +0 -6
- package/shared/localization/locales/sr-Latn.json +0 -6
- package/shared/localization/locales/sr.json +0 -6
- package/shared/localization/locales/sv.json +0 -6
- package/shared/localization/locales/ta.json +0 -6
- package/shared/localization/locales/te.json +0 -6
- package/shared/localization/locales/th.json +0 -6
- package/shared/localization/locales/tr.json +0 -6
- package/shared/localization/locales/uk.json +0 -6
- package/shared/localization/locales/vi.json +0 -6
- package/shared/localization/locales/zh-HK.json +18 -24
- package/shared/localization/locales/zh-TW.json +60 -66
- package/shared/localization/locales/zh.json +2 -8
- package/shared/root.js +1 -3
- package/tsconfig.json +0 -1
- package/types/artifacts.d.ts +8 -1
- package/core/lib/cdt/package.json +0 -4
- package/eslint-local-rules.d.cts +0 -9
- package/eslint.config.mjs +0 -242
package/core/lib/cdt/Common.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
export namespace ArrayUtilities {
|
|
2
|
+
export { lowerBound };
|
|
3
|
+
export { upperBound };
|
|
4
|
+
}
|
|
5
|
+
export namespace DevToolsPath {
|
|
6
|
+
let EmptyUrlString: string;
|
|
7
|
+
}
|
|
1
8
|
/**
|
|
2
9
|
* @license
|
|
3
10
|
* Copyright 2021 Google LLC
|
|
@@ -15,12 +22,5 @@ declare function lowerBound(array: any[], needle: any, comparator: any, left: an
|
|
|
15
22
|
* @param {any} comparator
|
|
16
23
|
*/
|
|
17
24
|
declare function upperBound(array: any[], needle: any, comparator: any, left: any, right: any): any;
|
|
18
|
-
export namespace ArrayUtilities {
|
|
19
|
-
export { lowerBound };
|
|
20
|
-
export { upperBound };
|
|
21
|
-
}
|
|
22
|
-
export namespace DevToolsPath {
|
|
23
|
-
let EmptyUrlString: string;
|
|
24
|
-
}
|
|
25
25
|
export {};
|
|
26
26
|
//# sourceMappingURL=Platform.d.ts.map
|
package/core/lib/cdt/Platform.js
CHANGED
|
@@ -46,12 +46,15 @@ function upperBound(array, needle, comparator, left, right) {
|
|
|
46
46
|
return r;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
const ArrayUtilities = {
|
|
50
|
+
lowerBound,
|
|
51
|
+
upperBound,
|
|
52
|
+
};
|
|
53
|
+
const DevToolsPath = {
|
|
54
|
+
EmptyUrlString: '',
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
ArrayUtilities,
|
|
59
|
+
DevToolsPath,
|
|
57
60
|
};
|
package/core/lib/cdt/SDK.d.ts
CHANGED
package/core/lib/cdt/SDK.js
CHANGED
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import SourceMap from './generated/SourceMap.js';
|
|
8
|
+
|
|
7
9
|
const SDK = {
|
|
8
|
-
SourceMap
|
|
10
|
+
SourceMap,
|
|
9
11
|
};
|
|
10
12
|
|
|
11
13
|
// Add `lastColumnNumber` to mappings. This will eventually be added to CDT.
|
|
@@ -25,4 +27,4 @@ SDK.SourceMap.prototype.computeLastGeneratedColumns = function() {
|
|
|
25
27
|
// Now, all but the last mapping on each line will have 'lastColumnNumber' set to a number.
|
|
26
28
|
};
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
export default SDK;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// generated by yarn build-cdt-lib
|
|
3
3
|
/* eslint-disable */
|
|
4
|
-
"use strict";
|
|
5
4
|
/*
|
|
6
5
|
* Copyright (C) 2012 Google Inc. All rights reserved.
|
|
7
6
|
*
|
|
@@ -31,15 +30,11 @@
|
|
|
31
30
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
32
31
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
33
32
|
*/
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.ParsedURL = void 0;
|
|
36
|
-
exports.normalizePath = normalizePath;
|
|
37
|
-
exports.schemeIs = schemeIs;
|
|
38
33
|
;
|
|
39
34
|
/**
|
|
40
35
|
* http://tools.ietf.org/html/rfc3986#section-5.2.4
|
|
41
36
|
*/
|
|
42
|
-
function normalizePath(path) {
|
|
37
|
+
export function normalizePath(path) {
|
|
43
38
|
if (path.indexOf('..') === -1 && path.indexOf('.') === -1) {
|
|
44
39
|
return path;
|
|
45
40
|
}
|
|
@@ -69,7 +64,7 @@ function normalizePath(path) {
|
|
|
69
64
|
}
|
|
70
65
|
return normalizedPath;
|
|
71
66
|
}
|
|
72
|
-
function schemeIs(url, scheme) {
|
|
67
|
+
export function schemeIs(url, scheme) {
|
|
73
68
|
try {
|
|
74
69
|
return (new URL(url)).protocol === scheme;
|
|
75
70
|
}
|
|
@@ -77,7 +72,7 @@ function schemeIs(url, scheme) {
|
|
|
77
72
|
return false;
|
|
78
73
|
}
|
|
79
74
|
}
|
|
80
|
-
class ParsedURL {
|
|
75
|
+
export class ParsedURL {
|
|
81
76
|
isValid;
|
|
82
77
|
url;
|
|
83
78
|
scheme;
|
|
@@ -186,5 +181,4 @@ class ParsedURL {
|
|
|
186
181
|
}
|
|
187
182
|
static urlRegexInstance = null;
|
|
188
183
|
}
|
|
189
|
-
exports.ParsedURL = ParsedURL;
|
|
190
184
|
|
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Parses the {@link content} as JSON, ignoring BOM markers in the beginning, and
|
|
3
|
+
* also handling the CORB bypass prefix correctly.
|
|
4
|
+
*
|
|
5
|
+
* @param content the string representation of a sourcemap.
|
|
6
|
+
* @returns the {@link SourceMapV3} representation of the {@link content}.
|
|
7
|
+
*/
|
|
8
|
+
export function parseSourceMap(content: any): any;
|
|
9
|
+
export class SourceMapEntry {
|
|
10
|
+
static compare(entry1: any, entry2: any): number;
|
|
11
|
+
constructor(lineNumber: any, columnNumber: any, sourceIndex: any, sourceURL: any, sourceLineNumber: any, sourceColumnNumber: any, name: any);
|
|
12
|
+
lineNumber: any;
|
|
13
|
+
columnNumber: any;
|
|
14
|
+
sourceIndex: any;
|
|
15
|
+
sourceURL: any;
|
|
16
|
+
sourceLineNumber: any;
|
|
17
|
+
sourceColumnNumber: any;
|
|
18
|
+
name: any;
|
|
19
|
+
}
|
|
20
|
+
export class SourceMap {
|
|
3
21
|
/**
|
|
4
22
|
* @param {string} compiledURL
|
|
5
23
|
* @param {string} sourceMappingURL
|
|
@@ -76,30 +94,10 @@ declare class SourceMap {
|
|
|
76
94
|
findOriginalFunctionName(position: any): any;
|
|
77
95
|
#private;
|
|
78
96
|
}
|
|
79
|
-
|
|
80
|
-
export { parseSourceMap
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Parses the {@link content} as JSON, ignoring BOM markers in the beginning, and
|
|
84
|
-
* also handling the CORB bypass prefix correctly.
|
|
85
|
-
*
|
|
86
|
-
* @param content the string representation of a sourcemap.
|
|
87
|
-
* @returns the {@link SourceMapV3} representation of the {@link content}.
|
|
88
|
-
*/
|
|
89
|
-
declare function parseSourceMap(content: any): any;
|
|
90
|
-
declare const __esModule: boolean;
|
|
91
|
-
declare class SourceMapEntry {
|
|
92
|
-
static compare(entry1: any, entry2: any): number;
|
|
93
|
-
constructor(lineNumber: any, columnNumber: any, sourceIndex: any, sourceURL: any, sourceLineNumber: any, sourceColumnNumber: any, name: any);
|
|
94
|
-
lineNumber: any;
|
|
95
|
-
columnNumber: any;
|
|
96
|
-
sourceIndex: any;
|
|
97
|
-
sourceURL: any;
|
|
98
|
-
sourceLineNumber: any;
|
|
99
|
-
sourceColumnNumber: any;
|
|
100
|
-
name: any;
|
|
97
|
+
export namespace SourceMap {
|
|
98
|
+
export { parseSourceMap };
|
|
101
99
|
}
|
|
102
|
-
|
|
100
|
+
export class TokenIterator {
|
|
103
101
|
constructor(string: any);
|
|
104
102
|
next(): any;
|
|
105
103
|
/** Returns the unicode value of the next character and advances the iterator */
|
|
@@ -114,4 +112,5 @@ declare class TokenIterator {
|
|
|
114
112
|
peekVLQ(): number | null;
|
|
115
113
|
#private;
|
|
116
114
|
}
|
|
115
|
+
export default SourceMap;
|
|
117
116
|
//# sourceMappingURL=SourceMap.d.ts.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// generated by yarn build-cdt-lib
|
|
3
3
|
/* eslint-disable */
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const Platform = require('../Platform.js');
|
|
4
|
+
import * as Common from '../Common.js';
|
|
5
|
+
import * as Platform from '../Platform.js';
|
|
7
6
|
|
|
8
7
|
const BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
9
8
|
const BASE64_CODES = new Uint8Array(123);
|
|
@@ -14,9 +13,6 @@ const Platform = require('../Platform.js');
|
|
|
14
13
|
// Copyright 2021 The Chromium Authors. All rights reserved.
|
|
15
14
|
// Use of this source code is governed by a BSD-style license that can be
|
|
16
15
|
// found in the LICENSE file.
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.TokenIterator = exports.SourceMap = exports.SourceMapEntry = void 0;
|
|
19
|
-
exports.parseSourceMap = parseSourceMap;
|
|
20
16
|
/*
|
|
21
17
|
* Copyright (C) 2012 Google Inc. All rights reserved.
|
|
22
18
|
*
|
|
@@ -59,7 +55,7 @@ exports.parseSourceMap = parseSourceMap;
|
|
|
59
55
|
* @param content the string representation of a sourcemap.
|
|
60
56
|
* @returns the {@link SourceMapV3} representation of the {@link content}.
|
|
61
57
|
*/
|
|
62
|
-
function parseSourceMap(content) {
|
|
58
|
+
export function parseSourceMap(content) {
|
|
63
59
|
if (content.startsWith(')]}')) {
|
|
64
60
|
content = content.substring(content.indexOf('\n'));
|
|
65
61
|
}
|
|
@@ -69,7 +65,7 @@ function parseSourceMap(content) {
|
|
|
69
65
|
}
|
|
70
66
|
return JSON.parse(content);
|
|
71
67
|
}
|
|
72
|
-
class SourceMapEntry {
|
|
68
|
+
export class SourceMapEntry {
|
|
73
69
|
lineNumber;
|
|
74
70
|
columnNumber;
|
|
75
71
|
sourceIndex;
|
|
@@ -93,8 +89,7 @@ class SourceMapEntry {
|
|
|
93
89
|
return entry1.columnNumber - entry2.columnNumber;
|
|
94
90
|
}
|
|
95
91
|
}
|
|
96
|
-
|
|
97
|
-
class SourceMap {
|
|
92
|
+
export class SourceMap {
|
|
98
93
|
#json;
|
|
99
94
|
#compiledURLInternal;
|
|
100
95
|
#sourceMappingURL;
|
|
@@ -502,11 +497,10 @@ class SourceMap {
|
|
|
502
497
|
return this.#scopesInfo?.findOriginalFunctionName(position) ?? null;
|
|
503
498
|
}
|
|
504
499
|
}
|
|
505
|
-
exports.SourceMap = SourceMap;
|
|
506
500
|
const VLQ_BASE_SHIFT = 5;
|
|
507
501
|
const VLQ_BASE_MASK = (1 << 5) - 1;
|
|
508
502
|
const VLQ_CONTINUATION_MASK = 1 << 5;
|
|
509
|
-
class TokenIterator {
|
|
503
|
+
export class TokenIterator {
|
|
510
504
|
#string;
|
|
511
505
|
#position;
|
|
512
506
|
constructor(string) {
|
|
@@ -565,8 +559,6 @@ class TokenIterator {
|
|
|
565
559
|
}
|
|
566
560
|
}
|
|
567
561
|
}
|
|
568
|
-
exports.TokenIterator = TokenIterator;
|
|
569
562
|
|
|
570
|
-
|
|
571
|
-
module.exports = SourceMap;
|
|
563
|
+
export default SourceMap;
|
|
572
564
|
SourceMap.parseSourceMap = parseSourceMap;
|
package/core/lib/i18n/i18n.js
CHANGED
|
@@ -15,7 +15,6 @@ import log from 'lighthouse-logger';
|
|
|
15
15
|
import {getAvailableLocales} from '../../../shared/localization/format.js';
|
|
16
16
|
import {LH_ROOT} from '../../../shared/root.js';
|
|
17
17
|
import {isIcuMessage, formatMessage, DEFAULT_LOCALE} from '../../../shared/localization/format.js';
|
|
18
|
-
import {getModulePath} from '../../../shared/esm-utils.js';
|
|
19
18
|
|
|
20
19
|
const UIStrings = {
|
|
21
20
|
/** 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) */
|
|
@@ -198,7 +197,7 @@ function createIcuMessageFn(filename, fileStrings = {}) {
|
|
|
198
197
|
// one of the common strings found in `i18n.UIStrings`.
|
|
199
198
|
const filenameToLookup = keyname in fileStrings ?
|
|
200
199
|
filename :
|
|
201
|
-
path.relative(LH_ROOT,
|
|
200
|
+
path.relative(LH_ROOT, import.meta.filename);
|
|
202
201
|
const unixStyleFilename = filenameToLookup.replace(/\\/g, '/');
|
|
203
202
|
const i18nId = `${unixStyleFilename} | ${keyname}`;
|
|
204
203
|
|
|
@@ -15,10 +15,10 @@ export type Result = {
|
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* @param {string} content
|
|
18
|
-
* @param {import('../cdt/generated/SourceMap.js')|null} map
|
|
18
|
+
* @param {import('../cdt/generated/SourceMap.js').default|null} map
|
|
19
19
|
* @return {Result}
|
|
20
20
|
*/
|
|
21
|
-
export function detectLegacyJavaScript(content: string, map: import("../cdt/generated/SourceMap.js") | null): Result;
|
|
21
|
+
export function detectLegacyJavaScript(content: string, map: import("../cdt/generated/SourceMap.js").default | null): Result;
|
|
22
22
|
/**
|
|
23
23
|
* @return {Pattern[]}
|
|
24
24
|
*/
|
|
@@ -401,7 +401,7 @@ const matcher = new CodePatternMatcher([
|
|
|
401
401
|
|
|
402
402
|
/**
|
|
403
403
|
* @param {string} content
|
|
404
|
-
* @param {import('../cdt/generated/SourceMap.js')|null} map
|
|
404
|
+
* @param {import('../cdt/generated/SourceMap.js').default|null} map
|
|
405
405
|
* @return {Result}
|
|
406
406
|
*/
|
|
407
407
|
function detectLegacyJavaScript(content, map) {
|
package/core/runner.js
CHANGED
|
@@ -19,13 +19,12 @@ import {Sentry} from './lib/sentry.js';
|
|
|
19
19
|
import {ReportGenerator} from '../report/generator/report-generator.js';
|
|
20
20
|
import {LighthouseError} from './lib/lh-error.js';
|
|
21
21
|
import {lighthouseVersion} from '../shared/root.js';
|
|
22
|
-
import {getModuleDirectory} from '../shared/esm-utils.js';
|
|
23
22
|
import {EntityClassification} from './computed/entity-classification.js';
|
|
24
23
|
import UrlUtils from './lib/url-utils.js';
|
|
25
24
|
import {Util} from '../shared/util.js';
|
|
26
25
|
import {isEqual} from './lib/arbitrary-equality-map.js';
|
|
27
26
|
|
|
28
|
-
const moduleDir =
|
|
27
|
+
const moduleDir = import.meta.dirname;
|
|
29
28
|
|
|
30
29
|
/** @typedef {import('./lib/arbitrary-equality-map.js').ArbitraryEqualityMap} ArbitraryEqualityMap */
|
|
31
30
|
|
|
@@ -230,6 +229,7 @@ class Runner {
|
|
|
230
229
|
log.time(runnerStatus, 'verbose');
|
|
231
230
|
|
|
232
231
|
const artifacts = await gatherFn({resolvedConfig: options.resolvedConfig});
|
|
232
|
+
options.resolvedConfig.artifacts = null;
|
|
233
233
|
log.timeEnd(runnerStatus);
|
|
234
234
|
|
|
235
235
|
// If `gather` is run multiple times before `audit`, the timing entries for each `gather` can pollute one another.
|