Skip to content

Commit c421bac

Browse files
author
John Doe
committed
Merge branch 'main' into chore/tsdown-dual-build
# Conflicts: # package-lock.json
2 parents ee12c70 + 9876d94 commit c421bac

File tree

237 files changed

+5844
-4650
lines changed

Some content is hidden

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

237 files changed

+5844
-4650
lines changed

.github/actions/code-pushup/src/runner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
type SourceFileIssue,
1111
runInCI,
1212
} from '@code-pushup/ci';
13-
import { CODE_PUSHUP_UNICODE_LOGO } from '@code-pushup/utils';
13+
import { CODE_PUSHUP_UNICODE_LOGO, stringifyError } from '@code-pushup/utils';
1414

1515
type GitHubRefs = {
1616
head: GitBranch;
@@ -150,7 +150,7 @@ async function run(): Promise<void> {
150150

151151
core.info(`${LOG_PREFIX} Finished running successfully`);
152152
} catch (error) {
153-
const message = error instanceof Error ? error.message : String(error);
153+
const message = stringifyError(error);
154154
core.error(`${LOG_PREFIX} Failed: ${message}`);
155155
core.setFailed(message);
156156
}

CHANGELOG.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,80 @@
1+
## 0.85.0 (2025-11-07)
2+
3+
### 🚀 Features
4+
5+
- **utils:** print custom cwd in logger command spinner ([52dc118c](https://github.com/code-pushup/cli/commit/52dc118c))
6+
- **utils:** integrate logger with executeProcess ([eb04da8f](https://github.com/code-pushup/cli/commit/eb04da8f))
7+
8+
### 🩹 Fixes
9+
10+
- **ci:** remove redundant silent and debug options, use CP_VERBOSE env ([62a48b01](https://github.com/code-pushup/cli/commit/62a48b01))
11+
- **ci,core,nx-plugin,create-cli:** prevent duplicate process logs ([edfd95d5](https://github.com/code-pushup/cli/commit/edfd95d5))
12+
- **plugin-js-packages:** avoid parallel process execution (concurrent spinners not supported) ([455043e3](https://github.com/code-pushup/cli/commit/455043e3))
13+
- **utils:** hide verbose stdout/stderr attributes in ProcessError object ([7b9b6a94](https://github.com/code-pushup/cli/commit/7b9b6a94))
14+
15+
### ❤️ Thank You
16+
17+
- Matěj Chalk
18+
19+
## 0.84.0 (2025-10-30)
20+
21+
### 🚀 Features
22+
23+
- **ci:** use new shared logger, remove option ([6f134e62](https://github.com/code-pushup/cli/commit/6f134e62))
24+
25+
### ❤️ Thank You
26+
27+
- Matěj Chalk
28+
29+
## 0.83.0 (2025-10-29)
30+
31+
### 🚀 Features
32+
33+
- use formatted zod schema validation errors ([68fe123d](https://github.com/code-pushup/cli/commit/68fe123d))
34+
- **plugin-lighthouse:** prettify table validation errors ([ab2fe542](https://github.com/code-pushup/cli/commit/ab2fe542))
35+
- **utils:** prettify zod errors in stringifyError utility ([5e7456f7](https://github.com/code-pushup/cli/commit/5e7456f7))
36+
- **utils:** add option to truncate error messages to one-liner ([487ac865](https://github.com/code-pushup/cli/commit/487ac865))
37+
- **utils:** truncate group/spinner inline errors to one-liner ([ee31b9e8](https://github.com/code-pushup/cli/commit/ee31b9e8))
38+
- **utils:** provide validateAsync alternative to synchronous validate ([fb236e19](https://github.com/code-pushup/cli/commit/fb236e19))
39+
40+
### 🩹 Fixes
41+
42+
- use safe error to string conversions ([c78c7264](https://github.com/code-pushup/cli/commit/c78c7264))
43+
44+
### ❤️ Thank You
45+
46+
- Matěj Chalk
47+
48+
## 0.82.0 (2025-10-25)
49+
50+
### 🚀 Features
51+
52+
- **nx-plugin:** adjust bin path handling ([#1109](https://github.com/code-pushup/cli/pull/1109))
53+
54+
### ❤️ Thank You
55+
56+
- Michael Hladky @BioPhoton
57+
58+
## 0.81.0 (2025-10-22)
59+
60+
### 🚀 Features
61+
62+
- **utils:** add utility for rounding to max decimals, use in formatDuration ([be80d99c](https://github.com/code-pushup/cli/commit/be80d99c))
63+
- **utils:** add settlePromise helper for convenient rejected promise handling ([9fa7df9e](https://github.com/code-pushup/cli/commit/9fa7df9e))
64+
- **utils:** add unix timestamp conversion ([b95877e9](https://github.com/code-pushup/cli/commit/b95877e9))
65+
- **utils:** implement custom logger with groups and tasks ([3d158ff6](https://github.com/code-pushup/cli/commit/3d158ff6))
66+
- **utils:** throw if invalid group/spinner combinations used in logger ([899ab764](https://github.com/code-pushup/cli/commit/899ab764))
67+
- **utils:** export shared logger instance ([009bc0eb](https://github.com/code-pushup/cli/commit/009bc0eb))
68+
69+
### 🩹 Fixes
70+
71+
- **utils:** ensure multiline logs during spinner are indented properly ([2ca91c08](https://github.com/code-pushup/cli/commit/2ca91c08))
72+
- **utils:** avoid formatting milliseconds with decimals ([3c22e5d0](https://github.com/code-pushup/cli/commit/3c22e5d0))
73+
74+
### ❤️ Thank You
75+
76+
- Matěj Chalk
77+
178
## 0.80.2 (2025-09-26)
279

380
### 🩹 Fixes

e2e/ci-e2e/global-setup.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

e2e/ci-e2e/tsconfig.test.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"vitest.e2e.config.ts",
99
"tests/**/*.e2e.test.ts",
1010
"tests/**/*.d.ts",
11-
"mocks/**/*.ts",
12-
"global-setup.ts"
11+
"mocks/**/*.ts"
1312
]
1413
}

e2e/ci-e2e/vitest.e2e.config.ts

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
1-
/// <reference types="vitest" />
2-
import { defineConfig } from 'vite';
3-
import { tsconfigPathAliases } from '../../tools/vitest-tsconfig-path-aliases.js';
1+
import { createE2ETestConfig } from '../../testing/test-setup-config/src/index.js';
42

5-
export default defineConfig({
6-
cacheDir: '../../node_modules/.vite/ci-e2e',
7-
test: {
8-
reporters: ['basic'],
9-
testTimeout: 60_000,
10-
globals: true,
11-
alias: tsconfigPathAliases(),
12-
pool: 'threads',
13-
poolOptions: { threads: { singleThread: true } },
14-
cache: {
15-
dir: '../../node_modules/.vitest',
16-
},
17-
environment: 'node',
18-
include: ['tests/**/*.e2e.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
19-
globalSetup: './global-setup.ts',
20-
setupFiles: ['../../testing/test-setup/src/lib/reset.mocks.ts'],
21-
},
3+
export default createE2ETestConfig('ci-e2e', {
4+
testTimeout: 60_000,
225
});

e2e/cli-e2e/vitest.e2e.config.ts

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
1-
/// <reference types="vitest" />
2-
import { defineConfig } from 'vite';
3-
import { tsconfigPathAliases } from '../../tools/vitest-tsconfig-path-aliases.js';
1+
import { createE2ETestConfig } from '../../testing/test-setup-config/src/index.js';
42

5-
export default defineConfig({
6-
cacheDir: '../../node_modules/.vite/cli-e2e',
7-
test: {
8-
reporters: ['basic'],
9-
testTimeout: 20_000,
10-
globals: true,
11-
alias: tsconfigPathAliases(),
12-
pool: 'threads',
13-
poolOptions: { threads: { singleThread: true } },
14-
cache: {
15-
dir: '../../node_modules/.vitest',
16-
},
17-
environment: 'node',
18-
include: ['tests/**/*.e2e.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
19-
setupFiles: ['../../testing/test-setup/src/lib/reset.mocks.ts'],
20-
},
3+
export default createE2ETestConfig('cli-e2e', {
4+
testTimeout: 20_000,
215
});
Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
1-
/// <reference types="vitest" />
2-
import { defineConfig } from 'vite';
3-
import { tsconfigPathAliases } from '../../tools/vitest-tsconfig-path-aliases.js';
1+
import { createE2ETestConfig } from '../../testing/test-setup-config/src/index.js';
42

5-
export default defineConfig({
6-
cacheDir: '../../node_modules/.vite/create-cli-e2e',
7-
test: {
8-
reporters: ['basic'],
9-
testTimeout: 20_000,
10-
hookTimeout: 20_000,
11-
globals: true,
12-
alias: tsconfigPathAliases(),
13-
pool: 'threads',
14-
poolOptions: { threads: { singleThread: true } },
15-
cache: {
16-
dir: '../../node_modules/.vitest',
17-
},
18-
environment: 'node',
19-
include: ['tests/**/*.e2e.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
20-
setupFiles: ['../../testing/test-setup/src/lib/reset.mocks.ts'],
21-
},
3+
export default createE2ETestConfig('create-cli-e2e', {
4+
testTimeout: 20_000,
225
});

e2e/nx-plugin-e2e/tests/__snapshots__/plugin-create-nodes.e2e.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ exports[`nx-plugin > should add configuration target dynamically 1`] = `
1717
"configurations": {},
1818
"executor": "nx:run-commands",
1919
"options": {
20-
"command": "nx g @code-pushup/nx-plugin:configuration --skipTarget --targetName="code-pushup" --project="my-lib"",
20+
"command": "nx g @code-pushup/nx-plugin:configuration --project="my-lib"",
2121
},
2222
"parallelism": true,
2323
},

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { type Tree, updateProjectConfiguration } from '@nx/devkit';
22
import path from 'node:path';
33
import { readProjectConfiguration } from 'nx/src/generators/utils/project-configuration';
4-
import { afterAll, afterEach, beforeEach, expect, vi } from 'vitest';
4+
import { afterAll, afterEach, beforeEach, expect } from 'vitest';
55
import {
66
type AutorunCommandExecutorOptions,
77
generateCodePushupConfig,
@@ -17,7 +17,7 @@ import {
1717
removeColorCodes,
1818
teardownTestFolder,
1919
} from '@code-pushup/test-utils';
20-
import { executeProcess, readJsonFile } from '@code-pushup/utils';
20+
import { executeProcess, logger, readJsonFile } from '@code-pushup/utils';
2121
import { INLINE_PLUGIN } from '../mocks/inline-plugin.js';
2222

2323
async function addTargetToWorkspace(
@@ -62,15 +62,16 @@ describe('executor command', () => {
6262
Object.entries(process.env).filter(([k]) => k.startsWith('CP_')),
6363
);
6464

65-
/* eslint-disable functional/immutable-data, @typescript-eslint/no-dynamic-delete */
6665
beforeAll(() => {
6766
Object.entries(process.env)
6867
.filter(([k]) => k.startsWith('CP_'))
69-
.forEach(([k]) => delete process.env[k]);
68+
.forEach(([k]) => {
69+
// eslint-disable-next-line functional/immutable-data, @typescript-eslint/no-dynamic-delete
70+
delete process.env[k];
71+
});
7072
});
7173

7274
beforeEach(async () => {
73-
vi.unstubAllEnvs();
7475
tree = await generateWorkspaceAndProject(project);
7576
});
7677

@@ -79,9 +80,11 @@ describe('executor command', () => {
7980
});
8081

8182
afterAll(() => {
82-
Object.entries(processEnvCP).forEach(([k, v]) => (process.env[k] = v));
83+
Object.entries(processEnvCP).forEach(([k, v]) => {
84+
// eslint-disable-next-line functional/immutable-data
85+
process.env[k] = v;
86+
});
8387
});
84-
/* eslint-enable functional/immutable-data, @typescript-eslint/no-dynamic-delete */
8588

8689
it('should execute no specific command by default', async () => {
8790
const cwd = path.join(testFileDir, 'execute-default-command');
@@ -179,6 +182,7 @@ describe('executor command', () => {
179182
},
180183
},
181184
);
185+
logger.setVerbose(true);
182186

183187
const { stdout, code } = await executeProcess({
184188
command: 'npx',

0 commit comments

Comments
 (0)