lighthouse 9.5.0-dev.20220504 → 9.5.0-dev.20220507

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 (45) hide show
  1. package/lighthouse-cli/test/smokehouse/lighthouse-runners/bundle.js +97 -22
  2. package/lighthouse-cli/test/smokehouse/version-check-test.js +0 -2
  3. package/lighthouse-core/audits/bootup-time.js +2 -70
  4. package/lighthouse-core/audits/long-tasks.js +3 -3
  5. package/lighthouse-core/audits/metrics/experimental-interaction-to-next-paint.js +7 -5
  6. package/lighthouse-core/audits/third-party-summary.js +3 -3
  7. package/lighthouse-core/computed/metrics/responsiveness.js +14 -13
  8. package/lighthouse-core/fraggle-rock/gather/driver.js +1 -1
  9. package/lighthouse-core/gather/driver.js +1 -1
  10. package/lighthouse-core/gather/fetcher.js +34 -210
  11. package/lighthouse-core/gather/gather-runner.js +0 -11
  12. package/lighthouse-core/gather/gatherers/seo/robots-txt.js +0 -29
  13. package/lighthouse-core/gather/gatherers/source-maps.js +0 -1
  14. package/lighthouse-core/lib/cdt/generated/SourceMap.js +1 -1
  15. package/lighthouse-core/lib/stack-packs.js +4 -5
  16. package/lighthouse-core/lib/tracehouse/task-groups.js +1 -0
  17. package/lighthouse-core/lib/tracehouse/task-summary.js +87 -0
  18. package/package.json +5 -5
  19. package/report/test/.eslintrc.cjs +11 -0
  20. package/report/test/clients/bundle-test.js +0 -3
  21. package/report/test/generator/file-namer-test.js +0 -1
  22. package/report/test/generator/report-generator-test.js +0 -2
  23. package/report/test/renderer/category-renderer-test.js +0 -2
  24. package/report/test/renderer/components-test.js +0 -2
  25. package/report/test/renderer/crc-details-renderer-test.js +0 -2
  26. package/report/test/renderer/details-renderer-test.js +0 -2
  27. package/report/test/renderer/dom-test.js +0 -2
  28. package/report/test/renderer/element-screenshot-renderer-test.js +0 -2
  29. package/report/test/renderer/i18n-test.js +0 -2
  30. package/report/test/renderer/performance-category-renderer-test.js +0 -2
  31. package/report/test/renderer/pwa-category-renderer-test.js +0 -2
  32. package/report/test/renderer/report-renderer-axe-test.js +0 -2
  33. package/report/test/renderer/report-renderer-test.js +0 -2
  34. package/report/test/renderer/report-ui-features-test.js +0 -2
  35. package/report/test/renderer/snippet-renderer-test.js +0 -2
  36. package/report/test/renderer/text-encoding-test.js +0 -2
  37. package/report/test/renderer/util-test.js +0 -2
  38. package/shared/test/localization/.eslintrc.cjs +11 -0
  39. package/shared/test/localization/format-test.js +0 -2
  40. package/shared/test/localization/locales-test.js +0 -2
  41. package/shared/test/localization/swap-locale-test.js +0 -2
  42. package/third-party/chromium-synchronization/inspector-issueAdded-types-test.js +0 -2
  43. package/third-party/chromium-synchronization/installability-errors-test.js +0 -2
  44. package/tsconfig.json +2 -0
  45. package/types/artifacts.d.ts +17 -0
@@ -4,8 +4,6 @@
4
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
5
  */
6
6
 
7
- /* eslint-env jest */
8
-
9
7
  import {strict as assert} from 'assert';
10
8
 
11
9
  import jsdom from 'jsdom';
@@ -4,8 +4,6 @@
4
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
5
  */
6
6
 
7
- /* eslint-env jest */
8
-
9
7
  import {strict as assert} from 'assert';
10
8
 
11
9
  import jsdom from 'jsdom';
@@ -4,8 +4,6 @@
4
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
5
  */
6
6
 
7
- /* eslint-env jest */
8
-
9
7
  import puppeteer from 'puppeteer';
10
8
 
11
9
  import sampleResults from '../../../lighthouse-core/test/results/sample_v2.json';
@@ -4,8 +4,6 @@
4
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
5
  */
6
6
 
7
- /* eslint-env jest */
8
-
9
7
  import {strict as assert} from 'assert';
10
8
 
11
9
  import jsdom from 'jsdom';
@@ -4,8 +4,6 @@
4
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
5
  */
6
6
 
7
- /* eslint-env jest */
8
-
9
7
  import {strict as assert} from 'assert';
10
8
 
11
9
  import jsdom from 'jsdom';
@@ -4,8 +4,6 @@
4
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
5
  */
6
6
 
7
- /* eslint-env jest */
8
-
9
7
  import {strict as assert} from 'assert';
10
8
 
11
9
  import jsdom from 'jsdom';
