lighthouse 8.6.0-dev.20211028 → 8.6.0-dev.20211029

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.
Files changed (63) hide show
  1. package/flow-report/test/flow-report-pptr-test.ts +46 -0
  2. package/jest.config.js +1 -0
  3. package/lighthouse-core/audits/errors-in-console.js +0 -2
  4. package/lighthouse-core/audits/image-aspect-ratio.js +1 -2
  5. package/lighthouse-core/audits/image-size-responsive.js +4 -5
  6. package/lighthouse-core/audits/unsized-images.js +1 -1
  7. package/lighthouse-core/computed/image-records.js +4 -3
  8. package/lighthouse-core/config/default-config.js +0 -3
  9. package/lighthouse-core/fraggle-rock/config/default-config.js +0 -3
  10. package/lighthouse-core/gather/driver/storage.js +0 -1
  11. package/lighthouse-core/gather/gatherers/image-elements.js +0 -3
  12. package/package.json +2 -2
  13. package/shared/localization/locales/ar-XB.json +0 -12
  14. package/shared/localization/locales/ar.json +0 -12
  15. package/shared/localization/locales/bg.json +0 -12
  16. package/shared/localization/locales/ca.json +0 -12
  17. package/shared/localization/locales/cs.json +0 -12
  18. package/shared/localization/locales/da.json +0 -12
  19. package/shared/localization/locales/de.json +0 -12
  20. package/shared/localization/locales/el.json +0 -12
  21. package/shared/localization/locales/en-GB.json +0 -12
  22. package/shared/localization/locales/en-US.json +0 -12
  23. package/shared/localization/locales/en-XA.json +0 -12
  24. package/shared/localization/locales/en-XL.json +0 -12
  25. package/shared/localization/locales/es-419.json +0 -12
  26. package/shared/localization/locales/es.json +0 -12
  27. package/shared/localization/locales/fi.json +0 -12
  28. package/shared/localization/locales/fil.json +0 -12
  29. package/shared/localization/locales/fr.json +0 -12
  30. package/shared/localization/locales/he.json +0 -12
  31. package/shared/localization/locales/hi.json +0 -12
  32. package/shared/localization/locales/hr.json +0 -12
  33. package/shared/localization/locales/hu.json +0 -12
  34. package/shared/localization/locales/id.json +0 -12
  35. package/shared/localization/locales/it.json +0 -12
  36. package/shared/localization/locales/ja.json +0 -12
  37. package/shared/localization/locales/ko.json +0 -12
  38. package/shared/localization/locales/lt.json +0 -12
  39. package/shared/localization/locales/lv.json +0 -12
  40. package/shared/localization/locales/nl.json +0 -12
  41. package/shared/localization/locales/no.json +0 -12
  42. package/shared/localization/locales/pl.json +0 -12
  43. package/shared/localization/locales/pt-PT.json +0 -12
  44. package/shared/localization/locales/pt.json +0 -12
  45. package/shared/localization/locales/ro.json +0 -12
  46. package/shared/localization/locales/ru.json +0 -12
  47. package/shared/localization/locales/sk.json +0 -12
  48. package/shared/localization/locales/sl.json +0 -12
  49. package/shared/localization/locales/sr-Latn.json +0 -12
  50. package/shared/localization/locales/sr.json +0 -12
  51. package/shared/localization/locales/sv.json +0 -12
  52. package/shared/localization/locales/ta.json +0 -12
  53. package/shared/localization/locales/te.json +0 -12
  54. package/shared/localization/locales/th.json +0 -12
  55. package/shared/localization/locales/tr.json +0 -12
  56. package/shared/localization/locales/uk.json +0 -12
  57. package/shared/localization/locales/vi.json +0 -12
  58. package/shared/localization/locales/zh-HK.json +0 -12
  59. package/shared/localization/locales/zh-TW.json +0 -12
  60. package/shared/localization/locales/zh.json +0 -12
  61. package/types/artifacts.d.ts +5 -4
  62. package/lighthouse-core/audits/dobetterweb/appcache-manifest.js +0 -67
  63. package/lighthouse-core/gather/gatherers/dobetterweb/appcache.js +0 -34
@@ -122,8 +122,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts,LegacyBaseArt
122
122
  Accessibility: Artifacts.Accessibility;
123
123
  /** Array of all anchors on the page. */
124
124
  AnchorElements: Artifacts.AnchorElement[];
125
- /** The value of the page's <html> manifest attribute, or null if not defined */
126
- AppCacheManifest: string | null;
127
125
  /** Array of all URLs cached in CacheStorage. */
