44 getVersion,
55 restorePackageJson,
66 setPackageName,
7- PACKAGES ,
7+ PACKAGE_NAME ,
88 MODULE_MAIN_PATH ,
99 getTag,
1010} = require ( './shared' )
@@ -14,33 +14,31 @@ if (!process.env.NPM_TOKEN) {
1414}
1515
1616try {
17- for ( const package of PACKAGES ) {
18- console . log ( '' )
19- console . log ( `📦 Deploying package: ${ package } (dry run)` )
17+ console . log ( '' )
18+ console . log ( `📦 Deploying package: ${ PACKAGE_NAME } (dry run)` )
2019
21- const version = getVersion ( )
22- const tag = getTag ( isCanary ( version ) )
20+ const version = getVersion ( )
21+ const tag = getTag ( isCanary ( version ) )
2322
24- console . log ( ` > 📝 Updating package name...` )
25- setPackageName ( package )
23+ console . log ( ` > 📝 Updating package name...` )
24+ setPackageName ( PACKAGE_NAME )
2625
27- console . log ( ` > 📚 Publishing ${ package } on the registry... (dry run)` )
28- const { status } = spawn . sync (
29- 'npm' ,
30- [ 'publish' , '--access' , 'public' , '--dry-run' , '--tag' , tag ] ,
31- {
32- stdio : 'inherit' ,
33- cwd : MODULE_MAIN_PATH ,
34- }
35- )
36-
37- if ( status !== 0 ) {
38- throw new Error ( `Failed to publish ${ package } ` )
26+ console . log ( ` > 📚 Publishing ${ PACKAGE_NAME } on the registry... (dry run)` )
27+ const { status } = spawn . sync (
28+ 'npm' ,
29+ [ 'publish' , '--access' , 'public' , '--dry-run' , '--tag' , tag ] ,
30+ {
31+ stdio : 'inherit' ,
32+ cwd : MODULE_MAIN_PATH ,
3933 }
34+ )
4035
41- console . log ( `✅ Dry run for ${ package } on ${ tag } successful!` )
42- console . log ( '' )
36+ if ( status !== 0 ) {
37+ throw new Error ( `Failed to publish ${ PACKAGE_NAME } ` )
4338 }
39+
40+ console . log ( `✅ Dry run for ${ PACKAGE_NAME } on ${ tag } successful!` )
41+ console . log ( '' )
4442} catch ( err ) {
4543 throw new Error ( err )
4644} finally {
0 commit comments