@@ -96,9 +96,7 @@ async function publishByPackageName(
96
96
) {
97
97
logInfo ( `Start publish ${ sourceType } .` ) ;
98
98
99
- const {
100
- targetPackageJson, targetConfig, targetRoot, targetPackageInfo,
101
- } = prePareParamsBeforePublish ( sourceType ) ;
99
+ const { targetPackageJson, targetConfig, targetRoot, targetPackageInfo } = prePareParamsBeforePublish ( sourceType ) ;
102
100
103
101
// Change source config here
104
102
pri . sourceConfig = targetConfig ;
@@ -123,8 +121,8 @@ async function publishByPackageName(
123
121
124
122
// Update version in depMao
125
123
if ( depMap ) {
126
- depMap . forEach ( ( value ) => {
127
- value . depMonoPackages . forEach ( ( eachPackage ) => {
124
+ depMap . forEach ( value => {
125
+ value . depMonoPackages . forEach ( eachPackage => {
128
126
if ( eachPackage . name === sourceType ) {
129
127
// eslint-disable-next-line no-param-reassign
130
128
eachPackage . packageJson . version = targetPackageJson . version ;
@@ -159,9 +157,7 @@ async function publishPackageAndItsMonoPackage(
159
157
) {
160
158
logInfo ( `Start publish ${ sourceType } .` ) ;
161
159
162
- const {
163
- targetPackageJson, targetConfig, targetRoot, targetPackageInfo,
164
- } = prePareParamsBeforePublish ( sourceType ) ;
160
+ const { targetPackageJson, targetConfig, targetRoot, targetPackageInfo } = prePareParamsBeforePublish ( sourceType ) ;
165
161
166
162
// Change source config here
167
163
pri . sourceConfig = targetConfig ;
@@ -180,7 +176,7 @@ async function publishPackageAndItsMonoPackage(
180
176
181
177
// Generate all package version and upgrade
182
178
183
- await depMonoPackages . forEach ( async ( item ) => {
179
+ await depMonoPackages . forEach ( async item => {
184
180
const version = await generateVersion ( options , isDevelopBranch , item . packageJson , item . config , currentBranchName ) ;
185
181
186
182
monoPackageVersion [ item . name as string ] = version ;
@@ -194,8 +190,8 @@ async function publishPackageAndItsMonoPackage(
194
190
195
191
// Update depMonoPackages version
196
192
197
- depMonoPackages . forEach ( ( item ) => {
198
- depMap . get ( item . name ) . depMonoPackages . forEach ( ( eachPackage ) => {
193
+ depMonoPackages . forEach ( item => {
194
+ depMap . get ( item . name ) . depMonoPackages . forEach ( eachPackage => {
199
195
if ( monoPackageVersion [ eachPackage . packageJson . name ] ) {
200
196
eachPackage . packageJson . version = monoPackageVersion [ eachPackage . packageJson . name ] ;
201
197
}
@@ -226,14 +222,14 @@ async function publishPackageAndItsMonoPackage(
226
222
227
223
const publishQueue = [ ] ;
228
224
// async publish & add tag and push
229
- depMonoPackages . map ( ( item ) => {
225
+ depMonoPackages . map ( item => {
230
226
publishQueue . push ( buildComponentAndPublish ( item , options , depMap , isDevelopBranch ) ) ;
231
227
} ) ;
232
228
233
229
// publish current package
234
230
publishQueue . push ( buildComponentAndPublish ( targetPackageInfo , options , depMap , isDevelopBranch ) ) ;
235
231
236
- return Promise . all ( publishQueue ) . catch ( async ( e ) => {
232
+ return Promise . all ( publishQueue ) . catch ( async e => {
237
233
await fs . remove ( path . join ( pri . projectRootPath , tempPath . dir , declarationPath . dir ) ) ;
238
234
await exec ( `git push origin ${ currentBranchName } ` ) ;
239
235
logFatal ( `publish error stop publish: ${ e } ` ) ;
0 commit comments