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

clean-css

Package Overview
Dependencies
Maintainers
2
Versions
211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clean-css - npm Package Compare versions

Comparing version 3.4.15 to 3.4.16

6

History.md

@@ -0,1 +1,7 @@

[3.4.16 / 2016-06-02](https://github.com/jakubpawlowicz/clean-css/compare/v3.4.15...v3.4.16)
==================
* Fixed issue [#781](https://github.com/jakubpawlowicz/clean-css/issues/781) - regression in override compacting.
* Fixed issue [#782](https://github.com/jakubpawlowicz/clean-css/issues/782) - regression in processing data URIs.
[3.4.15 / 2016-06-01](https://github.com/jakubpawlowicz/clean-css/compare/v3.4.14...v3.4.15)

@@ -2,0 +8,0 @@ ==================

2

lib/properties/every-combination.js

@@ -6,3 +6,3 @@ var shallowClone = require('./clone').shallow;

function everyCombination(fn, left, right, validator) {
var samePositon = !left.shorthand && !right.shorthand;
var samePositon = !left.shorthand && !right.shorthand && !left.multiplex && !right.multiplex;
var _left = shallowClone(left);

@@ -9,0 +9,0 @@ var _right = shallowClone(right);

@@ -0,1 +1,3 @@

var split = require('../utils/split');
var URL_PREFIX = 'url(';

@@ -6,3 +8,3 @@ var UPPERCASE_URL_PREFIX = 'URL(';

var DATA_URI_PREFIX_PATTERN = /^\s*['"]?\s*data:/;
var DATA_URI_END_FUZZY_PATTERN = /^\)[\s\{\};]/;
var DATA_URI_TRAILER_PATTERN = /[\s\};,\/]/;

@@ -18,3 +20,3 @@ var IMPORT_URL_PREFIX = '@import';

var nextEnd = 0;
var nextEndAhead = 0;
var firstMatch;
var isDataURI = false;

@@ -37,14 +39,8 @@ var cursor = 0;

if (isDataURI) {
nextEnd = data.indexOf(URL_SUFFIX, nextStart);
firstMatch = split(data.substring(nextStart), DATA_URI_TRAILER_PATTERN, false, '(', ')', true).pop();
// this is a fuzzy matching logic for unqoted data URIs
while (true) {
nextEndAhead = data.indexOf(URL_SUFFIX, nextEnd + 1);
// if it has whitespace, curly braces, or semicolon then we should be out of URL,
// otherwise keep iterating if it has not but content is not escaped,
// it has to be quoted so it will be captured by either of two clauses above
if (nextEndAhead == -1 || DATA_URI_END_FUZZY_PATTERN.test(data.substring(nextEnd, nextEndAhead)))
break;
nextEnd = nextEndAhead;
if (firstMatch && firstMatch[firstMatch.length - 1] == URL_SUFFIX) {
nextEnd = nextStart + firstMatch.length - URL_SUFFIX.length;
} else {
nextEnd = -1;
}

@@ -51,0 +47,0 @@ } else {

@@ -1,2 +0,2 @@

function split(value, separator, includeSeparator, openLevel, closeLevel) {
function split(value, separator, includeSeparator, openLevel, closeLevel, firstOnly) {
var withRegex = typeof separator != 'string';

@@ -13,3 +13,3 @@ var hasSeparator = withRegex ?

if (value.indexOf(openLevel) == -1 && !includeSeparator)
if (value.indexOf(openLevel) == -1 && !includeSeparator && !firstOnly)
return value.split(separator);

@@ -33,2 +33,6 @@

lastStart = cursor + 1;
if (firstOnly && tokens.length == 1) {
break;
}
}

@@ -35,0 +39,0 @@

{
"name": "clean-css",
"version": "3.4.15",
"version": "3.4.16",
"author": "Jakub Pawlowicz <contact@jakubpawlowicz.com> (http://twitter.com/jakubpawlowicz)",

@@ -5,0 +5,0 @@ "description": "A well-tested CSS minifier",

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