Skip to content

Commit aa6363d

Browse files
author
John Doe
committed
refactor: revert verbose changes
1 parent 4268ecc commit aa6363d

File tree

15 files changed

+7
-59
lines changed

15 files changed

+7
-59
lines changed

packages/ci/src/lib/cli/commands/collect.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export async function runCollect(
77
{ hasFormats }: { hasFormats: boolean },
88
): Promise<void> {
99
await executeProcess({
10-
verbose: isVerbose(),
1110
command: bin,
1211
args: [
1312
...(isVerbose() ? ['--verbose'] : []),

packages/ci/src/lib/cli/commands/compare.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export async function runCompare(
77
{ hasFormats }: { hasFormats: boolean },
88
): Promise<void> {
99
await executeProcess({
10-
verbose: isVerbose(),
1110
command: bin,
1211
args: [
1312
'compare',

packages/ci/src/lib/cli/commands/merge-diffs.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export async function runMergeDiffs(
1414
const filename = `merged-${DEFAULT_PERSIST_FILENAME}`;
1515

1616
await executeProcess({
17-
verbose: isVerbose(),
1817
command: bin,
1918
args: [
2019
'merge-diffs',

packages/ci/src/lib/cli/commands/print-config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export async function runPrintConfig({
2727
path.resolve(directory, '.code-pushup', outputFile);
2828

2929
await executeProcess({
30-
verbose: isVerbose(),
3130
command: bin,
3231
args: [
3332
...(config ? [`--config=${config}`] : []),

packages/ci/src/lib/monorepo/handlers/nx.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
executeProcess,
44
fileExists,
55
interpolate,
6-
isVerbose,
76
stringifyError,
87
toArray,
98
} from '@code-pushup/utils';
@@ -17,7 +16,6 @@ export const nxHandler: MonorepoToolHandler = {
1716
(await fileExists(path.join(options.cwd, 'nx.json'))) &&
1817
(
1918
await executeProcess({
20-
verbose: isVerbose(),
2119
command: 'npx',
2220
args: ['nx', 'report'],
2321
cwd: options.cwd,
@@ -30,7 +28,6 @@ export const nxHandler: MonorepoToolHandler = {
3028

3129
async listProjects({ cwd, task, nxProjectsFilter, observer }) {
3230
const { stdout } = await executeProcess({
33-
verbose: isVerbose(),
3431
command: 'npx',
3532
args: [
3633
'nx',

packages/ci/src/lib/monorepo/handlers/nx.unit.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ describe('nxHandler', () => {
7777
'--exclude=*-e2e',
7878
'--json',
7979
],
80-
verbose: false,
8180
cwd: MEMFS_VOLUME,
8281
} satisfies utils.ProcessConfig);
8382
});
@@ -93,7 +92,6 @@ describe('nxHandler', () => {
9392
command: 'npx',
9493
args: ['nx', 'show', 'projects', '--with-target=code-pushup', '--json'],
9594
cwd: MEMFS_VOLUME,
96-
verbose: false,
9795
} satisfies utils.ProcessConfig);
9896
});
9997

packages/ci/src/lib/monorepo/list-projects.unit.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ describe('listMonorepoProjects', () => {
7171
args: ['nx', 'show', 'projects', '--with-target=code-pushup', '--json'],
7272
cwd: process.cwd(),
7373
observer: expect.any(Object),
74-
verbose: false,
7574
});
7675
});
7776

packages/ci/src/lib/run.int.test.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,12 @@ describe('runInCI', () => {
294294
args: ['print-config', expect.stringMatching(/^--output=.*\.json$/)],
295295
cwd: workDir,
296296
observer: expectedObserver,
297-
verbose: false,
298297
} satisfies utils.ProcessConfig);
299298
expect(utils.executeProcess).toHaveBeenNthCalledWith(2, {
300299
command: options.bin,
301300
args: [],
302301
cwd: workDir,
303302
observer: expectedObserver,
304-
verbose: false,
305303
} satisfies utils.ProcessConfig);
306304

307305
expect(logger.error).not.toHaveBeenCalled();
@@ -374,35 +372,30 @@ describe('runInCI', () => {
374372
args: ['print-config', expect.stringMatching(/^--output=.*\.json$/)],
375373
cwd: workDir,
376374
observer: expectedObserver,
377-
verbose: false,
378375
} satisfies utils.ProcessConfig);
379376
expect(utils.executeProcess).toHaveBeenNthCalledWith(2, {
380377
command: options.bin,
381378
args: [],
382379
cwd: workDir,
383380
observer: expectedObserver,
384-
verbose: false,
385381
} satisfies utils.ProcessConfig);
386382
expect(utils.executeProcess).toHaveBeenNthCalledWith(3, {
387383
command: options.bin,
388384
args: ['print-config', expect.stringMatching(/^--output=.*\.json$/)],
389385
cwd: workDir,
390386
observer: expectedObserver,
391-
verbose: false,
392387
} satisfies utils.ProcessConfig);
393388
expect(utils.executeProcess).toHaveBeenNthCalledWith(4, {
394389
command: options.bin,
395390
args: [],
396391
cwd: workDir,
397392
observer: expectedObserver,
398-
verbose: false,
399393
} satisfies utils.ProcessConfig);
400394
expect(utils.executeProcess).toHaveBeenNthCalledWith(5, {
401395
command: options.bin,
402396
args: ['compare'],
403397
cwd: workDir,
404398
observer: expectedObserver,
405-
verbose: false,
406399
} satisfies utils.ProcessConfig);
407400

408401
expect(logger.error).not.toHaveBeenCalled();
@@ -457,21 +450,18 @@ describe('runInCI', () => {
457450
args: ['print-config', expect.stringMatching(/^--output=.*\.json$/)],
458451
cwd: workDir,
459452
observer: expectedObserver,
460-
verbose: false,
461453
} satisfies utils.ProcessConfig);
462454
expect(utils.executeProcess).toHaveBeenNthCalledWith(2, {
463455
command: options.bin,
464456
args: [],
465457
cwd: workDir,
466458
observer: expectedObserver,
467-
verbose: false,
468459
} satisfies utils.ProcessConfig);
469460
expect(utils.executeProcess).toHaveBeenNthCalledWith(3, {
470461
command: options.bin,
471462
args: ['compare'],
472463
cwd: workDir,
473464
observer: expectedObserver,
474-
verbose: false,
475465
} satisfies utils.ProcessConfig);
476466

477467
expect(logger.error).not.toHaveBeenCalled();
@@ -531,21 +521,18 @@ describe('runInCI', () => {
531521
args: ['print-config', expect.stringMatching(/^--output=.*\.json$/)],
532522
cwd: workDir,
533523
observer: expectedObserver,
534-
verbose: false,
535524
} satisfies utils.ProcessConfig);
536525
expect(utils.executeProcess).toHaveBeenNthCalledWith(2, {
537526
command: options.bin,
538527
args: [],
539528
cwd: workDir,
540529
observer: expectedObserver,
541-
verbose: false,
542530
} satisfies utils.ProcessConfig);
543531
expect(utils.executeProcess).toHaveBeenNthCalledWith(3, {
544532
command: options.bin,
545533
args: ['compare'],
546534
cwd: workDir,
547535
observer: expectedObserver,
548-
verbose: false,
549536
} satisfies utils.ProcessConfig);
550537

551538
expect(logger.error).not.toHaveBeenCalled();
@@ -593,7 +580,6 @@ describe('runInCI', () => {
593580
args: expect.arrayContaining(['compare']),
594581
cwd: workDir,
595582
observer: expectedObserver,
596-
verbose: false,
597583
} satisfies utils.ProcessConfig);
598584
});
599585
});
@@ -728,14 +714,12 @@ describe('runInCI', () => {
728714
],
729715
cwd: expect.stringContaining(workDir),
730716
observer: expectedObserver,
731-
verbose: false,
732717
} satisfies utils.ProcessConfig);
733718
expect(utils.executeProcess).toHaveBeenCalledWith({
734719
command: runMany,
735720
args: [],
736721
cwd: expect.stringContaining(workDir),
737722
observer: expectedObserver,
738-
verbose: false,
739723
} satisfies utils.ProcessConfig);
740724

741725
expect(logger.error).not.toHaveBeenCalled();
@@ -805,7 +789,6 @@ describe('runInCI', () => {
805789
args: [],
806790
cwd: expect.stringContaining(workDir),
807791
observer: expectedObserver,
808-
verbose: false,
809792
} satisfies utils.ProcessConfig);
810793

811794
expect(logger.error).not.toHaveBeenCalled();
@@ -969,21 +952,18 @@ describe('runInCI', () => {
969952
],
970953
cwd: expect.stringContaining(workDir),
971954
observer: expectedObserver,
972-
verbose: false,
973955
} satisfies utils.ProcessConfig);
974956
expect(utils.executeProcess).toHaveBeenCalledWith({
975957
command: runMany,
976958
args: [],
977959
cwd: expect.stringContaining(workDir),
978960
observer: expectedObserver,
979-
verbose: false,
980961
} satisfies utils.ProcessConfig);
981962
expect(utils.executeProcess).toHaveBeenCalledWith({
982963
command: runMany,
983964
args: ['compare'],
984965
cwd: expect.stringContaining(workDir),
985966
observer: expectedObserver,
986-
verbose: false,
987967
} satisfies utils.ProcessConfig);
988968
expect(utils.executeProcess).toHaveBeenCalledWith({
989969
command: run,
@@ -1003,7 +983,6 @@ describe('runInCI', () => {
1003983
],
1004984
cwd: expect.stringContaining(workDir),
1005985
observer: expectedObserver,
1006-
verbose: false,
1007986
} satisfies utils.ProcessConfig);
1008987

1009988
expect(logger.error).not.toHaveBeenCalled();
@@ -1079,14 +1058,12 @@ describe('runInCI', () => {
10791058
args: [],
10801059
cwd: expect.stringContaining(workDir),
10811060
observer: expectedObserver,
1082-
verbose: false,
10831061
} satisfies utils.ProcessConfig);
10841062
expect(utils.executeProcess).toHaveBeenCalledWith({
10851063
command: runMany,
10861064
args: ['compare'],
10871065
cwd: expect.stringContaining(workDir),
10881066
observer: expectedObserver,
1089-
verbose: false,
10901067
} satisfies utils.ProcessConfig);
10911068
expect(utils.executeProcess).toHaveBeenCalledWith({
10921069
command: run,
@@ -1106,7 +1083,6 @@ describe('runInCI', () => {
11061083
],
11071084
cwd: expect.stringContaining(workDir),
11081085
observer: expectedObserver,
1109-
verbose: false,
11101086
} satisfies utils.ProcessConfig);
11111087
expect(utils.executeProcess).not.toHaveBeenCalledWith(
11121088
expect.objectContaining({
@@ -1162,21 +1138,18 @@ describe('runInCI', () => {
11621138
args: expect.any(Array),
11631139
cwd: expect.stringContaining(workDir),
11641140
observer: expectedObserver,
1165-
verbose: false,
11661141
} satisfies utils.ProcessConfig);
11671142
expect(utils.executeProcess).toHaveBeenCalledWith({
11681143
command: runMany,
11691144
args: expect.arrayContaining(['compare']),
11701145
cwd: expect.stringContaining(workDir),
11711146
observer: expectedObserver,
1172-
verbose: false,
11731147
} satisfies utils.ProcessConfig);
11741148
expect(utils.executeProcess).toHaveBeenCalledWith({
11751149
command: run,
11761150
args: expect.arrayContaining(['merge-diffs']),
11771151
cwd: expect.stringContaining(workDir),
11781152
observer: expectedObserver,
1179-
verbose: false,
11801153
} satisfies utils.ProcessConfig);
11811154
});
11821155
});
@@ -1269,14 +1242,12 @@ describe('runInCI', () => {
12691242
args: ['print-config', expect.stringMatching(/^--output=.*\.json$/)],
12701243
cwd: expect.stringContaining(workDir),
12711244
observer: expectedObserver,
1272-
verbose: false,
12731245
} satisfies utils.ProcessConfig);
12741246
expect(utils.executeProcess).toHaveBeenCalledWith({
12751247
command: options.bin,
12761248
args: [],
12771249
cwd: expect.stringContaining(workDir),
12781250
observer: expectedObserver,
1279-
verbose: false,
12801251
} satisfies utils.ProcessConfig);
12811252

12821253
expect(logger.error).not.toHaveBeenCalled();
@@ -1440,21 +1411,18 @@ describe('runInCI', () => {
14401411
args: ['print-config', expect.stringMatching(/^--output=.*\.json$/)],
14411412
cwd: expect.stringContaining(workDir),
14421413
observer: expectedObserver,
1443-
verbose: false,
14441414
} satisfies utils.ProcessConfig);
14451415
expect(utils.executeProcess).toHaveBeenCalledWith({
14461416
command: options.bin,
14471417
args: [],
14481418
cwd: expect.stringContaining(workDir),
14491419
observer: expectedObserver,
1450-
verbose: false,
14511420
} satisfies utils.ProcessConfig);
14521421
expect(utils.executeProcess).toHaveBeenCalledWith({
14531422
command: options.bin,
14541423
args: ['compare'],
14551424
cwd: expect.stringContaining(workDir),
14561425
observer: expectedObserver,
1457-
verbose: false,
14581426
} satisfies utils.ProcessConfig);
14591427
expect(utils.executeProcess).toHaveBeenCalledWith({
14601428
command: options.bin,
@@ -1474,7 +1442,6 @@ describe('runInCI', () => {
14741442
],
14751443
cwd: expect.stringContaining(workDir),
14761444
observer: expectedObserver,
1477-
verbose: false,
14781445
} satisfies utils.ProcessConfig);
14791446

14801447
expect(logger.error).not.toHaveBeenCalled();

packages/create-cli/src/lib/init.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
type ProcessConfig,
33
executeProcess,
4-
isVerbose,
54
objectToCliArgs,
65
} from '@code-pushup/utils';
76
import {
@@ -30,7 +29,6 @@ export async function initCodePushup() {
3029
...nxPluginGenerator('init', {
3130
skipNxJson: true,
3231
}),
33-
verbose: isVerbose(),
3432
observer: {
3533
onStdout: data => {
3634
console.info(parseNxProcessOutput(data.toString()));
@@ -41,13 +39,12 @@ export async function initCodePushup() {
4139
},
4240
});
4341

44-
const { stdout: configStdout, stderr: configStderr } = await executeProcess({
45-
...nxPluginGenerator('configuration', {
42+
const { stdout: configStdout, stderr: configStderr } = await executeProcess(
43+
nxPluginGenerator('configuration', {
4644
skipTarget: true,
4745
project: setupResult.projectName,
4846
}),
49-
verbose: isVerbose(),
50-
});
47+
);
5148
console.info(parseNxProcessOutput(configStdout));
5249
console.warn(parseNxProcessOutput(configStderr));
5350

packages/create-cli/src/lib/init.unit.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ describe('initCodePushup', () => {
6060
command: 'npx',
6161
args: ['nx', 'g', '@code-pushup/nx-plugin:init', '--skipNxJson'],
6262
observer: expect.any(Object),
63-
verbose: false,
6463
});
6564
expect(spyParseNxProcessOutput).toHaveBeenNthCalledWith(1, 'stdout-mock');
6665
expect(spyExecuteProcess).toHaveBeenNthCalledWith(2, {
@@ -72,7 +71,6 @@ describe('initCodePushup', () => {
7271
'--skipTarget',
7372
`--project="${projectJson.name}"`,
7473
],
75-
verbose: false,
7674
});
7775
expect(spyParseNxProcessOutput).toHaveBeenNthCalledWith(1, 'stdout-mock');
7876
expect(spyParseNxProcessOutput).toHaveBeenCalledTimes(2);

0 commit comments

Comments
 (0)