Skip to content

Rename auto-update to update#2286

Merged
j178 merged 2 commits into
masterfrom
update
Jul 2, 2026
Merged

Rename auto-update to update#2286
j178 merged 2 commits into
masterfrom
update

Conversation

@j178

@j178 j178 commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Rename prek auto-update to prek update
  • Keep legacy command and config aliases
  • Update docs, schema, and tests

Copilot AI review requested due to automatic review settings July 2, 2026 04:57
@j178 j178 added the enhancement New feature or request label Jul 2, 2026
@j178 j178 changed the title Rename auto-update to update Rename auto-update to update Jul 2, 2026
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.10145% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.12%. Comparing base (3c0e172) to head (edaca0e).

Files with missing lines Patch % Lines
crates/prek/src/schema.rs 90.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2286      +/-   ##
==========================================
+ Coverage   93.11%   93.12%   +0.01%     
==========================================
  Files         127      127              
  Lines       27991    28051      +60     
==========================================
+ Hits        26063    26122      +59     
- Misses       1928     1929       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR renames the CLI command prek auto-update to prek update, while keeping backwards-compatible command and config key aliases, and updates the surrounding docs, schema, and tests to match.

Changes:

  • Rename the CLI subcommand to update while retaining legacy aliases (auto-update, autoupdate).
  • Rename configuration keys from auto_update.* to update.* while keeping auto_update as a deserialization alias.
  • Update documentation pages, the published JSON schema, and snapshots/integration tests to reflect the new naming.

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Updates documentation references from auto-update to update.
prek.schema.json Renames the documented config section from auto_update to update.
docs/usage.md Updates example usage to prek update.
docs/reference/configuration.md Renames documented config keys to update.* and documents compatibility aliases.
docs/reference/cli.md Updates CLI reference section/anchors/options from auto-update to update.
docs/diff.md Updates “Difference from pre-commit” command description from auto-update to update.
docs/configuration.md Updates links/compat notes to update.cooldown_days.
docs/compatibility.md Updates compatibility table for new preferred command/config spellings.
docs/authoring-hooks.md Updates hook authoring guidance to refer to prek update.
crates/prek/tests/update.rs Renames integration tests and command invocations to update.
crates/prek/tests/run.rs Updates completion snapshot content to show update.
crates/prek/tests/global_config.rs Updates global-config tests to call update and adds a legacy alias check.
crates/prek/tests/common/mod.rs Renames the TestContext helper from auto_update() to update().
crates/prek/src/snapshots/prek__config__tests__read_yaml_config.snap Updates config debug snapshot field name to update.
crates/prek/src/snapshots/prek__config__tests__read_toml_config.snap Updates config debug snapshot field name to update.
crates/prek/src/snapshots/prek__config__tests__read_config_with_nested_merge_keys.snap Updates config debug snapshot field name to update.
crates/prek/src/snapshots/prek__config__tests__read_config_with_merge_keys.snap Updates config debug snapshot field name to update.
crates/prek/src/snapshots/prek__config__tests__parse_repos.snap Updates config debug snapshot field name to update.
crates/prek/src/snapshots/prek__config__tests__parse_repos-6.snap Updates config debug snapshot field name to update.
crates/prek/src/snapshots/prek__config__tests__parse_repos-4.snap Updates config debug snapshot field name to update.
crates/prek/src/snapshots/prek__config__tests__parse_repos-3.snap Updates config debug snapshot field name to update.
crates/prek/src/snapshots/prek__config__tests__parse_hooks-3.snap Updates config debug snapshot field name to update.
crates/prek/src/snapshots/prek__config__tests__numeric_rev_is_parsed_as_string.snap Updates config debug snapshot field name to update.
crates/prek/src/snapshots/prek__config__tests__meta_hooks-5.snap Updates config debug snapshot field name to update.
crates/prek/src/snapshots/prek__config__tests__language_version.snap Updates config debug snapshot field name to update.
crates/prek/src/settings.rs Renames global-config options to update with serde alias support and adds unit tests for aliases.
crates/prek/src/main.rs Switches CLI dispatch from AutoUpdate to Update.
crates/prek/src/hook.rs Updates test config struct field name to update.
crates/prek/src/config.rs Renames config options/types to UpdateOptions, adds serde alias for auto_update, updates hint text, and adds alias parsing tests.
crates/prek/src/cli/update/source.rs Updates imports and settings resolution to use UpdateSettings and config.update.
crates/prek/src/cli/update/repository.rs Updates module path imports and docstrings to prek update.
crates/prek/src/cli/update/mod.rs Renames the primary entrypoint from auto_update to update and switches reporter type.
crates/prek/src/cli/update/display.rs Updates imports to the update module path.
crates/prek/src/cli/update/config.rs Updates test imports to reference the update module.
crates/prek/src/cli/reporter.rs Renames AutoUpdateReporter to UpdateReporter.
crates/prek/src/cli/mod.rs Replaces the subcommand variant with Update(UpdateArgs) and wires legacy aliases.

