addyosmani / critical

Extract & Inline Critical-path CSS in HTML pages
Apache License 2.0
10.03k stars 371 forks source link

[2.x] Update got to v10.x #432

Closed XhmikosR closed 4 years ago

XhmikosR commented 4 years ago

@bezoerb https://github.com/sindresorhus/got/releases/tag/v10.0.0

We will need to drop support for Node.js 8.x but that's OK IMO for v2.x. From a quick test some tests fail.

bezoerb commented 4 years ago

What's the benefit here?

bezoerb commented 4 years ago

Currently got v10 fails with the rejectUnauthorized:false option. https://github.com/sindresorhus/got/issues/1148 We can update as soon as this is fixed or we have a workaround.

Node.js 8.x support is dropped ;)

bezoerb commented 4 years ago

Seems this RequestError: unable to verify the first certificate issue is caused by the 'old' pupetteer version (1.15.0) used in penthouse.

Running the following script works absolutely fine:

const got = require('got');
(async () => {
  try {
    const response = await got(
      'https://fonts.googleapis.com/css?family=Merriweather:300',
      {
        method: 'head'
      }
    );
    console.log('DONE');
  } catch (error) {
    console.error(error);
  }
})();

But as soon as const puppeteer = require("puppeteer"); is added we get the mentioned error. It seems like this error is fixed in puppeteer@2.1.0

bezoerb commented 4 years ago

Done with #453