conventional-changelog-angular 5.0.2 → 5.0.10

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,47 @@
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
+ ## [5.0.10](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-angular@5.0.6...conventional-changelog-angular@5.0.10) (2020-05-08)
7
+
8
+ **Note:** Version bump only for package conventional-changelog-angular
9
+
10
+
11
+
12
+
13
+
14
+ ## [5.0.6](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-angular@5.0.5...conventional-changelog-angular@5.0.6) (2019-11-07)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * revertPattern match default git revert format ([#545](https://github.com/conventional-changelog/conventional-changelog/issues/545)) ([fe449f8](https://github.com/conventional-changelog/conventional-changelog/commit/fe449f899567574a36d1819b313e2caa899052ff))
20
+
21
+
22
+
23
+
24
+
25
+ ## [5.0.4](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-angular@5.0.3...conventional-changelog-angular@5.0.4) (2019-10-02)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * use full commit hash in commit link ([7a60dec](https://github.com/conventional-changelog/conventional-changelog/commit/7a60dec)), closes [#476](https://github.com/conventional-changelog/conventional-changelog/issues/476)
31
+
32
+
33
+
34
+
35
+
36
+ ## [5.0.3](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-angular@5.0.2...conventional-changelog-angular@5.0.3) (2019-02-14)
37
+
38
+
39
+ ### Bug Fixes
40
+
41
+ * **preset:angular:** scoped npm packages should not be seen as GitHub username ([#394](https://github.com/conventional-changelog/conventional-changelog/issues/394)) ([e332ef0](https://github.com/conventional-changelog/conventional-changelog/commit/e332ef0))
42
+
43
+
44
+
45
+
46
+
6
47
  ## [5.0.2](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-angular@5.0.1...conventional-changelog-angular@5.0.2) (2018-11-01)
7
48
 
8
49
 
package/README.md CHANGED
@@ -64,7 +64,7 @@ If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. Howev
64
64
 
65
65
  Other prefixes are up to your discretion. Suggested prefixes are `build`, `ci`, `docs` ,`style`, `refactor`, and `test` for non-changelog related tasks.
66
66
 
67
- Details regarding these types can be found in the official [Angular Contributing Guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#type)
67
+ Details regarding these types can be found in the official [Angular Contributing Guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#type).
68
68
 
69
69
  ### Scope
70
70
 
@@ -1,8 +1,8 @@
1
1
  'use strict'
2
2
 
3
- const Q = require(`q`)
4
- const parserOpts = require(`./parser-opts`)
5
- const writerOpts = require(`./writer-opts`)
3
+ const Q = require('q')
4
+ const parserOpts = require('./parser-opts')
5
+ const writerOpts = require('./writer-opts')
6
6
 
7
7
  module.exports = Q.all([parserOpts, writerOpts])
8
8
  .spread((parserOpts, writerOpts) => {
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- const parserOpts = require(`./parser-opts`)
3
+ const parserOpts = require('./parser-opts')
4
4
 
5
5
  module.exports = {
6
6
  parserOpts,
@@ -14,7 +14,7 @@ module.exports = {
14
14
  if (commit.notes.length > 0) {
15
15
  breakings += commit.notes.length
16
16
  level = 0
17
- } else if (commit.type === `feat`) {
17
+ } else if (commit.type === 'feat') {
18
18
  features += 1
19
19
  if (level === 2) {
20
20
  level = 1
package/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  'use strict'
2
- const Q = require(`q`)
3
- const conventionalChangelog = require(`./conventional-changelog`)
4
- const parserOpts = require(`./parser-opts`)
5
- const recommendedBumpOpts = require(`./conventional-recommended-bump`)
6
- const writerOpts = require(`./writer-opts`)
2
+ const Q = require('q')
3
+ const conventionalChangelog = require('./conventional-changelog')
4
+ const parserOpts = require('./parser-opts')
5
+ const recommendedBumpOpts = require('./conventional-recommended-bump')
6
+ const writerOpts = require('./writer-opts')
7
7
 
8
8
  module.exports = Q.all([conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts])
9
9
  .spread((conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conventional-changelog-angular",
3
- "version": "5.0.2",
3
+ "version": "5.0.10",
4
4
  "description": "conventional-changelog angular preset",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -25,7 +25,7 @@
25
25
  ],
26
26
  "author": "Steve Mao",
27
27
  "engines": {
28
- "node": ">=6.9.0"
28
+ "node": ">=10"
29
29
  },
30
30
  "license": "ISC",
31
31
  "bugs": {
@@ -36,5 +36,5 @@
36
36
  "compare-func": "^1.3.1",
37
37
  "q": "^1.5.1"
38
38
  },
39
- "gitHead": "f301b0de0b954713a50b2256a3140e21817d14c0"
39
+ "gitHead": "83643c5a0d2c4d7c9ba14cbf990ffbc577a51e8c"
40
40
  }
package/parser-opts.js CHANGED
@@ -3,11 +3,11 @@
3
3
  module.exports = {
4
4
  headerPattern: /^(\w*)(?:\((.*)\))?: (.*)$/,
5
5
  headerCorrespondence: [
6
- `type`,
7
- `scope`,
8
- `subject`
6
+ 'type',
7
+ 'scope',
8
+ 'subject'
9
9
  ],
10
- noteKeywords: [`BREAKING CHANGE`],
11
- revertPattern: /^revert:\s([\s\S]*?)\s*This reverts commit (\w*)\./,
12
- revertCorrespondence: [`header`, `hash`]
10
+ noteKeywords: ['BREAKING CHANGE'],
11
+ revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
12
+ revertCorrespondence: ['header', 'hash']
13
13
  }
@@ -6,7 +6,7 @@
6
6
  {{~/if}}
7
7
 
8
8
  {{~!-- commit link --}} {{#if @root.linkReferences~}}
9
- ([{{hash}}](
9
+ ([{{shortHash}}](
10
10
  {{~#if @root.repository}}
11
11
  {{~#if @root.host}}
12
12
  {{~@root.host}}/
@@ -20,7 +20,7 @@
20
20
  {{~/if}}/
21
21
  {{~@root.commit}}/{{hash}}))
22
22
  {{~else}}
23
- {{~hash}}
23
+ {{~shortHash}}
24
24
  {{~/if}}
25
25
 
26
26
  {{~!-- commit references --}}
package/writer-opts.js CHANGED
@@ -1,15 +1,15 @@
1
1
  'use strict'
2
2
 
3
- const compareFunc = require(`compare-func`)
4
- const Q = require(`q`)
5
- const readFile = Q.denodeify(require(`fs`).readFile)
6
- const resolve = require(`path`).resolve
3
+ const compareFunc = require('compare-func')
4
+ const Q = require('q')
5
+ const readFile = Q.denodeify(require('fs').readFile)
6
+ const resolve = require('path').resolve
7
7
 
8
8
  module.exports = Q.all([
9
- readFile(resolve(__dirname, `./templates/template.hbs`), `utf-8`),
10
- readFile(resolve(__dirname, `./templates/header.hbs`), `utf-8`),
11
- readFile(resolve(__dirname, `./templates/commit.hbs`), `utf-8`),
12
- readFile(resolve(__dirname, `./templates/footer.hbs`), `utf-8`)
9
+ readFile(resolve(__dirname, './templates/template.hbs'), 'utf-8'),
10
+ readFile(resolve(__dirname, './templates/header.hbs'), 'utf-8'),
11
+ readFile(resolve(__dirname, './templates/commit.hbs'), 'utf-8'),
12
+ readFile(resolve(__dirname, './templates/footer.hbs'), 'utf-8')
13
13
  ])
14
14
  .spread((template, header, commit, footer) => {
15
15
  const writerOpts = getWriterOpts()
@@ -29,43 +29,43 @@ function getWriterOpts () {
29
29
  const issues = []
30
30
 
31
31
  commit.notes.forEach(note => {
32
- note.title = `BREAKING CHANGES`
32
+ note.title = 'BREAKING CHANGES'
33
33
  discard = false
34
34
  })
35
35
 
36
- if (commit.type === `feat`) {
37
- commit.type = `Features`
38
- } else if (commit.type === `fix`) {
39
- commit.type = `Bug Fixes`
40
- } else if (commit.type === `perf`) {
41
- commit.type = `Performance Improvements`
42
- } else if (commit.type === `revert`) {
43
- commit.type = `Reverts`
36
+ if (commit.type === 'feat') {
37
+ commit.type = 'Features'
38
+ } else if (commit.type === 'fix') {
39
+ commit.type = 'Bug Fixes'
40
+ } else if (commit.type === 'perf') {
41
+ commit.type = 'Performance Improvements'
42
+ } else if (commit.type === 'revert' || commit.revert) {
43
+ commit.type = 'Reverts'
44
44
  } else if (discard) {
45
45
  return
46
- } else if (commit.type === `docs`) {
47
- commit.type = `Documentation`
48
- } else if (commit.type === `style`) {
49
- commit.type = `Styles`
50
- } else if (commit.type === `refactor`) {
51
- commit.type = `Code Refactoring`
52
- } else if (commit.type === `test`) {
53
- commit.type = `Tests`
54
- } else if (commit.type === `build`) {
55
- commit.type = `Build System`
56
- } else if (commit.type === `ci`) {
57
- commit.type = `Continuous Integration`
46
+ } else if (commit.type === 'docs') {
47
+ commit.type = 'Documentation'
48
+ } else if (commit.type === 'style') {
49
+ commit.type = 'Styles'
50
+ } else if (commit.type === 'refactor') {
51
+ commit.type = 'Code Refactoring'
52
+ } else if (commit.type === 'test') {
53
+ commit.type = 'Tests'
54
+ } else if (commit.type === 'build') {
55
+ commit.type = 'Build System'
56
+ } else if (commit.type === 'ci') {
57
+ commit.type = 'Continuous Integration'
58
58
  }
59
59
 
60
- if (commit.scope === `*`) {
61
- commit.scope = ``
60
+ if (commit.scope === '*') {
61
+ commit.scope = ''
62
62
  }
63
63
 
64
- if (typeof commit.hash === `string`) {
65
- commit.hash = commit.hash.substring(0, 7)
64
+ if (typeof commit.hash === 'string') {
65
+ commit.shortHash = commit.hash.substring(0, 7)
66
66
  }
67
67
 
68
- if (typeof commit.subject === `string`) {
68
+ if (typeof commit.subject === 'string') {
69
69
  let url = context.repository
70
70
  ? `${context.host}/${context.owner}/${context.repository}`
71
71
  : context.repoUrl
@@ -79,7 +79,13 @@ function getWriterOpts () {
79
79
  }
80
80
  if (context.host) {
81
81
  // User URLs.
82
- commit.subject = commit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9]){0,38})/g, `[@$1](${context.host}/$1)`)
82
+ commit.subject = commit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => {
83
+ if (username.includes('/')) {
84
+ return `@${username}`
85
+ }
86
+
87
+ return `[@${username}](${context.host}/${username})`
88
+ })
83
89
  }
84
90
  }
85
91
 
@@ -94,10 +100,10 @@ function getWriterOpts () {
94
100
 
95
101
  return commit
96
102
  },
97
- groupBy: `type`,
98
- commitGroupsSort: `title`,
99
- commitsSort: [`scope`, `subject`],
100
- noteGroupsSort: `title`,
103
+ groupBy: 'type',
104
+ commitGroupsSort: 'title',
105
+ commitsSort: ['scope', 'subject'],
106
+ noteGroupsSort: 'title',
101
107
  notesSort: compareFunc
102
108
  }
103
109
  }