# What changed in exit-hook

> 2 changes in exit-hook 5 from its official release notes, upgrade guides and advisories. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/exit-hook/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## exit-hook 5

### Fixes and other changes

- The async exit path flushes stdout and stderr before exiting, helping ensure pending output is written. (5.1.0) — [release notes](https://github.com/sindresorhus/exit-hook/releases/tag/v5.1.0)
- Fixes gracefulExit() so it honors explicit exit codes. (5.0.1) — [release notes](https://github.com/sindresorhus/exit-hook/releases/tag/v5.0.1)
