question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add gitRawCommitsExecOpts parameter for conventional core

See original GitHub issue

the source code of git-raw-commits

There should be 2 parameters rawGitOpts and rawExecOpts.

function gitRawCommits (rawGitOpts, rawExecOpts) {
  var readable = new stream.Readable()
  readable._read = function () {}

  var gitOpts = normalizeGitOpts(rawGitOpts)
  var execOpts = normalizeExecOpts(rawExecOpts)
  var args = getGitArgs(gitOpts)

  if (gitOpts.debug) {
    gitOpts.debug('Your git-log command is:\ngit ' + args.join(' '))
  }

But there is only one parameter here.

https://github.com/conventional-changelog/conventional-changelog/blob/97ad96fe893bd5b40ec52e24fe46f4f9cd357a1a/packages/conventional-changelog-core/index.js#L23-L28

here is an example to set base dir to parse the commit that is what I need

gitRawCommits(gitRawCommitsOpts, { cwd: 'path/to/your/git/project' });

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
hutsoncommented, Mar 18, 2019

I’ve come to prefer the single object argument as well for most of my work. I can always do object destructuring in the called function if I want to pull out specific properties from the object (typically I do this for readability).

1reaction
stevemaocommented, Mar 11, 2019

I like option 1 a lot better. I think a breaking change is fine and it should be easy for users to change accordingly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

weixin_39625975的博客_CSDN博客-领域博主
内网服务器共享文件,内网服务器文件共享,wegame显示不出区服务器,wegame无法显示网页怎么办?腾讯wegame无法显示网页的三种解决方法...,oppo r17听筒 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found