1- const { promisify } = require ( 'util' )
1+ const { promisify} = require ( 'util' )
22const readFileAsync = promisify ( require ( 'fs' ) . readFile )
33
44const template = readFileAsync ( '.github/templates/template.hbs' )
@@ -46,22 +46,23 @@ function makeGroups(commits) {
4646 if ( ! commits . length ) return [ ]
4747
4848 function mapCommits ( groups ) {
49- return groups
50- . map ( ( { group, emojis, label } ) => ( {
51- group,
52- label,
53- is_dep : group === 'dependencies' ,
54- commits : commits
55- . filter ( ( commit ) => emojis . indexOf ( commit . gitmoji ) >= 0 )
56- . sort ( ( first , second ) => new Date ( second . committerDate ) - new Date ( first . committerDate ) ) ,
57- } ) )
58- . filter ( group => group . commits . length ) ;
59- }
49+ return groups
50+ . map ( ( { group, emojis, label} ) => ( {
51+ group,
52+ label,
53+ is_dep : group === 'dependencies' ,
54+ commits : commits
55+ . filter ( ( commit ) => emojis . indexOf ( commit . gitmoji ) >= 0 )
56+ . sort ( ( first , second ) => new Date ( second . committerDate ) - new Date ( first . committerDate ) ) ,
57+ } ) )
58+ . filter ( group => group . commits . length ) ;
59+ }
6060
6161 return mapCommits ( sections )
6262}
63+
6364module . exports = {
64- branches : [ "main" , { name : "develop" , prerelease : "rc" } ] ,
65+ branches : [ "main" , { name : "develop" , prerelease : "rc" } ] ,
6566 tagFormat : "v${version}" ,
6667 plugins : [
6768 [
@@ -75,7 +76,7 @@ module.exports = {
7576 } ,
7677 releaseNotes : {
7778 template,
78- partials : { commitTemplate } ,
79+ partials : { commitTemplate} ,
7980 helpers : {
8081 sections : ( commits ) => {
8182 let flat_commits = [ ] ;
@@ -99,7 +100,10 @@ module.exports = {
99100 [
100101 "@semantic-release/exec" ,
101102 {
102- prepareCmd : "poetry version ${nextRelease.version} && poetry build" ,
103+ prepareCmd :
104+ "poetry version ${nextRelease.version} && " +
105+ "npm version --no-git-tag-version ${nextRelease.version} && " +
106+ "poetry build" ,
103107 publishCmd : "poetry publish" ,
104108 } ,
105109 ] ,
@@ -117,7 +121,7 @@ module.exports = {
117121 [
118122 "@semantic-release/github" ,
119123 {
120- assets : [ { path : "dist/*.whl" } , { path : "dist/*.tar.gz" } ] ,
124+ assets : [ { path : "dist/*.whl" } , { path : "dist/*.tar.gz" } ] ,
121125 } ,
122126 ] ,
123127 ] ,
0 commit comments