File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -132,11 +132,6 @@ const getContributors = async () => {
132
132
return acc
133
133
} , [ ] )
134
134
. filter ( ( { name } ) => ! REGEX_BOT_NAMES . test ( name ) )
135
- . filter ( ( { email } ) =>
136
- isString ( pkgAuthor )
137
- ? ! new RegExp ( pkgAuthor , 'i' ) . test ( email )
138
- : ! isSameEmail ( pkgAuthor . email , email )
139
- )
140
135
. filter ( ( { email } ) => emailRegex ( ) . test ( email ) )
141
136
. filter ( ( { author } ) => ! ( ignorePatternReg && ignorePatternReg . test ( author ) ) )
142
137
. sort (
@@ -150,15 +145,21 @@ const getContributors = async () => {
150
145
151
146
if ( contributors . length ) {
152
147
if ( print ) {
153
- ( print === 'verbose' ? renderContributorsVerbose : renderContributors ) (
148
+ ; ( print === 'verbose' ? renderContributorsVerbose : renderContributors ) (
154
149
contributors ,
155
150
maxIndent
156
151
)
157
152
}
158
153
const pkg = await loadPkg ( pkgPath )
159
154
160
155
if ( pkg && save ) {
161
- const newContributors = contributors . map ( ( { author } ) => author )
156
+ const newContributors = contributors
157
+ . filter ( ( { email } ) =>
158
+ isString ( pkgAuthor )
159
+ ? ! new RegExp ( pkgAuthor , 'i' ) . test ( email )
160
+ : ! isSameEmail ( pkgAuthor . email , email )
161
+ )
162
+ . map ( ( { author } ) => author )
162
163
const newPkg = { ...pkg , contributors : newContributors }
163
164
await jsonFuture . saveAsync ( pkgPath , newPkg )
164
165
if ( print ) {
You can’t perform that action at this time.
0 commit comments