@@ -52,7 +52,7 @@ const commitChanges = async (cwd: string, shortName: string, version: string) =>
52
52
await execa ( 'git' , params ) ;
53
53
} ;
54
54
55
- const getCommits = async ( shortName : string , stripScope : string [ ] ) => {
55
+ const getCommits = async ( shortName : string ) => {
56
56
log ( chalk `{blue Gathering Commits}` ) ;
57
57
58
58
let params = [ 'tag' , '--list' , `${ shortName } -v*` , '--sort' , '-v:refname' ] ;
@@ -62,8 +62,7 @@ const getCommits = async (shortName: string, stripScope: string[]) => {
62
62
log ( chalk `{blue Last Release Tag}: ${ latestTag || '<none>' } ` ) ;
63
63
64
64
params = [ '--no-pager' , 'log' , `${ latestTag } ..HEAD` , '--format=%B%n-hash-%n%H🐒💨🙊' ] ;
65
- const scope = stripScope . reduce ( ( prev , strip ) => prev . replace ( strip , '' ) , shortName ) ;
66
- const rePlugin = new RegExp ( `^[\\w\\!]+\\(([\\w,]+)?${ scope } ([\\w,]+)?\\)` , 'i' ) ;
65
+ const rePlugin = new RegExp ( `^[\\w\\!]+\\(([\\w,]+)?${ shortName } ([\\w,]+)?\\)` , 'i' ) ;
67
66
let { stdout } = await execa ( 'git' , params ) ;
68
67
69
68
if ( ! stdout ) {
@@ -144,7 +143,7 @@ const updateChangelog = (commits: Commit[], cwd: string, shortName: string, vers
144
143
145
144
for ( const { breaking, hash, header, type } of commits ) {
146
145
const ref = / \( # \d + \) / . test ( header as string ) ? '' : ` (${ hash ?. substring ( 0 , 7 ) } )` ;
147
- const message = header ?. trim ( ) . replace ( / \( .+ \) / , '' ) + ref ;
146
+ const message = header ?. trim ( ) . replace ( / \( .+ \) ! ? : / , '' ) + ref ;
148
147
if ( breaking ) {
149
148
notes . breaking . push ( message ) ;
150
149
} else if ( type === 'fix' ) {
@@ -194,7 +193,6 @@ const updatePackage = async (cwd: string, pkg: RepoPackage, version: string) =>
194
193
try {
195
194
const argv = yargs ( process . argv . slice ( 2 ) ) ;
196
195
const packagePath = argv . packagePath || 'packages' ;
197
- const stripScope = argv . stripScope ?. split ( ',' ) || [ ] ;
198
196
const packageName = argv . pkg ;
199
197
const shortName = packageName . replace ( / ^ @ .+ \/ / , '' ) . replace ( 'plugin-' , '' ) ;
200
198
const cwd = join ( process . cwd ( ) , `/${ packagePath } /` , shortName ) ;
@@ -211,7 +209,7 @@ const updatePackage = async (cwd: string, pkg: RepoPackage, version: string) =>
211
209
212
210
log ( chalk `{cyan Releasing \`${ packageName } \`} from {grey packages/${ shortName } }\n` ) ;
213
211
214
- const commits = await getCommits ( shortName , stripScope ) ;
212
+ const commits = await getCommits ( shortName ) ;
215
213
216
214
if ( ! commits . length ) {
217
215
log ( chalk `\n{red No Commits Found}. Did you mean to publish ${ packageName } ?` ) ;
0 commit comments