Skip to content

Release v4.6.0 - #4416

Closed
matthew-dean wants to merge 6 commits into
less:masterfrom
matthew-dean:release/v4.6.0
Closed

Release v4.6.0#4416
matthew-dean wants to merge 6 commits into
less:masterfrom
matthew-dean:release/v4.6.0

Conversation

@matthew-dean

@matthew-dean matthew-dean commented Mar 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Version bump to 4.6.0 across all packages with CHANGELOG covering ~28 commits since v4.5.1
  • CJS + ESM dual support: adds index.cjs wrapper so require('less') works alongside import less from 'less', with tests for both
  • Enriched npm README with logo, badges, Less code example, usage for Node.js/CLI/browser, and feature highlights
  • Publish workflow hardened: fork guard (github.repository check), idempotent GitHub Release creation, dist assets (less.js/less.min.js) attached to releases, squash-merge-safe version detection
  • Provenance fix: added repository field to @less/test-data for npm OIDC verification
  • Release process documented in CONTRIBUTING.md

Closes

Closes #4230, closes #4186, closes #4171, closes #4151, closes #4092, closes #3990, closes #3966

Test plan

  • Full test suite passes (grunt test)
  • node test/test-es6.js — ESM import with promise/await and callback
  • node test/test-cjs.cjs — CJS require('less') with promise
  • After merge: verify publish workflow creates GitHub Release with dist assets
  • After merge: verify npm shows enriched README

version: 4.6.0

Summary by CodeRabbit

Release Notes - v4.6.0

  • New Features

    • CommonJS (require) support now available for the package
  • Documentation

    • Comprehensive README with installation, usage, and feature overview
    • Updated contributing guide clarifying build and release processes
  • Tests

    • Added CommonJS test coverage
    • Enhanced ES6 module testing
  • Chores

    • Version bumped to 4.6.0
    • Automated release workflow improvements
    • Package repository metadata updates

- Bump version to 4.6.0 in all package.json files
- Add CHANGELOG entry for v4.6.0
- Update publish workflow: replace deprecated actions/create-release with
  gh release create, attach dist files (less.js, less.min.js) as release
  assets, bump contents permission to write
- Remove .github/** from paths-ignore (was preventing workflow updates)
- Update CONTRIBUTING.md with detailed release documentation

version: 4.6.0
- Add repository field to test-data package.json (fixes npm OIDC
  provenance verification failure)
- Skip publish workflow on forks (only run on less/less.js)
- Remove duplicate require('fs') in bump-and-publish.js
- Add language specifier to markdown code block in CONTRIBUTING.md
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
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
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 10, 2026
@coderabbitai

coderabbitai Bot commented Mar 10, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e4100ef0-282c-4422-ba5e-2cf6626612dd

📥 Commits

Reviewing files that changed from the base of the PR and between 30c3a97 and 5a848a2.

📒 Files selected for processing (13)
  • .github/workflows/publish.yml
  • CHANGELOG.md
  • CONTRIBUTING.md
  • package.json
  • packages/less/Gruntfile.cjs
  • packages/less/README.md
  • packages/less/index.cjs
  • packages/less/package.json
  • packages/less/test/test-cjs.cjs
  • packages/less/test/test-es6.js
  • packages/test-data/package.json
  • packages/test-import-module/package.json
  • scripts/bump-and-publish.js

📝 Walkthrough

Walkthrough

This release bumps the package to v4.6.0 with multiple improvements: adds CommonJS entry point support via new index.cjs and exports configuration, refactors the GitHub Actions publish workflow into a consolidated script-driven approach, introduces new CommonJS test coverage, updates test infrastructure, expands documentation, and bumps versions across packages.

Changes

Cohort / File(s) Summary
Release Workflow Automation
.github/workflows/publish.yml, scripts/bump-and-publish.js
Consolidated separate release steps into single script-driven approach using gh CLI; enhanced version detection to account for pre-bumped package.json versions beyond git tags; broadened permissions to contents: write.
Version Bumps
package.json, packages/less/package.json, packages/test-data/package.json, packages/test-import-module/package.json
Bumped versions from 4.5.0/4.5.1 to 4.6.0 across packages; added repository metadata to test-data package.
CommonJS Support (New)
packages/less/index.cjs, packages/less/package.json
Added CommonJS entry point (index.cjs) re-exporting default from lib/less-node/index.js; updated exports configuration to support dual import/require paths.
Test Infrastructure
packages/less/Gruntfile.cjs, packages/less/test/test-cjs.cjs, packages/less/test/test-es6.js
Added new CommonJS test (test-cjs.cjs) to verify require() interface; refactored ES6 test to explicitly test both Promise and callback-based APIs; integrated new test into Grunt task.
Documentation & Release Notes
CHANGELOG.md, CONTRIBUTING.md, packages/less/README.md
Added v4.6.0 release notes with categorized entries (bug fixes, features, deprecations, chores); expanded README with logo, badges, usage guide, and feature documentation; updated contribution guide with release process and dist folder handling guidance.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • chore: release v4.6.0 #4415: Makes identical changes to publish workflow consolidation, GH_TOKEN usage, asset attachment, and synchronized version bumps across package files.

Poem

🐰 A new release hops into view,
CommonJS paths—now require() works too!
Tests bundled tighter, docs shining bright,
Version four-six makes everything right! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@matthew-dean

Copy link
Copy Markdown
Member Author

Already merged v4.6.0 via #4415. Will create a new PR for the CJS fix, README, and workflow improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant