npm / exit-hook
exit-hook
What changed in exit-hook 3 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
5 breaking3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initexit-hook 54 changes
Breaking changes 1
Node.js 20 is now required to use exit-hook.
Fixes and other changes 3
The async exit path flushes stdout and stderr before exiting, helping ensure pending output is written.
Fixes gracefulExit() so it honors explicit exit codes.
exit-hook now respects process.exitCode.
exit-hook 42 changes
Breaking changes 2
Node.js 18 is now required to use exit-hook.
The minimumWait option was renamed to wait; it specifies how long the onExit function is expected to take.
exit-hook 32 changes
Breaking changes 2
Node.js 12.20 is now required to run the package.
The package is now pure ESM, changing how developers import and use it.