Skip to content

Commit ad0d6ab

Browse files
author
John Doe
committed
Merge branch 'main' into refactor/move-test-fixtures
2 parents 768ca49 + 38ad415 commit ad0d6ab

File tree

96 files changed

+913
-1077
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+913
-1077
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
## 0.94.0 (2025-12-09)
2+
3+
### 🚀 Features
4+
5+
- **cli:** include logo and version in initial log ([52266a7f](https://github.com/code-pushup/cli/commit/52266a7f))
6+
- **cli:** log config import and validation steps ([f3cebd3b](https://github.com/code-pushup/cli/commit/f3cebd3b))
7+
- **cli:** simplify sticker hints ([db44dff0](https://github.com/code-pushup/cli/commit/db44dff0))
8+
- **cli:** improve collect and upload logs ([239c7c7e](https://github.com/code-pushup/cli/commit/239c7c7e))
9+
- **cli:** drop print-config to stdout, output arg is now required ([88096844](https://github.com/code-pushup/cli/commit/88096844))
10+
- **utils:** support custom return values in logger.task ([e0793eeb](https://github.com/code-pushup/cli/commit/e0793eeb))
11+
- **utils:** ensure consistent line breaks in stdout report ([7093fe4d](https://github.com/code-pushup/cli/commit/7093fe4d))
12+
13+
### ❤️ Thank You
14+
15+
- Matěj Chalk
16+
17+
## 0.93.0 (2025-12-08)
18+
19+
### 🚀 Features
20+
21+
- **plugin-axe:** use category-based groups ([aa7b7f63](https://github.com/code-pushup/cli/commit/aa7b7f63))
22+
23+
### 🩹 Fixes
24+
25+
- **plugin-axe:** wrap HTML tags in audit metadata ([9ac95d60](https://github.com/code-pushup/cli/commit/9ac95d60))
26+
27+
### ❤️ Thank You
28+
29+
- hanna-skryl
30+
131
## 0.92.1 (2025-12-03)
232

333
### 🩹 Fixes

e2e/cli-e2e/tests/__snapshots__/help.e2e.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Commands:
88
[default]
99
code-pushup autorun Shortcut for running collect followed by upload
1010
11-
code-pushup collect Run Plugins and collect results
11+
code-pushup collect Run plugins and collect results
1212
code-pushup upload Upload report results to the portal
1313
code-pushup history Collect reports for commit history
1414
code-pushup compare Compare 2 report files and create a diff file

e2e/cli-e2e/tests/collect.e2e.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ describe('CLI collect', () => {
5959

6060
const md = await readTextFile(path.join(dummyOutputDir, 'report.md'));
6161

62-
expect(md).toContain('# Code PushUp Report');
62+
expect(md).toContain('# Code PushUp report');
6363
expect(md).toContain(dummyPluginTitle);
6464
expect(md).toContain(dummyAuditTitle);
6565
});
@@ -112,7 +112,7 @@ describe('CLI collect', () => {
112112

113113
expect(code).toBe(0);
114114

115-
expect(stdout).toContain('Code PushUp Report');
115+
expect(stdout).toContain('Code PushUp report');
116116
expect(stdout).not.toContain('Generated reports');
117117
expect(stdout).toContain(dummyPluginTitle);
118118
expect(stdout).toContain(dummyAuditTitle);

e2e/cli-e2e/tests/print-config.e2e.test.ts

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ describe('CLI print-config', () => {
4040
it.each(extensions)(
4141
'should load .%s config file with correct arguments',
4242
async ext => {
43-
const { code, stdout } = await executeProcess({
43+
const { code } = await executeProcess({
4444
command: 'npx',
4545
args: [
4646
'@code-pushup/cli',
4747
'print-config',
48+
'--output=config.json',
4849
`--config=${configFilePath(ext)}`,
4950
'--tsconfig=tsconfig.base.json',
5051
'--persist.outputDir=output-dir',
@@ -56,7 +57,11 @@ describe('CLI print-config', () => {
5657

5758
expect(code).toBe(0);
5859

59-
expect(JSON.parse(stdout)).toEqual(
60+
const output = await readFile(
61+
path.join(testFileDummySetup, 'config.json'),
62+
'utf8',
63+
);
64+
expect(JSON.parse(output)).toEqual(
6065
expect.objectContaining({
6166
config: expect.stringContaining(`code-pushup.config.${ext}`),
6267
tsconfig: 'tsconfig.base.json',
@@ -71,30 +76,4 @@ describe('CLI print-config', () => {
7176
);
7277
},
7378
);
74-
75-
it('should print config to output file', async () => {
76-
const { code, stdout } = await executeProcess({
77-
command: 'npx',
78-
args: ['@code-pushup/cli', 'print-config', '--output=config.json'],
79-
cwd: testFileDummySetup,
80-
});
81-
82-
expect(code).toBe(0);
83-
84-
const output = await readFile(
85-
path.join(testFileDummySetup, 'config.json'),
86-
'utf8',
87-
);
88-
expect(JSON.parse(output)).toEqual(
89-
expect.objectContaining({
90-
plugins: [
91-
expect.objectContaining({
92-
slug: 'dummy-plugin',
93-
title: 'Dummy Plugin',
94-
}),
95-
],
96-
}),
97-
);
98-
expect(stdout).not.toContain('dummy-plugin');
99-
});
10079
});

e2e/nx-plugin-e2e/tests/executor-cli.e2e.test.ts

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,6 @@ describe('executor command', () => {
100100
expect(cleanStdout).toContain('nx run my-lib:code-pushup');
101101
});
102102

103-
it('should execute print-config executor', async () => {
104-
const cwd = path.join(testFileDir, 'execute-print-config-command');
105-
await addTargetToWorkspace(tree, { cwd, project });
106-
107-
const { stdout, code } = await executeProcess({
108-
command: 'npx',
109-
args: ['nx', 'run', `${project}:code-pushup`, 'print-config'],
110-
cwd,
111-
});
112-
113-
expect(code).toBe(0);
114-
const cleanStdout = removeColorCodes(stdout);
115-
expect(cleanStdout).toContain('nx run my-lib:code-pushup print-config');
116-
117-
await expect(() =>
118-
readJsonFile(path.join(cwd, '.code-pushup', project, 'report.json')),
119-
).rejects.toThrow('');
120-
});
121-
122103
it('should execute print-config executor with output', async () => {
123104
const cwd = path.join(testFileDir, 'execute-print-config-command');
124105
await addTargetToWorkspace(tree, { cwd, project });
@@ -144,32 +125,6 @@ describe('executor command', () => {
144125
).resolves.not.toThrow();
145126
});
146127

147-
it('should execute print-config executor with api key', async () => {
148-
const cwd = path.join(testFileDir, 'execute-print-config-command');
149-
await addTargetToWorkspace(tree, { cwd, project });
150-
151-
const { stdout, code } = await executeProcess({
152-
command: 'npx',
153-
args: [
154-
'nx',
155-
'run',
156-
`${project}:code-pushup`,
157-
'print-config',
158-
'--upload.apiKey=a123a',
159-
],
160-
cwd,
161-
});
162-
163-
expect(code).toBe(0);
164-
const cleanStdout = removeColorCodes(stdout);
165-
expect(cleanStdout).toContain('nx run my-lib:code-pushup print-config');
166-
expect(cleanStdout).toContain('a123a');
167-
168-
await expect(() =>
169-
readJsonFile(path.join(cwd, '.code-pushup', project, 'report.json')),
170-
).rejects.toThrow('');
171-
});
172-
173128
it('should execute collect executor and merge target and command-line options', async () => {
174129
const cwd = path.join(testFileDir, 'execute-collect-with-merged-options');
175130
await addTargetToWorkspace(

0 commit comments

Comments
 (0)