Comment thread prek.schema.json
Comment thread crates/prek/src/cli/mod.rs Outdated
@prek-ci-bot

prek-ci-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

📦 Cargo Bloat Comparison

Binary size change: +0.00% (26.7 MiB → 26.7 MiB)

Expand for cargo-bloat output

Head Branch Results

 File  .text     Size             Crate Name
 1.2%   2.5% 332.0KiB        aws_lc_sys aws_lc_0_41_0_aes_gcm_encrypt_avx512
 1.2%   2.5% 332.0KiB        aws_lc_sys aws_lc_0_41_0_aes_gcm_decrypt_avx512
 0.4%   0.7%  97.6KiB              prek prek::languages::<impl prek::config::Language>::run::{{closure}}::{{closure}}
 0.4%   0.7%  97.1KiB              prek prek::languages::<impl prek::config::Language>::run::{{closure}}::{{closure}}
 0.3%   0.7%  91.9KiB              prek prek::languages::<impl prek::config::Language>::install::{{closure}}
 0.2%   0.5%  64.0KiB             prek? <prek::cli::Command as clap_builder::derive::Subcommand>::augment_subcommands
 0.2%   0.4%  49.4KiB annotate_snippets annotate_snippets::renderer::render::render
 0.2%   0.4%  48.4KiB              prek prek::run::{{closure}}
 0.2%   0.3%  42.9KiB              prek prek::cli::run::run::run::{{closure}}
 0.2%   0.3%  42.6KiB             prek? <prek::config::_::<impl serde_core::de::Deserialize for prek::config::Config>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map
 0.1%   0.3%  34.6KiB               std core::ptr::drop_in_place<prek::languages::<impl prek::config::Language>::install::{{closure}}>
 0.1%   0.2%  33.1KiB              prek prek::archive::unpack::{{closure}}
 0.1%   0.2%  30.9KiB             prek? <prek::cli::RunOptions as clap_builder::derive::Args>::augment_args
 0.1%   0.2%  29.8KiB     granit_parser granit_parser::scanner::Scanner<T>::fetch_more_tokens
 0.1%   0.2%  28.0KiB        aws_lc_sys aws_lc_0_41_0_edwards25519_scalarmuldouble_alt
 0.1%   0.2%  27.5KiB        aws_lc_sys aws_lc_0_41_0_edwards25519_scalarmuldouble
 0.1%   0.2%  27.3KiB             prek? <prek::config::_::<impl serde_core::de::Deserialize for prek::config::RemoteHook>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map
 0.1%   0.2%  24.8KiB              prek prek::cli::try_repo::try_repo::{{closure}}
 0.1%   0.2%  24.7KiB             prek? <prek::config::_::<impl serde_core::de::Deserialize for prek::config::LocalHook>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map
 0.1%   0.2%  24.5KiB              prek prek::languages::ruby::installer::RubyInstaller::install::{{closure}}
42.0%  86.1%  11.2MiB                   And 24528 smaller methods. Use -n N to show more.
48.8% 100.0%  13.0MiB                   .text section size, the file size is 26.7MiB

