lighthouse 9.5.0-dev.20220725 → 9.5.0-dev.20220726
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/lighthouse-cli/test/smokehouse/readme.md +1 -1
- package/lighthouse-cli/test/smokehouse/report-assert.js +7 -7
- package/lighthouse-core/config/default-config.js +2 -2
- package/package.json +1 -1
- package/shared/localization/locales/en-US.json +2 -2
- package/shared/localization/locales/en-XL.json +2 -2
- package/types/smokehouse.d.ts +2 -2
|
@@ -116,8 +116,8 @@ All pruning checks:
|
|
|
116
116
|
- `_maxChromiumVersion`
|
|
117
117
|
- `_legacyOnly`
|
|
118
118
|
- `_fraggleRockOnly`
|
|
119
|
-
- `_skipInBundled`
|
|
120
119
|
- `_runner` (set to same value provided to CLI --runner flag, ex: `'devtools'`)
|
|
120
|
+
- `_excludeRunner` (set to same value provided to CLI --runner flag, ex: `'devtools'`)
|
|
121
121
|
|
|
122
122
|
## Pipeline
|
|
123
123
|
|
|
@@ -217,11 +217,10 @@ function makeComparison(name, actualResult, expectedResult) {
|
|
|
217
217
|
* @param {LocalConsole} localConsole
|
|
218
218
|
* @param {LH.Result} lhr
|
|
219
219
|
* @param {Smokehouse.ExpectedRunnerResult} expected
|
|
220
|
-
* @param {{runner?: string,
|
|
220
|
+
* @param {{runner?: string, useLegacyNavigation?: boolean}=} reportOptions
|
|
221
221
|
*/
|
|
222
222
|
function pruneExpectations(localConsole, lhr, expected, reportOptions) {
|
|
223
223
|
const isLegacyNavigation = reportOptions?.useLegacyNavigation;
|
|
224
|
-
const isBundled = reportOptions?.isBundled;
|
|
225
224
|
|
|
226
225
|
/**
|
|
227
226
|
* Lazily compute the Chrome version because some reports are explicitly asserting error conditions.
|
|
@@ -289,15 +288,15 @@ function pruneExpectations(localConsole, lhr, expected, reportOptions) {
|
|
|
289
288
|
`Actual channel: ${lhr.configSettings.channel}`,
|
|
290
289
|
].join(' '));
|
|
291
290
|
remove(key);
|
|
292
|
-
} else if (value.
|
|
291
|
+
} else if (value._runner && reportOptions?.runner !== value._runner) {
|
|
293
292
|
localConsole.log([
|
|
294
|
-
`[${key}]
|
|
293
|
+
`[${key}] is only for runner ${value._runner}, pruning expectation:`,
|
|
295
294
|
JSON.stringify(value, null, 2),
|
|
296
295
|
].join(' '));
|
|
297
296
|
remove(key);
|
|
298
|
-
} else if (value.
|
|
297
|
+
} else if (value._excludeRunner && reportOptions?.runner === value._excludeRunner) {
|
|
299
298
|
localConsole.log([
|
|
300
|
-
`[${key}] is
|
|
299
|
+
`[${key}] is excluded for runner ${value._excludeRunner}, pruning expectation:`,
|
|
301
300
|
JSON.stringify(value, null, 2),
|
|
302
301
|
].join(' '));
|
|
303
302
|
remove(key);
|
|
@@ -312,6 +311,7 @@ function pruneExpectations(localConsole, lhr, expected, reportOptions) {
|
|
|
312
311
|
delete obj._minChromiumVersion;
|
|
313
312
|
delete obj._maxChromiumVersion;
|
|
314
313
|
delete obj._runner;
|
|
314
|
+
delete obj._excludeRunner;
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
const cloned = cloneDeep(expected);
|
|
@@ -459,7 +459,7 @@ function reportAssertion(localConsole, assertion) {
|
|
|
459
459
|
* summary. Returns count of passed and failed tests.
|
|
460
460
|
* @param {{lhr: LH.Result, artifacts: LH.Artifacts, networkRequests?: string[]}} actual
|
|
461
461
|
* @param {Smokehouse.ExpectedRunnerResult} expected
|
|
462
|
-
* @param {{runner?: string, isDebug?: boolean,
|
|
462
|
+
* @param {{runner?: string, isDebug?: boolean, useLegacyNavigation?: boolean}=} reportOptions
|
|
463
463
|
* @return {{passed: number, failed: number, log: string}}
|
|
464
464
|
*/
|
|
465
465
|
function getAssertionReport(actual, expected, reportOptions = {}) {
|
|
@@ -100,10 +100,10 @@ const UIStrings = {
|
|
|
100
100
|
pwaCategoryTitle: 'PWA',
|
|
101
101
|
/** Description of the Progressive Web Application (PWA) category. This is displayed at the top of a list of audits focused on topics related to whether or not a site is a progressive web app, e.g. responds offline, uses a service worker, is on https, etc. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
102
102
|
pwaCategoryDescription: 'These checks validate the aspects of a Progressive Web App. ' +
|
|
103
|
-
'[Learn more](https://
|
|
103
|
+
'[Learn more](https://web.dev/pwa-checklist/).',
|
|
104
104
|
/** Description of the Progressive Web Application (PWA) manual checks category, containing a list of additional validators must be run by hand in order to check all PWA best practices. This is displayed at the top of a list of manually run audits focused on topics related to whether or not a site is a progressive web app, e.g. responds offline, uses a service worker, is on https, etc.. No character length limits. */
|
|
105
105
|
pwaCategoryManualDescription: 'These checks are required by the baseline ' +
|
|
106
|
-
'[PWA Checklist](https://
|
|
106
|
+
'[PWA Checklist](https://web.dev/pwa-checklist/) but are ' +
|
|
107
107
|
'not automatically checked by Lighthouse. They do not affect your score but it\'s important that you verify them manually.',
|
|
108
108
|
/** Title of the Best Practices category of audits. This is displayed at the top of a list of audits focused on topics related to following web development best practices and accepted guidelines. Also used as a label of a score gauge; try to limit to 20 characters. */
|
|
109
109
|
bestPracticesCategoryTitle: 'Best Practices',
|
package/package.json
CHANGED
|
@@ -1791,10 +1791,10 @@
|
|
|
1791
1791
|
"message": "Performance"
|
|
1792
1792
|
},
|
|
1793
1793
|
"lighthouse-core/config/default-config.js | pwaCategoryDescription": {
|
|
1794
|
-
"message": "These checks validate the aspects of a Progressive Web App. [Learn more](https://
|
|
1794
|
+
"message": "These checks validate the aspects of a Progressive Web App. [Learn more](https://web.dev/pwa-checklist/)."
|
|
1795
1795
|
},
|
|
1796
1796
|
"lighthouse-core/config/default-config.js | pwaCategoryManualDescription": {
|
|
1797
|
-
"message": "These checks are required by the baseline [PWA Checklist](https://
|
|
1797
|
+
"message": "These checks are required by the baseline [PWA Checklist](https://web.dev/pwa-checklist/) but are not automatically checked by Lighthouse. They do not affect your score but it's important that you verify them manually."
|
|
1798
1798
|
},
|
|
1799
1799
|
"lighthouse-core/config/default-config.js | pwaCategoryTitle": {
|
|
1800
1800
|
"message": "PWA"
|
|
@@ -1791,10 +1791,10 @@
|
|
|
1791
1791
|
"message": "P̂ér̂f́ôŕm̂án̂ćê"
|
|
1792
1792
|
},
|
|
1793
1793
|
"lighthouse-core/config/default-config.js | pwaCategoryDescription": {
|
|
1794
|
-
"message": "T̂h́êśê ćĥéĉḱŝ v́âĺîd́ât́ê t́ĥé âśp̂éĉt́ŝ óf̂ á P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂. [Ĺêár̂ń m̂ór̂é](https://
|
|
1794
|
+
"message": "T̂h́êśê ćĥéĉḱŝ v́âĺîd́ât́ê t́ĥé âśp̂éĉt́ŝ óf̂ á P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂. [Ĺêár̂ń m̂ór̂é](https://web.dev/pwa-checklist/)."
|
|
1795
1795
|
},
|
|
1796
1796
|
"lighthouse-core/config/default-config.js | pwaCategoryManualDescription": {
|
|
1797
|
-
"message": "T̂h́êśê ćĥéĉḱŝ ár̂é r̂éq̂úîŕêd́ b̂ý t̂h́ê b́âśêĺîńê [ṔŴÁ Ĉh́êćk̂ĺîśt̂](https://
|
|
1797
|
+
"message": "T̂h́êśê ćĥéĉḱŝ ár̂é r̂éq̂úîŕêd́ b̂ý t̂h́ê b́âśêĺîńê [ṔŴÁ Ĉh́êćk̂ĺîśt̂](https://web.dev/pwa-checklist/) b́ût́ âŕê ńôt́ âút̂óm̂át̂íĉál̂ĺŷ ćĥéĉḱêd́ b̂ý L̂íĝh́t̂h́ôúŝé. T̂h́êý d̂ó n̂ót̂ áf̂f́êćt̂ ýôúr̂ śĉór̂é b̂út̂ ít̂'ś îḿp̂ór̂t́âńt̂ t́ĥát̂ ýôú v̂ér̂íf̂ý t̂h́êḿ m̂án̂úâĺl̂ý."
|
|
1798
1798
|
},
|
|
1799
1799
|
"lighthouse-core/config/default-config.js | pwaCategoryTitle": {
|
|
1800
1800
|
"message": "P̂ẂÂ"
|
package/types/smokehouse.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ declare global {
|
|
|
15
15
|
requestedUrl: string;
|
|
16
16
|
finalUrl: string | RegExp;
|
|
17
17
|
userAgent?: string | RegExp;
|
|
18
|
-
runWarnings?:
|
|
18
|
+
runWarnings?: any;
|
|
19
19
|
runtimeError?: {
|
|
20
20
|
code?: any;
|
|
21
21
|
message?: any;
|
|
@@ -28,7 +28,7 @@ declare global {
|
|
|
28
28
|
export type ExpectedRunnerResult = {
|
|
29
29
|
lhr: ExpectedLHR,
|
|
30
30
|
artifacts?: Partial<Record<keyof Artifacts|'_maxChromiumVersion'|'_minChromiumVersion', any>>
|
|
31
|
-
networkRequests?:
|
|
31
|
+
networkRequests?: any;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export interface TestDfn {
|