@@ -42,7 +42,7 @@ export function workspaceConfigName() {
4242}
4343
4444export function updateWorkspaceConfig (
45- callback : ( json : { [ key : string ] : any } ) => Object
45+ callback : ( json : { [ key : string ] : any } ) => Object ,
4646) {
4747 const file = workspaceConfigName ( ) ;
4848 updateFile ( file , JSON . stringify ( callback ( readJson ( file ) ) , null , 2 ) ) ;
@@ -66,7 +66,7 @@ export function runCreateWorkspace(
6666 packageManager ?: 'npm' | 'yarn' | 'pnpm' ;
6767 cli ?: string ;
6868 extraArgs ?: string ;
69- }
69+ } ,
7070) {
7171 projName = name ;
7272
@@ -197,7 +197,7 @@ export function runCommandAsync(
197197 opts : RunCmdOpts = {
198198 silenceError : false ,
199199 env : process . env ,
200- }
200+ } ,
201201) : Promise < { stdout : string ; stderr : string ; combinedOutput : string } > {
202202 return new Promise ( ( resolve , reject ) => {
203203 exec (
@@ -211,15 +211,15 @@ export function runCommandAsync(
211211 reject ( err ) ;
212212 }
213213 resolve ( { stdout, stderr, combinedOutput : `${ stdout } ${ stderr } ` } ) ;
214- }
214+ } ,
215215 ) ;
216216 } ) ;
217217}
218218
219219export function runCommandUntil (
220220 command : string ,
221221 criteria : ( output : string ) => boolean ,
222- { kill = true } = { }
222+ { kill = true } = { } ,
223223) : Promise < { process : ChildProcess } > {
224224 const pm = getPackageManagerCommand ( ) ;
225225 const p = exec ( `${ pm . runNx } ${ command } ` , {
@@ -259,12 +259,12 @@ export function runCLIAsync(
259259 silenceError : false ,
260260 env : process . env ,
261261 silent : false ,
262- }
262+ } ,
263263) : Promise < { stdout : string ; stderr : string ; combinedOutput : string } > {
264264 const pm = getPackageManagerCommand ( ) ;
265265 return runCommandAsync (
266266 `${ opts . silent ? pm . runNxSilent : pm . runNx } ${ command } ` ,
267- opts
267+ opts ,
268268 ) ;
269269}
270270
@@ -274,7 +274,7 @@ export function runNgAdd(
274274 silenceError : false ,
275275 env : process . env ,
276276 cwd : tmpProjPath ( ) ,
277- }
277+ } ,
278278) : string {
279279 try {
280280 packageInstall ( '@nrwl/workspace' ) ;
@@ -283,12 +283,12 @@ export function runNgAdd(
283283 {
284284 cwd : tmpProjPath ( ) ,
285285 env : opts . env as any ,
286- }
286+ } ,
287287 )
288288 . toString ( )
289289 . replace (
290290 / [ \u001b \u009b ] [ [ ( ) # ; ? ] * (?: [ 0 - 9 ] { 1 , 4 } (?: ; [ 0 - 9 ] { 0 , 4 } ) * ) ? [ 0 - 9 A - O R Z c f - n q r y = > < ] / g,
291- ''
291+ '' ,
292292 ) ;
293293 } catch ( e ) {
294294 if ( opts . silenceError ) {
@@ -305,7 +305,7 @@ export function runCLI(
305305 opts : RunCmdOpts = {
306306 silenceError : false ,
307307 env : process . env ,
308- }
308+ } ,
309309) : string {
310310 try {
311311 const pm = getPackageManagerCommand ( ) ;
@@ -315,7 +315,7 @@ export function runCLI(
315315 } ) . toString ( ) ;
316316 r = r . replace (
317317 / [ \u001b \u009b ] [ [ ( ) # ; ? ] * (?: [ 0 - 9 ] { 1 , 4 } (?: ; [ 0 - 9 ] { 0 , 4 } ) * ) ? [ 0 - 9 A - O R Z c f - n q r y = > < ] / g,
318- ''
318+ '' ,
319319 ) ;
320320 if ( process . env . VERBOSE_OUTPUT ) {
321321 console . log ( r ) ;
@@ -402,15 +402,15 @@ export function createFile(f: string, content: string = ''): void {
402402
403403export function updateFile (
404404 f : string ,
405- content : string | ( ( content : string ) => string )
405+ content : string | ( ( content : string ) => string ) ,
406406) : void {
407407 ensureDirSync ( path . dirname ( tmpProjPath ( f ) ) ) ;
408408 if ( typeof content === 'string' ) {
409409 writeFileSync ( tmpProjPath ( f ) , content ) ;
410410 } else {
411411 writeFileSync (
412412 tmpProjPath ( f ) ,
413- content ( readFileSync ( tmpProjPath ( f ) ) . toString ( ) )
413+ content ( readFileSync ( tmpProjPath ( f ) ) . toString ( ) ) ,
414414 ) ;
415415 }
416416}
0 commit comments