Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

juice

Package Overview
Dependencies
Maintainers
3
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

juice - npm Package Compare versions

Comparing version 10.0.1 to 11.0.0

3

lib/cheerio.js

@@ -10,3 +10,4 @@ 'use strict';

var cheerioLoad = function(html, options, encodeEntities) {
options = Object.assign({decodeEntities: false, _useHtmlParser2:true}, options);
const { xmlMode, ...rest } = options;
options = Object.assign({ xml: { decodeEntities: false, xmlMode } }, rest);
html = encodeEntities(html);

@@ -13,0 +14,0 @@ return cheerio.load(html, options);

@@ -11,5 +11,6 @@ 'use strict';

cli.getProgram = function() {
program.name = pkg.name;
program.version(pkg.version)
program
.name(pkg.name)
.description(pkg.description)
.version(pkg.version)
.usage('[options] input.html output.html');

@@ -128,3 +129,3 @@

var option = cli.options[key];
var value = program[option.pMap];
var value = program.getOptionValue(option.pMap);
if (value !== undefined) {

@@ -131,0 +132,0 @@ if (option.coercion) {

@@ -254,3 +254,3 @@ 'use strict';

});
var string = props

@@ -263,3 +263,3 @@ .filter(function(prop) {

}
// Content becomes the innerHTML of pseudo elements, not used as a

@@ -474,6 +474,3 @@ // style property

styleElement = this;
// the API for Cheerio using parse5 (default) and htmlparser2 are slightly different
// detect this by checking if .childNodes exist (as opposed to .children)
var usingParse5 = !!styleElement.childNodes;
styleDataList = usingParse5 ? styleElement.childNodes : styleElement.children;
styleDataList = styleElement.childNodes;
if (styleDataList.length !== 1) {

@@ -490,3 +487,3 @@ if (options.removeStyleTags) {

if (options.removeStyleTags && $(styleElement).attr('data-embed') === undefined) {
var text = usingParse5 ? styleElement.childNodes[0].nodeValue : styleElement.children[0].data;
var text = styleElement.childNodes[0].nodeValue;
var preservedText = utils.getPreservedText(text, {

@@ -499,7 +496,3 @@ mediaQueries: options.preserveMediaQueries,

if (preservedText) {
if (usingParse5) {
styleElement.childNodes[0].nodeValue = preservedText;
} else {
styleElement.children[0].data = preservedText;
}
styleElement.childNodes[0].nodeValue = preservedText;
} else {

@@ -506,0 +499,0 @@ $(styleElement).remove();

{
"name": "juice",
"version": "10.0.1",
"version": "11.0.0",
"description": "Inlines css into html source",

@@ -35,19 +35,19 @@ "bin": "bin/juice",

"engines": {
"node": ">=10.0.0"
"node": ">=18.17"
},
"dependencies": {
"cheerio": "1.0.0-rc.12",
"commander": "^6.1.0",
"cheerio": "^1.0.0",
"commander": "^12.1.0",
"mensch": "^0.3.4",
"slick": "^1.12.2",
"web-resource-inliner": "^6.0.1"
"web-resource-inliner": "^7.0.0"
},
"devDependencies": {
"@types/node": "^22.2.0",
"@types/node": "^22.4.2",
"batch": "0.6.1",
"browserify": "^17.0.0",
"cross-spawn": "^7.0.3",
"mocha": "^5.2.0",
"mocha": "^10.7.3",
"should": "^13.2.3",
"typescript": "^5.0.2"
"typescript": "^5.5.4"
},

@@ -54,0 +54,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc