@thisismanta/semantic-version 2.0.0-5 → 2.0.0-6

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.
@@ -38,12 +38,15 @@ async function main() {
38
38
  if (!lastVersion) {
39
39
  throw new Error('Expect to have a valid "version" field in package.json.');
40
40
  }
41
- const commits = (await run(`git log v${lastVersion}..HEAD --format="%H %s"`))
42
- .trim()
41
+ const commits = (await run(`git log v${lastVersion}..HEAD --format=%H%s`))
43
42
  .split('\n')
44
- .map(line => {
45
- const hash = line.substring(0, line.indexOf(' '));
46
- const message = line.substring(line.indexOf(' ') + 1);
43
+ .filter(line => line.length > 0)
44
+ .map(line => ({
45
+ hash: line.substring(0, 40),
46
+ message: line.substring(40),
47
+ }))
48
+ .filter(({ message }) => semver_1.default.valid(message) === null)
49
+ .map(({ hash, message }) => {
47
50
  const { type, breaking, subject } = (0, index_1.checkConventionalMessage)(message, { debug: debug_1.debug });
48
51
  return {
49
52
  hash,
@@ -52,8 +55,9 @@ async function main() {
52
55
  subject,
53
56
  };
54
57
  });
55
- console.log(`Found ${commits.length} commits since ${lastVersion}`);
58
+ console.log(`Found ${commits.length} commits since v${lastVersion}`);
56
59
  (0, debug_1.debug)('commits »', JSON.stringify(commits, null, 2));
60
+ return;
57
61
  const releaseType = commits.reduce((releaseType, { type, breaking }) => {
58
62
  if (releaseType === 'major' || breaking) {
59
63
  return 'major';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thisismanta/semantic-version",
3
- "version": "2.0.0-5",
3
+ "version": "2.0.0-6",
4
4
  "author": "Anantachai Saothong <thisismanta@gmail.com>",
5
5
  "license": "ISC",
6
6
  "engines": {