Skip to content

Commit 4a168e4

Browse files
committed
Merge branch 'main' into impl-nx-create-nodes-v2
2 parents 1f97896 + e538f8a commit 4a168e4

File tree

337 files changed

+9770
-1214
lines changed

Some content is hidden

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

337 files changed

+9770
-1214
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Plugin request
2+
description: Add a request for a new plugin
3+
title: 'Plugin request'
4+
body:
5+
- type: textarea
6+
id: metric
7+
attributes:
8+
label: Metric
9+
description: Elaborate on the specific metric the plugin will measure.
10+
placeholder: e.g. Code coverage of functions, branches and lines.
11+
validations:
12+
required: true
13+
- type: markdown
14+
attributes:
15+
value: Please provide a concise set of requirements, so that we can process your request as soon as possible.
16+
- type: textarea
17+
id: user-story
18+
attributes:
19+
label: User story
20+
description: Here you can phrase your request in a user story format which highlights the added value of the requested plugin.
21+
placeholder: e.g. As a Code PushUp user, I want to <request>, so that <added value>.
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: dependencies
26+
attributes:
27+
label: Dependencies
28+
description: List all added dependencies needed for the plugin (dev-dependencies excluded)
29+
placeholder: e.g. - [ts-morph npm package](https://www.npmjs.com/package/ts-morph)
30+
validations:
31+
required: false
32+
- type: textarea
33+
id: acceptance-criteria
34+
attributes:
35+
label: Acceptance criteria
36+
description: Please list a set of criteria to help us determine whether the scope of the plugin was fully addressed.
37+
placeholder: |
38+
For example:
39+
- [ ] All packages have a comprehensive documentation in place.
40+
- [ ] All unit, integration and e2e tests for the plugin.
41+
- [ ] Cross references to relevant models or files are added as links.
42+
validations:
43+
required: true
44+
- type: textarea
45+
id: implementation-details
46+
attributes:
47+
label: Implementation details
48+
description: If there are any implementation details you would want to point out, feel free to do so here.
49+
placeholder: e.g. A link to a 3rd-party library, relevant article, expected flow details, wireframes highlighting the change or other.

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.10.0
1+
22.14.0

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nodejs 22.10.0
1+
nodejs 22.14.0

CHANGELOG.md

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,143 @@
1+
## 0.64.1 (2025-03-04)
2+
3+
### 🩹 Fixes
4+
5+
- **ci:** always show execute process errors and log stdout if verbose ([b41de478](https://github.com/code-pushup/cli/commit/b41de478))
6+
- **utils:** remove partial from mergeConfigs return type ([69c2ef4c](https://github.com/code-pushup/cli/commit/69c2ef4c))
7+
8+
### ❤️ Thank You
9+
10+
- Matěj Chalk
11+
- Vojtech Masek @vmasek
12+
13+
## 0.64.0 (2025-02-27)
14+
15+
### 🚀 Features
16+
17+
- **ci:** allow refs without shas, fetch if needed ([2ee0a8d1](https://github.com/code-pushup/cli/commit/2ee0a8d1))
18+
19+
### ❤️ Thank You
20+
21+
- Matěj Chalk
22+
23+
## 0.63.0 (2025-02-26)
24+
25+
### 🚀 Features
26+
27+
- **ci:** use temporary file for print-config instead of stdout ([aa4d0b38](https://github.com/code-pushup/cli/commit/aa4d0b38))
28+
- **cli:** add --output=<file> option to print-config command ([a1fde20c](https://github.com/code-pushup/cli/commit/a1fde20c))
29+
30+
### ❤️ Thank You
31+
32+
- Matěj Chalk
33+
34+
## 0.62.0 (2025-02-25)
35+
36+
### 🚀 Features
37+
38+
- log process working directory as cwd if undefined ([a0638f8c](https://github.com/code-pushup/cli/commit/a0638f8c))
39+
40+
### 🩹 Fixes
41+
42+
- **utils:** replace misleading commit labels in markdown diff ([21a1f25d](https://github.com/code-pushup/cli/commit/21a1f25d))
43+
44+
### ❤️ Thank You
45+
46+
- Matěj Chalk
47+
- Vojtech Masek @vmasek
48+
49+
## 0.61.0 (2025-02-19)
50+
51+
### 🚀 Features
52+
53+
- **ci:** disable nx/turbo cache for non-autorun code-pushup commands ([29a1bc63](https://github.com/code-pushup/cli/commit/29a1bc63))
54+
- **models:** do not throw if docs url invalid, treat as missing and log warning ([a54295c6](https://github.com/code-pushup/cli/commit/a54295c6))
55+
56+
### ❤️ Thank You
57+
58+
- Matěj Chalk
59+
60+
## 0.60.2 (2025-02-18)
61+
62+
### 🩹 Fixes
63+
64+
- **ci:** prevent unknown pathspec error for custom base ref ([60dfb5b2](https://github.com/code-pushup/cli/commit/60dfb5b2))
65+
66+
### ❤️ Thank You
67+
68+
- Matěj Chalk
69+
70+
## 0.60.1 (2025-02-18)
71+
72+
### 🩹 Fixes
73+
74+
- add toSorted polyfill as hotfix for bug in github actions runner ([55704d18](https://github.com/code-pushup/cli/commit/55704d18))
75+
- **ci:** prevent ambigious ref when checking head ([f5f226e1](https://github.com/code-pushup/cli/commit/f5f226e1))
76+
77+
### ❤️ Thank You
78+
79+
- Matěj Chalk
80+
- Vojtech Masek @vmasek
81+
82+
## 0.60.0 (2025-02-18)
83+
84+
### 🚀 Features
85+
86+
- **ci:** add skipComment option ([9ac2a6ba](https://github.com/code-pushup/cli/commit/9ac2a6ba))
87+
- **plugin-typescript:** add TS core logic ([#932](https://github.com/code-pushup/cli/pull/932))
88+
- **plugin-typescript:** add plugin logic ([#936](https://github.com/code-pushup/cli/pull/936))
89+
90+
### 🩹 Fixes
91+
92+
- **ci:** ensure head ref is checked out ([74db9023](https://github.com/code-pushup/cli/commit/74db9023))
93+
94+
### ❤️ Thank You
95+
96+
- Matěj Chalk
97+
- Michael Hladky @BioPhoton
98+
99+
## 0.59.0 (2025-02-14)
100+
101+
### 🚀 Features
102+
103+
- **plugin-coverage:** do not halt plugin execution on fail ([23f1ce5c](https://github.com/code-pushup/cli/commit/23f1ce5c))
104+
- **utils:** add string helper ([#916](https://github.com/code-pushup/cli/pull/916))
105+
106+
### 🩹 Fixes
107+
108+
- explicitly exit process with successful code to not leave cli hanging ([2cb815bb](https://github.com/code-pushup/cli/commit/2cb815bb))
109+
110+
### ❤️ Thank You
111+
112+
- Michael Hladky @BioPhoton
113+
- Vojtech Masek @vmasek
114+
115+
## 0.58.0 (2025-02-12)
116+
117+
### 🚀 Features
118+
119+
- **models:** auto-generate JSDoc annotations ([29cf02ad](https://github.com/code-pushup/cli/commit/29cf02ad))
120+
- **plugin-coverage:** support lcovonly option for vitest ([b230a3d2](https://github.com/code-pushup/cli/commit/b230a3d2))
121+
- **plugin-eslint:** add support for custom groups ([#925](https://github.com/code-pushup/cli/pull/925))
122+
- **plugin-jsdocs:** add plugin-jsdocs to analyze documentation in ts/js projects ([#896](https://github.com/code-pushup/cli/pull/896))
123+
- **plugin-typescript:** setup plugin project base ([#917](https://github.com/code-pushup/cli/pull/917))
124+
125+
### 🩹 Fixes
126+
127+
- handle skipped audits and groups ([#911](https://github.com/code-pushup/cli/pull/911))
128+
- fix poppinss version ([#921](https://github.com/code-pushup/cli/pull/921))
129+
- nest files with timestamp for plugin runners ([4ecf9772](https://github.com/code-pushup/cli/commit/4ecf9772))
130+
- **models:** add missing exports ([#918](https://github.com/code-pushup/cli/pull/918))
131+
- **nx-plugin:** deep merge executor options ([#927](https://github.com/code-pushup/cli/pull/927))
132+
133+
### ❤️ Thank You
134+
135+
- Alejandro @aramirezj
136+
- Hanna Skryl @hanna-skryl
137+
- hanna-skryl
138+
- Michael Hladky @BioPhoton
139+
- Vojtech Masek @vmasek
140+
1141
## 0.57.0 (2024-12-17)
2142

3143
### 🚀 Features

code-pushup.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { z } from 'zod';
33
import {
44
coverageCoreConfigNx,
55
eslintCoreConfigNx,
6+
jsDocsCoreConfig,
67
jsPackagesCoreConfig,
78
lighthouseCoreConfig,
89
} from './code-pushup.preset.js';
@@ -39,4 +40,12 @@ export default mergeConfigs(
3940
'https://github.com/code-pushup/cli?tab=readme-ov-file#code-pushup-cli/',
4041
),
4142
await eslintCoreConfigNx(),
43+
jsDocsCoreConfig([
44+
'packages/**/src/**/*.ts',
45+
'!packages/**/node_modules',
46+
'!packages/**/{mocks,mock}',
47+
'!**/*.{spec,test}.ts',
48+
'!**/implementation/**',
49+
'!**/internal/**',
50+
]),
4251
);

code-pushup.preset.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ import eslintPlugin, {
1010
eslintConfigFromNxProject,
1111
} from './packages/plugin-eslint/src/index.js';
1212
import jsPackagesPlugin from './packages/plugin-js-packages/src/index.js';
13+
import jsDocsPlugin, {
14+
JsDocsPluginConfig,
15+
} from './packages/plugin-jsdocs/src/index.js';
16+
import {
17+
PLUGIN_SLUG,
18+
groups,
19+
} from './packages/plugin-jsdocs/src/lib/constants.js';
20+
import { filterGroupsByOnlyAudits } from './packages/plugin-jsdocs/src/lib/utils.js';
1321
import lighthousePlugin, {
1422
lighthouseGroupRef,
1523
} from './packages/plugin-lighthouse/src/index.js';
@@ -82,6 +90,24 @@ export const eslintCategories: CategoryConfig[] = [
8290
},
8391
];
8492

93+
export function getJsDocsCategories(
94+
config: JsDocsPluginConfig,
95+
): CategoryConfig[] {
96+
return [
97+
{
98+
slug: 'docs',
99+
title: 'Documentation',
100+
description: 'Measures how much of your code is **documented**.',
101+
refs: filterGroupsByOnlyAudits(groups, config).map(group => ({
102+
weight: 1,
103+
type: 'group',
104+
plugin: PLUGIN_SLUG,
105+
slug: group.slug,
106+
})),
107+
},
108+
];
109+
}
110+
85111
export const coverageCategories: CategoryConfig[] = [
86112
{
87113
slug: 'code-coverage',
@@ -114,6 +140,19 @@ export const lighthouseCoreConfig = async (
114140
};
115141
};
116142

143+
export const jsDocsCoreConfig = (
144+
config: JsDocsPluginConfig | string[],
145+
): CoreConfig => {
146+
return {
147+
plugins: [
148+
jsDocsPlugin(Array.isArray(config) ? { patterns: config } : config),
149+
],
150+
categories: getJsDocsCategories(
151+
Array.isArray(config) ? { patterns: config } : config,
152+
),
153+
};
154+
};
155+
117156
export const eslintCoreConfigNx = async (
118157
projectName?: string,
119158
): Promise<CoreConfig> => {

e2e/ci-e2e/mocks/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import path from 'node:path';
33
import { fileURLToPath } from 'node:url';
44
import { simpleGit } from 'simple-git';
55
import { nxTargetProject } from '@code-pushup/test-nx-utils';
6-
import { teardownTestFolder } from '@code-pushup/test-setup';
76
import {
87
E2E_ENVIRONMENTS_DIR,
98
TEST_OUTPUT_DIR,
109
initGitRepo,
1110
simulateGitFetch,
11+
teardownTestFolder,
1212
} from '@code-pushup/test-utils';
1313

1414
export type TestRepo = Awaited<ReturnType<typeof setupTestRepo>>;

e2e/ci-e2e/tests/__snapshots__/basic-report-diff.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code PushUp
22

3-
🥳 Code PushUp report has **improved** – compared target commit `<commit-sha>` with source commit `<commit-sha>`.
3+
🥳 Code PushUp report has **improved** – compared current commit `<commit-sha>` with previous commit `<commit-sha>`.
44

55
<details>
66
<summary>👍 <strong>1</strong> audit improved</summary>

e2e/ci-e2e/tests/__snapshots__/npm-workspaces-report-diff.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code PushUp
22

3-
🥳 Code PushUp report has **improved** – compared target commit `<commit-sha>` with source commit `<commit-sha>`.
3+
🥳 Code PushUp report has **improved** – compared current commit `<commit-sha>` with previous commit `<commit-sha>`.
44

55
## 💼 Project `@example/core`
66

e2e/ci-e2e/tests/__snapshots__/nx-monorepo-report-diff.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code PushUp
22

3-
🤨 Code PushUp report has both **improvements and regressions** – compared target commit `<commit-sha>` with source commit `<commit-sha>`.
3+
🤨 Code PushUp report has both **improvements and regressions** – compared current commit `<commit-sha>` with previous commit `<commit-sha>`.
44

55
## 💼 Project `api`
66

0 commit comments

Comments
 (0)