v0.4.2

j178/prekv0.4.2May 26, 2026by github-actions[bot]

AI Summary

A performance-focused release that makes `prek run` significantly faster in large repositories by optimizing diff checks and adding automatic concurrency for workspace projects at the same depth.

Key Highlights

  • Up to 10x faster performance in large repos by optimizing diff checks
  • Skip diff checks for read-only built-in hooks
  • Optimize diff checks for clean worktrees using cheap dirty check
  • Same-depth workspace projects now run in parallel automatically
  • Made rustup install profile configurable

New Features

  • Run same-depth projects concurrently in workspace mode
  • Make rustup install profile configurable
  • Simplify hook progress folding
  • Optimize diff checks for clean worktrees
  • Skip diff checks for read-only hooks

Full Release Notes

## Release Notes

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

## Install prek 0.4.2

### Install prebuilt binaries via shell script

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

### Install prebuilt binaries via powershell script

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

### Install prebuilt binaries via Homebrew

```sh
brew install prek
```

## Download prek 0.4.2

|  File  | Platform | Checksum |
|--------|----------|----------|
| [prek-aarch64-apple-darwin.tar.gz](https://github.com/j178/prek/releases/download/v0.4.2/prek-aarch64-apple-darwin.tar.gz) | Apple Silicon macOS | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-aarch64-apple-darwin.tar.gz.sha256) |
| [prek-x86_64-apple-darwin.tar.gz](https://github.com/j178/prek/releases/download/v0.4.2/prek-x86_64-apple-darwin.tar.gz) | Intel macOS | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-x86_64-apple-darwin.tar.gz.sha256) |
| [prek-aarch64-pc-windows-msvc.zip](https://github.com/j178/prek/releases/download/v0.4.2/prek-aarch64-pc-windows-msvc.zip) | ARM64 Windows | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-aarch64-pc-windows-msvc.zip.sha256) |
| [prek-i686-pc-windows-msvc.zip](https://github.com/j178/prek/releases/download/v0.4.2/prek-i686-pc-windows-msvc.zip) | x86 Windows | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-i686-pc-windows-msvc.zip.sha256) |
| [prek-x86_64-pc-windows-msvc.zip](https://github.com/j178/prek/releases/download/v0.4.2/prek-x86_64-pc-windows-msvc.zip) | x64 Windows | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-x86_64-pc-windows-msvc.zip.sha256) |
| [prek-aarch64-unknown-linux-gnu.tar.gz](https://github.com/j178/prek/releases/download/v0.4.2/prek-aarch64-unknown-linux-gnu.tar.gz) | ARM64 Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-aarch64-unknown-linux-gnu.tar.gz.sha256) |
| [prek-i686-unknown-linux-gnu.tar.gz](https://github.com/j178/prek/releases/download/v0.4.2/prek-i686-unknown-linux-gnu.tar.gz) | x86 Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-i686-unknown-linux-gnu.tar.gz.sha256) |
| [prek-riscv64gc-unknown-linux-gnu.tar.gz](https://github.com/j178/prek/releases/download/v0.4.2/prek-riscv64gc-unknown-linux-gnu.tar.gz) | RISCV Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-riscv64gc-unknown-linux-gnu.tar.gz.sha256) |
| [prek-s390x-unknown-linux-gnu.tar.gz](https://github.com/j178/prek/releases/download/v0.4.2/prek-s390x-unknown-linux-gnu.tar.gz) | S390x Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-s390x-unknown-linux-gnu.tar.gz.sha256) |
| [prek-x86_64-unknown-linux-gnu.tar.gz](https://github.com/j178/prek/releases/download/v0.4.2/prek-x86_64-unknown-linux-gnu.tar.gz) | x64 Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-x86_64-unknown-linux-gnu.tar.gz.sha256) |
| [prek-armv7-unknown-linux-gnueabihf.tar.gz](https://github.com/j178/prek/releases/download/v0.4.2/prek-armv7-unknown-linux-gnueabihf.tar.gz) | ARMv7 Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-armv7-unknown-linux-gnueabihf.tar.gz.sha256) |
| [prek-aarch64-unknown-linux-musl.tar.gz](https://github.com/j178/prek/releases/download/v0.4.2/prek-aarch64-unknown-linux-musl.tar.gz) | ARM64 MUSL Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-aarch64-unknown-linux-musl.tar.gz.sha256) |
| [prek-i686-unknown-linux-musl.tar.gz](https://github.com/j178/prek/releases/download/v0.4.2/prek-i686-unknown-linux-musl.tar.gz) | x86 MUSL Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-i686-unknown-linux-musl.tar.gz.sha256) |
| [prek-x86_64-unknown-linux-musl.tar.gz](https://github.com/j178/prek/releases/download/v0.4.2/prek-x86_64-unknown-linux-musl.tar.gz) | x64 MUSL Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-x86_64-unknown-linux-musl.tar.gz.sha256) |
| [prek-arm-unknown-linux-musleabihf.tar.gz](https://github.com/j178/prek/releases/download/v0.4.2/prek-arm-unknown-linux-musleabihf.tar.gz) | ARMv6 MUSL Linux (Hardfloat) | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-arm-unknown-linux-musleabihf.tar.gz.sha256) |
| [prek-armv7-unknown-linux-musleabihf.tar.gz](https://github.com/j178/prek/releases/download/v0.4.2/prek-armv7-unknown-linux-musleabihf.tar.gz) | ARMv7 MUSL Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.2/prek-armv7-unknown-linux-musleabihf.tar.gz.sha256) |

## Verifying GitHub Artifact Attestations

The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the [GitHub CLI](https://cli.github.com/manual/gh_attestation_verify):
```sh
gh attestation verify <file-path of downloaded artifact> --repo j178/prek
```

You can also download the attestation from [GitHub](https://github.com/j178/prek/attestations) and verify against that directly:
```sh
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>
```