1- import { type Tree , updateProjectConfiguration } from '@nx/devkit' ;
1+ import { type Tree , updateProjectConfiguration } from '@nx/devkit' ;
22import path from 'node:path' ;
3- import { readProjectConfiguration } from 'nx/src/generators/utils/project-configuration' ;
4- import { afterEach , expect } from 'vitest' ;
3+ import { readProjectConfiguration } from 'nx/src/generators/utils/project-configuration' ;
4+ import { afterEach , expect } from 'vitest' ;
55import {
66 type AutorunCommandExecutorOptions ,
77 generateCodePushupConfig ,
@@ -17,27 +17,27 @@ import {
1717 removeColorCodes ,
1818 teardownTestFolder ,
1919} from '@code-pushup/test-utils' ;
20- import { executeProcess , readJsonFile } from '@code-pushup/utils' ;
21- import { INLINE_PLUGIN } from './inline-plugin.js' ;
20+ import { executeProcess , readJsonFile } from '@code-pushup/utils' ;
21+ import { INLINE_PLUGIN } from './inline-plugin.js' ;
2222
2323async function addTargetToWorkspace (
2424 tree : Tree ,
2525 options : { cwd : string ; project : string } ,
2626 executorOptions ?: AutorunCommandExecutorOptions ,
2727) {
28- const { cwd, project} = options ;
28+ const { cwd, project } = options ;
2929 const projectCfg = readProjectConfiguration ( tree , project ) ;
3030 updateProjectConfiguration ( tree , project , {
3131 ...projectCfg ,
3232 targets : {
3333 ...projectCfg . targets ,
3434 'code-pushup' : {
3535 executor : '@code-pushup/nx-plugin:cli' ,
36- ...( executorOptions && { options : executorOptions } ) ,
36+ ...( executorOptions && { options : executorOptions } ) ,
3737 } ,
3838 } ,
3939 } ) ;
40- const { root} = projectCfg ;
40+ const { root } = projectCfg ;
4141 generateCodePushupConfig ( tree , root , {
4242 plugins : [
4343 {
@@ -73,8 +73,8 @@ describe('executor command', () => {
7373
7474 it ( 'should execute no specific command by default' , async ( ) => {
7575 const cwd = path . join ( testFileDir , 'execute-default-command' ) ;
76- await addTargetToWorkspace ( tree , { cwd, project} ) ;
77- const { stdout, code} = await executeProcess ( {
76+ await addTargetToWorkspace ( tree , { cwd, project } ) ;
77+ const { stdout, code } = await executeProcess ( {
7878 command : 'npx' ,
7979 args : [ 'nx' , 'run' , `${ project } :code-pushup` , '--dryRun' ] ,
8080 cwd,
@@ -87,9 +87,9 @@ describe('executor command', () => {
8787
8888 it ( 'should execute print-config executor' , async ( ) => {
8989 const cwd = path . join ( testFileDir , 'execute-print-config-command' ) ;
90- await addTargetToWorkspace ( tree , { cwd, project} ) ;
90+ await addTargetToWorkspace ( tree , { cwd, project } ) ;
9191
92- const { stdout, code} = await executeProcess ( {
92+ const { stdout, code } = await executeProcess ( {
9393 command : 'npx' ,
9494 args : [ 'nx' , 'run' , `${ project } :code-pushup` , 'print-config' ] ,
9595 cwd,
@@ -106,9 +106,9 @@ describe('executor command', () => {
106106
107107 it ( 'should execute print-config executor with api key' , async ( ) => {
108108 const cwd = path . join ( testFileDir , 'execute-print-config-command' ) ;
109- await addTargetToWorkspace ( tree , { cwd, project} ) ;
109+ await addTargetToWorkspace ( tree , { cwd, project } ) ;
110110
111- const { stdout, code} = await executeProcess ( {
111+ const { stdout, code } = await executeProcess ( {
112112 command : 'npx' ,
113113 args : [
114114 'nx' ,
@@ -134,7 +134,7 @@ describe('executor command', () => {
134134 const cwd = path . join ( testFileDir , 'execute-collect-with-merged-options' ) ;
135135 await addTargetToWorkspace (
136136 tree ,
137- { cwd, project} ,
137+ { cwd, project } ,
138138 {
139139 persist : {
140140 outputDir : '.reports' ,
@@ -143,7 +143,7 @@ describe('executor command', () => {
143143 } ,
144144 ) ;
145145
146- const { stdout, code} = await executeProcess ( {
146+ const { stdout, code } = await executeProcess ( {
147147 command : 'npx' ,
148148 args : [
149149 'nx' ,
@@ -168,9 +168,9 @@ describe('executor command', () => {
168168
169169 it ( 'should execute collect executor and add report to sub folder named by project' , async ( ) => {
170170 const cwd = path . join ( testFileDir , 'execute-collect-command' ) ;
171- await addTargetToWorkspace ( tree , { cwd, project} ) ;
171+ await addTargetToWorkspace ( tree , { cwd, project } ) ;
172172
173- const { stdout, code} = await executeProcess ( {
173+ const { stdout, code } = await executeProcess ( {
174174 command : 'npx' ,
175175 args : [ 'nx' , 'run' , `${ project } :code-pushup` , 'collect' ] ,
176176 cwd,
0 commit comments