# What changed in pre-commit

> 16 changes in pre-commit 4 from its official release notes, upgrade guides and advisories: 1 breaking, 3 new APIs and options. Each one cited. Sources checked 2026-10-19. HTML: https://unstale.sh/pypi/pre-commit/

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

## pre-commit 4

### Breaking changes

- Requires the --hook-type option. (4.6.0) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.6.0)

### New APIs and options

- Adds the pre-commit hazmat command. (4.5.0) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.5.0)
- Adds `unsupported` and `unsupported_script` as aliases for `system` and `script`; the existing values will eventually be deprecated. (4.4.0) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.4.0)
- Adds --fail-fast to stop running hooks after the first failure. (4.4.0) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.4.0)

### Performance

- Improve the performance of the commit existence check in pre-push. (4.6.1) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.6.1)

### Behavior and default changes

- Allows --hook-dir to be omitted for easier usage with git 2.54+ hooks. (4.6.0) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.6.0)

### Fixes and other changes

- Fixes `language: node` hooks during commits with `-a` or inside a submodule. (4.7.0) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.7.0)
- Fixes node-language hooks containing a build script when used with npm 11.x. (4.6.2) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.6.2)
- Set JULIA_DEPOT_PATH for language: julia hooks. (4.6.1) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.6.1)
- Install hooks configured with language: node via git to fix npm 12.x compatibility. (4.6.1) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.6.1)
- Mistyped --repo values now produce an error when running pre-commit autoupdate. (4.6.1) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.6.1)
- Avoid duplicating conflicted filenames when running all files. (4.6.1) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.6.1)
- Fixes local hooks configured with language: python so they work without additional_dependencies. (4.5.1) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.5.1)
- Adds support for detecting docker-in-docker when using cgroups v2. (4.4.0) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.4.0)
- Handles Docker returning `SecurityOptions: null`. (4.4.0) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.4.0)
- Improves the error context reported for invalid `stages`. (4.4.0) — [release notes](https://github.com/pre-commit/pre-commit/releases/tag/v4.4.0)
