Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# Changelog

## 0.4.2

Released on 2026-05-26.

### Highlights

0.4.2 is mainly about making `prek run` faster in large repos.

`prek` now does less `git diff` work. After hooks run, `prek` uses diff checks
to detect files changed by hooks. If a hook modifies files, prek marks that hook
as failed. That is important, but full diff snapshots can be slow in big repos,
especially when they happen after every hook group.

We skip the expensive diff path in two common cases: built-in hooks that prek
knows are read-only, and clean worktrees where a cheap dirty check is enough
unless a hook actually changes files. In the right large-repo workload,
skipping that work can make runs up to 10x faster.

Workspace mode is faster too. Hooks have historically been too serial.
Priority-based concurrency helped, but it required users to choose good
`priority` values. Now sibling projects at the same workspace depth run in
parallel automatically. Their files do not overlap, so this is safe and needs
no extra config. For multi-project workspaces, this can dramatically reduce
total hook time.

### Sponsorship

If `prek` saves time for you or your team, please consider sponsoring the
project on [GitHub Sponsors](https://github.com/sponsors/j178). It helps keep
new features, performance work, and maintenance moving.

### Enhancements

- Run same-depth projects concurrently ([#2110](https://github.com/j178/prek/pull/2110))
- Make rustup install profile configurable ([#2111](https://github.com/j178/prek/pull/2111))
- Simplify hook progress folding ([#2125](https://github.com/j178/prek/pull/2125))

### Performance

- Optimize diff checks for clean worktrees ([#2109](https://github.com/j178/prek/pull/2109))
- Skip diff checks for read-only hooks ([#2108](https://github.com/j178/prek/pull/2108))

### Contributors

- @j178
- @Carlomus

## 0.4.1

Released on 2026-05-20.
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ members = ["crates/*"]
resolver = "3"

[workspace.package]
version = "0.4.1"
version = "0.4.2"
edition = "2024"
rust-version = "1.93.1"
repository = "https://github.com/j178/prek"
homepage = "https://prek.j178.dev/"
license = "MIT"

[workspace.dependencies]
prek-consts = { path = "crates/prek-consts", version = "0.4.1" }
prek-identify = { path = "crates/prek-identify", version = "0.4.1" }
prek-pty = { path = "crates/prek-pty", version = "0.4.1" }
prek-consts = { path = "crates/prek-consts", version = "0.4.2" }
prek-identify = { path = "crates/prek-identify", version = "0.4.2" }
prek-pty = { path = "crates/prek-pty", version = "0.4.2" }

aho-corasick = { version = "1.1.4" }
annotate-snippets = { version = "0.12.13" }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ On Linux and macOS:
<!-- --8<-- [start: linux-standalone-install] -->

```bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.4.1/prek-installer.sh | sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.4.2/prek-installer.sh | sh
```

<!-- --8<-- [end: linux-standalone-install] -->
Expand All @@ -73,7 +73,7 @@ On Windows:
<!-- --8<-- [start: windows-standalone-install] -->

```powershell
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.4.1/prek-installer.ps1 | iex"
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.4.2/prek-installer.ps1 | iex"
```

<!-- --8<-- [end: windows-standalone-install] -->
Expand Down
6 changes: 3 additions & 3 deletions docs/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ A common pattern is to copy the binary into your own image:

```dockerfile
FROM debian:bookworm-slim
COPY --from=ghcr.io/j178/prek:v0.4.1 /prek /usr/local/bin/prek
COPY --from=ghcr.io/j178/prek:v0.4.2 /prek /usr/local/bin/prek
```

If you prefer, you can also run the distroless image directly:

```bash
docker run --rm ghcr.io/j178/prek:v0.4.1 --version
docker run --rm ghcr.io/j178/prek:v0.4.2 --version
```

### Verifying Images
Expand All @@ -43,7 +43,7 @@ Loaded 1 attestation from GitHub API

!!! tip

Use a specific version tag (e.g., `ghcr.io/j178/prek:v0.4.1`) or image
Use a specific version tag (e.g., `ghcr.io/j178/prek:v0.4.2`) or image
digest rather than `latest` for verification.

## GitHub Actions
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "prek"
version = "0.4.1"
version = "0.4.2"
description = "A fast Git hook manager written in Rust, designed as a drop-in alternative to pre-commit, reimagined."
authors = [{ name = "j178", email = "hi@j178.dev" }]
requires-python = ">=3.8"
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading