Socket
Socket
Sign inDemoInstall

less

Package Overview
Dependencies
Maintainers
7
Versions
130
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.1.1 to 4.1.2

72

.eslintrc.json
{
"extends": "../../.eslintrc.json"
}
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"env": {
"browser": true,
"node": true
},
"globals": {},
"rules": {
"no-eval": 2,
"no-use-before-define": [
2,
{
"functions": false
}
],
"no-undef": 0,
"no-unused-vars": 1,
"no-caller": 2,
"no-eq-null": 1,
"guard-for-in": 2,
"no-implicit-coercion": [
2,
{
"boolean": false,
"string": true,
"number": true
}
],
"no-with": 2,
"no-mixed-spaces-and-tabs": 2,
"no-multiple-empty-lines": 2,
"dot-location": [2, "property"],
"operator-linebreak": [0, "after"],
"keyword-spacing": [2, {}],
"space-unary-ops": [
2,
{
"words": false,
"nonwords": false
}
],
"no-spaced-func": 2,
"space-before-function-paren": [
1,
{
"anonymous": "ignore",
"named": "never"
}
],
"comma-dangle": [2, "never"],
"no-trailing-spaces": 0,
"max-len": [2, 160],
"comma-style": [2, "last"],
"curly": [2, "all"],
"space-infix-ops": 2,
"spaced-comment": 1,
"space-before-blocks": [2, "always"],
"indent": [
2,
4,
{
"SwitchCase": 1
}
]
}
}

17

Gruntfile.js

@@ -15,3 +15,2 @@ "use strict";

var COMPRESS_FOR_TESTS = false;
var git = require("git-rev");

@@ -188,13 +187,7 @@

var semver = require('semver');
var path = require('path');
// Handle async / await in Rollup build for tests
// Remove this when Node 6 is no longer supported for the build/test process
const nodeVersion = semver.major(process.versions.node);
const tsNodeRuntime = path.resolve(path.join('node_modules', '.bin', 'ts-node'));
let scriptRuntime = 'node';
if (nodeVersion < 8) {
scriptRuntime = tsNodeRuntime;
}
const crossEnv = path.resolve(path.join('node_modules', '.bin', 'cross-env'));

@@ -214,3 +207,3 @@ // Project configuration.

/** Browser runtime */
scriptRuntime + " build/rollup.js --dist",
"node build/rollup.js --dist",
/** Copy to repo root */

@@ -225,3 +218,3 @@ "npm run copy:root",

"npm run build",
scriptRuntime + " build/rollup.js --browser --out=./tmp/browser/less.min.js"
"node build/rollup.js --browser --out=./tmp/browser/less.min.js"
].join(" && ")

@@ -233,6 +226,8 @@ },