128
126
  CacheContents: string[];
129
127
  /** CSS coverage information for styles used by page's final state. */
@@ -489,8 +487,6 @@ declare module Artifacts {
489
487
  isPicture: boolean;
490
488
  /** Flags whether this element was contained within a ShadowRoot */
491
489
  isInShadowDOM: boolean;
492
- /** The MIME type of the underlying image file. */
493
- mimeType?: string;
494
490
  /** Details for node in DOM for the image element */
495
491
  node: NodeDetails;
496
492
  /** The loading attribute of the image. */
@@ -873,6 +869,11 @@ declare module Artifacts {
873
869
  }
874
870
 
875
871
  type ConsoleMessage = ConsoleAPICall | ConsoleException | ConsoleProtocolLog;
872
+
873
+ interface ImageElementRecord extends ImageElement {
874
+ /** The MIME type of the underlying image file. */
875
+ mimeType?: string;
876
+ }
876
877
  }
877
878
 
878
879
  export interface Trace {
@@ -1,67 +0,0 @@
1
- /**
2
- * @license Copyright 2016 The Lighthouse Authors. All Rights Reserved.
3
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
- */
6
-
7
- /**
8
- * @fileoverview Audit a page to ensure it is not using the Application Cache API.
9
- */
10
-
11
- 'use strict';
12
-
13
- const Audit = require('../audit.js');
14
- const i18n = require('../../lib/i18n/i18n.js');
15
-
16
- const UIStrings = {
17
- /** Title of a Lighthouse audit that provides detail on the use of the Application Cache API. This descriptive title is shown to users when they do not use the Application Cache API. */
18
- title: 'Avoids Application Cache',
19
- /** Title of a Lighthouse audit that provides detail on the use of the Application Cache API. This descriptive title is shown to users when they do use the Application Cache API, which is considered bad practice. */
20
- failureTitle: 'Uses Application Cache',
21
- /** Description of a Lighthouse audit that tells the user why they should not use the Application Cache API. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
22
- description: 'Application Cache is deprecated. ' +
23
- '[Learn more](https://web.dev/appcache-manifest/).',
24
- /**
25
- * @description Label for the audit identifying uses of the Application Cache.
26
- * @example {clock.appcache} AppCacheManifest
27
- */
28
- displayValue: 'Found "{AppCacheManifest}"',
29
- };
30
-
31
- const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
32
-
33
- class AppCacheManifestAttr extends Audit {
34
- /**
35
- * @return {LH.Audit.Meta}
36
- */
37
- static get meta() {
38
- return {
39
- id: 'appcache-manifest',
40
- title: str_(UIStrings.title),
41
- failureTitle: str_(UIStrings.failureTitle),
42
- description: str_(UIStrings.description),
43
- requiredArtifacts: ['AppCacheManifest'],
44
- };
45
- }
46
-
47
- /**
48
- * @param {LH.Artifacts} artifacts
49
- * @return {LH.Audit.Product}
50
- */
51
- static audit(artifacts) {
52
- // Fails if an AppCacheManifest was found.
53
- if (artifacts.AppCacheManifest !== null) {
54
- return {
55
- score: 0,
56
- displayValue: str_(UIStrings.displayValue, {AppCacheManifest: artifacts.AppCacheManifest}),
57
- };
58
- }
59
-
60
- return {
61
- score: 1,
62
- };
63
- }
64
- }
65
-
66
- module.exports = AppCacheManifestAttr;
67
- module.exports.UIStrings = UIStrings;
@@ -1,34 +0,0 @@
1
- /**
2
- * @license Copyright 2016 The Lighthouse Authors. All Rights Reserved.
3
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
- */
6
- 'use strict';
7
-
8
- const FRGatherer = require('../../../fraggle-rock/gather/base-gatherer.js');
9
-
10
- /* global document */
11
-
12
- class AppCacheManifest extends FRGatherer {
13
- /** @type {LH.Gatherer.GathererMeta} */
14
- meta = {
15
- supportedModes: ['snapshot', 'navigation'],
16
- }
17
-
18
- /**
19
- * @param {LH.Gatherer.FRTransitionalContext} passContext
20
- * @return {Promise<LH.Artifacts['AppCacheManifest']>}
21
- */
22
- getArtifact(passContext) {
23
- const driver = passContext.driver;
24
-
25
- return driver.executionContext.evaluate(() => {
26
- return document.documentElement && document.documentElement.getAttribute('manifest');
27
- }, {
28
- args: [],
29
- useIsolation: true,
30
- });
31
- }
32
- }
33
-
34
- module.exports = AppCacheManifest;