File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33const { execSync } = require ( 'child_process' ) ;
44const conventionalCommitsParser = require ( 'conventional-commits-parser' ) ;
55const chalk = require ( 'chalk' ) ;
6+
7+ /** Node's default execSync buffer (~1 MiB) is too small for `git log` on long histories. */
8+ const GIT_LOG_EXEC_OPTS = { maxBuffer : 50 * 1024 * 1024 } ;
9+
610const { version } = require ( '../package.json' ) ;
711
812const releaseType = process . argv [ 2 ] ;
@@ -50,7 +54,8 @@ function getCommits(branch) {
5054 // all commits are too large for execSync buffer size so we'll just get since the last 3 years
5155 const date = new Date ( new Date ( ) . setFullYear ( new Date ( ) . getFullYear ( ) - 3 ) ) ;
5256 const stdout = execSync (
53- `git log ${ branch || '' } --abbrev-commit --since=${ date . getFullYear ( ) } `
57+ `git log ${ branch || '' } --no-merges --abbrev-commit --since=${ date . getFullYear ( ) } ` ,
58+ GIT_LOG_EXEC_OPTS
5459 ) . toString ( ) ;
5560 const allCommits = stdout
5661 . split ( / c o m m i t (? = [ \w \d ] { 8 } [ \n \r ] ) / )
You can’t perform that action at this time.
0 commit comments