🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

less

Package Overview
Dependencies
Maintainers
5
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

less - npm Package Compare versions

Comparing version
4.7.0
to
4.8.0
+12
-0
lib/less/deprecation.js

@@ -25,2 +25,14 @@ /**

},
'numeric-variable-name': {
description: 'Variable names beginning with a number are deprecated and will be removed in Less 5.x.'
},
'dash-only-variable-name': {
description: 'The dash-only variable names @- and @{-} are deprecated and will be removed in Less 5.x.'
},
'dash-only-mixin-name': {
description: 'The dash-only mixin names .-() and #-() are deprecated and will be removed in Less 5.x.'
},
'dynamic-charset': {
description: 'Dynamic @charset interpolation is deprecated and will be removed in Less 5.x.'
},
'property-in-unknown-value': {

@@ -27,0 +39,0 @@ description: '$property in custom property values is treated as literal text.'

+30
-18

@@ -270,21 +270,31 @@ // @ts-check

const allArgsCnt = (args && args.length) || 0;
let len;
const optionalParameters = this.optionalParameters;
const requiredArgsCnt = !args ? 0 : args.reduce(function (/** @type {number} */ count, /** @type {MixinArg} */ p) {
if (optionalParameters.indexOf(p.name) < 0) {
return count + 1;
} else {
return count;
const evaldArguments = new Array(this.params.length);
const positionalArgs = [];
let positionalIndex = 0;
for (let i = 0; i < allArgsCnt; i++) {
const arg = /** @type {MixinArg[]} */ (args)[i];
if (!arg.name) {
positionalArgs.push(arg);
continue;
}
}, 0);
if (!this.variadic) {
if (requiredArgsCnt < this.required) {
const paramIndex = this.params.findIndex((param, index) => param.name === arg.name && !evaldArguments[index]);
if (paramIndex < 0) {
return false;
}
if (allArgsCnt > this.params.length) {
return false;
evaldArguments[paramIndex] = arg;
}
for (let i = 0; i < this.params.length; i++) {
if (evaldArguments[i]) {
continue;
}
} else {
if (requiredArgsCnt < (this.required - 1)) {
if (this.params[i].variadic) {
positionalIndex = positionalArgs.length;
continue;
}
if (positionalIndex < positionalArgs.length) {
evaldArguments[i] = positionalArgs[positionalIndex++];
} else if (!this.params[i].name || !this.params[i].value) {
return false;

@@ -294,8 +304,10 @@ }

if (positionalIndex < positionalArgs.length) {
return false;
}
// check patterns
len = Math.min(requiredArgsCnt, this.arity);
for (let i = 0; i < len; i++) {
for (let i = 0; i < this.arity; i++) {
if (!this.params[i].name && !this.params[i].variadic) {
if (/** @type {MixinArg[]} */ (args)[i].value.eval(context).toCSS(/** @type {EvalContext} */ ({})) != /** @type {Node} */ (this.params[i].value).eval(context).toCSS(/** @type {EvalContext} */ ({}))) {
if (evaldArguments[i].value.eval(context).toCSS(/** @type {EvalContext} */ ({})) != /** @type {Node} */ (this.params[i].value).eval(context).toCSS(/** @type {EvalContext} */ ({}))) {
return false;

@@ -302,0 +314,0 @@ }

{
"name": "less",
"version": "4.7.0",
"version": "4.8.0",
"description": "Leaner CSS",

@@ -5,0 +5,0 @@ "homepage": "http://lesscss.org",

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

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

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

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

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

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