Repository navigation
chore(deps): update commitlint to v21 and husky to v9 - #1525
Merged
Merged
Conversation
Move commitlint and @commitlint/config-conventional from 8.3 to 21.2.3 and turn the configuration into an ES module, commitlint.config.mjs, with the same single preset. Drop the git-raw-commits devDependency and resolution: only commitlint 8 used that package, and commitlint 21 reads the history through @conventional-changelog/git-client instead.
Move husky from 1.3 to 9.1.7. husky 9 no longer reads hooks from package.json and no longer sets HUSKY_GIT_PARAMS, so the two hooks move from the `husky` key of the manifest to .husky/pre-commit and .husky/commit-msg with the same commands; commit-msg now passes the message file git gives it to `commitlint --edit`. `prepare` runs `husky` before the build to install the hooks. husky 1.3 did not install hooks on CI, husky 9 does, so the release job sets HUSKY=0: otherwise commit-msg would reject the "Version Packages" commit that changesets/action creates.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
commitlint and
@commitlint/config-conventionalgo from 8.3.6 to 21.2.3, husky from 1.3.1 to 9.1.7, one commit per tool. husky 9 reads nopackage.jsonkey and sets noHUSKY_GIT_PARAMS, so the hooks move into files; raising the version alone would silently turn both off.commitlint.config.jsbecomescommitlint.config.mjswithexport defaultand the same single preset. Thegit-raw-commitsdevDependency andresolutionsentry go; only@commitlint/read8 used it.preparekeeps the build thatreleaseand the CI install use.HUSKY: 0is the only CI change. husky 1.3.1 skipped CI; 9.1.7 installs wherever.gitexists, and the release job's install runsprepare. The commit-msg hook would then reject theVersion Packagescommit of changesets/action ([subject-empty],[type-empty]), which uses a plaingit commit -m. The other workflows make no commit that the hook could reject: check.yml makes none, and the deploy action in site-deploy.yml commits with--no-verify.Lockfile
99 keys leave (the commitlint 8 and husky 1 closures) and 44 arrive; no retained package changes version. Two side effects of pnpm 9.15.9:
@commitlint/loadand satisfies the optionaljitipeer of vite, so pnpm adds(jiti@2.6.1)to 11 snapshot keys and importer lines ofexamples/astro-solidandexamples/vite. Their versions do not move; the suffix stripped by hand is written back the next time pnpm resolves.semver@7.8.5losesoptional: true, since@commitlint/is-ignored21.2.3 depends on it directly.Evidence
pnpm 9.15.9, Node 24.4.1:
prepareran husky and the build,core.hooksPathis.husky/_,git status --shortis empty.foo: barexits 1 with[type-enum]; the good message exits 0 silently..husky/pre-commitset toexit 0there (so the slow checks cannot mask the result),git commit -m 'foo: bar'is rejected with[type-enum]and the commit count is unchanged;git commit -m 'chore: try hooks'succeeds.sh -e .husky/pre-commitandpnpm check:allpassed.git commit -m 'Version Packages'exits 1 with the hooks installed;HUSKY=0 pnpm exec huskyprintsHUSKY=0 skip installand leavescore.hooksPathunset.Left out
packages/,examples/orwebsite/changes..git/hooksfiles husky 1 left in existing clones are not removed.Not verified
HUSKY: 0was checked only locally, not in a release run.