conventional-commits-parser 3.0.3 → 3.0.8

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,49 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.0.8](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.7...conventional-commits-parser@3.0.8) (2019-11-14)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * add types for cli flags ([#551](https://github.com/conventional-changelog/conventional-changelog/issues/551)) ([bf1d64a](https://github.com/conventional-changelog/conventional-changelog/commit/bf1d64aeaf8f262d4b2beec02d2aebb78df7343b))
12
+
13
+
14
+
15
+
16
+
17
+ ## [3.0.7](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.6...conventional-commits-parser@3.0.7) (2019-11-07)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **conventional-commits-parser:** add breaking change notes if header match `breakingHeaderPattern` ([#544](https://github.com/conventional-changelog/conventional-changelog/issues/544)) ([efdf3cb](https://github.com/conventional-changelog/conventional-changelog/commit/efdf3cbc9de3278b180a48beebb74e596e3c5f94))
23
+ * **conventional-commits-parser:** add missing separator pipe to non tty parser ([#546](https://github.com/conventional-changelog/conventional-changelog/issues/546)) ([c522743](https://github.com/conventional-changelog/conventional-changelog/commit/c5227437b0b300f30a57e8ba5df2a8ab8d163af0))
24
+
25
+
26
+
27
+
28
+
29
+ ## [3.0.6](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.5...conventional-commits-parser@3.0.6) (2019-10-24)
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * **conventional-commits-parser:** downgrade is-text-path due to node 6 incompatibility ([#536](https://github.com/conventional-changelog/conventional-changelog/issues/536)) ([3aa2637](https://github.com/conventional-changelog/conventional-changelog/commit/3aa2637a1c65bb4db3d8bf2c6ce17e6f5abe1ca1))
35
+ * **deps:** update lodash to fix security issues ([#535](https://github.com/conventional-changelog/conventional-changelog/issues/535)) ([ac43f51](https://github.com/conventional-changelog/conventional-changelog/commit/ac43f51de1f3b597c32f7f8442917a2d06199018))
36
+
37
+
38
+
39
+
40
+
41
+ ## [3.0.4](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.3...conventional-commits-parser@3.0.4) (2019-10-02)
42
+
43
+ **Note:** Version bump only for package conventional-commits-parser
44
+
45
+
46
+
47
+
48
+
6
49
  ## [3.0.3](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.2...conventional-commits-parser@3.0.3) (2019-05-18)
7
50
 
8
51
 
package/README.md CHANGED
@@ -129,7 +129,7 @@ Type: `object`
129
129
 
130
130
  Type: `regex` or `string` Default: null
131
131
 
132
- Pattern to match merge headers. EG: branch merge, GitHub or GitLab like pull requests headers. When a merge header is parsed, the next line is used for conventionnal header parsing.
132
+ Pattern to match merge headers. EG: branch merge, GitHub or GitLab like pull requests headers. When a merge header is parsed, the next line is used for conventional header parsing.
133
133
 
134
134
  For example, if we have a commit
135
135
 
package/cli.js CHANGED
@@ -43,25 +43,38 @@ var cli = meow(`
43
43
  `, {
44
44
  flags: {
45
45
  'header-pattern': {
46
- alias: `p`
46
+ alias: 'p',
47
+ type: 'string'
47
48
  },
48
49
  'header-correspondence': {
49
- alias: `c`
50
+ alias: 'c',
51
+ type: 'string'
50
52
  },
51
53
  'reference-actions': {
52
- alias: `r`
54
+ alias: 'r',
55
+ type: 'string'
53
56
  },
54
57
  'issue-prefixes': {
55
- alias: `i`
58
+ alias: 'i',
59
+ type: 'string'
56
60
  },
57
61
  'note-keywords': {
58
- alias: `n`
62
+ alias: 'n',
63
+ type: 'string'
59
64
  },
60
65
  'field-pattern': {
61
- alias: `f`
66
+ alias: 'f',
67
+ type: 'string'
68
+ },
69
+ 'revert-pattern': {
70
+ type: 'string'
71
+ },
72
+ 'revert-correspondence': {
73
+ type: 'string'
62
74
  },
63
75
  verbose: {
64
- alias: `v`
76
+ alias: 'v',
77
+ type: 'boolean'
65
78
  }
66
79
  }
67
80
  })
@@ -137,6 +150,7 @@ if (process.stdin.isTTY) {
137
150
  } else {
138
151
  options.warn = true
139
152
  process.stdin
153
+ .pipe(split(separator))
140
154
  .pipe(conventionalCommitsParser(options))
141
155
  .on('error', function (err) {
142
156
  console.error(err.toString())
package/lib/parser.js CHANGED
@@ -253,6 +253,17 @@ function parser (raw, options, regex) {
253
253
  }
254
254
  })
255
255
 
256
+ if (options.breakingHeaderPattern && notes.length === 0) {
257
+ var breakingHeader = header.match(options.breakingHeaderPattern)
258
+ if (breakingHeader) {
259
+ const noteText = breakingHeader[3] // the description of the change.
260
+ notes.push({
261
+ title: 'BREAKING CHANGE',
262
+ text: noteText
263
+ })
264
+ }
265
+ }
266
+
256
267
  while ((mentionsMatch = regex.mentions.exec(raw))) {
257
268
  mentions.push(mentionsMatch[1])
258
269
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conventional-commits-parser",
3
- "version": "3.0.3",
3
+ "version": "3.0.8",
4
4
  "description": "Parse raw conventional commits",
5
5
  "bugs": {
6
6
  "url": "https://github.com/conventional-changelog/conventional-changelog/issues"
@@ -34,9 +34,9 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "JSONStream": "^1.0.4",
37
- "is-text-path": "^2.0.0",
38
- "lodash": "^4.2.1",
39
- "meow": "^4.0.0",
37
+ "is-text-path": "^1.0.1",
38
+ "lodash": "^4.17.15",
39
+ "meow": "^5.0.0",
40
40
  "split2": "^2.0.0",
41
41
  "through2": "^3.0.0",
42
42
  "trim-off-newlines": "^1.0.0"
@@ -47,5 +47,5 @@
47
47
  "bin": {
48
48
  "conventional-commits-parser": "cli.js"
49
49
  },
50
- "gitHead": "38f5508191f8afc1a8503d1fd24e2de6d05b8738"
50
+ "gitHead": "79217815a7ce5f3d3f833961ce9a14bd454e5789"
51
51
  }