@@ -96,9 +96,7 @@ async function publishByPackageName(
9696) {
9797 logInfo ( `Start publish ${ sourceType } .` ) ;
9898
99- const {
100- targetPackageJson, targetConfig, targetRoot, targetPackageInfo,
101- } = prePareParamsBeforePublish ( sourceType ) ;
99+ const { targetPackageJson, targetConfig, targetRoot, targetPackageInfo } = prePareParamsBeforePublish ( sourceType ) ;
102100
103101 // Change source config here
104102 pri . sourceConfig = targetConfig ;
@@ -123,8 +121,8 @@ async function publishByPackageName(
123121
124122 // Update version in depMao
125123 if ( depMap ) {
126- depMap . forEach ( ( value ) => {
127- value . depMonoPackages . forEach ( ( eachPackage ) => {
124+ depMap . forEach ( value => {
125+ value . depMonoPackages . forEach ( eachPackage => {
128126 if ( eachPackage . name === sourceType ) {
129127 // eslint-disable-next-line no-param-reassign
130128 eachPackage . packageJson . version = targetPackageJson . version ;
@@ -159,9 +157,7 @@ async function publishPackageAndItsMonoPackage(
159157) {
160158 logInfo ( `Start publish ${ sourceType } .` ) ;
161159
162- const {
163- targetPackageJson, targetConfig, targetRoot, targetPackageInfo,
164- } = prePareParamsBeforePublish ( sourceType ) ;
160+ const { targetPackageJson, targetConfig, targetRoot, targetPackageInfo } = prePareParamsBeforePublish ( sourceType ) ;
165161
166162 // Change source config here
167163 pri . sourceConfig = targetConfig ;
@@ -180,7 +176,7 @@ async function publishPackageAndItsMonoPackage(
180176
181177 // Generate all package version and upgrade
182178
183- await depMonoPackages . forEach ( async ( item ) => {
179+ await depMonoPackages . forEach ( async item => {
184180 const version = await generateVersion ( options , isDevelopBranch , item . packageJson , item . config , currentBranchName ) ;
185181
186182 monoPackageVersion [ item . name as string ] = version ;
@@ -194,8 +190,8 @@ async function publishPackageAndItsMonoPackage(
194190
195191 // Update depMonoPackages version
196192
197- depMonoPackages . forEach ( ( item ) => {
198- depMap . get ( item . name ) . depMonoPackages . forEach ( ( eachPackage ) => {
193+ depMonoPackages . forEach ( item => {
194+ depMap . get ( item . name ) . depMonoPackages . forEach ( eachPackage => {
199195 if ( monoPackageVersion [ eachPackage . packageJson . name ] ) {
200196 eachPackage . packageJson . version = monoPackageVersion [ eachPackage . packageJson . name ] ;
201197 }
@@ -226,14 +222,14 @@ async function publishPackageAndItsMonoPackage(
226222
227223 const publishQueue = [ ] ;
228224 // async publish & add tag and push
229- depMonoPackages . map ( ( item ) => {
225+ depMonoPackages . map ( item => {
230226 publishQueue . push ( buildComponentAndPublish ( item , options , depMap , isDevelopBranch ) ) ;
231227 } ) ;
232228
233229 // publish current package
234230 publishQueue . push ( buildComponentAndPublish ( targetPackageInfo , options , depMap , isDevelopBranch ) ) ;
235231
236- return Promise . all ( publishQueue ) . catch ( async ( e ) => {
232+ return Promise . all ( publishQueue ) . catch ( async e => {
237233 await fs . remove ( path . join ( pri . projectRootPath , tempPath . dir , declarationPath . dir ) ) ;
238234 await exec ( `git push origin ${ currentBranchName } ` ) ;
239235 logFatal ( `publish error stop publish: ${ e } ` ) ;
0 commit comments