@@ -5,7 +5,9 @@ import { spawnSync } from "node:child_process";
55const npmToken = process . env . NODE_AUTH_TOKEN ?? process . env . NPM_TOKEN ;
66
77if ( ! npmToken ) {
8- console . error ( "NODE_AUTH_TOKEN or NPM_TOKEN is required for first package releases." ) ;
8+ console . error (
9+ "NODE_AUTH_TOKEN or NPM_TOKEN is required for first package releases." ,
10+ ) ;
911 process . exit ( 1 ) ;
1012}
1113
@@ -109,12 +111,16 @@ for (const pkg of missingPackages) {
109111 process . exit ( whoami . status ?? 1 ) ;
110112 }
111113
112- const result = spawnSync ( "npm" , [ "publish" , "--provenance" , "--access" , "public" ] , {
113- cwd : pkg . dir ,
114- encoding : "utf8" ,
115- env : { ...process . env , NODE_AUTH_TOKEN : npmToken , NPM_TOKEN : npmToken } ,
116- stdio : [ "inherit" , "pipe" , "pipe" ] ,
117- } ) ;
114+ const result = spawnSync (
115+ "npm" ,
116+ [ "publish" , "--provenance" , "--access" , "public" ] ,
117+ {
118+ cwd : pkg . dir ,
119+ encoding : "utf8" ,
120+ env : { ...process . env , NODE_AUTH_TOKEN : npmToken , NPM_TOKEN : npmToken } ,
121+ stdio : [ "inherit" , "pipe" , "pipe" ] ,
122+ } ,
123+ ) ;
118124
119125 process . stdout . write ( result . stdout ) ;
120126 process . stderr . write ( result . stderr ) ;
@@ -133,7 +139,9 @@ for (const pkg of missingPackages) {
133139 process . stderr . write ( tag . stderr ) ;
134140
135141 if ( tag . status !== 0 ) {
136- console . error ( `${ pkg . name } was published, but git tag ${ tagName } could not be created.` ) ;
142+ console . error (
143+ `${ pkg . name } was published, but git tag ${ tagName } could not be created.` ,
144+ ) ;
137145 process . exit ( tag . status ?? 1 ) ;
138146 }
139147
0 commit comments