Skip to content

v2.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 07 Sep 05:33
· 3 commits to main since this release
898ef19

Major Changes

  • c730d86: Ship ESM only.

    The package is now "type": "module" and lib/ holds a single ESM build. The
    plugin class moved from export = to a default export, which is what jest's
    requireOrImportModule reads off an imported namespace.

    Migration

    • Requires jest >= 28. Jest has loaded ESM watch plugins since 27, but it
      resolves the plugin path with the default require/node/default conditions
      and only honours exports from 28 — so the exports map deliberately points its
      default condition at the ESM entry, and jest 27 and older are no longer supported.
    • require('jest-watch-suspend') no longer works. Configure the plugin by name in
      watchPlugins as before; jest imports it for you.

Patch Changes

  • 090e7bd: Declare a supported Node range: ^20.19.0 || ^22.13.0 || >=24.

    Every version in that range has unflagged require(esm), so a CommonJS consumer's
    require() of this now-ESM-only package resolves rather than throwing ERR_REQUIRE_ESM.
    Node 18 (EOL April 2025) and Node 20.0–20.18 are excluded because require() hard-fails there.