lighthouse 9.5.0-dev.20220724 → 9.5.0-dev.20220725

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.
@@ -7,7 +7,6 @@
7
7
 
8
8
  import {makeComputedArtifact} from '../computed-artifact.js';
9
9
  import ProcessedTrace from '../processed-trace.js';
10
- import {LighthouseError} from '../../lib/lh-error.js';
11
10
 
12
11
  /** @typedef {{ts: number, isMainFrame: boolean, weightedScore: number}} LayoutShiftEvent */
13
12
 
@@ -37,13 +36,10 @@ class CumulativeLayoutShift {
37
36
  continue;
38
37
  }
39
38
 
40
- // For all-frames CLS calculation, we rely on `weighted_score_delta`, which
41
- // was added in Chrome 90: https://crbug.com/1173139
39
+ // For all-frames CLS calculation, we rely on `weighted_score_delta`
40
+ // All layout shift events should have this since M90: https://crbug.com/1173139
42
41
  if (event.args.data.weighted_score_delta === undefined) {
43
- throw new LighthouseError(
44
- LighthouseError.errors.UNSUPPORTED_OLD_CHROME,
45
- {featureName: 'Cumulative Layout Shift'}
46
- );
42
+ throw new Error('CLS missing weighted_score_delta');
47
43
  }
48
44
 
49
45
  if (event.args.data.had_recent_input) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "9.5.0-dev.20220724",
4
+ "version": "9.5.0-dev.20220725",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./lighthouse-core/index.js",
7
7
  "bin": {
@@ -159,7 +159,7 @@
159
159
  "jsdom": "^12.2.0",
160
160
  "jsonld": "^5.2.0",
161
161
  "jsonlint-mod": "^1.7.6",
162
- "lighthouse-plugin-publisher-ads": "^1.5.4",
162
+ "lighthouse-plugin-publisher-ads": "^1.5.6",
163
163
  "magic-string": "^0.25.7",
164
164
  "mime-types": "^2.1.30",
165
165
  "mocha": "^10.0.0",
@@ -1,31 +0,0 @@
1
- /**
2
- * @license Copyright 2019 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
- /** @fileoverview This file is no longer used internally, but remains here for backcompat with plugins. */
9
-
10
- import log from 'lighthouse-logger';
11
-
12
- import {makeComputedArtifact} from './computed-artifact.js';
13
- import ProcessedTrace from './processed-trace.js';
14
- import ProcessedNavigation from './processed-navigation.js';
15
-
16
- class TraceOfTab {
17
- /**
18
- * @param {LH.Trace} trace
19
- * @param {LH.Artifacts.ComputedContext} context
20
- * @return {Promise<any>}
21
- */
22
- static async compute_(trace, context) {
23
- const processedTrace = await ProcessedTrace.request(trace, context);
24
- const processedNavigation = await ProcessedNavigation.request(processedTrace, context);
25
- return {...processedTrace, ...processedNavigation};
26
- }
27
- }
28
-
29
- log.warn(`trace-of-tab`, `trace-of-tab is deprecated, use processed-trace / processed-navigation instead`); // eslint-disable-line max-len
30
- export default makeComputedArtifact(TraceOfTab, null);
31
-