Socket
Socket
Sign inDemoInstall

critical

Package Overview
Dependencies
416
Maintainers
3
Versions
109
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

4

CHANGELOG.md

@@ -1,4 +0,4 @@

# v2.0.0 / 2018-11-27
# v2.0.0 / 2020-06-16
- Drop support for Node.js < 8
- Drop support for Node.js < 10
- Bump dependencies

@@ -5,0 +5,0 @@ - Use Jest for testing

{
"name": "critical",
"version": "2.0.0",
"version": "2.0.1",
"description": "Extract & Inline Critical-path CSS from HTML",

@@ -5,0 +5,0 @@ "author": "Addy Osmani",

@@ -11,14 +11,6 @@ [![NPM version][npm-image]][npm-url] [![Build Status][ci-image]][ci-url] [![dependencies Status][depstat-image]][depstat-url] [![devDependencies Status][devdepstat-image]][devdepstat-url] [![Coverage][coveralls-image]][coveralls-url]

### Install current beta version
```sh
npm i -D critical@next
npm i -D critical
```
### Install latest stable version
```sh
npm i -D critical@latest
```
The docs for the latest 1.x version can be found [here](https://github.com/addyosmani/critical/tree/1.x).

@@ -25,0 +17,0 @@

@@ -310,4 +310,4 @@ 'use strict';

async function fetch(uri, options = {}, secure = true) {
const {user, pass, userAgent, request = {}} = options;
const {headers = {}, method = 'get'} = request;
const {user, pass, userAgent, request: requestOptions = {}} = options;
const {headers = {}, method = 'get', https} = requestOptions;
let resourceUrl = uri;

@@ -322,3 +322,3 @@ let protocolRelative = false;

request.rejectUnauthorized = false;
requestOptions.https = {rejectUnauthorized: true, ...(https || {})};
if (user && pass) {

@@ -332,6 +332,6 @@ headers.Authorization = `Basic ${token(user, pass)}`;

debug(`Fetching resource: ${resourceUrl}`, {...request, headers});
debug(`Fetching resource: ${resourceUrl}`, {...requestOptions, headers});
try {
const response = await got(resourceUrl, {...request, headers});
const response = await got(resourceUrl, {...requestOptions, headers});
if (method === 'head') {

@@ -338,0 +338,0 @@ return response;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc