Skip to content

Update dependency pre-commit to v2#8477

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/pre-commit-2.x
Open

Update dependency pre-commit to v2#8477
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/pre-commit-2.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented May 5, 2026

This PR contains the following updates:

Package Change Age Confidence
pre-commit 1.2.22.0.0 age confidence

Release Notes

observing/pre-commit (pre-commit)

v2.0.0

Compare Source

  • Breaking: requires Node.js 16.13 or newer. engines.node is now
    declared as ">=16.13.0" to match the minimum required by which@4.
  • Breaking: cross-spawn upgraded ^5^7.0.5, fixing the ReDoS
    vulnerability (GHSA-3xgq-45jj-v275).
    cross-spawn's spawnSync now returns status/signal/error instead
    of code; index.js was updated to match.
  • Breaking: which upgraded 1.2.x^4. The spawn-sync runtime
    dependency is dropped in favor of cross-spawn's built-in spawnSync.
  • Breaking: the generated .git/hooks/pre-commit wrapper is rewritten.
    It is now a small bash script that execs the package's hook file via
    an absolute path (single-line invocation instead of multi-line inline
    bash). Anyone parsing the wrapper file will need to adjust.
  • Breaking: hook file mode tightened from 0777 to 0755
    (CIS 6.1.10).
  • Breaking: submodule installs now write to
    <super>/.git/modules/<sub>/hooks/pre-commit. The previous behavior
    silently walked up to the super-project's .git directory and installed
    there because the gitdir-parsing branch was unreachable. Linked worktrees
    (whose .git is also a file) are handled correctly too.
  • The hook now unsets GIT_LITERAL_PATHSPECS, so commits triggered from
    emacs/magit behave the same as on the command line
    (magit FAQ).
  • The hook now cds to the git root before resolving pre-commit via
    require.resolve, so Yarn Plug'n'Play and GUI git clients that invoke
    hooks with an unexpected cwd resolve dependencies correctly.
  • The hook is resilient to a missing pre-commit package: switching to a
    branch without node_modules (or removing the package) no longer blocks
    commits — it exits 0 with a warning instead of throwing a Node
    module-not-found stack trace.
  • Fixed handling of null close codes and signal-terminated scripts; the
    hook no longer treats a signal kill as success.
  • Hardened install.js gitdir parsing against missing matches and bad
    input; gitdir: paths are resolved relative to the directory containing
    the .git file (was incorrectly resolved against the package root).
  • install.js: typo fix ("backuped""backed up").
  • Dev tooling refresh: mocha 3 → 10, assume 1 → 2, dropped istanbul
    for nyc.

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot force-pushed the renovate/pre-commit-2.x branch 2 times, most recently from ba87bbe to 1539e73 Compare May 6, 2026 01:34
@renovate renovate Bot force-pushed the renovate/pre-commit-2.x branch from 1539e73 to 14a1499 Compare May 6, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants