Skip to content

Releases: GoogleChromeLabs/psi

4.1.0

07 Jan 21:37
Compare
Choose a tag to compare

Minor version bump to pull in bug fixes and updates.

Fixes:

  • Fix cannot read property metrics of undefined (#120)
  • Fix issue 115 "Cannot read property 'type' of undefined" (#116)

Updates:

  • Add Field Data Wording for CLS and LCP (#121)
  • Add link to opportunities (#113)
  • Update package googleapis to ^47.0.0 (#110)
  • Round percentum in output message (#109)

Thanks to @JuanMaRuiz, @tonysan, @Yashko, and @midudev 🎉

4.0.0

22 Oct 16:37
Compare
Choose a tag to compare

psi 4.0.0 targets the PSI V5 API, which is powered by Lighthouse. This provides a whole new set of field and lab data to pull in, as well as new opportunities for improvement!

Thanks to @JuanMaRuiz for making the upgrade and sticking with it through the reviews 🙏

3.0.0

14 Feb 06:41
Compare
Choose a tag to compare
  • Dropped support for Node.js 0.10 and 0.12. edd21ad
  • Supports 0 as a threshold option value. 9ac737e

2.0.1

22 Dec 22:36
Compare
Choose a tag to compare

psi 2.0 is out and includes new support for the PageSpeed Insights V2 API, bringing mobile usability scores (do you have a mobile viewport? are your tap targets sized adequately?), the ability to download optimised assets for your site and more.

screen shot 2015-11-16 at 15 25 46

Install/Update

$ npm install --global psi

New Promise-based API

We've switched our core API over to using Promises (thanks to @callumlocke). Interacting with psi is only slightly different to the way you're used to using it and now looks like this:

var psi = require('psi');

// get the PageSpeed Insights report
psi('theverge.com').then(function (data) {
  console.log(data.ruleGroups.SPEED.score);
  console.log(data.pageStats);
});

// Supply options to psi and get back speed and usability scores
psi('html5rocks.com', { nokey: 'true', strategy: 'mobile' }).then(function (data) {
  console.log('Speed score: ' + data.ruleGroups.SPEED.score);
  console.log('Usability score: ' + data.ruleGroups.USABILITY.score);
});

// output a formatted report to the terminal
psi.output('theverge.com').then(function () {
  console.log('done');
});

Support for the PageSpeed API V2

Thanks to @christianhaller we now support the latest version of the PageSpeed Insights API. Amongst other things, this adds support for screenshots in the returned API response when using the screenshot option:

psi('aerotwist.com', {
        screenshot: 'true', 
        nokey: 'true',
        strategy: 'mobile',
}).then(function (data) {
      // Data URI for the screenshot
      console.log(data.screenshot.data);
});

New CLI features

This release includes a few new CLI flags including the ability to download optimised resources for your current page or fetch the URL to this zipped up bundle. Thanks to @hemanth for working on support for this.

  • --download now lets you download optimised resources for the current page as a ZIP file
  • --optimized gets you the URL of these optimised resources for use elsewhere

For example, here are some of the optimised assets we get back when running --download against marvel.com, who have a particularly poor score on moblile:

screen shot 2015-11-10 at 15 43 16

This downloads an optimized.zip file to the current directory containing optimized CSS, JS and image resources returned from the PageSpeed Insights service.

Wrapping up

I would also like to thank @sindresorhus for consistently helping with code reviews and assisting us with moving over to XO for style linting in this release. Thanks also goes out to James Cryer for updating grunt-pagespeed to use the latest version of psi. Gulp and npm scripts users will of course be able to just use the module directly.

1.0.6

24 Feb 08:52
Compare
Choose a tag to compare

Bump dependencies.

1.0.5

08 Feb 09:29
Compare
Choose a tag to compare

Correctly error out when threshold is not met. #48 e85c57e

1.0.0/1.0.4 - frantic-ducks

11 Jan 17:42
Compare
Choose a tag to compare

Rewritten with a better API and CLI output.

tumblr_ng6pczbvfl1qdlh1io1_400

Update

$ npm install --global psi

Improved CLI UI

  • Humanized URL
  • More succinct labels
  • Empty stats removed
  • Various other tweaks

Improved API

The API no longer outputs to the terminal. You can use the psi.output() method to do that.

The url option is now the first argument instead of the options object.

The default strategy changed from desktop to mobile. As mobile is eating the world.

Before
psi({
    url: 'todomvc.com',
    strategy: 'desktop'
}, function (error, data) {
    console.log(data);
});
After
psi('todomvc.com', {strategy: 'desktop'}, function (error, data) {
    console.log(data);
});

Changes

v0.1.6...v1.0.4

v0.1.6 noticeable-crystallization

28 Nov 12:44
Compare
Choose a tag to compare

PageSpeed Insights With Reporting

This release of PSI includes support for humanized URLs. Thanks goes out to @sindresorhus for the fix to support this.

With 0.1.6, you can now optionally omit the http portion of your URL input and PSI will still return you the PageSpeed Insights results for your chosen strategy.

Desktop (default):

screen shot 2014-12-03 at 00 25 24

Mobile:

If you haven't yet tried out PSI, npm install -g psi then psi <YOUR_URL> to get back performance reports from your CLI with ease yo.

v0.1.0

08 Jul 14:32
Compare
Choose a tag to compare

In 0.1.0 and 0.1.1 many parts of the project were rewritten, improving code quality and the visual look and feel of our reporting logs.

  • We completely cleaned up reporting and logging (thanks to @jrcryer)
  • Test assertions and numerous test improvements were made (thanks @samccone)
  • Several code style and general project tweaks landed (thanks to @sindresorhus)

We now also use Chalk to add some sexy colors to our terminal output: