* fix: webpack browser build - use UMD dist/less.js, add CJS bundle (#4423)
- Browser exports point to dist/less.js (UMD) instead of less-node
- Add CJS bundle (dist/less-node.cjs) for Node require() with module shim
- Remove dead index.js; index.cjs re-exports CJS bundle
- Add export tests: import-patterns, webpack-browser, test-cjs-suite
- CI and publish workflows run test:node (build + CJS + ESM tests)
* Beta publish script
* chore: clarify test:node runs ESM + CJS in workflow labels
* fix: normalize path separators in rollup plugin for Windows CI
The inlinePackageVersion plugin used forward-slash path check that
failed on Windows where rollup passes backslash-separated IDs,
leaving the require('../../package.json') unresolved at runtime.
* chore: bump version to 4.6.3 for release
* 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.
* 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