* 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
* docs: enrich npm README with usage examples and feature highlights
version: 4.6.0
* fix: update README and tests to show ESM + promise/await usage
The package is ESM-only ("type": "module"), so the README now correctly
shows `import less from 'less'` with `await` instead of CJS `require()`.
The ES6 test now verifies both promise/await and callback APIs.
version: 4.6.0
* fix: add CJS compatibility wrapper so require('less') works
Adds index.cjs as a one-line wrapper that re-exports the ESM default.
The exports field now has both import and require conditions.
Adds test-cjs.cjs to verify CJS consumption alongside the existing
ESM test.
version: 4.6.0
* fix: lazy Proxy CJS wrapper for Node 18+ compatibility
Node 22+ uses native require(esm). Node 18-20 uses a lazy Proxy with
dynamic import() — transparent because render()/parse() already return
promises. Tested with render, callback, and version property access.
* fix: include Node 20.19+ in native require(esm) path
* fix: add alt text to README images for accessibility
* 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.
* Migrate Less to use valid CSS
* Re-organize test structure
* Lots of test refactoring
* More test updates
* Add restructured tests
* WIP
Signed-off-by: Matthew Dean <matthew-dean@users.noreply.github.com>
* More fixes to tests
* More test fixes
* All tests passing
* WIP fix tests
* Finished fixing browser tests
* Improve test coverage
* Add debug tests
* Add back debug tests to show equal test coverage
* Fix browser tests
* More test coverage
* Fix sourcemap absolute path for CI
* More source map normalization for Windows
* Fix source map normalization
* Another attempted fix for Windows
---------
Signed-off-by: Matthew Dean <matthew-dean@users.noreply.github.com>
* 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
* chore: try run scripts directly
* chore: only trigger windows ci
* chore: remove resolve-bin
* fix: windows ci
* fix: windows path
* chore: try path
* chore: print gen
* chore: remove linux test
* chore: debug windows path
* chore: compare unix system
* chore: try change path
* chore: noramlize path
* chore: switch windows
* fix: bug
* chore: windows ci
* chore: up timeout
* chore: up timeout
* chore: match more tests
* chore: clean code
* use path.posix.normalize
* ci: debug path
* chore: test utils
* chore: update logic
* chore: reduce diff content
* chore: fix less ci
* fix: add missing semver require
* fix: fix the error format and file path
* chore: fix error format
* chore: fix test snapshot
* chore: fix error position
* 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