testbrowser: {
command: scriptRuntime + " build/rollup.js --browser --out=./tmp/browser/less.min.js"
command: "node build/rollup.js --browser --out=./tmp/browser/less.min.js"
},
test: {
command: [
// https://github.com/TypeStrong/ts-node/issues/693#issuecomment-848907036
crossEnv + " TS_NODE_SCOPE=true",
tsNodeRuntime + " test/test-es6.ts",

@@ -239,0 +234,0 @@ "node test/index.js"

@@ -25,3 +25,3 @@ "use strict";

if (!request) {
reject({ type: 'File', message: 'optional dependency \'native-request\' required to import over http(s)\n' });
reject({ type: 'File', message: 'optional dependency \'needle\' required to import over http(s)\n' });
return;

@@ -28,0 +28,0 @@ }

@@ -34,2 +34,6 @@ "use strict";

if (subNodes.length === 1) {
// https://github.com/less/less.js/issues/3616
if (item.parens && subNodes[0].op === '/') {
return item;
}
return subNodes[0];

@@ -44,3 +48,3 @@ }

if (evalArgs === false) {
return this.func.apply(this, tslib_1.__spreadArrays([this.context], args));
return this.func.apply(this, tslib_1.__spreadArray([this.context], args));
}

@@ -47,0 +51,0 @@ return this.func.apply(this, args);

@@ -54,3 +54,4 @@ "use strict";

if (!(val instanceof dimension_1.default)) {
throw { type: 'Argument', message: "the first argument to unit must be a number" + (val instanceof operation_1.default ? '. Have you forgotten parenthesis?' : '') };
throw { type: 'Argument',
message: "the first argument to unit must be a number" + (val instanceof operation_1.default ? '. Have you forgotten parenthesis?' : '') };
}

@@ -57,0 +58,0 @@ if (unit) {

@@ -42,9 +42,36 @@ "use strict";

exports.default = {
Node: node_1.default, Color: color_1.default, AtRule: atrule_1.default, DetachedRuleset: detached_ruleset_1.default, Operation: operation_1.default,
Dimension: dimension_1.default, Unit: unit_1.default, Keyword: keyword_1.default, Variable: variable_1.default, Property: property_1.default,
Ruleset: ruleset_1.default, Element: element_1.default, Attribute: attribute_1.default, Combinator: combinator_1.default, Selector: selector_1.default,
Quoted: quoted_1.default, Expression: expression_1.default, Declaration: declaration_1.default, Call: call_1.default, URL: url_1.default, Import: import_1.default,
Comment: comment_1.default, Anonymous: anonymous_1.default, Value: value_1.default, JavaScript: javascript_1.default, Assignment: assignment_1.default,
Condition: condition_1.default, Paren: paren_1.default, Media: media_1.default, UnicodeDescriptor: unicode_descriptor_1.default, Negative: negative_1.default,
Extend: extend_1.default, VariableCall: variable_call_1.default, NamespaceValue: namespace_value_1.default,
Node: node_1.default,
Color: color_1.default,
AtRule: atrule_1.default,
DetachedRuleset: detached_ruleset_1.default,
Operation: operation_1.default,
Dimension: dimension_1.default,
Unit: unit_1.default,
Keyword: keyword_1.default,
Variable: variable_1.default,
Property: property_1.default,
Ruleset: ruleset_1.default,
Element: element_1.default,
Attribute: attribute_1.default,
Combinator: combinator_1.default,
Selector: selector_1.default,
Quoted: quoted_1.default,
Expression: expression_1.default,
Declaration: declaration_1.default,
Call: call_1.default,
URL: url_1.default,
Import: import_1.default,
Comment: comment_1.default,
Anonymous: anonymous_1.default,
Value: value_1.default,
JavaScript: javascript_1.default,
Assignment: assignment_1.default,
Condition: condition_1.default,
Paren: paren_1.default,
Media: media_1.default,
UnicodeDescriptor: unicode_descriptor_1.default,
Negative: negative_1.default,
Extend: extend_1.default,
VariableCall: variable_call_1.default,
NamespaceValue: namespace_value_1.default,
mixin: {

@@ -51,0 +78,0 @@ Call: mixin_call_1.default,

@@ -24,3 +24,4 @@ "use strict";

catch (e) {
throw { message: "JavaScript evaluation error: " + e.message + " from `" + expression + "`", filename: this.fileInfo().filename,
throw { message: "JavaScript evaluation error: " + e.message + " from `" + expression + "`",
filename: this.fileInfo().filename,
index: this.getIndex() };

@@ -44,3 +45,4 @@ }

catch (e) {
throw { message: "JavaScript evaluation error: '" + e.name + ": " + e.message.replace(/["]/g, '\'') + "'", filename: this.fileInfo().filename,
throw { message: "JavaScript evaluation error: '" + e.name + ": " + e.message.replace(/["]/g, '\'') + "'",
filename: this.fileInfo().filename,
index: this.getIndex() };

@@ -47,0 +49,0 @@ }

@@ -130,3 +130,5 @@ "use strict";

if ((count[defTrue] + count[defFalse]) > 1) {
throw { type: 'Runtime', message: "Ambiguous use of `default()` found when matching for `" + this.format(args) + "`", index: this.getIndex(), filename: this.fileInfo().filename };
throw { type: 'Runtime',
message: "Ambiguous use of `default()` found when matching for `" + this.format(args) + "`",
index: this.getIndex(), filename: this.fileInfo().filename };
}

@@ -159,6 +161,10 @@ }

if (isOneFound) {
throw { type: 'Runtime', message: "No matching definition was found for `" + this.format(args) + "`", index: this.getIndex(), filename: this.fileInfo().filename };
throw { type: 'Runtime',
message: "No matching definition was found for `" + this.format(args) + "`",
index: this.getIndex(), filename: this.fileInfo().filename };
}
else {
throw { type: 'Name', message: this.selector.toCSS().trim() + " is undefined", index: this.getIndex(), filename: this.fileInfo().filename };
throw { type: 'Name',
message: this.selector.toCSS().trim() + " is undefined",
index: this.getIndex(), filename: this.fileInfo().filename };
}

@@ -165,0 +171,0 @@ },

@@ -39,3 +39,5 @@ "use strict";

if (!rules) {
throw { type: 'Name', message: "variable " + name + " not found", filename: this.fileInfo().filename,
throw { type: 'Name',
message: "variable " + name + " not found",
filename: this.fileInfo().filename,
index: this.getIndex() };

@@ -55,3 +57,5 @@ }

if (!rules) {
throw { type: 'Name', message: "property \"" + name.substr(1) + "\" not found", filename: this.fileInfo().filename,
throw { type: 'Name',
message: "property \"" + name.substr(1) + "\" not found",
filename: this.fileInfo().filename,
index: this.getIndex() };

@@ -58,0 +62,0 @@ }

@@ -16,10 +16,17 @@ "use strict";

this.parsed = null;
var self = this;
Object.defineProperty(this, 'currentFileInfo', {
get: function () { return self.fileInfo(); }
});
Object.defineProperty(this, 'index', {
get: function () { return self.getIndex(); }
});
}
Object.defineProperty(Node.prototype, "currentFileInfo", {
get: function () {
return this.fileInfo();
},
enumerable: false,
configurable: true
});
Object.defineProperty(Node.prototype, "index", {
get: function () {
return this.getIndex();
},
enumerable: false,
configurable: true
});
Node.prototype.setParent = function (nodes, parent) {

@@ -26,0 +33,0 @@ function set(node) {

@@ -19,3 +19,5 @@ "use strict";

if (this.evaluating) {
throw { type: 'Name', message: "Recursive property reference for " + name, filename: this.fileInfo().filename,
throw { type: 'Name',
message: "Recursive property reference for " + name,
filename: this.fileInfo().filename,
index: this.getIndex() };

@@ -47,3 +49,5 @@ }

else {
throw { type: 'Name', message: "Property '" + name + "' is undefined", filename: this.currentFileInfo.filename,
throw { type: 'Name',
message: "Property '" + name + "' is undefined",
filename: this.currentFileInfo.filename,
index: this.index };

@@ -50,0 +54,0 @@ }

@@ -19,3 +19,5 @@ "use strict";

if (this.evaluating) {
throw { type: 'Name', message: "Recursive variable definition for " + name, filename: this.fileInfo().filename,
throw { type: 'Name',
message: "Recursive variable definition for " + name,
filename: this.fileInfo().filename,
index: this.getIndex() };

@@ -45,3 +47,5 @@ }

else {
throw { type: 'Name', message: "variable " + name + " is undefined", filename: this.fileInfo().filename,
throw { type: 'Name',
message: "variable " + name + " is undefined",
filename: this.fileInfo().filename,
index: this.getIndex() };

@@ -48,0 +52,0 @@ }

@@ -180,6 +180,8 @@ "use strict";

if (ruleNode instanceof tree_1.default.Call) {
throw { message: "Function '" + ruleNode.name + "' did not return a root node", index: ruleNode.getIndex(), filename: ruleNode.fileInfo() && ruleNode.fileInfo().filename };
throw { message: "Function '" + ruleNode.name + "' did not return a root node",
index: ruleNode.getIndex(), filename: ruleNode.fileInfo() && ruleNode.fileInfo().filename };
}
if (ruleNode.type && !ruleNode.allowRoot) {
throw { message: ruleNode.type + " node returned by a function is not valid here", index: ruleNode.getIndex(), filename: ruleNode.fileInfo() && ruleNode.fileInfo().filename };
throw { message: ruleNode.type + " node returned by a function is not valid here",
index: ruleNode.getIndex(), filename: ruleNode.fileInfo() && ruleNode.fileInfo().filename };
}

@@ -186,0 +188,0 @@ }

{
"name": "less",
"version": "4.1.1",
"version": "4.1.2",
"description": "Leaner CSS",

@@ -62,9 +62,10 @@ "homepage": "http://lesscss.org",

"@rollup/plugin-node-resolve": "^11.0.0",
"@typescript-eslint/eslint-plugin": "^3.3.0",
"@typescript-eslint/parser": "^3.3.0",
"@typescript-eslint/eslint-plugin": "^4.28.0",
"@typescript-eslint/parser": "^4.28.0",
"benny": "^3.6.12",
"bootstrap-less-port": "0.3.0",
"chai": "^4.2.0",
"cross-env": "^7.0.3",
"diff": "^3.2.0",
"eslint": "^6.8.0",
"eslint": "^7.29.0",
"fs-extra": "^8.1.0",

@@ -77,3 +78,3 @@ "git-rev": "^0.2.1",

"grunt-contrib-connect": "^1.0.2",
"grunt-eslint": "^21.1.0",
"grunt-eslint": "^23.0.0",
"grunt-saucelabs": "^9.0.1",

@@ -96,3 +97,3 @@ "grunt-shell": "^1.3.0",

"resolve": "^1.17.0",
"rollup": "^2.34.1",
"rollup": "^2.52.2",
"rollup-plugin-terser": "^5.1.1",

@@ -103,4 +104,4 @@ "rollup-plugin-typescript2": "^0.29.0",

"time-grunt": "^1.3.0",
"ts-node": "^8.4.1",
"typescript": "^4.1.3",
"ts-node": "^9.1.1",
"typescript": "^4.3.4",
"uikit": "2.27.4"

@@ -138,4 +139,4 @@ },

"parse-node-version": "^1.0.1",
"tslib": "^1.10.0"
"tslib": "^2.3.0"
}
}

@@ -12,4 +12,9 @@ {

},
"ts-node": {
"compilerOptions": {
"rootDir": "."
}
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}

Sorry, the diff of this file is not supported yet

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 not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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