Comparing version 0.13.2 to 0.13.3
0.13.3 / 2011-06-01 | ||
================== | ||
* Added padding for error linenos so they line up | ||
* Improved unary op error messages | ||
* Improved invalid __@keyframes__ ident error msg | ||
* Fixed HSLA regression for operations resulting in a bool. Closes #274 | ||
* Fixed `arguments` issue with excluding defaults. Closes #272 | ||
0.13.2 / 2011-05-31 | ||
@@ -3,0 +12,0 @@ ================== |
@@ -137,3 +137,16 @@ | ||
HSLA.prototype.operate = function(op, right){ | ||
return this.rgba.operate(op, right).hsla; | ||
switch (op) { | ||
case '==': | ||
case '!=': | ||
case '<=': | ||
case '>=': | ||
case '<': | ||
case '>': | ||
case 'is a': | ||
case '||': | ||
case '&&': | ||
return this.rgba.operate(op, right); | ||
default: | ||
return this.rgba.operate(op, right).hsla; | ||
} | ||
}; | ||
@@ -140,0 +153,0 @@ |
@@ -155,3 +155,3 @@ | ||
if (val.trim() == type.trim()) val = ''; | ||
throw new errors.ParseError(msg.replace('{peek}', type + val)); | ||
throw new errors.ParseError(msg.replace('{peek}', '"' + type + val + '"')); | ||
}, | ||
@@ -184,3 +184,3 @@ | ||
if (type != this.peek().type) { | ||
throw new errors.ParseError('expected ' + type + ', got ' + this.peek()); | ||
this.error('expected "' + type + '", got {peek}'); | ||
} | ||
@@ -717,3 +717,3 @@ return this.next(); | ||
// css-sty;e | ||
// css-style | ||
if (this.css = this.accept('{')) { | ||
@@ -737,3 +737,3 @@ this.skipWhitespace(); | ||
default: | ||
throw new errors.ParseError('invalid ident "' + pos.val.name + '" in selector'); | ||
this.error('"' + pos.val.name + '" is invalid, use "from" or "to"'); | ||
} | ||
@@ -1258,3 +1258,3 @@ } else { | ||
this.operand = true; | ||
if (!node) throw new errors.ParseError('illegal unary ' + op); | ||
if (!node) this.error('illegal unary "' + op + '", missing left-hand operand'); | ||
node = new nodes.BinOp(op.type, node, this.equality()); | ||
@@ -1275,3 +1275,3 @@ this.operand = false; | ||
this.operand = true; | ||
if (!node) throw new errors.ParseError('illegal unary ' + op); | ||
if (!node) this.error('illegal unary "' + op + '", missing left-hand operand'); | ||
node = new nodes.BinOp(op.type, node, this.in()); | ||
@@ -1291,3 +1291,3 @@ this.operand = false; | ||
this.operand = true; | ||
if (!node) throw new errors.ParseError('illegal unary in'); | ||
if (!node) this.error('illegal unary "in", missing left-hand operand'); | ||
node = new nodes.BinOp('in', node, this.relational()); | ||
@@ -1313,3 +1313,3 @@ this.operand = false; | ||
this.operand = true; | ||
if (!node) throw new errors.ParseError('illegal unary ' + op); | ||
if (!node) this.error('illegal unary "' + op + '", missing left-hand operand'); | ||
node = new nodes.BinOp(op.type, node, this.range()); | ||
@@ -1330,3 +1330,3 @@ this.operand = false; | ||
this.operand = true; | ||
if (!node) throw new errors.ParseError('illegal unary ' + op); | ||
if (!node) this.error('illegal unary "' + op + '", missing left-hand operand'); | ||
node = new nodes.BinOp(op.val, node, this.additive()); | ||
@@ -1371,3 +1371,3 @@ this.operand = false; | ||
} else { | ||
if (!node) throw new errors.ParseError('illegal unary ' + op); | ||
if (!node) this.error('illegal unary "' + op + '", missing left-hand operand'); | ||
node = new nodes.BinOp(op.type, node, this.defined()); | ||
@@ -1388,3 +1388,3 @@ this.operand = false; | ||
if (this.accept('is defined')) { | ||
if (!node) throw new errors.ParseError('illegal use of "is defined"'); | ||
if (!node) this.error('illegal unary "is defined", missing left-hand operand'); | ||
node = new nodes.BinOp('is defined', node); | ||
@@ -1391,0 +1391,0 @@ } |
@@ -27,3 +27,3 @@ | ||
exports.version = '0.13.2'; | ||
exports.version = '0.13.3'; | ||
@@ -30,0 +30,0 @@ /** |
@@ -80,3 +80,4 @@ | ||
, start = Math.max(lineno - context, 1) | ||
, end = Math.min(lines.length, lineno + context); | ||
, end = Math.min(lines.length, lineno + context) | ||
, pad = end.toString().length; | ||
@@ -86,2 +87,3 @@ var context = lines.slice(start, end).map(function(line, i){ | ||
return (curr == lineno ? ' > ' : ' ') | ||
+ Array(pad - curr.toString().length + 1).join(' ') | ||
+ curr | ||
@@ -88,0 +90,0 @@ + '| ' |
@@ -647,3 +647,7 @@ | ||
node = node.clone(); | ||
node.val = arg && !arg.isEmpty ? arg : node.val; | ||
if (arg) { | ||
if (!arg.isEmpty) node.val = arg; | ||
} else { | ||
args.push(node.val); | ||
} | ||
@@ -650,0 +654,0 @@ // required argument not satisfied |
{ "name": "stylus" | ||
, "description": "Robust, expressive, and feature-rich CSS superset" | ||
, "version": "0.13.2" | ||
, "version": "0.13.3" | ||
, "author": "TJ Holowaychuk <tj@vision-media.ca>" | ||
@@ -10,2 +10,3 @@ , "keywords": ["css", "parser", "style", "stylesheets", "jade", "language"] | ||
, "bin": { "stylus": "./bin/stylus" } | ||
, "scripts" : { "prepublish" : "npm prune" } | ||
, "dependencies": { | ||
@@ -12,0 +13,0 @@ "cssom": "0.2.0" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
6
3
207924
64
7489