const conventionalCommitsParser = require("conventional-commits-parser");
const angularPreset = require('conventional-changelog-angular');
const {parserOpts} = await angularPreset;
const opts = {...parserOpts, commentChar: '#'};
const commit = `
feat: add a thing
Some things we might want to discuss.
A-Trailer-Key: With some Value
# Changes to be committed:
# new file: thing
#
# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.
diff --git a/thing b/thing
new file mode 100644
index 0000000..f198579
--- /dev/null
+++ b/thing
@@ -0,0 +1 @@
+# ------------------------ >8 ------------------------
`;
conventionalCommitsParser.sync(commit, opts)
Created from: https://npm.runkit.com/conventional-commits-parser