Major Changes
-
a2421ba: Ship ESM only.
The package is now
"type": "module"and tsdown emits a single ES module output at
esm/(it used to emit CommonJS atcjs/). There is no CommonJS entry any more, so the
cjsDefault: falseinterop shape is gone with it.Migration:
- Requires Jest 27 or later — the
jestpeer range moved from>=24.0.0to>=27.0.0.
Jest loads custom reporters withrequireOrImportModule, which falls back to
await import()on an ESM module; support for ESM reporters landed in Jest 27. Jest
28+ is what the exports map is aimed at; on Jest 27, which ignoresexports,main
points at the same ES module. - Requires Node 20 or later.
require('jest-progress-tracker')no longer works. Nothing changes for the documented
usage — listing"jest-progress-tracker"in Jest'sreporterskeeps working as before.- The exports map deliberately publishes the ES module under the
defaultcondition
rather thanimport: Jest resolves reporter paths with the default condition set
(require,node,default) and never asks forimport, so animport-only map
fails to resolve with "Could not resolve a module for a custom reporter".
- Requires Jest 27 or later — the
-
dbece6c: Fix: the reporter never recorded anything.
ProgressReporterimplementedjest-watcher'sWatchPlugininterface (run+apply), but the README documents the package as areportersentry. Jest never callsrunorapplyon a reporter, so listing it inreporters— the only documented usage — did nothing beyond creating an empty.progress/directory at import.It was broken in the watch-plugin role too. Jest only invokes
WatchPlugin.runfor the plugin whosegetUsageInfo().keymatches a keypress, and this class has nogetUsageInfo, sorunwas unreachable andfilteredwas permanentlyfalse.The class is now a plain jest reporter:
onRunComplete(testContexts, results)replacesapply+ theonTestRunCompletehook.filteredis derived in the constructor from theglobalConfigjest passes to every custom reporter, replacingrun. Jest builds a fresh reporter for each run, including every re-run in watch mode, so a pattern changed mid-watch is now tracked instead of being fixed at startup.- The append is awaited rather than fire-and-forget, so the write lands before the process exits.
init()moved from module scope into the constructor — importing the package no longer creates.progress/as a side effect.
Breaking:
runandapplyare gone. If you listed this package underwatchPlugins, move it toreporters. It now works in both watch and non-watch runs, where the watch-plugin form only ever ran under--watch.jest-watcheris no longer a dependency.
Patch Changes
-
f5b5fa7: 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 throwingERR_REQUIRE_ESM.
Node 18 (EOL April 2025) and Node 20.0–20.18 are excluded becauserequire()hard-fails there.