-
Notifications
You must be signed in to change notification settings - Fork 965
fix(read): update git-raw-commits to v5 API #4638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
escapedcat
merged 3 commits into
conventional-changelog:master
from
Tamas-hi:fix-git-raw-commits-v5
Mar 10, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,33 @@ | ||
| import gitRawCommits from "git-raw-commits"; | ||
|
|
||
| import { streamToPromise } from "./stream-to-promise.js"; | ||
| import type { GitOptions } from "git-raw-commits"; | ||
| import { getRawCommits } from "git-raw-commits"; | ||
|
|
||
| // Get commit messages from history | ||
| export async function getHistoryCommits( | ||
| options: gitRawCommits.GitOptions, | ||
| options: GitOptions, | ||
| opts: { cwd?: string } = {}, | ||
| ): Promise<string[]> { | ||
| return streamToPromise(gitRawCommits(options, { cwd: opts.cwd })); | ||
| // Note: git-raw-commits v5 drops support for arbitrary git log arguments. | ||
| // We extract and handle 'skip' manually here to preserve backward compatibility. | ||
| // Other arbitrary arguments passed via gitLogArgs may be silently ignored by v5. | ||
| const { skip: skipRaw, ...gitOptions } = options as GitOptions & { | ||
| skip?: unknown; | ||
| }; | ||
|
|
||
| let skipNum = 0; | ||
| if (skipRaw !== undefined) { | ||
| skipNum = Number(skipRaw); | ||
| if (!Number.isInteger(skipNum) || skipNum < 0) { | ||
| throw new TypeError(`Invalid skip value: ${skipRaw}`); | ||
| } | ||
| } | ||
|
|
||
| const data: string[] = []; | ||
| for await (const commit of getRawCommits({ ...gitOptions, cwd: opts.cwd })) { | ||
| if (skipNum > 0) { | ||
| skipNum--; | ||
| continue; | ||
| } | ||
| data.push(commit); | ||
| } | ||
| return data; | ||
| } | ||
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -312,6 +312,15 @@ | |
| "@babel/helper-string-parser" "^7.27.1" | ||
| "@babel/helper-validator-identifier" "^7.28.5" | ||
|
|
||
| "@conventional-changelog/git-client@^2.6.0": | ||
| version "2.6.0" | ||
| resolved "https://registry.npmjs.org/@conventional-changelog/git-client/-/git-client-2.6.0.tgz#1c7a13681426a7bc4298d24c92cda3a6d6fba544" | ||
| integrity sha512-T+uPDciKf0/ioNNDpMGc8FDsehJClZP0yR3Q5MN6wE/Y/1QZ7F+80OgznnTCOlMEG4AV0LvH2UJi3C/nBnaBUg== | ||
| dependencies: | ||
| "@simple-libs/child-process-utils" "^1.0.0" | ||
| "@simple-libs/stream-utils" "^1.2.0" | ||
| semver "^7.5.2" | ||
|
|
||
| "@docsearch/[email protected]": | ||
| version "3.8.2" | ||
| resolved "https://registry.npmjs.org/@docsearch/css/-/css-3.8.2.tgz#7973ceb6892c30f154ba254cd05c562257a44977" | ||
|
|
@@ -1601,6 +1610,13 @@ | |
| "@sigstore/core" "^1.1.0" | ||
| "@sigstore/protobuf-specs" "^0.3.2" | ||
|
|
||
| "@simple-libs/child-process-utils@^1.0.0": | ||
| version "1.0.2" | ||
| resolved "https://registry.npmjs.org/@simple-libs/child-process-utils/-/child-process-utils-1.0.2.tgz#cb182d310c9bed3ace200b26258e090d898a1736" | ||
| integrity sha512-/4R8QKnd/8agJynkNdJmNw2MBxuFTRcNFnE5Sg/G+jkSsV8/UBgULMzhizWWW42p8L5H7flImV2ATi79Ove2Tw== | ||
| dependencies: | ||
| "@simple-libs/stream-utils" "^1.2.0" | ||
|
|
||
| "@simple-libs/stream-utils@^1.2.0": | ||
| version "1.2.0" | ||
| resolved "https://registry.npmjs.org/@simple-libs/stream-utils/-/stream-utils-1.2.0.tgz#5af724b826f1ab4d7f2826d31d3efccec124102b" | ||
|
|
@@ -1759,10 +1775,10 @@ | |
| "@types/jsonfile" "*" | ||
| "@types/node" "*" | ||
|
|
||
| "@types/git-raw-commits@^2.0.3": | ||
| version "2.0.4" | ||
| resolved "https://registry.npmjs.org/@types/git-raw-commits/-/git-raw-commits-2.0.4.tgz#29a77a82043b7baaba823f8b34ab10191df138e9" | ||
| integrity sha512-PYmTK156j6TilbwtnO2JErH4TCC1izpgP3kRE3KUX35bjBOD2A+syCGeercqHXBcM6wL+DU0WbJB2Gz8fPR+8A== | ||
| "@types/git-raw-commits@^5.0.0": | ||
| version "5.0.1" | ||
| resolved "https://registry.npmjs.org/@types/git-raw-commits/-/git-raw-commits-5.0.1.tgz#825c653f4fcd5d49464f9df620f6efd1946eebfb" | ||
| integrity sha512-sd4kgxJbuZF0RDy6cX7KlKSGiwqB1mqn8nriUbxt5e1F+MO/N4hJlhaYn0Omw4g2biClFpT5Mre07x7OkGt8tg== | ||
| dependencies: | ||
| "@types/node" "*" | ||
|
|
||
|
|
@@ -3423,11 +3439,6 @@ dargs@^7.0.0: | |
| resolved "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" | ||
| integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== | ||
|
|
||
| dargs@^8.0.0: | ||
| version "8.1.0" | ||
| resolved "https://registry.npmjs.org/dargs/-/dargs-8.1.0.tgz#a34859ea509cbce45485e5aa356fef70bfcc7272" | ||
| integrity sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw== | ||
|
|
||
| dateformat@^3.0.3: | ||
| version "3.0.3" | ||
| resolved "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" | ||
|
|
@@ -4337,14 +4348,13 @@ git-raw-commits@^3.0.0: | |
| meow "^8.1.2" | ||
| split2 "^3.2.2" | ||
|
|
||
| git-raw-commits@^4.0.0: | ||
| version "4.0.0" | ||
| resolved "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-4.0.0.tgz#b212fd2bff9726d27c1283a1157e829490593285" | ||
| integrity sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ== | ||
| git-raw-commits@^5.0.0: | ||
| version "5.0.1" | ||
| resolved "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-5.0.1.tgz#e91d8fd4e3a264142166956fe1a23d08c069657e" | ||
| integrity sha512-Y+csSm2GD/PCSh6Isd/WiMjNAydu0VBiG9J7EdQsNA5P9uXvLayqjmTsNlK5Gs9IhblFZqOU0yid5Il5JPoLiQ== | ||
| dependencies: | ||
| dargs "^8.0.0" | ||
| meow "^12.0.1" | ||
| split2 "^4.0.0" | ||
| "@conventional-changelog/git-client" "^2.6.0" | ||
| meow "^13.0.0" | ||
|
|
||
| git-remote-origin-url@^2.0.0: | ||
| version "2.0.0" | ||
|
|
@@ -5582,11 +5592,6 @@ mdast-util-to-hast@^13.0.0: | |
| unist-util-visit "^5.0.0" | ||
| vfile "^6.0.0" | ||
|
|
||
| meow@^12.0.1: | ||
| version "12.1.1" | ||
| resolved "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz#e558dddbab12477b69b2e9a2728c327f191bace6" | ||
| integrity sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw== | ||
|
|
||
| meow@^13.0.0: | ||
| version "13.2.0" | ||
| resolved "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz#6b7d63f913f984063b3cc261b6e8800c4cd3474f" | ||
|
|
@@ -6952,16 +6957,16 @@ semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semve | |
| resolved "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" | ||
| integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== | ||
|
|
||
| semver@^7.5.2, semver@^7.6.0, semver@^7.7.3: | ||
| version "7.7.4" | ||
| resolved "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a" | ||
| integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA== | ||
|
|
||
| semver@^7.5.4, semver@^7.7.1, semver@^7.7.2: | ||
| version "7.7.2" | ||
| resolved "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58" | ||
| integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA== | ||
|
|
||
| semver@^7.6.0, semver@^7.7.3: | ||
| version "7.7.4" | ||
| resolved "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a" | ||
| integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA== | ||
|
|
||
| set-blocking@^2.0.0: | ||
| version "2.0.0" | ||
| resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" | ||
|
|
@@ -7129,11 +7134,6 @@ split2@^3.2.2: | |
| dependencies: | ||
| readable-stream "^3.0.0" | ||
|
|
||
| split2@^4.0.0: | ||
| version "4.2.0" | ||
| resolved "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4" | ||
| integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== | ||
|
|
||
| split@^1.0.1: | ||
| version "1.0.1" | ||
| resolved "https://registry.npmjs.org/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.