25 Commits

Author SHA1 Message Date
Matthew Dean
c21e465d58 feat: migrate to native ESM with no build step (#4411)
* feat: migrate to native ESM with no build step

- Rename src/ to lib/ — source files are shipped directly, no compilation
- Add "type": "module" to package.json for native ESM support (Node 18+)
- Convert bin/lessc, test files, and build scripts from CJS to ESM
- Rename Gruntfile.js and .eslintrc.js to .cjs (must remain CommonJS)
- Add .js extensions to all relative import paths for ESM resolution
- Use createRequire() for optional dependency resolution (npm packages, JSON)
- Configure TypeScript for check-only mode (noEmit: true, allowJs: true)
- Update Rollup config to read from lib/ directly
- Update CI matrix to drop Node 16 (minimum Node 18+)
- Browser build is smaller: 500KB (was 509KB), minified 153KB (was 158KB)
- All 139 tests pass

* chore: fix trailing semicolons from linter

* chore: gitignore generated .css.map files in lib/

* fix(ci): restore lts/-3 to test matrix

* chore: stop tracking dist/ build artifacts

Generated browser bundles don't need to be in source control — they're
built during publish and included in the npm package via the files field.
Removes duplicate copies from both root dist/ and packages/less/dist/.

* fix(ci): use pnpm exec for playwright install

npx doesn't reliably find binaries with pnpm. Since playwright is
already a devDependency, use pnpm exec to run the installed version.

* fix(ci): use pnpm --filter for playwright, disable fail-fast

pnpm exec at workspace root can't find playwright binary since it's a
devDependency of the less package. Use --filter to run in that context.
Also disable fail-fast so all matrix jobs complete independently.

* fix(ci): move playwright to root devDependencies

Makes pnpm exec playwright work from workspace root in CI.

* fix: upgrade copy-anything to v3 for ESM compat, fix Windows test paths

copy-anything v2 lacks "type": "module", causing named import failures
on Node 18. v3 has proper ESM exports.

Revert testFolder to absolute path (matching original behavior) so debug
test path replacements match Less compiler output on Windows.

* chore: add CodeRabbit config to raise file review limit

* fix: add files field to package.json, remove postinstall from published package

Restricts npm package to only bin/, lib/, dist/, index.js, and README.md.
Previously shipped test files, Gruntfile, eslint config, etc.
Removes postinstall script (Playwright browser install) which only applies
in the monorepo dev environment and fails when installed from npm.

Verified: npm pack --dry-run shows 120 files (was 229), lessc CLI and
API both work from a clean tarball install.
2026-03-09 16:55:44 -07:00
Daniel Puckowski
1bde4bddff Release/v4.4.2 (#4364)
* Release v4.4.2

* Update files for Release/v4.4.2.

* chore: update CHANGELOG.md

* Update CHANGELOG.md for release v4.4.2.
2025-10-06 11:06:54 -07:00
Daniel Puckowski
9d345ffe30 Release v4.4.1 (#4351)
* Update files for Release/v4.4.1
2025-08-08 17:29:06 -04:00
Daniel Puckowski
033e3b356f Release v4.4.0 (#4345)
* Release v4.4.0

* Update files for Revlease/v4.4.0

* chore: pull in latest PRs for release

* Pull in latest PRs for release and update CHANEGLOG.md to reflect
  updates.

* chore: update CHANGELOG.md

* Update CHANGELOG.md.
2025-07-16 10:44:44 -07:00
Daniel Puckowski
1a5553d19c Release v4.3.0 (#4335)
* Update files for Release/v4.3.0.
2025-04-05 07:50:08 -07:00
Matthew Dean
d1abdabcc2 feat: deprecation warnings for Less + monorepo chores (#4319)
* Added deprecation warnings

* Remove warning about combinator

* Switch to PNPM

* Update local dependencies

* Remove inner dist folder

* Create symbolic link to dist folder

* Flip dist folders

* Create symbolic link in root

* Add contributors

* 👥 Add @matthew-dean as a contributor

* 👥 Add @cloudhead as a contributor

* 👥 Add @lukeapage as a contributor

* 👥 Add @seven-phases-max as a contributor

* 👥 Add @iChenLei as a contributor

* 👥 Add @puckowski as a contributor

* Add more contributors

* Finish deprecation warnings

* Resolve deletions and such

* Fix symbolic link

* Update ci.yml to use PNPM

* Update ci.yml to use PNPM

* Refine CI versions

* Fix node printed version

* Better fix for #4258 and #4292

* Re-enable other tests
2025-03-01 11:23:48 -08:00
Daniel Puckowski
1e7b0038d4 Release v4.2.2 (#4307)
* Release v4.2.2

* Update files for Release/v4.2.2.

* chore: update changelog for CI merges

* Update CHANGELOG.md for recent CI update merges.
2025-01-19 10:43:04 -08:00
Matthew Dean
773e157c76 Release v4.2.1 (#4287) 2024-11-25 09:05:24 -08:00
Daniel Puckowski
09b8f5cf4d Release v4.2.1 (#4280)
* Update files for Release/v4.2.1.
2024-10-15 10:07:31 -07:00
Daniel Puckowski
53f84f02ba Master container style fix for 4235 (#4237)
* fix(issue:4211) parse entities for comma list

parse the correct entities for a comma separated list so that all URLs are
rewritten correctly.

* fix(issue #4235) style must not have space

fixes issue #4235 where container query style would have invalid space
after keyword
2024-01-17 17:26:29 -08:00
Matthew Dean
6390ae3406 Release/v4.2.0 (#3814) 2023-08-19 14:31:21 -07:00
Daniel Puckowski
012d549d42 fix(issue:3766) add support for container queries (#3811)
* fix(issue:3766) add support for container queries

* Add support for CSS Container Queries
* Add tests for CSS Container Queries

* feat(media-queries-level-4) update media query

* Add support for Media Queries Level 4.
* Add tests for Media Queries Level 4.

* fix(mq-4 regex) fix regex for media queries

* Fix regex used for Media Queries Level 4 syntax parsing.

* fix(media-query-syntax) fix parsing of invalid CSS

* Fix parsing of invalid CSS for media queries to be consistent with
  Less.js version 4.1.3 handling.
2023-08-05 09:39:42 -07:00
Matthew Dean
6986f3e0cb Release v4.1.3 (#3722) 2022-06-08 12:23:27 -07:00
Matthew Dean
836391212a Release v4.1.2 (#3651) 2021-10-04 08:10:59 -07:00
Matthew Dean
9538abae09 Release/v4.1.1 (#3599)
* v4.1.1

* Update dist files
2021-01-30 19:53:41 -08:00
Matthew Dean
3c23217358 Release v4.1.0 2021-01-09 18:39:57 -08:00
Matthew Dean
a4b6c8544c Roll back paren requirement on mixin calls (#3588) 2021-01-09 18:35:26 -08:00
Matthew Dean
d3ef7c214d Updated dist files 2020-12-18 10:06:03 -08:00
Matthew Dean
dc3a310530 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
2020-12-18 10:03:08 -08:00
Matthew Dean
283b1b4d8b Fixes #3574 (#3575)
* Fixes #3574
* Bump version and dist files
2020-12-18 07:49:43 -08:00
Matthew Dean
257efdd688 Fixes #3434 - memory / runtime improvements (#3572)
* Remove class extends pattern for nodes
* Fix node benchmark
* v3.13.0
* Restore tree caching
2020-12-11 18:00:22 -08:00
Matthew Dean
ef4baa5bb2 Release 3.12.2 (#3545)
* Release v3.12.2
2020-07-16 08:59:23 -07:00
Matthew Dean
371185c71d v3.12.0-RC.2 (#3540) 2020-07-13 08:14:24 -07:00
Matthew Dean
f7bdce79fd Duplicate dist files in root for older links (#3529)
* Move dist files to root of repo
* Ignore dist in less package
* Duplicate dist files
2020-07-06 18:47:45 -07:00
Matthew Dean
2c5e4dd9b9 Lerna refactor / TS compiling w/o bundling (#3521)
* Lerna refactor / TS compiling w/o bundling
* Adds package-lock.json
2020-06-22 05:41:38 -07:00