Base Branch Results

 File  .text     Size             Crate Name
 1.2%   2.5% 332.0KiB        aws_lc_sys aws_lc_0_41_0_aes_gcm_encrypt_avx512
 1.2%   2.5% 332.0KiB        aws_lc_sys aws_lc_0_41_0_aes_gcm_decrypt_avx512
 0.4%   0.7%  97.1KiB              prek prek::languages::<impl prek::config::Language>::run::{{closure}}::{{closure}}
 0.3%   0.7%  93.0KiB              prek prek::languages::<impl prek::config::Language>::run::{{closure}}::{{closure}}
 0.3%   0.7%  91.9KiB              prek prek::languages::<impl prek::config::Language>::install::{{closure}}
 0.2%   0.5%  65.2KiB             prek? <prek::cli::Command as clap_builder::derive::Subcommand>::augment_subcommands
 0.2%   0.4%  49.4KiB annotate_snippets annotate_snippets::renderer::render::render
 0.2%   0.4%  48.5KiB              prek prek::run::{{closure}}
 0.2%   0.3%  42.8KiB              prek prek::cli::run::run::run::{{closure}}
 0.2%   0.3%  42.6KiB             prek? <prek::config::_::<impl serde_core::de::Deserialize for prek::config::Config>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map
 0.1%   0.3%  34.2KiB               std core::ptr::drop_in_place<prek::languages::<impl prek::config::Language>::install::{{closure}}>
 0.1%   0.2%  33.4KiB              prek prek::archive::unpack::{{closure}}
 0.1%   0.2%  31.9KiB             prek? <prek::cli::RunOptions as clap_builder::derive::Args>::augment_args
 0.1%   0.2%  29.8KiB     granit_parser granit_parser::scanner::Scanner<T>::fetch_more_tokens
 0.1%   0.2%  28.0KiB        aws_lc_sys aws_lc_0_41_0_edwards25519_scalarmuldouble_alt
 0.1%   0.2%  27.5KiB        aws_lc_sys aws_lc_0_41_0_edwards25519_scalarmuldouble
 0.1%   0.2%  27.3KiB             prek? <prek::config::_::<impl serde_core::de::Deserialize for prek::config::RemoteHook>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map
 0.1%   0.2%  24.8KiB              prek prek::cli::try_repo::try_repo::{{closure}}
 0.1%   0.2%  24.7KiB             prek? <prek::config::_::<impl serde_core::de::Deserialize for prek::config::LocalHook>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map
 0.1%   0.2%  24.5KiB              prek prek::languages::ruby::installer::RubyInstaller::install::{{closure}}
42.0%  86.1%  11.2MiB                   And 24526 smaller methods. Use -n N to show more.
48.8% 100.0%  13.0MiB                   .text section size, the file size is 26.7MiB

@prek-ci-bot

prek-ci-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

⚡️ Hyperfine Benchmarks

Summary: 0 regressions, 0 improvements above the 10% threshold.

Environment
  • OS: Linux 6.17.0-1018-azure
  • CPU: 4 cores
  • prek version: prek 0.4.6+7 (de72cf6 2026-07-02)
  • Rust version: rustc 1.96.1 (31fca3adb 2026-06-26)
  • Hyperfine version: hyperfine 1.20.0
CLI Commands

Benchmarking basic commands in the main repo:

prek --version

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base --version 2.3 ± 0.2 2.1 3.1 1.08 ± 0.11
prek-head --version 2.1 ± 0.1 2.0 3.0 1.00

prek list

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base list 9.3 ± 0.4 9.0 13.0 1.03 ± 0.05
prek-head list 9.1 ± 0.1 8.7 9.7 1.00

prek validate-config .pre-commit-config.yaml

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base validate-config .pre-commit-config.yaml 3.2 ± 0.1 3.1 3.5 1.06 ± 0.16
prek-head validate-config .pre-commit-config.yaml 3.0 ± 0.4 2.9 6.1 1.00

prek sample-config

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base sample-config 2.5 ± 0.1 2.4 3.1 1.06 ± 0.04
prek-head sample-config 2.4 ± 0.0 2.3 2.5 1.00
Cold vs Warm Runs

Comparing first run (cold) vs subsequent runs (warm cache):

prek run --all-files (cold - no cache)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --all-files 74.9 ± 2.7 70.2 78.0 1.03 ± 0.05
prek-head run --all-files 73.1 ± 2.2 68.9 75.6 1.00

prek run --all-files (warm - with cache)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --all-files 74.3 ± 4.3 69.9 88.0 1.03 ± 0.07
prek-head run --all-files 72.0 ± 2.4 68.3 77.5 1.00
Full Hook Suite

Running the builtin hook suite on the benchmark workspace:

