@existdb/repo-xml-changelog-generator 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/changelog.js +5 -1
  2. package/package.json +1 -1
package/lib/changelog.js CHANGED
@@ -17,6 +17,9 @@ import conventionalChangelogConventionalCommits from 'conventional-changelog-con
17
17
  const REPO_NS = 'http://exist-db.org/xquery/repo'
18
18
  const HTML_NS = 'http://www.w3.org/1999/xhtml'
19
19
  const MD_LINK = /\[([^\]]+)\]\(([^)\s]+)\)/g
20
+ // Attribution trailers that would otherwise be read as part of a preceding
21
+ // BREAKING CHANGE note.
22
+ const ATTRIBUTION_TRAILER = /^\s*(Co-authored-by|Signed-off-by):/i
20
23
 
21
24
  const SECTION_PREFIX = {
22
25
  Features: 'New',
@@ -81,7 +84,8 @@ function getRawCommits ({ prevTag, cwd }) {
81
84
  // %s folds a hard-wrapped subject paragraph into a single line; %B would
82
85
  // keep the line break and the parser would truncate the subject there.
83
86
  return hashes.map(hash =>
84
- execSync(`git log -1 --format=%s%n%n%b ${hash}`, { encoding: 'utf8', cwd }).trim()
87
+ execSync(`git log -1 --format=%s%n%n%b ${hash}`, { encoding: 'utf8', cwd })
88
+ .split('\n').filter(line => !ATTRIBUTION_TRAILER.test(line)).join('\n').trim()
85
89
  )
86
90
  }
87
91
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@existdb/repo-xml-changelog-generator",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "semantic-release plugin: inject conventional-commit changelog entries into EXPath package repo.xml descriptors (eXist-db / BaseX / MarkLogic XAR packages)",
5
5
  "type": "module",
6
6
  "main": "index.js",