From 27d199a9011b1226945f9eb3772b8aeafc6ac227 Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Fri, 6 Oct 2017 14:58:29 -0700 Subject: [PATCH 1/4] web-inspector: fall back to page's Runtime and queryParam() --- lighthouse-core/lib/web-inspector.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/lighthouse-core/lib/web-inspector.js b/lighthouse-core/lib/web-inspector.js index 950f4c800635..a5e07cf8dbff 100644 --- a/lighthouse-core/lib/web-inspector.js +++ b/lighthouse-core/lib/web-inspector.js @@ -24,25 +24,21 @@ module.exports = (function() { global.window = global; } - global.Runtime = {}; - global.Runtime.experiments = { - isEnabled(experimentName) { - switch (experimentName) { - case 'timelineLatencyInfo': - return true; - default: - return false; - } - }, - }; + global.Runtime = global.Runtime || {}; + + const _queryParam = global.Runtime.queryParam; global.Runtime.queryParam = function(arg) { switch (arg) { case 'remoteFrontend': return false; case 'ws': return false; - default: - throw Error('Mock queryParam case not implemented.'); + default: { + if (_queryParam) { + return _queryParam.call(global.Runtime, arg); + } + throw new Error('Mock queryParam case not implemented.'); + } } }; From ff3a881bacebfd4a1b4366fb32589757f79debed Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Fri, 6 Oct 2017 14:58:58 -0700 Subject: [PATCH 2/4] 2.5.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index badc10a7c356..e6e492219701 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lighthouse", - "version": "2.5.0", + "version": "2.5.1", "description": "Lighthouse", "main": "./lighthouse-core/index.js", "bin": { From 5919a5bf821a1b354130c42a8cffcac9edae26b1 Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Fri, 6 Oct 2017 15:07:28 -0700 Subject: [PATCH 3/4] changelog. --- changelog.md | 76 ++++++++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/changelog.md b/changelog.md index c34131293595..6703337a9822 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,9 @@ + +# 2.5.1 (2017-10-06) +[Full Changelog](https://github.com/GoogleChrome/lighthouse/compare/v2.5.0...v2.5.1) + +* Fix compat with DevTools via Runtime mock object + # 2.5.0 (2017-10-04) [Full Changelog](https://github.com/GoogleChrome/lighthouse/compare/v2.4.0...v2.5.0) @@ -332,7 +338,7 @@ Overall the **Operation Yaquina Bay** (Issue #2146) effort made massive improvem ## New Contributors! -Huge thanks to who contributed 27 epic PRs. +Huge thanks to who contributed 27 epic PRs. * @abacon - remove images from critical request chains * @benschwarz - Calibre and WPT to readme @@ -347,7 +353,7 @@ Huge thanks to who contributed 27 epic PRs. * @maya - Fix "Installation" spelling mistake * @stramel - non-critical images, template literal linting, containerized trusty * @mikerhyssmith - Updated readme to add port number when testing a site with authentication -* @sendilkumarn - handlebars precompiled (we'll pour one out), clearer iconography, helpText fixes. +* @sendilkumarn - handlebars precompiled (we'll pour one out), clearer iconography, helpText fixes. * @ZZhaoTireless - report `
` printing fix * @cedricbellet - handleJavascriptDialogs * @thearegee - Readme: Adding lighthouse-cron to Related Projects @@ -454,9 +460,9 @@ Huge thanks to who contributed 27 epic PRs. # 1.6.5 (2017-03-04) [Full Changelog](https://github.com/GoogleChrome/lighthouse/compare/v1.6.0...1.6.5) -This is a **maintenance release** on the stable [1.6 branch](https://github.com/GoogleChrome/lighthouse/tree/1.6). +This is a **maintenance release** on the stable [1.6 branch](https://github.com/GoogleChrome/lighthouse/tree/1.6). -Master branch (tagged at 2.0.0-alpha) is under some heavy refactors, so we're holding off on shipping a new version. Expect one by mid-May. +Master branch (tagged at 2.0.0-alpha) is under some heavy refactors, so we're holding off on shipping a new version. Expect one by mid-May. _( Poke around recent PRs and issues if you're curious what we're up to ;)_ In the meantime, only a few changes here in 1.6.5: @@ -498,21 +504,21 @@ Huge thanks to @sendilkumarn, who contributed [four epic PRs](https://github.com ### Notable Changes - **WebPageTest integration is in beta** - - By popular demand, you will soon have a way to run Lighthouse on demand in the cloud. We've worked closely with WebPageTest to enable Lighthouse auditing and analysis from within a WPT run. + + By popular demand, you will soon have a way to run Lighthouse on demand in the cloud. We've worked closely with WebPageTest to enable Lighthouse auditing and analysis from within a WPT run. Our contribution [WPO-Foundation/webpagetest#825](https://github.com/WPO-Foundation/webpagetest/pull/825) was just merged and Lighthouse on WPT is currently in private beta.

lighthouse-webpagetest-beta

- **Lighthouse's CLI output has taken a chill pill** - #1764 - While you can view all Lighthouse results on the command line, it hasn't scaled well. A few screenworths of report was generally dumped to stdout right as Lighthouse finished up. Now, to keep your terminal happy, you will no longer see the reams of results printed to stdout. - The HTML report is saved to disk by default, and you can automatically open it with `lighthouse --view`. + While you can view all Lighthouse results on the command line, it hasn't scaled well. A few screenworths of report was generally dumped to stdout right as Lighthouse finished up. Now, to keep your terminal happy, you will no longer see the reams of results printed to stdout. + The HTML report is saved to disk by default, and you can automatically open it with `lighthouse --view`.

lighthouse --view flag

If you still want the stdout output, use `--output=pretty`. Oh so pretty. - + - **CI coverage for Windows via AppVeyor** - #1280

@@ -612,66 +618,66 @@ There were 128 PRs landed for this release. These are their stories. ### Notable Changes - **Dropped support for Node earlier than v6** - #1519 - + Node v6 became the [Node long-term-support version](https://github.com/nodejs/LTS#lts-schedule) in October 2016. After a suitable mourning period for v4 with a `--harmony` flag, Lighthouse has moved on and will only support v6+ going forward. - **Improved selection of First Contentful and Meaningful Paint events from unusual traces** - #1632, #1634 - + Lighthouse has banished the dreaded `-1` score that has long plagued runs for [certain sites](https://airhorner.com/). - + ![image](https://cloud.githubusercontent.com/assets/316891/22815981/ea000d68-ef13-11e6-95f5-258e2cacdd54.png) - + First Meaningful Paint is now detected much more robustly. While it is [not yet a completely solved problem](https://github.com/GoogleChrome/lighthouse/issues/1464), a large class of these errors should be eliminated. Reporting on these errors has also improved over the ambiguous `-1`, clearly differentiating between an issue with Lighthouse and an issue with the page being tested. - **Open local report in online report Viewer** - #1179 - + When viewing a Lighthouse HTML report generated locally—in the extension or from the command line—a new option is available in the "Export..." dropdown that allows you to upload to the [Lighthouse Online Viewer](https://googlechrome.github.io/lighthouse/viewer/). - + ![localreport](https://cloud.githubusercontent.com/assets/316891/22817784/3d865302-ef1e-11e6-9535-50937f5929ef.png) - + ![viewer](https://cloud.githubusercontent.com/assets/316891/22817839/9b477ab6-ef1e-11e6-8fc7-bafbedfd2872.png) - + You can then use the Viewer share button to get a report URL that you can share freely. - + Behind the scenes, Viewer gets your permission via OAuth to create a GitHub [secret gist](https://help.github.com/articles/about-gists/#secret-gists) and saves the report there. Since it's done as _your_ gist, you maintain full control over the sharing of the report and you can delete it at any time. You can revoke the Viewer's permission to create gists under your [GitHub settings](https://github.com/settings/applications). - **Performance metrics are injected into trace saved with `--save-assets` for viewing in timeline** - #1446 - + Lighthouse metrics like "First meaningful paint", "Time to Interactive", etc are mocked out as User Timing measures and injected back into the trace taken by Lighthouse. - + ![image](https://cloud.githubusercontent.com/assets/39191/21796487/f35ad136-d6bd-11e6-9447-2260adcf1d65.png) - + If you save a run's trace with `--save-assets` and then open it in DevTools or [Timeline Viewer](https://chromedevtools.github.io/timeline-viewer/), you'll be able to see your key metrics in context with the full trace of the page load. - **Throttling and emulation information in report** - #1485, #1608, fc858ea - + screen shot 2017-02-09 at 22 43 27 - + It's easy to forget what throttling and emulation settings were used for a particular Lighthouse run after some time has passed. The settings used are now saved in the raw JSON results and are printed at the top of the HTML report under the arrow dropdown. - **UI to interactively block certain page resources and measure the load performance difference** - + The first version of the [Performance Experiment](https://docs.google.com/document/d/1FYt5Es_Kf5IyC_bkTHj2G_a_sTvRvIq5iZCEN8VZY5o/edit#heading=h.cetla8h0y4o) project is landing in 1.5.0. When Lighthouse is run with the `--interactive` flag, a special report is generated that allows interactive selection of costly page resources. The experiment server then reruns Lighthouse on that page with those resources blocked. - + screen shot 2017-02-09 at 23 45 34 - + This lets you experiment with your page load performance, interactively testing the effects of blocking or delaying assets in your critical path. ### New Audits - **CSS usage** - #1421, #1479, #1466, #1496, #1557 - + Reports the number of unused style rules in your page and the byte/time savings of removing them: - + screen shot 2017-02-09 at 23 43 17 - **Image optimization** - #1452, #1579 - + Reports images that are unoptimized and the byte/time savings of optimizing them: - + screen shot 2017-02-09 at 23 43 49 - **Report Chrome's deprecated API warnings** - #1470 - + Lists console warnings from Chrome if your page is using deprecated APIs or features that have [interventions](https://www.chromestatus.com/features#intervention): - + screen shot 2017-02-10 at 00 05 25 - **Responsive image sizing** - #1497 - + Reports images that are too big and the potential byte/time savings of sizing them correctly for the given device: - + screen shot 2017-02-09 at 23 44 23 ### Improvements @@ -881,7 +887,7 @@ There were 128 PRs landed for this release. These are their stories. - **Report:** Fix print styling - #1180 - **Testing:** Handle critical-request-chains audit promise rejections - #1100 - **Testing:** Fix failing lint test - aa6d38b3 -- **Viewer:** Disable sharing button if gist is already saved - #1118 +- **Viewer:** Disable sharing button if gist is already saved - #1118 ### Testing - Don't run Closure type checking on Travis - 558a26 From fb286c3d49fa03e9ce4235f47d06208af9317cfc Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Fri, 6 Oct 2017 15:08:08 -0700 Subject: [PATCH 4/4] extension manifest to 2.5.1 --- lighthouse-extension/app/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lighthouse-extension/app/manifest.json b/lighthouse-extension/app/manifest.json index b00121f07b9d..179dda6e1d5a 100644 --- a/lighthouse-extension/app/manifest.json +++ b/lighthouse-extension/app/manifest.json @@ -1,6 +1,6 @@ { "name": "__MSG_appName__", - "version": "2.5.0", + "version": "2.5.1", "minimum_chrome_version": "56", "manifest_version": 2, "description": "__MSG_appDescription__",