lighthouse 9.1.0-dev.20211206 → 9.1.0-dev.20211210

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/changelog.md CHANGED
@@ -4973,7 +4973,7 @@ There were 128 PRs landed for this release. These are their stories.
4973
4973
  <img width="630" alt="screen shot 2017-02-09 at 23 43 49" src="https://cloud.githubusercontent.com/assets/316891/22818588/dd3994aa-ef22-11e6-8fee-7469a8866aa6.png">
4974
4974
  - **Report Chrome's deprecated API warnings** - #1470
4975
4975
 
4976
- Lists console warnings from Chrome if your page is using deprecated APIs or features that have [interventions](https://www.chromestatus.com/features#intervention):
4976
+ Lists console warnings from Chrome if your page is using deprecated APIs or features that have [interventions](https://chromestatus.com/features#intervention):
4977
4977
 
4978
4978
  <img width="675" alt="screen shot 2017-02-10 at 00 05 25" src="https://cloud.githubusercontent.com/assets/316891/22818969/b317e9d6-ef24-11e6-89db-9ee596ba8539.png">
4979
4979
  - **Responsive image sizing** - #1497
@@ -150,7 +150,9 @@ class LanternFirstContentfulPaint extends LanternMetric {
150
150
  return dependencyGraph.cloneWithRelationships(node => {
151
151
  if (node.type === BaseNode.TYPES.NETWORK) {
152
152
  // Exclude all nodes that ended after paintTs (except for the main document which we always consider necessary)
153
- if (node.endTime > paintTs && !node.isMainDocument()) return false;
153
+ // endTime is negative if request does not finish, make sure startTime isn't after paintTs in this case.
154
+ const endedAfterPaint = node.endTime > paintTs || node.startTime > paintTs;
155
+ if (endedAfterPaint && !node.isMainDocument()) return false;
154
156
 
155
157
  const url = node.record.url;
156
158
  // If the URL definitely wasn't render-blocking then we filter it out.
@@ -211,6 +211,7 @@ class ExecutionContext {
211
211
  window.__nativePromise = window.Promise;
212
212
  window.__nativeURL = window.URL;
213
213
  window.__nativePerformance = window.performance;
214
+ window.__nativeFetch = window.fetch;
214
215
  window.__ElementMatches = window.Element.prototype.matches;
215
216
  // Ensure the native `performance.now` is not overwritable.
216
217
  const performance = window.performance;
@@ -232,6 +233,7 @@ class ExecutionContext {
232
233
  'const Promise = globalThis.__nativePromise || globalThis.Promise',
233
234
  'const URL = globalThis.__nativeURL || globalThis.URL',
234
235
  'const performance = globalThis.__nativePerformance || globalThis.performance',
236
+ 'const fetch = globalThis.__nativeFetch || globalThis.fetch',
235
237
  ].join(';\n');
236
238
 
237
239
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lighthouse",
3
- "version": "9.1.0-dev.20211206",
3
+ "version": "9.1.0-dev.20211210",
4
4
  "description": "Automated auditing, performance metrics, and best practices for the web.",
5
5
  "main": "./lighthouse-core/index.js",
6
6
  "bin": {
@@ -20,6 +20,7 @@ declare global {
20
20
  // See: `executionContext.cacheNativesOnNewDocument`.
21
21
  __nativePromise: PromiseConstructor;
22
22
  __nativePerformance: Performance;
23
+ __nativeFetch: typeof fetch,
23
24
  __nativeURL: typeof URL;
24
25
  __ElementMatches: Element['matches'];
25
26