Skip to content

Commit

Permalink
Merge branch 'less:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
puckowski authored Oct 22, 2023
2 parents 7d31d1c + 13864a6 commit af51cc8
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [10, 12, 14, 16, 19]
node: [10, 12, 14, 16, 20]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## Change Log

### v4.2.0 (2023-08-06)
- [#3811](https://github.com/less/less.js/pull/3811) add support for [container queries](https://www.w3.org/TR/css-contain-3) (@puckowski)
- [#3761](https://github.com/less/less.js/pull/3761) fix faulty source map generation with variables in selectors, fixes [#3567](https://github.com/less/less.js/issues/3567) (@pgoldberg)
- [#3700](https://github.com/less/less.js/pull/3700) parsing variables fail when there is no trailing semicolon (@b-kelly)
- [#3719](https://github.com/less/less.js/pull/3719) modify `this` pointer so that it is not empty. (@lumburr)
- [#3649](https://github.com/less/less.js/pull/3649) fixes [#2991](https://github.com/less/less.js/issues/2991) empty @media queries generated when compiling less file with (reference) to bootstrap (@MoonCoral)

### v4.1.3 (2022-06-09)
- [#3673](https://github.com/less/less.js/pull/3673) Feat: add support for case-insensitive attribute selectors (#3673) (@iChenLei)
- [#3710](https://github.com/less/less.js/pull/3701) Feat: add `disablePluginRule` flag for render() options (#3710) (@broofa @edhgoose)
Expand Down
27 changes: 1 addition & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"devDependencies": {
"github-changes": "^1.1.2",
"lerna": "^3.22.1",
"npm-run-all": "^4.1.5",
"resolve-bin": "~1.0.1"
"npm-run-all": "^4.1.5"
}
}
14 changes: 1 addition & 13 deletions packages/less/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var resolve = require('resolve');
var path = require('path');
var resolveBin = require('resolve-bin')

var testFolder = path.relative(process.cwd(), path.dirname(resolve.sync('@less/test-data')));
var lessFolder = path.join(testFolder, 'less');
Expand Down Expand Up @@ -184,12 +183,6 @@ module.exports = function(grunt) {
// Make the SauceLabs jobs
["all"].concat(browserTests).map(makeJob);

var path = require('path');

// Handle async / await in Rollup build for tests
const tsNodeRuntime = resolveBin.sync('ts-node');
const crossEnv = resolveBin.sync('cross-env');

// Project configuration.
grunt.initConfig({
shell: {
Expand Down Expand Up @@ -223,12 +216,7 @@ module.exports = function(grunt) {
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",
"node test/index.js"
].join(' && ')
command: 'ts-node test/test-es6.ts && node test/index.js'
},
generatebrowser: {
command: 'node test/browser/generator/generate.js'
Expand Down
12 changes: 6 additions & 6 deletions packages/less/test/browser/generator/runner.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
var path = require('path');
var resolve = require('resolve')
var { forceCovertToBrowserPath } = require('./utils');

/** Root of repo */
var rootFolder = path.resolve(__dirname, '../../../../../');
var testFolder = path.dirname(resolve.sync('@less/test-data'))
var lessFolder = path.join(testFolder, 'less');
var localTests = path.resolve(__dirname, '..');
var testFolder = forceCovertToBrowserPath(path.dirname(resolve.sync('@less/test-data')));
var lessFolder = forceCovertToBrowserPath(path.join(testFolder, 'less'));
var localTests = forceCovertToBrowserPath(path.resolve(__dirname, '..'));

module.exports = {
main: {
Expand Down Expand Up @@ -35,7 +35,7 @@ module.exports = {
}
},
strictUnits: {
src: [`${lessFolder}/strict-units/*.less`],
src: [`${lessFolder}/units/strict/*.less`],
options: {
helpers: 'test/browser/runner-strict-units-options.js',
specs: 'test/browser/runner-strict-units-spec.js',
Expand Down Expand Up @@ -185,4 +185,4 @@ module.exports = {
outfile: 'tmp/browser/test-runner-filemanager-plugin.html'
}
}
}
}
7 changes: 4 additions & 3 deletions packages/less/test/browser/generator/template.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
const html = require('html-template-tag')
const path = require('path')
const { forceCovertToBrowserPath } = require('./utils')

const webRoot = path.resolve(__dirname, '../../../../../');
const mochaDir = path.relative(webRoot, path.dirname(require.resolve('mocha')))
const chaiDir = path.relative(webRoot, path.dirname(require.resolve('chai')))
const mochaTeamCityDir = path.relative(webRoot, path.dirname(require.resolve('mocha-teamcity-reporter')))
const mochaDir = forceCovertToBrowserPath(path.relative(webRoot, path.dirname(require.resolve('mocha'))))
const chaiDir = forceCovertToBrowserPath(path.relative(webRoot, path.dirname(require.resolve('chai'))))
const mochaTeamCityDir = forceCovertToBrowserPath(path.relative(webRoot, path.dirname(require.resolve('mocha-teamcity-reporter'))))

/**
* Generates HTML templates from list of test sheets
Expand Down
14 changes: 14 additions & 0 deletions packages/less/test/browser/generator/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* utils for covert browser paths,
* fix https://github.com/less/less.js/pull/4213
*
* @param {string} path
* @returns {string}
*/
function forceCovertToBrowserPath (path) {
return (path || '').replace(/\\/g, '/');
}

module.exports = {
forceCovertToBrowserPath
}

0 comments on commit af51cc8

Please sign in to comment.