Skip to content

Commit 581911f

Browse files
committed
Merge branch 'main' into plugin-bundle-stats-poc
2 parents 4b8ef07 + ed01057 commit 581911f

Some content is hidden

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

60 files changed

+2708
-262
lines changed

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
## 0.69.5 (2025-07-11)
2+
3+
### 🩹 Fixes
4+
5+
- **plugin-js-packages:** include url for outdated packages in modern yarn ([297766d1](https://github.com/code-pushup/cli/commit/297766d1))
6+
- **plugin-js-packages:** include transitive dependencies in audit for modern yarn ([8e285e93](https://github.com/code-pushup/cli/commit/8e285e93))
7+
8+
### ❤️ Thank You
9+
10+
- Matěj Chalk
11+
12+
## 0.69.4 (2025-07-09)
13+
14+
### 🩹 Fixes
15+
16+
- **plugin-js-packages:** parse yarn 4 audit output correctly ([8041d870](https://github.com/code-pushup/cli/commit/8041d870))
17+
18+
### ❤️ Thank You
19+
20+
- Matěj Chalk
21+
22+
## 0.69.3 (2025-07-07)
23+
24+
### 🩹 Fixes
25+
26+
- **plugin-js-packages:** prevent negative scores in yarn v2+ workspaces ([b6f96330](https://github.com/code-pushup/cli/commit/b6f96330))
27+
28+
### ❤️ Thank You
29+
30+
- Matěj Chalk
31+
132
## 0.69.2 (2025-06-16)
233

334
### 🩹 Fixes

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616

1717
---
1818

19+
![Type safety](https://api.staging.code-pushup.dev/badges/code-pushup/cli/type-safety?apiKey=cp_def67c4efe558a9149061d0c62de893e1689ad793071db332790238446173fef)
20+
![Bug prevention](https://api.staging.code-pushup.dev/badges/code-pushup/cli/bug-prevention?apiKey=cp_def67c4efe558a9149061d0c62de893e1689ad793071db332790238446173fef)
21+
![Code style](https://api.staging.code-pushup.dev/badges/code-pushup/cli/code-style?apiKey=cp_def67c4efe558a9149061d0c62de893e1689ad793071db332790238446173fef)
22+
![Code coverage](https://api.staging.code-pushup.dev/badges/code-pushup/cli/code-coverage?apiKey=cp_def67c4efe558a9149061d0c62de893e1689ad793071db332790238446173fef)
23+
![Security](https://api.staging.code-pushup.dev/badges/code-pushup/cli/security?apiKey=cp_def67c4efe558a9149061d0c62de893e1689ad793071db332790238446173fef)
24+
![Updates](https://api.staging.code-pushup.dev/badges/code-pushup/cli/updates?apiKey=cp_def67c4efe558a9149061d0c62de893e1689ad793071db332790238446173fef)
25+
![Documentation](https://api.staging.code-pushup.dev/badges/code-pushup/cli/docs?apiKey=cp_def67c4efe558a9149061d0c62de893e1689ad793071db332790238446173fef)
26+
27+
---
28+
1929
### 🔌 Code quality tools are like phone chargers. Everyone has a different plug.
2030

2131
_Common problems with keeping track of technical quality:_

code-pushup.preset.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ import {
2020
} from './packages/plugin-jsdocs/src/lib/constants.js';
2121
import { filterGroupsByOnlyAudits } from './packages/plugin-jsdocs/src/lib/utils.js';
2222
import lighthousePlugin, {
23+
type LighthouseUrls,
2324
lighthouseGroupRef,
25+
mergeLighthouseCategories,
2426
} from './packages/plugin-lighthouse/src/index.js';
2527
import typescriptPlugin, {
2628
type TypescriptPluginOptions,
@@ -135,11 +137,14 @@ export const jsPackagesCoreConfig = async (): Promise<CoreConfig> => ({
135137
});
136138

137139
export const lighthouseCoreConfig = async (
138-
url: string,
139-
): Promise<CoreConfig> => ({
140-
plugins: [await lighthousePlugin(url)],
141-
categories: lighthouseCategories,
142-
});
140+
urls: LighthouseUrls,
141+
): Promise<CoreConfig> => {
142+
const lhPlugin = await lighthousePlugin(urls);
143+
return {
144+
plugins: [lhPlugin],
145+
categories: mergeLighthouseCategories(lhPlugin, lighthouseCategories),
146+
};
147+
};
143148

144149
export const jsDocsCoreConfig = (
145150
config: JsDocsPluginConfig | string[],

e2e/plugin-lighthouse-e2e/tests/__snapshots__/collect.e2e.test.ts.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ exports[`PLUGIN collect report with lighthouse-plugin NPM package > should run p
7777
"title": "Document has a valid \`hreflang\`",
7878
},
7979
],
80+
"context": {
81+
"urlCount": 1,
82+
"weights": {
83+
"1": 1,
84+
},
85+
},
8086
"groups": [
8187
{
8288
"refs": [

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.69.2",
3+
"version": "0.69.5",
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,8 +26,8 @@
2626
},
2727
"type": "module",
2828
"dependencies": {
29-
"@code-pushup/models": "0.69.2",
30-
"@code-pushup/utils": "0.69.2",
29+
"@code-pushup/models": "0.69.5",
30+
"@code-pushup/utils": "0.69.5",
3131
"glob": "^11.0.1",
3232
"simple-git": "^3.20.0",
3333
"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.69.2",
3+
"version": "0.69.5",
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.69.2",
49-
"@code-pushup/core": "0.69.2",
50-
"@code-pushup/utils": "0.69.2",
48+
"@code-pushup/models": "0.69.5",
49+
"@code-pushup/core": "0.69.5",
50+
"@code-pushup/utils": "0.69.5",
5151
"yargs": "^17.7.2",
5252
"ansis": "^3.3.0",
5353
"simple-git": "^3.20.0"

packages/cli/src/lib/implementation/filter.middleware.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,13 @@ function applyPluginFilters(
116116
options: Pick<FilterOptions, 'skipPlugins' | 'onlyPlugins'>,
117117
): CoreConfig['plugins'] {
118118
const { skipPlugins = [], onlyPlugins = [] } = options;
119-
const filteredPlugins = filterPluginsFromCategories({
120-
categories,
121-
plugins,
122-
});
119+
const filteredPlugins =
120+
onlyPlugins.length === 0
121+
? filterPluginsFromCategories({
122+
categories,
123+
plugins,
124+
})
125+
: plugins;
123126
if (skipPlugins.length === 0 && onlyPlugins.length === 0) {
124127
return filteredPlugins;
125128
}

packages/cli/src/lib/implementation/filter.middleware.unit.test.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,44 @@ describe('filterMiddleware', () => {
414414
),
415415
);
416416
});
417+
418+
it('should allow onlyPlugins to include plugins not referenced by categories', () => {
419+
const { plugins } = filterMiddleware({
420+
plugins: [
421+
{
422+
slug: 'p1',
423+
audits: [{ slug: 'a1-p1', isSkipped: false }],
424+
groups: [
425+
{
426+
slug: 'g1-p1',
427+
refs: [{ slug: 'a1-p1', weight: 1 }],
428+
isSkipped: false,
429+
},
430+
],
431+
},
432+
{
433+
slug: 'p2',
434+
audits: [{ slug: 'a1-p2', isSkipped: false }],
435+
groups: [
436+
{
437+
slug: 'g1-p2',
438+
refs: [{ slug: 'a1-p2', weight: 1 }],
439+
isSkipped: false,
440+
},
441+
],
442+
},
443+
] as PluginConfig[],
444+
categories: [
445+
{
446+
slug: 'c1',
447+
refs: [{ type: 'group', plugin: 'p1', slug: 'g1-p1', weight: 1 }],
448+
},
449+
] as CategoryConfig[],
450+
onlyPlugins: ['p2'],
451+
});
452+
453+
expect(plugins.map(plugin => plugin.slug)).toStrictEqual(['p2']);
454+
});
417455
});
418456

419457
describe('filterSkippedInPlugins', () => {

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.69.2",
3+
"version": "0.69.5",
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.69.2",
43-
"@code-pushup/utils": "0.69.2",
42+
"@code-pushup/models": "0.69.5",
43+
"@code-pushup/utils": "0.69.5",
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.69.2",
3+
"version": "0.69.5",
44
"license": "MIT",
55
"bin": "index.js",
66
"homepage": "https://github.com/code-pushup/cli/tree/main/packages/create-cli#readme",
@@ -26,7 +26,7 @@
2626
},
2727
"type": "module",
2828
"dependencies": {
29-
"@code-pushup/nx-plugin": "0.69.2",
30-
"@code-pushup/utils": "0.69.2"
29+
"@code-pushup/nx-plugin": "0.69.5",
30+
"@code-pushup/utils": "0.69.5"
3131
}
3232
}

0 commit comments

Comments
 (0)