1
0
mirror of https://github.com/j178/prek.git synced 2026-04-25 02:11:36 +02:00
Commit Graph

187 Commits

Author SHA1 Message Date
Jo 45e33109ad Remove examples directory (#1047) 2025-11-08 15:02:31 +08:00
Copilot 011a0b3ff1 Rename crate lib/constants to crates/prek-consts and rename lib to crates (#1026)
* Initial plan

* Rename crate lib/constants to lib/prek-consts and fix all references

Co-authored-by: j178 <10510431+j178@users.noreply.github.com>

* Rename lib directory to crates and update all references

Co-authored-by: j178 <10510431+j178@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: j178 <10510431+j178@users.noreply.github.com>
2025-11-03 23:16:58 +08:00
Jo ee0acf25a3 Rename pty crate to prek-pty (#1025) 2025-11-03 22:16:22 +08:00
Jo f6d873c48e Vendor yaml-merge-keys to reduce dependencies (#1024) 2025-11-03 20:36:23 +08:00
renovate[bot] e14219154d Update taiki-e/install-action action to v2.62.45 (#1007)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-03 19:38:24 +08:00
Jo e608155aaf Disable renovate update for ilammy/msvc-dev-cmd (#1023) 2025-11-03 19:36:04 +08:00
is-alnilam d9baf0a5f1 Add Ruby support (no download support yet) (#993)
* Add Ruby support (no download support yet)

Currently only pre-existing Rubies are used, although the code will
search for and consider multiple versions. This allows a hook to require
3.4.7 when the default system Ruby is 3.4.6, but RVM (or a similar tool)
has installed 3.4.7. If a suitable Ruby cannot be found, the user is
prompted to install one manually and re-run.

Hooks get an isolated GEM_HOME, based on the hook repository, any
additional_dependencies, and the interpreter version/path. Any Ruby
upgrade would therefore re-install the gems to ensure that stale
versions aren't used. Repository gem dependencies are installed based on
the included gemspec files, combined with the additional_dependencies
field.

* Add pins for CI 'install Ruby' action

* Update setup-ruby pin

* Tweak version parsing

* Tweak env vars

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-11-03 19:12:25 +08:00
renovate[bot] df6179017c Update dependency python to 3.14 (#1013) 2025-11-01 12:00:26 +08:00
renovate[bot] a69adc3791 Update GitHub Actions and speed up Windows CI (#1001)
* Update GitHub Actions

* Try to speed up windows CI

* Use `leafo/gh-actions-luarocks`

* Fix luarocks install failure

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-10-31 17:41:46 +08:00
Jo 6e69f990a9 Bump Rust toolchain to 1.91 (#1004)
* Bump Rust toolchain to 1.91

* Fix lint
2025-10-31 16:30:30 +08:00
renovate[bot] b1d9fc1e62 Update GitHub Actions (#1003)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-31 15:24:12 +08:00
Jo 8470e0424a Remove hotpath profiling (#991)
The profiling isn’t very useful right now - it’s way too sensitive to noise. What we really need is proper benchmarking that runs multiple times to filter out all that noise, like what you get with https://codspeed.io/ or https://bencher.dev/
2025-10-29 21:11:23 +08:00
Jo 59b82c7539 Warmup cache before run hotpath profiling 2025-10-29 17:12:33 +08:00
Jo a1b6d2821e Refactor bloat-check and hotpath workflow (#990)
* Refactor `bloat-check` and `hotpath` workflow

* Use faster profiling  profile

* Fix template injection issue

* Tweak
2025-10-29 17:00:38 +08:00
Jo e366cc2679 Fix hotpath profile comparison results path 2025-10-28 21:16:54 +08:00
Jo 83fa8234e1 Fix pr-commit reading result path (#986) 2025-10-28 18:08:06 +08:00
Jo 2fa29a7473 Fix pr-commit action (#985) 2025-10-28 17:50:23 +08:00
Louis Maddox 65a2fe22a6 Profile latency and allocations with hotpath (#956)
* perf(hotpath): profile prek run on its own repo

* Combine pr comments

* Fix path

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-10-28 17:41:47 +08:00
Jo b6c6ba8461 Fail windows CI when an error occured (#971)
* Fail windows CI when an error occured

* Fix tests
2025-10-26 19:04:02 +08:00
Les Freire ed3f357f85 Support language: lua hooks (#954)
* Add Lua language support

Refactor Lua integration: streamline async functions and improve rockspec file handling

Add Lua and LuaRocks installation steps to CI workflow

Add MSVC development command to CI workflow

Update CI workflow to specify Windows-only dependencies for MSVC and Lua installations

Update CI workflow to use official Lua and LuaRocks GitHub actions

Update CI workflow to specify Windows-only dependencies for Lua and LuaRocks installations

Update CI workflow to use PowerShell for Cargo test execution and improve command formatting

Add platform-specific command snapshots for Lua tests

Enhance the Lua test environment by adding separate command snapshots for Windows and non-Windows platforms. This ensures accurate output handling based on the operating system, improving test reliability and clarity.

Update CI workflow to use specific versions of Lua and LuaRocks actions

Refactor Lua dependency installation and update test cases

Refactor Lua command execution to streamline environment path handling

Fix dependencies installing

Fix remote repo hook

* Add lua remote_hook test

* Tweaks

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-10-24 19:36:38 +08:00
Jo b86327004f Hardening github actions (#947)
* Hardening github actions

* Add config

* Fix comment
2025-10-21 14:17:22 +08:00
Jo 9c2cf54a6c Fix bloat-comment action (#948) 2025-10-21 12:06:49 +08:00
Jo 1ab776b164 Fix bloat-comment workflow (#944) 2025-10-20 16:45:02 +08:00
Jo 06195bdbb7 Workaround PR from forks can't comment (#942)
* Workaround PR from forks can't comment

* Minor
2025-10-20 16:22:54 +08:00
Jo 5c2a887764 Comment binary size change on PR (#939)
* Comment binary size change on PR

* Fix permission
2025-10-20 12:49:12 +08:00
Jo 33ad008b7f Minor fix for cargo-bloat summary formatting (#933) 2025-10-19 18:56:51 +08:00
Jo 706960612e Improve cargo-bloat summary formatting (#932) 2025-10-19 18:00:48 +08:00
Louis Maddox 2d6cf9c78d Monitor binary size change in PRs via cargo-bloat workflow (#927)
* perf: monitor binary size change in PRs via cargo-bloat workflow

* perf: use mold linker and Swatinem/rust-cache

* revert: cannot use commit status in PR check

* fix: result was blank

* refactor: move the bloat check into main CI workflow

* refactor: Pythonise the bloat check

* Tweak

* Fix variable substitution

* Fix size extraction

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-10-19 17:45:28 +08:00
Jo 56da9ad94e Fix npm publish (#876) 2025-10-14 14:17:09 +08:00
Álvaro Mondéjar Rubio ff3a6746ff Publish prek to npmjs.com (#819)
* Publish prek to npmjs.com

* Add some docs

* Fix error in README

* Put installation after cargo in README

* Update docs

* Update integration

* Minor change

* Minor change

* Use `@j178/prek`

* Use cargo-dist generated npm package

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-10-13 23:30:50 +08:00
Jo c5be21a5b3 Use issue form for bug report template (#862) 2025-10-10 16:27:28 +08:00
Jo d8ee5c3ac9 Add a bug report template (#857)
* Add a bug report template

* Update
2025-10-09 16:09:09 +08:00
Jo db190aa649 Update renovate config (#849) 2025-10-07 21:16:43 +08:00
renovate[bot] 9af102ae28 Update j178/prek-action action to v1.0.11 (#841) 2025-10-06 09:53:56 +08:00
Jo 0dd84cd620 Improve language version download tests (#832) 2025-10-01 22:31:57 +08:00
renovate[bot] 1b86879736 Update j178/prek-action action to v1.0.10 (#830) 2025-10-01 20:05:32 +08:00
Jo 1e9ccf01f4 Build s390x binary on stable again (#827) 2025-10-01 18:36:14 +08:00
Jo 59960410fa Add support for .prekignore to ignore directories from project discovery (#826) 2025-10-01 18:15:10 +08:00
Jo 5d32b2fe0e Use prek-action in CI lint job (#822) 2025-09-30 17:41:12 +08:00
Jo 8392fcb08a Add a codecov configuration (#816) 2025-09-29 12:02:01 +08:00
renovate[bot] 876f2b912d Update taiki-e/install-action action to v2.62.12 (#815)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-29 10:46:13 +08:00
renovate[bot] 63cc07c53d Update taiki-e/install-action action to v2.62.1 (#778)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-22 11:03:52 +08:00
renovate[bot] b61ebaba68 Update Swatinem/rust-cache action to v2.8.1 (#777) 2025-09-22 10:33:57 +08:00
Jo 0ba14e2f1d Add support for specifying PREK_UV_SOURCE (#766)
* Add support for specifying `PREK_UV_SOURCE`

* Fix

* Improve

* debug

* Fix
2025-09-20 18:24:35 +08:00
Jo 45741797bd Add windows code cov (#764) 2025-09-20 00:13:37 +08:00
renovate[bot] 39e57d5bcf Update taiki-e/install-action action to v2.61.3 (#744)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-15 11:02:35 +08:00
renovate[bot] f57d8ba59c Update astral-sh/setup-uv action to v6.7.0 (#740)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-15 10:46:43 +08:00
Jo 8858c5b27f Enable go mod cache for faster go related tests (#725)
* Enable go mod cache for faster go related tests

* Add node cache
2025-09-14 12:22:08 +08:00
Jo 83d170020a Bump cargo-dist to 0.30 (#720) 2025-09-12 21:54:30 +08:00
Jo 8c17139379 Revert "Remove setup-dev-drive from Windows CI (#674)" (#695)
This reverts commit f3111a4d29.
2025-09-10 00:34:43 +08:00