Socket
Socket
Sign inDemoInstall

csso

Package Overview
Dependencies
3
Maintainers
3
Versions
82
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.2.0 to 3.3.0

6

HISTORY.md

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

## 3.3.0 (October 12, 2017)
- Migrated to [CSSTree](https://github.com/csstree/csstree) `1.0.0-alpha25`
- Changed AST format (see [CSSTree change log](https://github.com/csstree/csstree/blob/master/HISTORY.md) for details)
- Fixed performance issue when generate CSS with source map (quadratic increase in time depending on the size of the CSS)
## 3.2.0 (September 10, 2017)

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

4

lib/clean/Rule.js

@@ -80,6 +80,6 @@ var hasOwnProperty = Object.prototype.hasOwnProperty;

if (usageData && (usageData.whitelist !== null || usageData.blacklist !== null)) {
cleanUnused(node.selector, usageData);
cleanUnused(node.prelude, usageData);
}
if (node.selector.children.isEmpty() ||
if (node.prelude.children.isEmpty() ||
node.block.children.isEmpty()) {

@@ -86,0 +86,0 @@ list.remove(item);

@@ -102,3 +102,3 @@ var List = require('css-tree').List;

loc: null,
selector: {
prelude: {
type: 'SelectorList',

@@ -105,0 +105,0 @@ loc: null,

module.exports = function(node) {
node.block.children.each(function(rule) {
rule.selector.children.each(function(simpleselector) {
rule.prelude.children.each(function(simpleselector) {
simpleselector.children.each(function(data, item) {

@@ -5,0 +5,0 @@ if (data.type === 'Percentage' && data.value === '100') {

@@ -5,3 +5,3 @@ var walkRules = require('css-tree').walkRules;

function processRule(node, item, list) {
var selectors = node.selector.children;
var selectors = node.prelude.children;
var declarations = node.block.children;

@@ -15,3 +15,3 @@

var prevSelectors = prev.selector.children;
var prevSelectors = prev.prelude.children;
var prevDeclarations = prev.block.children;

@@ -18,0 +18,0 @@

@@ -5,3 +5,3 @@ var List = require('css-tree').List;

function processRule(node, item, list) {
var selectors = node.selector.children;
var selectors = node.prelude.children;

@@ -22,5 +22,5 @@ // generate new rule sets:

loc: node.loc,
selector: {
prelude: {
type: 'SelectorList',
loc: node.selector.loc,
loc: node.prelude.loc,
children: newSelectors

@@ -27,0 +27,0 @@ },

@@ -333,3 +333,3 @@ var List = require('css-tree').List;

var declarations = rule.block.children;
var selector = rule.selector.children.first().id;
var selector = rule.prelude.children.first().id;

@@ -405,3 +405,3 @@ rule.block.children.eachRight(function(declaration, item) {

var stylesheet = this.block || this.stylesheet;
var ruleId = (node.pseudoSignature || '') + '|' + node.selector.children.first().id;
var ruleId = (node.pseudoSignature || '') + '|' + node.prelude.children.first().id;
var ruleMap;

@@ -408,0 +408,0 @@ var shorts;

@@ -268,3 +268,3 @@ var resolveProperty = require('css-tree').property;

var stylesheet = this.block || this.stylesheet;
var ruleId = (node.pseudoSignature || '') + '|' + node.selector.children.first().id;
var ruleId = (node.pseudoSignature || '') + '|' + node.prelude.children.first().id;
var ruleMap;

@@ -271,0 +271,0 @@ var props;

@@ -17,3 +17,3 @@ var walkRules = require('css-tree').walkRules;

function processRule(node, item, list) {
var selectors = node.selector.children;
var selectors = node.prelude.children;
var declarations = node.block.children;

@@ -33,3 +33,3 @@ var nodeCompareMarker = selectors.first().compareMarker;

var nextFirstSelector = next.selector.children.head;
var nextFirstSelector = next.prelude.children.head;
var nextDeclarations = next.block.children;

@@ -36,0 +36,0 @@ var nextCompareMarker = nextFirstSelector.data.compareMarker;

@@ -30,3 +30,3 @@ var List = require('css-tree').List;

var avoidRulesMerge = this.block !== null ? this.block.avoidRulesMerge : false;
var selectors = node.selector.children;
var selectors = node.prelude.children;
var block = node.block;

@@ -43,3 +43,3 @@ var disallowDownMarkers = Object.create(null);

var prevSelectors = prev.selector.children;
var prevSelectors = prev.prelude.children;
var prevBlock = prev.block;

@@ -119,3 +119,3 @@

loc: null,
selector: newSelector,
prelude: newSelector,
block: {

@@ -122,0 +122,0 @@ type: 'Block',

@@ -26,3 +26,3 @@ var resolveKeyword = require('css-tree').keyword;

node.block.children.each(function(rule) {
rule.selector.children.each(function(simpleselector) {
rule.prelude.children.each(function(simpleselector) {
simpleselector.compareMarker = simpleselector.id;

@@ -29,0 +29,0 @@ });

@@ -25,3 +25,3 @@ var translate = require('css-tree').translate;

node.selector.children.each(function(simpleSelector) {
node.prelude.children.each(function(simpleSelector) {
var tagName = '*';

@@ -28,0 +28,0 @@ var scope = 0;

@@ -114,3 +114,3 @@ var hasOwnProperty = Object.prototype.hasOwnProperty;

// unsafe skip ruleset with selector similarities
return hasSimilarSelectors(node.selector.children, this);
return hasSimilarSelectors(node.prelude.children, this);

@@ -117,0 +117,0 @@ case 'Atrule':

{
"name": "csso",
"version": "3.2.0",
"version": "3.3.0",
"description": "CSS minifier with structural optimisations",

@@ -60,3 +60,3 @@ "keywords": [

"dependencies": {
"css-tree": "1.0.0-alpha23"
"css-tree": "1.0.0-alpha25"
},

@@ -78,3 +78,2 @@ "devDependencies": {

"files": [
"bin",
"dist/csso-browser.js",

@@ -81,0 +80,0 @@ "lib",

Sorry, the diff of this file is too big to display

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