@semantic-release/release-notes-generator 7.3.1 → 7.3.5
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/README.md +3 -3
- package/index.js +14 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -26,13 +26,13 @@ The plugin can be configured in the [**semantic-release** configuration file](ht
|
|
|
26
26
|
```json
|
|
27
27
|
{
|
|
28
28
|
"plugins": [
|
|
29
|
-
["semantic-release/commit-analyzer", {
|
|
29
|
+
["@semantic-release/commit-analyzer", {
|
|
30
30
|
"preset": "angular",
|
|
31
31
|
"parserOpts": {
|
|
32
32
|
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
|
|
33
33
|
}
|
|
34
34
|
}],
|
|
35
|
-
["semantic-release/release-notes-generator", {
|
|
35
|
+
["@semantic-release/release-notes-generator", {
|
|
36
36
|
"preset": "angular",
|
|
37
37
|
"parserOpts": {
|
|
38
38
|
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
|
|
@@ -55,7 +55,7 @@ With this example:
|
|
|
55
55
|
|
|
56
56
|
| Option | Description | Default |
|
|
57
57
|
|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
58
|
-
| `preset` | [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) preset (possible values: [`angular`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular), [`atom`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-atom), [`codemirror`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-codemirror), [`ember`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-ember), [`eslint`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-eslint), [`express`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-express), [`jquery`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-jquery), [`jshint`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-jshint)
|
|
58
|
+
| `preset` | [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) preset (possible values: [`angular`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular), [`atom`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-atom), [`codemirror`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-codemirror), [`ember`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-ember), [`eslint`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-eslint), [`express`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-express), [`jquery`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-jquery), [`jshint`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-jshint), [`conventionalcommits`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-conventionalcommits)). | [`angular`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular) |
|
|
59
59
|
| `config` | NPM package name of a custom [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) preset. | - |
|
|
60
60
|
| `parserOpts` | Additional [conventional-commits-parser](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-parser#conventionalcommitsparseroptions) options that will extends the ones loaded by `preset` or `config`. This is convenient to use a [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) preset with some customizations without having to create a new module. | - |
|
|
61
61
|
| `writerOpts` | Additional [conventional-commits-writer](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer#options) options that will extends the ones loaded by `preset` or `config`. This is convenient to use a [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) preset with some customizations without having to create a new module. | - |
|
package/index.js
CHANGED
|
@@ -35,16 +35,26 @@ async function generateNotes(pluginConfig, context) {
|
|
|
35
35
|
let {hostname, port, pathname, protocol} = new URL(
|
|
36
36
|
match ? `ssh://${auth ? `${auth}@` : ''}${host}/${path}` : repositoryUrl
|
|
37
37
|
);
|
|
38
|
+
port = protocol.includes('ssh') ? '' : port;
|
|
38
39
|
protocol = protocol && /http[^s]/.test(protocol) ? 'http' : 'https';
|
|
39
40
|
const [, owner, repository] = /^\/([^/]+)?\/?(.+)?$/.exec(pathname);
|
|
40
41
|
|
|
41
42
|
const {issue, commit, referenceActions, issuePrefixes} =
|
|
42
43
|
find(HOSTS_CONFIG, conf => conf.hostname === hostname) || HOSTS_CONFIG.default;
|
|
43
44
|
const parsedCommits = filter(
|
|
44
|
-
commits
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
commits
|
|
46
|
+
.filter(({message, hash}) => {
|
|
47
|
+
if (!message.trim()) {
|
|
48
|
+
debug('Skip commit %s with empty message', hash);
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return true;
|
|
53
|
+
})
|
|
54
|
+
.map(rawCommit => ({
|
|
55
|
+
...rawCommit,
|
|
56
|
+
...parser(rawCommit.message, {referenceActions, issuePrefixes, ...parserOpts}),
|
|
57
|
+
}))
|
|
48
58
|
);
|
|
49
59
|
const previousTag = lastRelease.gitTag || lastRelease.gitHead;
|
|
50
60
|
const currentTag = nextRelease.gitTag || nextRelease.gitHead;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semantic-release/release-notes-generator",
|
|
3
3
|
"description": "semantic-release plugin to generate changelog content with conventional-changelog",
|
|
4
|
-
"version": "7.3.
|
|
4
|
+
"version": "7.3.5",
|
|
5
5
|
"author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/semantic-release/release-notes-generator/issues"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"xo": "^0.25.0"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": ">=8.
|
|
44
|
+
"node": ">=8.16"
|
|
45
45
|
},
|
|
46
46
|
"files": [
|
|
47
47
|
"lib",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"all": true
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"semantic-release": ">=15.8.0 <16.0.0"
|
|
76
|
+
"semantic-release": ">=15.8.0 <16.0.0 || >=16.0.0-beta <17.0.0"
|
|
77
77
|
},
|
|
78
78
|
"prettier": {
|
|
79
79
|
"printWidth": 120,
|