Socket
Socket
Sign inDemoInstall

critical

Package Overview
Dependencies
329
Maintainers
3
Versions
109
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.3.0 to 6.0.0

18

cli.js

@@ -44,22 +44,22 @@ #!/usr/bin/env node

type: 'string',
alias: 'b',
shortFlag: 'b',
},
css: {
type: 'string',
alias: 'c',
shortFlag: 'c',
isMultiple: true,
},
width: {
alias: 'w',
shortFlag: 'w',
},
height: {
alias: 'h',
shortFlag: 'h',
},
inline: {
type: 'boolean',
alias: 'i',
shortFlag: 'i',
},
extract: {
type: 'boolean',
alias: 'e',
shortFlag: 'e',
default: false,

@@ -89,3 +89,3 @@ },

type: 'string',
alias: 'ua',
shortFlag: 'ua',
},

@@ -125,4 +125,4 @@ dimensions: {

const aliases = Object.keys(meowOpts.flags)
.filter((k) => meowOpts.flags[k].alias)
.map((k) => meowOpts.flags[k].alias);
.filter((k) => meowOpts.flags[k].shortFlag)
.map((k) => meowOpts.flags[k].shortFlag);

@@ -129,0 +129,0 @@ return aliases.includes(key);

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

@@ -28,3 +28,3 @@ "author": "Addy Osmani",

"engines": {
"node": ">=14.16"
"node": ">=16.10"
},

@@ -40,3 +40,3 @@ "dependencies": {

"globby": "^13.2.2",
"got": "^12.6.0",
"got": "^13.0.0",
"group-args": "^0.1.0",

@@ -46,13 +46,13 @@ "indent-string": "^5.0.0",

"is-glob": "^4.0.3",
"joi": "^17.10.1",
"joi": "^17.10.2",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"make-dir": "^3.1.0",
"meow": "^11.0.0",
"make-dir": "^4.0.0",
"meow": "^12.1.1",
"oust": "^2.0.4",
"p-all": "^4.0.0",
"p-all": "^5.0.0",
"penthouse": "^2.3.3",
"picocolors": "^1.0.0",
"plugin-error": "^2.0.1",
"postcss": "^8.4.29",
"postcss": "^8.4.30",
"postcss-discard": "^2.0.0",

@@ -72,3 +72,3 @@ "postcss-image-inliner": "^6.1.0",

"finalhandler": "^1.2.0",
"get-port": "^6.1.2",
"get-port": "^7.0.0",
"jest": "^29.7.0",

@@ -81,3 +81,3 @@ "nock": "^13.3.3",

"vinyl-source-stream": "^2.0.0",
"xo": "^0.54.0"
"xo": "^0.56.0"
},

@@ -84,0 +84,0 @@ "xo": {

@@ -969,3 +969,3 @@ import {Buffer} from 'node:buffer';

}, './')
.replace(/\.\.\//g, 'sub/');
.replaceAll('../', 'sub/');
const dir = path.join(temporaryDirectory(), subfolders);

@@ -979,3 +979,3 @@ const filename = path.basename(temporaryFile({extension: 'html'}));

// when served from file://
const injected = htmlContent.replace(/(<head(?:\s[^>]*)?>)/gi, `$1<style>${document.css.toString()}</style>`);
const injected = htmlContent.replaceAll(/(<head(?:\s[^>]*)?>)/gi, `$1<style>${document.css.toString()}</style>`);
// Write html to temp file

@@ -982,0 +982,0 @@ await outputFileAsync(file, injected);

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