Skip to content

Commit 9794a7e

Browse files
committed
Merge branch 'main' into add-plugin-targets
2 parents 51fc913 + 44e4934 commit 9794a7e

33 files changed

+160
-189
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 0.74.1 (2025-08-19)
2+
3+
### 🩹 Fixes
4+
5+
- **ci:** prevent invalid startLine 0 when downloading from portal ([5153c88b](https://github.com/code-pushup/cli/commit/5153c88b))
6+
7+
### ❤️ Thank You
8+
9+
- Matěj Chalk
10+
111
## 0.74.0 (2025-08-13)
212

313
### 🚀 Features

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.74.0",
3+
"version": "0.74.1",
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.74.0",
29+
"@code-pushup/models": "0.74.1",
3030
"@code-pushup/portal-client": "^0.15.0",
31-
"@code-pushup/utils": "0.74.0",
31+
"@code-pushup/utils": "0.74.1",
3232
"glob": "^11.0.1",
3333
"simple-git": "^3.20.0",
3434
"yaml": "^2.5.1",

packages/ci/src/lib/portal/__snapshots__/transform.unit.test.ts.snap

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ exports[`transformGQLReport > should convert full GraphQL report to valid report
44
{
55
"categories": [
66
{
7-
"isBinary": false,
87
"refs": [
98
{
109
"plugin": "eslint",
@@ -17,7 +16,6 @@ exports[`transformGQLReport > should convert full GraphQL report to valid report
1716
"title": "Code style",
1817
},
1918
{
20-
"isBinary": false,
2119
"refs": [
2220
{
2321
"plugin": "bundle-stats",

packages/ci/src/lib/portal/transform.ts

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ function transformGQLCategory(category: CategoryFragment): CategoryConfig {
6161
return {
6262
slug: category.slug,
6363
title: category.title,
64-
isBinary: category.isBinary,
6564
...(category.description && { description: category.description }),
6665
refs: category.refs.map(
6766
({ target, weight }): CategoryRef => ({
@@ -71,6 +70,9 @@ function transformGQLCategory(category: CategoryFragment): CategoryConfig {
7170
weight,
7271
}),
7372
),
73+
// TODO: Portal API migration - convert isBinary to scoreTarget for backward compatibility
74+
// Remove this conversion when Portal API supports scoreTarget (#713)
75+
...(category.isBinary && { scoreTarget: 1 }),
7476
};
7577
}
7678

@@ -150,18 +152,20 @@ function transformGQLIssue(issue: IssueFragment): Issue {
150152
...(issue.source?.__typename === 'SourceCodeLocation' && {
151153
source: {
152154
file: issue.source.filePath,
153-
position: {
154-
startLine: issue.source.startLine ?? 0,
155-
...(issue.source.startColumn != null && {
156-
startColumn: issue.source.startColumn,
157-
}),
158-
...(issue.source.endLine != null && {
159-
endLine: issue.source.endLine,
160-
}),
161-
...(issue.source.endColumn != null && {
162-
endColumn: issue.source.endColumn,
163-
}),
164-
},
155+
...(issue.source.startLine != null && {
156+
position: {
157+
startLine: issue.source.startLine,
158+
...(issue.source.startColumn != null && {
159+
startColumn: issue.source.startColumn,
160+
}),
161+
...(issue.source.endLine != null && {
162+
endLine: issue.source.endLine,
163+
}),
164+
...(issue.source.endColumn != null && {
165+
endColumn: issue.source.endColumn,
166+
}),
167+
},
168+
}),
165169
},
166170
}),
167171
};

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.74.0",
3+
"version": "0.74.1",
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.74.0",
49-
"@code-pushup/core": "0.74.0",
50-
"@code-pushup/utils": "0.74.0",
48+
"@code-pushup/models": "0.74.1",
49+
"@code-pushup/core": "0.74.1",
50+
"@code-pushup/utils": "0.74.1",
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.74.0",
3+
"version": "0.74.1",
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.74.0",
43-
"@code-pushup/utils": "0.74.0",
42+
"@code-pushup/models": "0.74.1",
43+
"@code-pushup/utils": "0.74.1",
4444
"ansis": "^3.3.0"
4545
},
4646
"peerDependencies": {

packages/core/src/lib/implementation/report-to-gql.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ function categoryToGQL(category: CategoryConfig): PortalCategory {
199199
slug: category.slug,
200200
title: category.title,
201201
description: category.description,
202-
isBinary: category.isBinary,
202+
// TODO: Portal API migration - convert scoreTarget to isBinary for backward compatibility
203+
// Remove this conversion when Portal API supports scoreTarget (#713)
204+
isBinary: category.scoreTarget === 1,
203205
refs: category.refs.map(ref => ({
204206
plugin: ref.plugin,
205207
type: categoryRefTypeToGQL(ref.type),

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.74.0",
3+
"version": "0.74.1",
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.74.0",
30-
"@code-pushup/utils": "0.74.0"
29+
"@code-pushup/nx-plugin": "0.74.1",
30+
"@code-pushup/utils": "0.74.1"
3131
},
3232
"files": [
3333
"src",

packages/models/docs/models-reference.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,15 @@ _Boolean._
167167

168168
_Object containing the following properties:_
169169

170-
| Property | Description | Type |
171-
| :--------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------- |
172-
| **`slug`** (\*) | Human-readable unique ID, e.g. "performance" | `string` (_regex: `/^[a-z\d]+(?:-[a-z\d]+)*$/`, max length: 128_) |
173-
| **`refs`** (\*) | | _Array of at least 1 [CategoryRef](#categoryref) items_ |
174-
| **`title`** (\*) | Category Title | `string` (_max length: 256_) |
175-
| `description` | Category description | `string` (_max length: 65536_) |
176-
| `docsUrl` | Category docs URL | `string` (_url_) (_optional_) _or_ `''` |
177-
| `isSkipped` | | `boolean` |
178-
| `isBinary` | Is this a binary category (i.e. only a perfect score considered a "pass")? | `boolean` |
170+
| Property | Description | Type |
171+
| :--------------- | :------------------------------------------- | :---------------------------------------------------------------- |
172+
| **`slug`** (\*) | Human-readable unique ID, e.g. "performance" | `string` (_regex: `/^[a-z\d]+(?:-[a-z\d]+)*$/`, max length: 128_) |
173+
| **`refs`** (\*) | | _Array of at least 1 [CategoryRef](#categoryref) items_ |
174+
| **`title`** (\*) | Category Title | `string` (_max length: 256_) |
175+
| `description` | Category description | `string` (_max length: 65536_) |
176+
| `docsUrl` | Category docs URL | `string` (_url_) (_optional_) _or_ `''` |
177+
| `isSkipped` | | `boolean` |
178+
| `scoreTarget` | Pass/fail score threshold (0-1) | `number` (_≥0, ≤1_) |
179179

180180
_(\*) Required._
181181

packages/models/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code-pushup/models",
3-
"version": "0.74.0",
3+
"version": "0.74.1",
44
"license": "MIT",
55
"description": "Model definitions and validators for the Code PushUp CLI",
66
"homepage": "https://github.com/code-pushup/cli/tree/main/packages/models#readme",

0 commit comments

Comments
 (0)