Skip to content

v5.0.0

Choose a tag to compare

@mizdra mizdra released this 07 Jun 15:18
· 3 commits to main since this release
Immutable release. Only release title and notes can be modified.
v5.0.0
04cf389

We have reduced dependencies. According to npmx.dev, the number of dependencies has been reduced from 97 to 46.

As a trade-off, this release also includes several breaking changes.

Breaking Changes

Drops support for Node.js 18 / 20 (#295)

Use Node.js 22 or later.

CSS module files starting with . are no longer matched by default (#307)

The internal glob implementation has been changed, and dotfiles are no longer matched by default.

Before: hcm 'src/**/*.module.css' matched both src/a.module.css and src/.hidden.module.css

After: hcm 'src/**/*.module.css' matches only src/a.module.css

To preserve the previous behavior, use a brace expansion to explicitly include dotfiles:

hcm 'src/**/{*,.*}.module.css'

Boolean options no longer accept the --option=true / --option=false syntax (#308)

Use --option / --no-option instead.

Before After
--cache=false --no-cache
--cache=true --cache
--watch=false --no-watch
--declarationMap=false --no-declarationMap
--arbitraryExtensions=false --no-arbitraryExtensions

YAML-based PostCSS config file require yaml package (#316)

If you use a YAML-based PostCSS config file (postcss.config.yaml or postcss.config.yml), you must now install the yaml package separately:

npm install --save-dev yaml

This is because postcss-load-config v6 no longer bundles yaml as a dependency — it is now an optional peer dependency. If yaml is not installed, loading a YAML config file will throw an error.

If you use a JavaScript or TypeScript PostCSS config file (e.g. postcss.config.js, postcss.config.ts), no action is required.

In watch mode, node_modules and .git directories are now always excluded from the watch target, regardless of the pattern (#317)

Due to an update of the internally-used file watcher library and to avoid performance issues caused by scanning large directories, node_modules and .git are now excluded unconditionally. Previously, patterns like hcm 'node_modules/**/*.module.css' --watch would watch files inside node_modules.

In practice, running hcm against node_modules or .git is almost never intended, so this change should not affect most users.

What's Changed

Breaking Change

  • feat!: require Node.js ^22.20.0 || ^24.8.0 || >=26.0.0 by @mizdra in #295
  • chore!: reduce dependencies by replacing with Node.js built-ins by @mizdra in #307
  • chore!: replace yargs with node:util's parseArgs by @mizdra in #308
  • deps: update postcss-load-config to v6 by @mizdra in #316
  • deps: update chokidar to v5 by @mizdra in #317

Bug

  • fix: set Node.js engines requirement on the published package instead of the monorepo root by @mizdra in #300

Documentation

  • docs: add AGENTS.md and re-export it from CLAUDE.md by @mizdra in #306

Refactoring

  • chore: migrate from Prettier to Oxfmt by @mizdra in #299
  • chore: migrate from ESLint to Oxlint by @mizdra in #301
  • chore: remove npm workspace and flatten to root by @mizdra in #302

Testing

  • Remove custom snapshot serializers by @mizdra in #298
  • test: suppress false-positive source map warning from Vite by @mizdra in #310
  • test: fix flaky test by @mizdra in #314

Maintenance

  • Repository maintenance by @mizdra in #297
  • chore: preinstall less v3/v4 and switch via LESS_VERSION env var by @mizdra in #303
  • chore: remove unused react and @types/react by @mizdra in #304
  • chore: upgrade TypeScript to v6 by @mizdra in #305
  • deps: update vitest to v4 by @mizdra in #309
  • Run build before update example by @mizdra in #312
  • Update devDependencies by @mizdra in #313
  • Use Trusted Publishing and Staged Packages by @mizdra in #318

Dependencies

Other Changes

Full Changelog: v4.0.0...v5.0.0