Skip to content

Commit 6ad4a13

Browse files
committed
Merge branch 'main' into add-plugin-targets
# Conflicts: # nx.json # package-lock.json
2 parents 1a44ce0 + 7aab96e commit 6ad4a13

28 files changed

Lines changed: 574 additions & 56 deletions

File tree

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,8 @@ Thumbs.db
5151

5252
# Nx workspace cache
5353
.nx
54+
55+
vite.config.*.timestamp*
56+
vitest.config.*.timestamp*
57+
.cursor/rules/nx-rules.mdc
58+
.github/instructions/nx.instructions.md

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
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)
19+
![Type safety](https://api.staging.code-pushup.dev/badges/code-pushup/cli-workspace/type-safety?apiKey=cp_def67c4efe558a9149061d0c62de893e1689ad793071db332790238446173fef)
20+
![Bug prevention](https://api.staging.code-pushup.dev/badges/code-pushup/cli-workspace/bug-prevention?apiKey=cp_def67c4efe558a9149061d0c62de893e1689ad793071db332790238446173fef)
21+
![Code style](https://api.staging.code-pushup.dev/badges/code-pushup/cli-workspace/code-style?apiKey=cp_def67c4efe558a9149061d0c62de893e1689ad793071db332790238446173fef)
22+
![Code coverage](https://api.staging.code-pushup.dev/badges/code-pushup/cli-workspace/code-coverage?apiKey=cp_def67c4efe558a9149061d0c62de893e1689ad793071db332790238446173fef)
23+
![Security](https://api.staging.code-pushup.dev/badges/code-pushup/cli-workspace/security?apiKey=cp_def67c4efe558a9149061d0c62de893e1689ad793071db332790238446173fef)
24+
![Updates](https://api.staging.code-pushup.dev/badges/code-pushup/cli-workspace/updates?apiKey=cp_def67c4efe558a9149061d0c62de893e1689ad793071db332790238446173fef)
25+
![Documentation](https://api.staging.code-pushup.dev/badges/code-pushup/cli-workspace/docs?apiKey=cp_def67c4efe558a9149061d0c62de893e1689ad793071db332790238446173fef)
2626

2727
---
2828

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
teardownTestFolder,
1919
} from '@code-pushup/test-utils';
2020
import { executeProcess, readJsonFile } from '@code-pushup/utils';
21-
import { INLINE_PLUGIN } from './inline-plugin.js';
21+
import { INLINE_PLUGIN } from '../mocks/inline-plugin.js';
2222

2323
async function addTargetToWorkspace(
2424
tree: Tree,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
teardownTestFolder,
1818
} from '@code-pushup/test-utils';
1919
import { executeProcess, readTextFile } from '@code-pushup/utils';
20-
import { INLINE_PLUGIN } from './inline-plugin.js';
20+
import { INLINE_PLUGIN } from '../mocks/inline-plugin.js';
2121

2222
describe('nx-plugin', () => {
2323
let tree: Tree;

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

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,26 @@ exports[`PLUGIN collect report with typescript-plugin NPM package > should run p
5858
"description": "Errors that occur during type checking and type inference",
5959
"details": {
6060
"issues": [
61+
{
62+
"message": "TS2694: Namespace ''./index'' has no exported member 'IOptions'.",
63+
"severity": "error",
64+
"source": {
65+
"file": "node_modules/@types/glob/index.d.ts",
66+
"position": {
67+
"startLine": 29,
68+
},
69+
},
70+
},
71+
{
72+
"message": "TS2724: ''./index'' has no exported member named 'IMinimatch'. Did you mean 'Minimatch'?",
73+
"severity": "error",
74+
"source": {
75+
"file": "node_modules/@types/glob/index.d.ts",
76+
"position": {
77+
"startLine": 74,
78+
},
79+
},
80+
},
6181
{
6282
"message": "TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.",
6383
"severity": "error",
@@ -80,11 +100,11 @@ exports[`PLUGIN collect report with typescript-plugin NPM package > should run p
80100
},
81101
],
82102
},
83-
"displayValue": "2 errors",
103+
"displayValue": "4 errors",
84104
"score": 0,
85105
"slug": "semantic-errors",
86106
"title": "Semantic errors",
87-
"value": 2,
107+
"value": 4,
88108
},
89109
{
90110
"description": "Errors that occur during TypeScript language service operations",

nx.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@
327327
},
328328
"version": {
329329
"conventionalCommits": true,
330-
"generatorOptions": {
330+
"preserveLocalDependencyProtocols": false,
331+
"versionActionsOptions": {
331332
"skipLockFileUpdate": true
332333
}
333334
},

package.json

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"dependencies": {
2525
"@code-pushup/portal-client": "^0.15.0",
2626
"@isaacs/cliui": "^8.0.2",
27-
"@nx/devkit": "19.8.13",
27+
"@nx/devkit": "21.4.1",
2828
"@poppinss/cliui": "6.4.1",
2929
"@swc/helpers": "0.5.13",
3030
"ansis": "^3.3.2",
@@ -36,7 +36,7 @@
3636
"lighthouse": "^12.0.0",
3737
"lighthouse-logger": "2.0.1",
3838
"multi-progress-bars": "^5.0.3",
39-
"nx": "19.8.13",
39+
"nx": "21.4.1",
4040
"parse-lcov": "^1.0.4",
4141
"rimraf": "^6.0.1",
4242
"semver": "^7.6.3",
@@ -57,26 +57,26 @@
5757
"@commitlint/cz-commitlint": "^19.5.0",
5858
"@commitlint/types": "^19.5.0",
5959
"@nodelib/fs.walk": "^2.0.0",
60-
"@nx/eslint-plugin": "19.8.13",
61-
"@nx/js": "19.8.13",
62-
"@nx/plugin": "19.8.13",
63-
"@nx/react": "19.8.13",
64-
"@nx/vite": "19.8.13",
65-
"@nx/workspace": "19.8.13",
66-
"@push-based/nx-verdaccio": "^0.0.0",
60+
"@nx/eslint-plugin": "21.4.1",
61+
"@nx/js": "21.4.1",
62+
"@nx/plugin": "21.4.1",
63+
"@nx/react": "21.4.1",
64+
"@nx/vite": "21.4.1",
65+
"@nx/workspace": "21.4.1",
66+
"@push-based/nx-verdaccio": "0.0.6",
6767
"@swc-node/register": "1.9.2",
68-
"@swc/cli": "0.3.14",
68+
"@swc/cli": "0.6.0",
6969
"@swc/core": "1.5.7",
7070
"@testing-library/jest-dom": "^6.4.2",
71-
"@testing-library/react": "15.0.6",
71+
"@testing-library/react": "16.1.0",
7272
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
7373
"@types/benchmark": "^2.1.5",
7474
"@types/debug": "^4.1.12",
7575
"@types/eslint": "^8.44.2",
7676
"@types/node": "^22.13.4",
7777
"@types/react": "18.3.1",
7878
"@types/react-dom": "18.3.0",
79-
"@vitejs/plugin-react": "4.2.1",
79+
"@vitejs/plugin-react": "^5.0.0",
8080
"@vitest/coverage-v8": "1.3.1",
8181
"@vitest/eslint-plugin": "^1.1.38",
8282
"@vitest/ui": "1.3.1",
@@ -88,19 +88,20 @@
8888
"dotenv": "^16.4.5",
8989
"eslint-import-resolver-typescript": "^3.6.1",
9090
"eslint-plugin-functional": "^7.1.0",
91-
"eslint-plugin-import": "^2.31.0",
91+
"eslint-plugin-import": "2.31.0",
9292
"eslint-plugin-jest-extended": "^3.0.0",
9393
"eslint-plugin-jest-formatting": "^3.1.0",
9494
"eslint-plugin-n": "^17.15.0",
9595
"eslint-plugin-promise": "^7.2.1",
9696
"eslint-plugin-react": "^7.37.2",
97-
"eslint-plugin-react-hooks": "^5.1.0",
97+
"eslint-plugin-react-hooks": "5.0.0",
9898
"eslint-plugin-sonarjs": "^1.0.4",
9999
"eslint-plugin-unicorn": "^56.0.1",
100100
"globals": "^15.13.0",
101101
"husky": "^8.0.0",
102102
"inquirer": "^9.3.7",
103103
"jest-extended": "^6.0.0",
104+
"jiti": "2.4.2",
104105
"jsdom": "~24.0.0",
105106
"jsonc-eslint-parser": "^2.4.0",
106107
"knip": "^5.33.3",
@@ -115,26 +116,26 @@
115116
"tsconfig-paths": "^4.2.0",
116117
"tsx": "^4.19.0",
117118
"type-fest": "^4.26.1",
118-
"typescript": "5.5.4",
119+
"typescript": "5.7.3",
119120
"typescript-eslint": "^8.18.0",
120-
"verdaccio": "^5.32.2",
121-
"vite": "^5.4.8",
121+
"verdaccio": "6.1.6",
122+
"vite": "6.3.5",
122123
"vitest": "1.3.1",
123124
"zod2md": "^0.2.4"
124125
},
125126
"optionalDependencies": {
126-
"@esbuild/darwin-arm64": "^0.19.12",
127-
"@nx/nx-darwin-arm64": "19.8.13",
128-
"@nx/nx-darwin-x64": "19.8.13",
129-
"@nx/nx-linux-x64-gnu": "19.8.13",
127+
"@esbuild/darwin-arm64": "^0.25.9",
128+
"@nx/nx-darwin-arm64": "^21.4.1",
129+
"@nx/nx-darwin-x64": "^21.4.1",
130+
"@nx/nx-linux-x64-gnu": "^21.4.1",
130131
"@rollup/rollup-darwin-arm64": "^4.0.0",
131132
"@rollup/rollup-darwin-x64": "^4.0.0",
132133
"@rollup/rollup-linux-x64-gnu": "^4.0.0",
133134
"@rollup/rollup-win32-x64-msvc": "^4.0.0"
134135
},
135136
"overrides": {
136137
"@beaussan/nx-knip": {
137-
"@nx/devkit": "19 || 18"
138+
"@nx/devkit": "21 || 19 || 18"
138139
}
139140
},
140141
"keywords": [

packages/models/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export { commitSchema, type Commit } from './lib/commit.js';
3434
export {
3535
artifactGenerationCommandSchema,
3636
pluginArtifactOptionsSchema,
37+
type PluginArtifactOptions,
3738
} from './lib/configuration.js';
3839
export { coreConfigSchema, type CoreConfig } from './lib/core-config.js';
3940
export {
@@ -62,6 +63,7 @@ export {
6263
export {
6364
fileNameSchema,
6465
filePathSchema,
66+
globPathSchema,
6567
materialIconSchema,
6668
scoreSchema,
6769
slugSchema,

packages/models/src/lib/configuration.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { z } from 'zod';
2+
import { globPathSchema } from './implementation/schemas.js';
23

34
/**
45
* Generic schema for a tool command configuration, reusable across plugins.
@@ -13,7 +14,9 @@ export const artifactGenerationCommandSchema = z.union([
1314

1415
export const pluginArtifactOptionsSchema = z.object({
1516
generateArtifactsCommand: artifactGenerationCommandSchema.optional(),
16-
artifactsPaths: z.union([z.string(), z.array(z.string()).min(1)]),
17+
artifactsPaths: z
18+
.union([globPathSchema, z.array(globPathSchema).min(1)])
19+
.describe('File paths or glob patterns for artifact files'),
1720
});
1821

1922
export type PluginArtifactOptions = z.infer<typeof pluginArtifactOptionsSchema>;

0 commit comments

Comments
 (0)