Skip to content

Commit dc3a310

Browse files
authored
v4.0.0 (#3573)
* Remove math=strict-legacy, set default=parens-division * Support for comma-less color functions * Require parens after mixin call * Output invalid JS functions in CSS * Escape parens and revert pass-through function errors * Remove ieCompat option * Remove non-performant class pattern * Add isdefined() function
1 parent 283b1b4 commit dc3a310

File tree

153 files changed

+25660
-35255
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+25660
-35255
lines changed

.vscode/launch.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,22 @@
33
// Hover to view descriptions of existing attributes.
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
6-
"configurations": [
6+
"configurations": [
77
{
88
"type": "node",
99
"request": "launch",
1010
"name": "Less test",
1111
"program": "${workspaceFolder}/packages/less/test/index.js",
1212
"cwd": "${workspaceFolder}/packages/less",
1313
"console": "integratedTerminal"
14+
},
15+
{
16+
"type": "node",
17+
"request": "launch",
18+
"name": "Benchmark test",
19+
"program": "${workspaceFolder}/packages/less/benchmark/index.js",
20+
"cwd": "${workspaceFolder}/packages/less",
21+
"console": "integratedTerminal"
1422
}
1523
]
1624
}

dist/less.js

Lines changed: 11153 additions & 11156 deletions
Large diffs are not rendered by default.

dist/less.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/less.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"packages/*"
44
],
55
"npmClient": "npm",
6-
"version": "3.13.0"
6+
"version": "4.0.0"
77
}

packages/less/Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ module.exports = function(grunt) {
283283
eslint: {
284284
target: [
285285
"test/**/*.js",
286-
"lib/less*/**/*.js",
286+
"src/less*/**/*.js",
287287
"!test/less/errors/plugin/plugin-error.js"
288288
],
289289
options: {

packages/less/bin/lessc

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,16 +554,27 @@ function processPluginQueue() {
554554

555555
if (checkArgFunc(arg, match[2])) {
556556
if (checkBooleanArg(match[2])) {
557-
options.math = Constants.Math.STRICT_LEGACY;
557+
options.math = Constants.Math.PARENS;
558558
}
559559
}
560560

561561
break;
562562

563563
case 'm':
564564
case 'math':
565-
if (checkArgFunc(arg, match[2])) {
566-
options.math = match[2];
565+
var m = match[2];
566+
if (checkArgFunc(arg, m)) {
567+
if (m === 'always') {
568+
console.warn('--math=always is deprecated and will be removed in the future.');
569+
options.math = Constants.Math.ALWAYS;
570+
} else if (m === 'parens-division') {
571+
options.math = Constants.Math.PARENS_DIVISION;
572+
} else if (m === 'parens' || m === 'strict') {
573+
options.math = Constants.Math.PARENS;
574+
} else if (m === 'strict-legacy') {
575+
console.warn('--math=strict-legacy has been removed. Defaulting to --math=strict');
576+
options.math = Constants.Math.PARENS;
577+
}
567578
}
568579

569580
break;

packages/less/build/rollup.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const rollup = require('rollup');
22
const typescript = require('rollup-plugin-typescript2');
33
const commonjs = require('rollup-plugin-commonjs');
4+
const json = require('@rollup/plugin-json');
45
const resolve = require('rollup-plugin-node-resolve');
56
const terser = require('rollup-plugin-terser').terser;
67
const banner = require('./banner');
@@ -28,6 +29,7 @@ async function buildBrowser() {
2829
plugins: [
2930
resolve(),
3031
commonjs(),
32+
json(),
3133
typescript({
3234
verbosity: 2,
3335
tsconfigDefaults: {

0 commit comments

Comments
 (0)