@@ -3,7 +3,7 @@ const rules = [
3
3
{ type : 'fix' , release : 'patch' , title : 'Bug fixes' } ,
4
4
{ type : 'refactor' , release : 'patch' , title : 'Code refactors' } ,
5
5
{ type : 'docs' , release : 'patch' , title : 'Documentation changes' } ,
6
- { type : 'chore' , release : 'patch' , title : 'Other changes' } ,
6
+ { type : 'chore' , release : 'patch' , title : 'Other changes' }
7
7
] ;
8
8
9
9
const sortMap = Object . fromEntries ( rules . map ( ( rule , index ) => [ rule . title , index ] ) ) ;
@@ -15,32 +15,42 @@ module.exports = {
15
15
branches : [ 'main' ] ,
16
16
tagFormat : '${version}' ,
17
17
plugins : [
18
- [ '@semantic-release/commit-analyzer' , {
19
- preset : 'conventionalcommits' ,
20
- releaseRules : [
21
- { breaking : true , release : 'major' } ,
22
- { revert : true , release : 'patch' } ,
23
- ] . concat (
24
- rules . map ( ( { type, release } ) => ( { type, release } ) )
25
- ) ,
26
- } ] ,
27
- [ '@semantic-release/release-notes-generator' , {
28
- preset : 'conventionalcommits' ,
29
- presetConfig : {
30
- types : rules . map ( ( { type, title } ) => ( { type, section : title } ) ) ,
31
- } ,
32
- writerOpts : {
33
- commitGroupsSort : ( a , z ) => sortMap [ a . title ] - sortMap [ z . title ] ,
34
- } ,
35
- } ] ,
18
+ [
19
+ '@semantic-release/commit-analyzer' ,
20
+ {
21
+ preset : 'conventionalcommits' ,
22
+ releaseRules : [
23
+ { breaking : true , release : 'major' } ,
24
+ { revert : true , release : 'patch' }
25
+ ] . concat ( rules . map ( ( { type, release } ) => ( { type, release } ) ) )
26
+ }
27
+ ] ,
28
+ [
29
+ '@semantic-release/release-notes-generator' ,
30
+ {
31
+ preset : 'conventionalcommits' ,
32
+ presetConfig : {
33
+ types : rules . map ( ( { type, title } ) => ( { type, section : title } ) )
34
+ } ,
35
+ writerOpts : {
36
+ commitGroupsSort : ( a , z ) => sortMap [ a . title ] - sortMap [ z . title ]
37
+ }
38
+ }
39
+ ] ,
36
40
'@semantic-release/changelog' ,
37
41
[ '@semantic-release/npm' , { npmPublish : false } ] ,
38
- [ '@semantic-release/git' , {
39
- message : 'chore: create new release ${nextRelease.version}\n\n${nextRelease.notes}' ,
40
- assets : [ 'package.json' , 'CHANGELOG.md' ] ,
41
- } ] ,
42
- [ '@semantic-release/github' , {
43
- draftRelease : false ,
44
- } ] ,
45
- ] ,
46
- } ;
42
+ [
43
+ '@semantic-release/git' ,
44
+ {
45
+ message : 'chore: create new release ${nextRelease.version}\n\n${nextRelease.notes}' ,
46
+ assets : [ 'package.json' , 'CHANGELOG.md' ]
47
+ }
48
+ ] ,
49
+ [
50
+ '@semantic-release/github' ,
51
+ {
52
+ draftRelease : false
53
+ }
54
+ ]
55
+ ]
56
+ } ;
0 commit comments