Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
8ee1964
test(test-data): keep one tests-unit styles.config, with the math the…
matthew-dean Oct 7, 2026
91bc428
Merge pull request #22 from matthew-dean/lane/v5-tests-unit-config
matthew-dean Oct 14, 2026
3820b3c
test(test-data): keep extenders of different specificity out of one :…
matthew-dean Oct 15, 2026
c331175
test(test-data): write a parent reference and escaped selector text i…
matthew-dean Oct 15, 2026
b201840
test(test-data): bring the bootstrap4 golden up to date
matthew-dean Oct 15, 2026
8b5249c
test(test-data): keep authored calc() parentheses; bind a non-dividin…
matthew-dean Oct 15, 2026
4204985
test(test-data): count import-once per output context
matthew-dean Oct 15, 2026
4ca4ebb
test(test-data): write glued condition functions and page selectors a…
matthew-dean Oct 15, 2026
01d3542
test(test-data): interpolate the value in namespacing-8's custom prop…
matthew-dean Oct 15, 2026
f1969ee
test(alpha): expect eight updated goldens to fail until the Jess pin …
matthew-dean Oct 15, 2026
eaba851
Merge pull request #23 from matthew-dean/test/v5-apply-accepted-golde…
matthew-dean Oct 15, 2026
e4e6730
Merge remote-tracking branch 'upstream/alpha' into HEAD
matthew-dean Oct 15, 2026
9166fcc
test(parse-interpolation): spell selector capture as selector(…)
matthew-dean Oct 17, 2026
c5bdaa9
chore(alpha): pin Jess 2.0.0-alpha.29
matthew-dean Oct 20, 2026
a3ac767
test(sourcemaps): check empty output with sourceMapURL and inline map…
matthew-dean Oct 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/less/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@
"rawcurrent": "https://raw.github.com/less/less.js/v",
"sourcearchive": "https://github.com/less/less.js/archive/v",
"dependencies": {
"@jesscss/compiler": "2.0.0-alpha.27",
"@jesscss/core": "2.0.0-alpha.27",
"@jesscss/plugin-less": "2.0.0-alpha.27",
"@jesscss/plugin-less-compat": "2.0.0-alpha.27",
"@jesscss/plugin-node-modules": "2.0.0-alpha.27",
"@jesscss/compiler": "2.0.0-alpha.29",
"@jesscss/core": "2.0.0-alpha.29",
"@jesscss/plugin-less": "2.0.0-alpha.29",
"@jesscss/plugin-less-compat": "2.0.0-alpha.29",
"@jesscss/plugin-node-modules": "2.0.0-alpha.29",
"parse-node-version": "^1.0.1"
},
"peerDependencies": {
"@jesscss/plugin-js": "2.0.0-alpha.27"
"@jesscss/plugin-js": "2.0.0-alpha.29"
},
"peerDependenciesMeta": {
"@jesscss/plugin-js": {
Expand Down
6 changes: 1 addition & 5 deletions packages/less/test/alpha-fixtures.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ const expectedFailureFixtures = new Map([
['tests-config/sourcemaps-basepath/sourcemaps-basepath.less', 'map is produced (gated by test/alpha-sourcemaps.mjs) but its source-path normalization/embedded-sources do not byte-match the 4.x golden yet'],
['tests-config/sourcemaps-include-source/sourcemaps-include-source.less', 'map is produced (gated by test/alpha-sourcemaps.mjs) but its source-path normalization/embedded-sources do not byte-match the 4.x golden yet'],
['tests-config/sourcemaps-rootpath/sourcemaps-rootpath.less', 'map is produced (gated by test/alpha-sourcemaps.mjs) but its source-path normalization/embedded-sources do not byte-match the 4.x golden yet'],
['tests-config/sourcemaps-url/sourcemaps-url.less', 'map is produced (gated by test/alpha-sourcemaps.mjs) but its source-path normalization/embedded-sources do not byte-match the 4.x golden yet'],
['tests-unit/mixins/mixins.less', 'same-named nested ruleset resolves the outer .recursion() mixin; remaining mismatch is fixture-local collapseNesting=false rendering'],
['tests-unit/property-name-interp/property-name-interp.less', 'deprecated dash-only @- and @{-} variable names are rejected'],
['tests-unit/plugin-module/plugin-module.less', 'legacy CommonJS @plugin graph with require() is not supported by the optional JS runtime'],
Expand All @@ -135,12 +134,9 @@ const expectedFailureDiagnosticCodes = new Map([
]);

const expectedErrorPasses = new Map([
['tests-error/eval/add-mixed-units.less', 'unit compatibility errors are not emitted yet'],
['tests-error/eval/add-mixed-units2.less', 'unit compatibility errors are not emitted yet'],
['tests-error/eval/ampersand-merge-template-invalid.less', 'accepted divergence: text prints as written (owner ruling 2026-10-09), so a merge template whose parent is escaped comma-list text renders that text instead of erroring'],
['tests-error/eval/color-func-invalid-color-2.less', 'color function argument errors are not emitted yet'],
['tests-error/eval/color-func-invalid-color.less', 'color function argument errors are not emitted yet'],
['tests-error/eval/divide-mixed-units.less', 'unit compatibility errors are not emitted yet'],
['tests-error/eval/multiply-mixed-units.less', 'unit compatibility errors are not emitted yet'],
['tests-error/eval/percentage-css-var.less', 'function argument type errors are not emitted yet'],
['tests-error/eval/percentage-non-number-argument.less', 'function argument type errors are not emitted yet'],
['tests-error/eval/svg-gradient1.less', 'svg-gradient argument validation errors are not emitted yet'],
Expand Down
11 changes: 7 additions & 4 deletions packages/less/test/alpha-sourcemaps.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,14 @@ function assertV3Map(json, { allowEmpty = false } = {}) {
assert.match(css, /sourceMappingURL=flat\.css\.map/, 'flat sourceMapURL honored');
}

// 6. Empty input yields a v3 map (possibly empty) and never crashes.
// 6. Empty output gets neither a map nor an annotation, and never crashes.
{
const { map } = await less.render('', { sourceMap: true });
assert.ok(map, 'empty input still returns a map');
assertV3Map(map, { allowEmpty: true });
for (const sourceMap of [true, { sourceMapURL: 'empty.css.map' }, { sourceMapFileInline: true }]) {
const { css, map } = await less.render('', { sourceMap });
const label = JSON.stringify(sourceMap);
assert.equal(map, undefined, `empty output gets no map (${label})`);
assert.doesNotMatch(css, /sourceMappingURL/, `empty output gets no annotation (${label})`);
}
}

// 7. `outputSourceFiles` embeds the original source into sourcesContent.
Expand Down
16 changes: 8 additions & 8 deletions packages/less/test/lessc-alpha.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ await realpath(compilerEntrypoint);
);
}

// 'native' distributes the child selector list (each branch keeps its own
// specificity); 'compact' folds it into a single :is().
const listNest = '.a, .b { .c, .d { x: 1 } }\n';
// 'native' groups child branches of equal specificity in one :is() and
// distributes branches of different specificity; 'compact' folds them all.
const listNest = '.a, .b { .c, #d { x: 1 } }\n';
const nativeCss = (await less.render(listNest, { collapseNesting: 'native' })).css;
assert.match(nativeCss, /:is\(\.a, \.b\) \.c/, "'native' distributes .c");
assert.match(nativeCss, /:is\(\.a, \.b\) \.d/, "'native' distributes .d");
assert.doesNotMatch(nativeCss, /:is\(\.c, \.d\)/, "'native' does not fold the child list");
assert.match(nativeCss, /:is\(\.a, \.b\) #d/, "'native' distributes #d");
assert.doesNotMatch(nativeCss, /:is\(\.c, #d\)/, "'native' keeps different specificities apart");
const compactCss = (await less.render(listNest, { collapseNesting: 'compact' })).css;
assert.match(compactCss, /:is\(\.a, \.b\) :is\(\.c, \.d\)/, "'compact' folds the child list");
assert.match(compactCss, /:is\(\.a, \.b\) :is\(\.c, #d\)/, "'compact' folds the child list");

const source = '.parent { before: 1; .child { inside: 2; } after: 3; }\n';
assert.equal((await less.render(source)).css, `.parent {
Expand Down Expand Up @@ -310,8 +310,8 @@ try {
assert.equal(sm.code, 0, sm.stderr);
assert.match(sm.stdout, /lessc: wrote .+sm\.css\.map\n/, '--source-map reports the sidecar map it wrote');
const smCss = await readFile(smOutput, 'utf8');
assert.match(smCss, /\/\*# sourceMappingURL=sm\.css\.map \*\/\n$/,
'--source-map annotates the CSS with the sidecar map basename');
assert.match(smCss, /\/\*# sourceMappingURL=sm\.css\.map \*\/$/,
'--source-map ends the CSS with the sidecar map annotation, no trailing newline');
const smMap = JSON.parse(await readFile(`${smOutput}.map`, 'utf8'));
assert.equal(smMap.version, 3, 'the sidecar map is source-map v3');
assert.equal(smMap.file, 'sm.css', 'map.file is the CSS output name');
Expand Down
Loading
Loading