diff --git a/CHANGELOG.md b/CHANGELOG.md index 6001103c2..9dd2469a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/Cargo.lock b/Cargo.lock index 970c9ce7e..561293e65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2053,7 +2053,7 @@ dependencies = [ [[package]] name = "prek" -version = "0.4.1" +version = "0.4.2" dependencies = [ "aho-corasick", "annotate-snippets", @@ -2134,14 +2134,14 @@ dependencies = [ [[package]] name = "prek-consts" -version = "0.4.1" +version = "0.4.2" dependencies = [ "tracing", ] [[package]] name = "prek-identify" -version = "0.4.1" +version = "0.4.2" dependencies = [ "anyhow", "fs-err", @@ -2157,7 +2157,7 @@ dependencies = [ [[package]] name = "prek-pty" -version = "0.4.1" +version = "0.4.2" dependencies = [ "fs-err", "rustix", diff --git a/Cargo.toml b/Cargo.toml index 6cc2dc4ca..5fa48e7ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ 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" @@ -11,9 +11,9 @@ 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" } diff --git a/README.md b/README.md index 39242e5be..adee52b61 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ On Linux and macOS: ```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 ``` @@ -73,7 +73,7 @@ On Windows: ```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" ``` diff --git a/docs/integrations.md b/docs/integrations.md index 27eff2b00..ebf4d87a4 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 7b71e4fd1..0fc045be4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/uv.lock b/uv.lock index d9cf9f882..da2a98b14 100644 --- a/uv.lock +++ b/uv.lock @@ -541,7 +541,7 @@ wheels = [ [[package]] name = "prek" -version = "0.4.1" +version = "0.4.2" source = { virtual = "." } [package.dev-dependencies]