@@ -11,8 +11,6 @@ import pako from 'pako';
11
11
  import {TextEncoding} from '../../renderer/text-encoding.js';
12
12
  import {LH_ROOT} from '../../../root.js';
13
13
 
14
- /* eslint-env jest */
15
-
16
14
  describe('TextEncoding', () => {
17
15
  beforeAll(() => {
18
16
  global.window = {pako};
@@ -10,8 +10,6 @@ import {Util} from '../../renderer/util.js';
10
10
  import {I18n} from '../../renderer/i18n.js';
11
11
  import sampleResult from '../../../lighthouse-core/test/results/sample_v2.json';
12
12
 
13
- /* eslint-env jest */
14
-
15
13
  describe('util helpers', () => {
16
14
  beforeEach(() => {
17
15
  Util.i18n = new I18n('en', {...Util.UIStrings});
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license Copyright 2022 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
+ module.exports = {
8
+ env: {
9
+ jest: true,
10
+ },
11
+ };
@@ -12,8 +12,6 @@ const i18n = require('../../../lighthouse-core/lib/i18n/i18n.js');
12
12
  const constants = require('../../../lighthouse-core/config/constants.js');
13
13
  const locales = require('../../localization/locales.js');
14
14
 
15
- /* eslint-env jest */
16
-
17
15
  describe('format', () => {
18
16
  describe('DEFAULT_LOCALE', () => {
19
17
  it('is the same as the default config locale', () => {
@@ -8,8 +8,6 @@
8
8
  const locales = require('../../localization/locales.js');
9
9
  const assert = require('assert').strict;
10
10
 
11
- /* eslint-env jest */
12
-
13
11
  describe('locales', () => {
14
12
  it('has only canonical (or expected-deprecated) language tags', () => {
15
13
  // Map of deprecated codes to their canonical version. Depending on the ICU
@@ -8,8 +8,6 @@
8
8
  const swapLocale = require('../../localization/swap-locale.js');
9
9
 
10
10
  const lhr = require('../../../lighthouse-core/test/results/sample_v2.json');
11
-
12
- /* eslint-env jest */
13
11
  describe('swap-locale', () => {
14
12
  it('does not mutate the original lhr', () => {
15
13
  /** @type {LH.Result} */
@@ -13,8 +13,6 @@ const inspectorIssuesGathererPath = LH_ROOT +
13
13
  '/lighthouse-core/gather/gatherers/inspector-issues.js';
14
14
  const inspectorIssuesGathererSource = fs.readFileSync(inspectorIssuesGathererPath, 'utf-8');
15
15
 
16
- /* eslint-env jest */
17
-
18
16
  describe('issueAdded types', () => {
19
17
  /** @type {Array<LH.Crdp.Audits.InspectorIssueDetails>} */
20
18
  let inspectorIssueDetailsTypes;
@@ -9,8 +9,6 @@ const fetch = require('node-fetch');
9
9
 
10
10
  const InstallableManifestAudit = require('../../lighthouse-core/audits/installable-manifest.js');
11
11
 
12
- /* eslint-env jest */
13
-
14
12
  jest.setTimeout(20_000);
15
13
 
16
14
  describe('installabilityErrors', () => {
package/tsconfig.json CHANGED
@@ -11,6 +11,7 @@
11
11
  {"path": "./report/"},
12
12
  {"path": "./report/generator/"},
13
13
  {"path": "./shared/"},
14
+ {"path": "./treemap/"},
14
15
  ],
15
16
  "include": [
16
17
  "root.js",
@@ -99,6 +100,7 @@
99
100
  "lighthouse-core/test/lib/timing-trace-saver-test.js",
100
101
  "lighthouse-core/test/lib/tracehouse/cpu-profile-model-test.js",
101
102
  "lighthouse-core/test/lib/tracehouse/main-thread-tasks-test.js",
103
+ "lighthouse-core/test/lib/tracehouse/task-summary-test.js",
102
104
  "lighthouse-core/test/lib/tracehouse/trace-processor-test.js",
103
105
  "lighthouse-core/test/lib/traces/pwmetrics-events-test.js",
104
106
  "lighthouse-core/test/lib/url-shim-test.js",
@@ -1020,6 +1020,23 @@ export interface TraceEvent {
1020
1020
  };
1021
1021
  }
1022
1022
 
1023
+ declare module Trace {
1024
+ /**
1025
+ * Base event of a `ph: 'X'` 'complete' event. Extend with `name` and `args` as
1026
+ * needed.
1027
+ */
1028
+ interface CompleteEvent {
1029
+ ph: 'X';
1030
+ cat: string;
1031
+ pid: number;
1032
+ tid: number;
1033
+ dur: number;
1034
+ ts: number;
1035
+ tdur: number;
1036
+ tts: number;
1037
+ }
1038
+ }
1039
+
1023
1040
  /**
1024
1041
  * A record of DevTools Debugging Protocol events.
1025
1042
  */