prek run --all-files (full builtin hook suite)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --all-files 72.0 ± 2.5 67.3 77.2 1.00
prek-head run --all-files 72.1 ± 2.4 68.0 77.7 1.00 ± 0.05
Individual Hook Performance

Benchmarking each hook individually on the test repo:

prek run trailing-whitespace --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run trailing-whitespace --all-files 20.0 ± 1.3 18.7 24.1 1.06 ± 0.08
prek-head run trailing-whitespace --all-files 19.0 ± 0.6 18.2 20.6 1.00

prek run end-of-file-fixer --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run end-of-file-fixer --all-files 25.6 ± 1.9 23.2 29.9 1.00
prek-head run end-of-file-fixer --all-files 26.0 ± 2.4 23.1 31.0 1.02 ± 0.12

prek run check-json --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-json --all-files 7.9 ± 0.5 7.3 10.0 1.04 ± 0.08
prek-head run check-json --all-files 7.6 ± 0.3 7.0 8.4 1.00

prek run check-yaml --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-yaml --all-files 7.5 ± 0.2 7.1 7.9 1.05 ± 0.04
prek-head run check-yaml --all-files 7.1 ± 0.2 6.9 7.6 1.00

prek run check-toml --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-toml --all-files 7.6 ± 0.3 6.9 8.3 1.05 ± 0.06
prek-head run check-toml --all-files 7.2 ± 0.3 6.6 8.2 1.00

prek run check-xml --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-xml --all-files 7.6 ± 0.3 7.0 8.2 1.03 ± 0.06
prek-head run check-xml --all-files 7.4 ± 0.3 6.9 8.2 1.00

prek run detect-private-key --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run detect-private-key --all-files 13.3 ± 1.1 11.6 15.9 1.00
prek-head run detect-private-key --all-files 13.3 ± 1.3 11.4 16.6 1.00 ± 0.13

prek run fix-byte-order-marker --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run fix-byte-order-marker --all-files 17.6 ± 1.2 16.1 20.0 1.02 ± 0.09
prek-head run fix-byte-order-marker --all-files 17.3 ± 1.0 15.9 20.3 1.00
Installation Performance

Benchmarking hook installation (fast path hooks skip Python setup):

prek install-hooks (cold - no cache)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base install-hooks 4.5 ± 0.1 4.5 4.8 1.08 ± 0.03
prek-head install-hooks 4.2 ± 0.0 4.2 4.3 1.00

prek install-hooks (warm - with cache)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base install-hooks 4.4 ± 0.0 4.4 4.5 1.03 ± 0.02
prek-head install-hooks 4.3 ± 0.1 4.2 4.4 1.00
File Filtering/Scoping Performance

Testing different file selection modes:

prek run (staged files only)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run 36.7 ± 1.1 35.4 39.8 1.00 ± 0.04
prek-head run 36.7 ± 1.2 35.3 40.1 1.00

prek run --files '*.json' (specific file type)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --files '*.json' 7.8 ± 0.1 7.6 8.1 1.00
prek-head run --files '*.json' 7.9 ± 0.2 7.6 8.4 1.01 ± 0.03
Workspace Discovery & Initialization

Benchmarking hook discovery and initialization overhead:

prek run --dry-run --all-files (measures init overhead)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --dry-run --all-files 6.9 ± 0.2 6.7 7.6 1.06 ± 0.04
prek-head run --dry-run --all-files 6.6 ± 0.2 6.3 6.9 1.00
Meta Hooks Performance

Benchmarking meta hooks separately:

prek run check-hooks-apply --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-hooks-apply --all-files 11.9 ± 0.2 11.6 12.3 1.05 ± 0.02
prek-head run check-hooks-apply --all-files 11.3 ± 0.1 11.2 11.4 1.00

prek run check-useless-excludes --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-useless-excludes --all-files 10.4 ± 0.1 10.3 10.6 1.03 ± 0.01
prek-head run check-useless-excludes --all-files 10.1 ± 0.1 10.0 10.2 1.00

prek run identity --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run identity --all-files 9.6 ± 0.1 9.4 9.8 1.02 ± 0.02
prek-head run identity --all-files 9.5 ± 0.1 9.3 9.8 1.00

@j178 j178 merged commit ec18e36 into master Jul 2, 2026
36 checks passed
@j178 j178 deleted the update branch July 2, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants