New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

csstree-validator

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csstree-validator - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

4

HISTORY.md

@@ -0,1 +1,5 @@

## 1.3.1 (February 19, 2018)
- Updated `csstree` to 1.0.0-alpha.28
## 1.3.0 (November 12, 2017)

@@ -2,0 +6,0 @@

53

lib/validate.js

@@ -34,31 +34,34 @@ var fs = require('fs');

csstree.walkDeclarations(ast, function(node) {
var match = syntax.matchDeclaration(node);
var error = match.error;
csstree.walk(ast, {
visit: 'Declaration',
enter: function(node) {
var match = syntax.matchDeclaration(node);
var error = match.error;
if (error) {
var message = error.rawMessage || error.message || error;
if (error) {
var message = error.rawMessage || error.message || error;
// ignore errors except those which make sense
if (error.name !== 'SyntaxMatchError' &&
error.name !== 'SyntaxReferenceError') {
return;
}
// ignore errors except those which make sense
if (error.name !== 'SyntaxMatchError' &&
error.name !== 'SyntaxReferenceError') {
return;
}
if (message === 'Mismatch') {
message = 'Invalid value for `' + node.property + '`';
} else if (message === 'Uncomplete match') {
message = 'The rest part of value can\'t be matched to `' + node.property + '` syntax';
if (message === 'Mismatch') {
message = 'Invalid value for `' + node.property + '`';
} else if (message === 'Uncomplete match') {
message = 'The rest part of value can\'t be matched to `' + node.property + '` syntax';
}
errors.push({
name: error.name,
node: node,
loc: error.loc || node.loc,
line: error.line || node.loc && node.loc.start && node.loc.start.line,
column: error.column || node.loc && node.loc.start && node.loc.start.column,
property: node.property,
message: message,
error: error
});
}
errors.push({
name: error.name,
node: node,
loc: error.loc || node.loc,
line: error.line || node.loc && node.loc.start && node.loc.start.line,
column: error.column || node.loc && node.loc.start && node.loc.start.column,
property: node.property,
message: message,
error: error
});
}

@@ -65,0 +68,0 @@ });

{
"name": "csstree-validator",
"version": "1.3.0",
"version": "1.3.1",
"description": "CSS validator build on csstree",

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

"clap": "^1.1.1",
"css-tree": "1.0.0-alpha.26"
"css-tree": "1.0.0-alpha.28"
},

@@ -51,0 +51,0 @@ "devDependencies": {

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