Skip to content

4.0.0 Make ESM module

Latest

Choose a tag to compare

@tedw tedw released this 18 May 22:09

Replace the webpack/babel/jest/eslint stack with native ESM and Node's
built-in test runner. The package now ships index.js directly as an ES
module; consumers' bundlers (or Node) handle it without transpilation.

  • Switch package.json to "type": "module" with an "exports" map and a
    "files" allowlist so only index.js ships in the tarball
  • Replace Jest with node:test + node:assert against happy-dom
  • Replace Travis CI with a GitHub Actions workflow on Node 20 and 22
  • Drop dist/, docs/, webpack.config.js, .babelrc, .eslintrc.json,
    .coveralls.yml, .travis.yml
  • Reduce devDependencies from 15 packages to 1 (happy-dom)
  • Add Sass mixin with minimum styles

BREAKING CHANGE: The package is now ESM-only. CommonJS consumers must
load it via dynamic import(). No changes to the ExpandToggle API.