Skip to content

Commit 27ec1fb

Browse files
authored
Merge branch 'main' into score-targets-config-implementation
2 parents 934ac1a + b05dd6e commit 27ec1fb

Some content is hidden

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

43 files changed

+1114
-142
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Install dependencies
5050
run: npm ci
5151
- name: Lint affected projects
52-
run: npx nx affected:lint --parallel=3
52+
run: npx nx affected -t lint --parallel=3
5353

5454
unit-test:
5555
strategy:
@@ -73,7 +73,7 @@ jobs:
7373
- name: Install dependencies
7474
run: npm ci
7575
- name: Unit test affected projects
76-
run: npx nx affected -t unit-test --parallel=3 --coverage.enabled
76+
run: npx nx affected -t unit-test --parallel=3
7777

7878
integration-test:
7979
strategy:
@@ -97,7 +97,7 @@ jobs:
9797
- name: Install dependencies
9898
run: npm ci
9999
- name: Integration test affected projects
100-
run: npx nx affected -t int-test --parallel=3 --coverage.enabled
100+
run: npx nx affected -t int-test --parallel=3
101101

102102
e2e:
103103
strategy:

.github/workflows/code-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Install dependencies
4949
run: npm ci
5050
- name: Execute tests with coverage
51-
run: npx nx run ${{ matrix.project }}:${{ matrix.target }} --coverage.enabled
51+
run: npx nx run ${{ matrix.project }}:${{ matrix.target }}
5252
- name: Upload coverage reports to Codecov
5353
uses: codecov/codecov-action@v4
5454
with:

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## 0.78.0 (2025-09-03)
2+
3+
### 🚀 Features
4+
5+
- **plugin-eslint:** add artefact options ([#1089](https://github.com/code-pushup/cli/pull/1089))
6+
7+
### 🩹 Fixes
8+
9+
- **nx-plugin:** print process output for CLI command ([#1095](https://github.com/code-pushup/cli/pull/1095))
10+
11+
### ❤️ Thank You
12+
13+
- Michael Hladky @BioPhoton
14+
115
## 0.77.0 (2025-08-28)
216

317
### 🚀 Features

code-pushup.preset.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,13 @@ export const eslintCoreConfigNx = async (
177177
eslintrc: `packages/${projectName}/eslint.config.js`,
178178
patterns: ['.'],
179179
})
180-
: await eslintPlugin(await eslintConfigFromAllNxProjects()),
180+
: await eslintPlugin(await eslintConfigFromAllNxProjects(), {
181+
artifacts: {
182+
// We leverage Nx dependsOn to only run all lint targets before we run code-pushup
183+
// generateArtifactsCommand: 'npx nx run-many -t lint',
184+
artifactsPaths: ['packages/**/.eslint/eslint-report.json'],
185+
},
186+
}),
181187
],
182188
categories: eslintCategories,
183189
});
@@ -193,16 +199,10 @@ export const coverageCoreConfigNx = async (
193199
projectName?: string,
194200
): Promise<CoreConfig> => {
195201
const targetNames = ['unit-test', 'int-test'];
196-
const targetArgs = ['-t', ...targetNames];
197202
return {
198203
plugins: [
199204
await coveragePlugin({
200-
coverageToolCommand: {
201-
command: 'npx',
202-
args: projectName
203-
? ['nx', 'run-many', '-p', projectName, ...targetArgs]
204-
: ['nx', 'run-many', ...targetArgs],
205-
},
205+
// We do not need to run a coverageToolCommand. This is handled over the Nx task graph.
206206
reports: projectName
207207
? [
208208
{

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ describe('executor command', () => {
172172
expect(cleanStdout).toContain(
173173
'nx run my-lib:code-pushup collect --persist.filename=terminal-report',
174174
);
175+
expect(cleanStdout).toContain('Code PushUp CLI');
175176

176177
await expect(
177178
readJsonFile(path.join(cwd, '.reports', 'terminal-report.json')),

nx.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,40 @@
4949
}
5050
],
5151
"sharedGlobals": [
52-
{ "runtime": "node -e \"console.log(require('os').platform())\"" },
53-
{ "runtime": "node -v" },
54-
{ "runtime": "npm -v" }
52+
{
53+
"runtime": "node -e \"console.log(require('os').platform())\""
54+
},
55+
{
56+
"runtime": "node -v"
57+
},
58+
{
59+
"runtime": "npm -v"
60+
}
5561
]
5662
},
5763
"targetDefaults": {
64+
"lint": {
65+
"dependsOn": ["eslint-formatter-multi:build"],
66+
"inputs": ["lint-eslint-inputs"],
67+
"outputs": ["{projectRoot}/.eslint/**/*"],
68+
"cache": true,
69+
"executor": "nx:run-commands",
70+
"options": {
71+
"command": "eslint",
72+
"args": [
73+
"{projectRoot}/**/*.ts",
74+
"{projectRoot}/package.json",
75+
"--config={projectRoot}/eslint.config.js",
76+
"--max-warnings=0",
77+
"--no-warn-ignored",
78+
"--error-on-unmatched-pattern=false",
79+
"--format=./tools/eslint-formatter-multi/dist/src/index.js"
80+
],
81+
"env": {
82+
"ESLINT_FORMATTER_CONFIG": "{\"outputDir\":\"{projectRoot}/.eslint\"}"
83+
}
84+
}
85+
},
5886
"build": {
5987
"dependsOn": ["^build"],
6088
"inputs": ["production", "^production"],
@@ -69,6 +97,7 @@
6997
}
7098
},
7199
"unit-test": {
100+
"cache": true,
72101
"outputs": [
73102
"{workspaceRoot}/coverage/{projectName}/unit-tests/lcov.info"
74103
],
@@ -81,6 +110,7 @@
81110
}
82111
},
83112
"int-test": {
113+
"cache": true,
84114
"outputs": ["{workspaceRoot}/coverage/{projectName}/int-tests/lcov.info"],
85115
"executor": "@nx/vite:test",
86116
"options": {
@@ -95,36 +125,6 @@
95125
"inputs": ["default"],
96126
"cache": true
97127
},
98-
"lint": {
99-
"inputs": ["lint-eslint-inputs"],
100-
"executor": "@nx/eslint:lint",
101-
"outputs": ["{options.outputFile}"],
102-
"cache": true,
103-
"options": {
104-
"errorOnUnmatchedPattern": false,
105-
"maxWarnings": 0,
106-
"lintFilePatterns": [
107-
"{projectRoot}/**/*.ts",
108-
"{projectRoot}/package.json"
109-
]
110-
}
111-
},
112-
"lint-report": {
113-
"inputs": ["default", "{workspaceRoot}/eslint.config.?(c)js"],
114-
"outputs": ["{projectRoot}/.eslint/eslint-report*.json"],
115-
"cache": true,
116-
"executor": "@nx/linter:eslint",
117-
"options": {
118-
"errorOnUnmatchedPattern": false,
119-
"maxWarnings": 0,
120-
"format": "json",
121-
"outputFile": "{projectRoot}/.eslint/eslint-report.json",
122-
"lintFilePatterns": [
123-
"{projectRoot}/**/*.ts",
124-
"{projectRoot}/package.json"
125-
]
126-
}
127-
},
128128
"nxv-pkg-install": {
129129
"parallelism": false
130130
},

packages/ci/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code-pushup/ci",
3-
"version": "0.77.0",
3+
"version": "0.78.0",
44
"description": "CI automation logic for Code PushUp (provider-agnostic)",
55
"license": "MIT",
66
"homepage": "https://github.com/code-pushup/cli/tree/main/packages/ci#readme",
@@ -26,9 +26,9 @@
2626
},
2727
"type": "module",
2828
"dependencies": {
29-
"@code-pushup/models": "0.77.0",
29+
"@code-pushup/models": "0.78.0",
3030
"@code-pushup/portal-client": "^0.16.0",
31-
"@code-pushup/utils": "0.77.0",
31+
"@code-pushup/utils": "0.78.0",
3232
"glob": "^11.0.1",
3333
"simple-git": "^3.20.0",
3434
"yaml": "^2.5.1",

packages/cli/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code-pushup/cli",
3-
"version": "0.77.0",
3+
"version": "0.78.0",
44
"license": "MIT",
55
"description": "A CLI to run all kinds of code quality measurements to align your team with company goals",
66
"homepage": "https://code-pushup.dev",
@@ -45,9 +45,9 @@
4545
"node": ">=20"
4646
},
4747
"dependencies": {
48-
"@code-pushup/models": "0.77.0",
49-
"@code-pushup/core": "0.77.0",
50-
"@code-pushup/utils": "0.77.0",
48+
"@code-pushup/models": "0.78.0",
49+
"@code-pushup/core": "0.78.0",
50+
"@code-pushup/utils": "0.78.0",
5151
"yargs": "^17.7.2",
5252
"ansis": "^3.3.0",
5353
"simple-git": "^3.20.0"

packages/core/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code-pushup/core",
3-
"version": "0.77.0",
3+
"version": "0.78.0",
44
"license": "MIT",
55
"description": "Core business logic for the used by the Code PushUp CLI",
66
"homepage": "https://github.com/code-pushup/cli/tree/main/packages/core#readme",
@@ -39,8 +39,8 @@
3939
},
4040
"type": "module",
4141
"dependencies": {
42-
"@code-pushup/models": "0.77.0",
43-
"@code-pushup/utils": "0.77.0",
42+
"@code-pushup/models": "0.78.0",
43+
"@code-pushup/utils": "0.78.0",
4444
"ansis": "^3.3.0"
4545
},
4646
"peerDependencies": {

packages/create-cli/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code-pushup/create-cli",
3-
"version": "0.77.0",
3+
"version": "0.78.0",
44
"license": "MIT",
55
"bin": "index.js",
66
"homepage": "https://github.com/code-pushup/cli/tree/main/packages/create-cli#readme",
@@ -26,8 +26,8 @@
2626
},
2727
"type": "module",
2828
"dependencies": {
29-
"@code-pushup/nx-plugin": "0.77.0",
30-
"@code-pushup/utils": "0.77.0"
29+
"@code-pushup/nx-plugin": "0.78.0",
30+
"@code-pushup/utils": "0.78.0"
3131
},
3232
"files": [
3333
"src",

0 commit comments

Comments
 (0)