chore(read): replace deprecated git-raw-commits with git-client#4860
Conversation
`git-raw-commits` is deprecated in favor of `@conventional-changelog/git-client`, which is now used directly via `GitClient.getRawCommits`.
PR Summary by QodoReplace deprecated git-raw-commits with @conventional-changelog/git-client
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Confidence Score: 5/5Safe to merge — the change is a direct like-for-like dependency swap with no user-facing API or behavioural differences. The migration is mechanically straightforward: git-raw-commits already wrapped @conventional-changelog/git-client internally, so the new code calls the same underlying operations directly. The manual skip handling, the cwd fallback to process.cwd(), and the existing test covering --skip 1 all remain intact. Transitive lockfile bumps are well-scoped and the new engine requirement (>=22) is already met by the package's own constraint. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "chore(read): replace deprecated git-raw-..." | Re-trigger Greptile |
Code Review by Qodo
1. Deprecation warnings remain
|
Thanks for flagging this. As I noted in the review above, this finding isn't entirely accurate. It's true that Tracing where it comes from: Every path ends at |
|
Thanks! |
git-raw-commitsis deprecated in favor of@conventional-changelog/git-client, which is now used directly viaGitClient.getRawCommits.Description
Replaces the deprecated
git-raw-commitsdependency in@commitlint/readwith its official successor,@conventional-changelog/git-client.getHistoryCommitsnow reads history throughnew GitClient(cwd).getRawCommits(...)instead of the standalonegetRawCommitsfunction.cwdis passed to theGitClientconstructor (previously passed inline per call).GitOptionstype is replaced by a localHistoryCommitsOptions(GitLogParams & Record<string, unknown>), since the client exposesGitLogParams.@types/git-raw-commitsdev dependency — the client ships its own types.^3.0.0(resolves to3.0.1).Motivation and Context
git-raw-commitsis deprecated and no longer maintained; its own deprecation notice recommends migrating to@conventional-changelog/git-client. This keeps@commitlint/readon a supported dependency with no intended change in behavior.This migration removes the deprecation warning that end users see when installing
commitlintpackages:Usage examples
No user-facing API or configuration change — behavior is unchanged. Reading commit messages from a range continues to work as before:
How Has This Been Tested?
@commitlint/readunit tests pass (includingget-history-commits).tsc --noEmit) and Vitest reports no type errors.git-raw-commits@5dependency is no longer pulled in by@commitlint/read.Types of changes
Checklist: