Skip to content

Migrate husky to version 9#6201

Merged
canova merged 1 commit into
firefox-devtools:mainfrom
canova:husky-9
Jul 20, 2026
Merged

Migrate husky to version 9#6201
canova merged 1 commit into
firefox-devtools:mainfrom
canova:husky-9

Conversation

@canova

@canova canova commented Jul 20, 2026

Copy link
Copy Markdown
Member

Main | Deploy preview

Husky has been very out of date, and it wasn't using the new git core.hooksPath for resolving the paths for hooks.

A little background on why I'm doing this:
I initially wanted to make the git hooks work in jujutsu (they are not supported currently), and came up with a jj alias workaround that checks core.hooksPath and then uses that automatically. But apparently husky 4 wasn't using that for resolving the paths, so it wasn't working correctly. Now this makes it work properly.

In case you're curious this is my current jj alias:

# Emulate git's pre-push hook, which jj doesn't support natively. Resolves the
# hook location the same way git does, including from secondary jj workspaces
# (which have no local .git).
push = ["util", "exec", "--", "sh", "-c", """
  set -e
  root="$(jj workspace root)"
  gitdir="$(jj git root --ignore-working-copy)"

  # Hook location, exactly as git resolves it: core.hooksPath else <gitdir>/hooks.
  hooksdir="$(git --git-dir="$gitdir" config core.hooksPath 2>/dev/null || true)"
  [ -n "$hooksdir" ] || hooksdir="$gitdir/hooks"
  case "$hooksdir" in /*) ;; *) hooksdir="$root/$hooksdir" ;; esac

  hook="$hooksdir/pre-push"
  if [ -x "$hook" ]; then
    ( cd "$root" && "$hook" origin "$(jj git remote list | awk '/^origin/{print $2; exit}')" </dev/null )
  fi

  jj git push "$@"
""", "sh"]

@canova
canova requested a review from fatadel as a code owner July 20, 2026 11:47
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.63%. Comparing base (d4b6ff9) to head (5078d50).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #6201    +/-   ##
========================================
  Coverage   83.63%   83.63%            
========================================
  Files         346      346            
  Lines       37174    37174            
  Branches    10318    10422   +104     
========================================
  Hits        31090    31090            
  Misses       5656     5656            
  Partials      428      428            

☔ 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.

@fatadel fatadel 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.

Thanks! Some nits below.

Comment thread bin/post-checkout.js Outdated
Comment thread bin/post-rewrite.js Outdated
Comment thread bin/post-checkout.js
Husky has been very out of date lately, and it wasn't using the new git
`core.hooksPath` for resolving the paths for hooks.
@canova
canova enabled auto-merge (squash) July 20, 2026 13:58
@canova
canova merged commit 9f38cd9 into firefox-devtools:main Jul 20, 2026
21 checks passed
@canova canova mentioned this pull request Jul 21, 2026
canova added a commit that referenced this pull request Jul 21, 2026
Changes:

[Sky Ning] Skip preview links for non-main PRs (#6161)
[spokodev] fix(gecko-upgrade): don't crash on a counter with empty
sample_groups (#6160)
[fatadel] Show counter values over time in profiler-cli (#6136)
[Markus Stange] Make profile-conversion snapshots more compact and
meaningful (#6152)
[Markus Stange] More typed arrays: sample + counter times, some
frametable columns (#6139)
[Nazım Can Altınova] Only render a marker url field as a link when the
whole value is a URL (#6163)
[fatadel] Show each counter's owning process in profiler-cli (#6164)
[Nazım Can Altınova] Document the pre-existing thread info and network
JSON schemas in the cli (#6171)
[Markus Stange] Copy column contents in
getRawSamplesTableBuilderFromExisting for consistency (#6168)
[Markus Stange] Convert eligible columns to typed arrays when outputting
from profiler-edit (#6167)
[Markus Stange] Remove unused samples.thread column (#6151)
[Markus Stange] Fixed botched merge which broke 'yarn ts' (#6174)
[Nazım Can Altınova] Add marker handles to `profiler-cli thread network`
(#6172)
[Markus Stange] Update json-slabs 0.3.0 → 0.4.0 (major) (#6176)
[Nazım Can Altınova] Surface network activity across profiler-cli
(#6175)
[Nazım Can Altınova] Add `profile meta` command to profiler-cli (#6177)
[Markus Stange] Allow raw marker table's `startTime` and `endTime`
columns to be Float64Array (#6169)
[nightcityblade] Fix light theme text selection colors (#6186)
[Nazım Can Altınova] Import source map URLs from Chrome DevTools traces
(#6190)
[Nazım Can Altınova] Rename yarn `build-profiler-cli` script to
`build-cli` (#6191)
[Nazım Can Altınova] Migrate husky to version 9 (#6201)
[Nazım Can Altınova] Fix horizontal overflow when the transform
navigator is long (#6199)
[fatadel] Add a 'hexadecimal' marker schema field format (#6197)
[Nazım Can Altınova] Bump source-map to 0.8.0 and remove the old type
workaround (#6202)
[Nazım Can Altınova] 🔃 Sync: l10n -> main (July 21, 2026) (#6209)


And special thanks to our localizers:

fr: parmegiani.thomas
fr: Théo Chevalier
sr: Марко Костић (Marko Kostić)
sv-SE: Luna Jernberg
tr: Grk
zh-CN: Ariel
zh-CN: Olvcpr423
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.

2 participants