|
2 | 2 | "$schema": "./node_modules/nx/schemas/nx-schema.json", |
3 | 3 | "namedInputs": { |
4 | 4 | "default": ["{projectRoot}/**/*", "sharedGlobals"], |
5 | | - "os": [{ "runtime": "node -e \"console.log(require('os').platform())\"" }], |
| 5 | + "os": [ |
| 6 | + { |
| 7 | + "runtime": "node -e \"console.log(require('os').platform())\"" |
| 8 | + } |
| 9 | + ], |
6 | 10 | "production": [ |
7 | 11 | "default", |
8 | 12 | "!{projectRoot}/README.md", |
|
25 | 29 | ], |
26 | 30 | "test-vitest-inputs": [ |
27 | 31 | "os", |
28 | | - { "env": "NX_VERBOSE_LOGGING" }, |
29 | | - { "externalDependencies": ["vitest"] } |
| 32 | + { |
| 33 | + "env": "NX_VERBOSE_LOGGING" |
| 34 | + }, |
| 35 | + { |
| 36 | + "externalDependencies": ["vitest"] |
| 37 | + } |
30 | 38 | ], |
31 | 39 | "lint-eslint-inputs": [ |
32 | 40 | "{workspaceRoot}/eslint.config.js", |
33 | | - { "externalDependencies": ["eslint"] } |
| 41 | + { |
| 42 | + "externalDependencies": ["eslint"] |
| 43 | + } |
34 | 44 | ], |
35 | 45 | "typecheck-typescript-inputs": [ |
36 | 46 | "{workspaceRoot}/tsconfig.base.json", |
37 | | - { "externalDependencies": ["typescript"] } |
| 47 | + { |
| 48 | + "externalDependencies": ["typescript"] |
| 49 | + } |
38 | 50 | ], |
39 | 51 | "code-pushup-inputs": [ |
40 | 52 | "{workspaceRoot}/code-pushup.preset.ts", |
41 | | - { "env": "NODE_OPTIONS" }, |
42 | | - { "env": "TSX_TSCONFIG_PATH" } |
| 53 | + { |
| 54 | + "env": "NODE_OPTIONS" |
| 55 | + }, |
| 56 | + { |
| 57 | + "env": "TSX_TSCONFIG_PATH" |
| 58 | + } |
43 | 59 | ], |
44 | | - "sharedGlobals": [{ "runtime": "node -v" }, { "runtime": "npm -v" }] |
| 60 | + "sharedGlobals": [ |
| 61 | + { |
| 62 | + "runtime": "node -v" |
| 63 | + }, |
| 64 | + { |
| 65 | + "runtime": "npm -v" |
| 66 | + } |
| 67 | + ] |
45 | 68 | }, |
46 | 69 | "targetDefaults": { |
47 | 70 | "lint": { |
|
124 | 147 | }, |
125 | 148 | "code-pushup": { |
126 | 149 | "cache": false, |
127 | | - "executor": "nx:run-commands", |
128 | 150 | "dependsOn": ["code-pushup-*"], |
129 | 151 | "options": { |
130 | | - "command": "node packages/cli/src/index.ts", |
131 | | - "args": [ |
132 | | - "--config={projectRoot}/code-pushup.config.ts", |
133 | | - "--cache.read", |
134 | | - "--persist.outputDir=.code-pushup/{projectName}" |
135 | | - ], |
136 | | - "env": { |
137 | | - "NODE_OPTIONS": "--import tsx", |
138 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 152 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 153 | + "persist": { |
| 154 | + "outputDir": ".code-pushup/{projectName}" |
| 155 | + } |
| 156 | + }, |
| 157 | + "configurations": { |
| 158 | + "print-config": { |
| 159 | + "command": "print-config", |
| 160 | + "output": "{projectRoot}/.code-pushup/code-pushup.config.json" |
139 | 161 | } |
140 | 162 | } |
141 | 163 | }, |
|
146 | 168 | "outputs": [ |
147 | 169 | "{workspaceRoot}/.code-pushup/{projectName}/coverage/runner-output.json" |
148 | 170 | ], |
149 | | - "executor": "nx:run-commands", |
150 | 171 | "options": { |
151 | | - "command": "node packages/cli/src/index.ts collect", |
152 | | - "args": [ |
153 | | - "--config={projectRoot}/code-pushup.config.ts", |
154 | | - "--cache.write", |
155 | | - "--onlyPlugins=coverage", |
156 | | - "--persist.skipReports=true", |
157 | | - "--persist.outputDir=.code-pushup/{projectName}" |
158 | | - ], |
159 | | - "env": { |
160 | | - "NODE_OPTIONS": "--import tsx", |
161 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 172 | + "command": "collect", |
| 173 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 174 | + "onlyPlugins": ["coverage"], |
| 175 | + "persist": { |
| 176 | + "outputDir": ".code-pushup/{projectName}" |
162 | 177 | } |
163 | 178 | } |
164 | 179 | }, |
|
169 | 184 | "outputs": [ |
170 | 185 | "{workspaceRoot}/.code-pushup/{projectName}/eslint/runner-output.json" |
171 | 186 | ], |
172 | | - "executor": "nx:run-commands", |
173 | 187 | "options": { |
174 | | - "command": "node packages/cli/src/index.ts collect", |
175 | | - "args": [ |
176 | | - "--config={projectRoot}/code-pushup.config.ts", |
177 | | - "--cache.write", |
178 | | - "--onlyPlugins=eslint", |
179 | | - "--persist.skipReports", |
180 | | - "--persist.outputDir=.code-pushup/{projectName}" |
181 | | - ], |
182 | | - "env": { |
183 | | - "NODE_OPTIONS": "--import tsx", |
184 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 188 | + "command": "collect", |
| 189 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 190 | + "onlyPlugins": ["eslint"], |
| 191 | + "persist": { |
| 192 | + "outputDir": ".code-pushup/{projectName}" |
185 | 193 | } |
186 | 194 | } |
187 | 195 | }, |
188 | 196 | "code-pushup-js-packages": { |
189 | | - "cache": false, |
| 197 | + "cache": true, |
190 | 198 | "inputs": [ |
191 | 199 | { |
192 | 200 | "runtime": "date +%Y-%m-%d" |
|
195 | 203 | "outputs": [ |
196 | 204 | "{workspaceRoot}/.code-pushup/{projectName}/js-packages/runner-output.json" |
197 | 205 | ], |
198 | | - "executor": "nx:run-commands", |
199 | 206 | "options": { |
200 | | - "command": "node packages/cli/src/index.ts collect", |
201 | | - "args": [ |
202 | | - "--config={projectRoot}/code-pushup.config.ts", |
203 | | - "--onlyPlugins=js-packages", |
204 | | - "--persist.outputDir=.code-pushup/{projectName}" |
205 | | - ], |
206 | | - "env": { |
207 | | - "NODE_OPTIONS": "--import tsx", |
208 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 207 | + "command": "collect", |
| 208 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 209 | + "onlyPlugins": ["js-packages"], |
| 210 | + "persist": { |
| 211 | + "outputDir": ".code-pushup/{projectName}" |
209 | 212 | } |
210 | 213 | } |
211 | 214 | }, |
|
215 | 218 | "outputs": [ |
216 | 219 | "{workspaceRoot}/.code-pushup/{projectName}/lighthouse/runner-output.json" |
217 | 220 | ], |
218 | | - "executor": "nx:run-commands", |
219 | 221 | "options": { |
220 | | - "command": "node packages/cli/src/index.ts collect", |
221 | | - "args": [ |
222 | | - "--config={projectRoot}/code-pushup.config.ts", |
223 | | - "--cache.write", |
224 | | - "--onlyPlugins=lighthouse", |
225 | | - "--persist.skipReports", |
226 | | - "--persist.outputDir=.code-pushup/{projectName}" |
227 | | - ], |
228 | | - "env": { |
229 | | - "NODE_OPTIONS": "--import tsx", |
230 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 222 | + "command": "collect", |
| 223 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 224 | + "onlyPlugins": ["lighthouse"], |
| 225 | + "persist": { |
| 226 | + "outputDir": ".code-pushup/{projectName}" |
231 | 227 | } |
232 | 228 | } |
233 | 229 | }, |
|
241 | 237 | "outputs": [ |
242 | 238 | "{workspaceRoot}/.code-pushup/{projectName}/jsdocs/runner-output.json" |
243 | 239 | ], |
244 | | - "executor": "nx:run-commands", |
245 | 240 | "options": { |
246 | | - "command": "node packages/cli/src/index.ts collect", |
247 | | - "args": [ |
248 | | - "--config={projectRoot}/code-pushup.config.ts", |
249 | | - "--cache.write", |
250 | | - "--onlyPlugins=jsdocs", |
251 | | - "--persist.skipReports", |
252 | | - "--persist.outputDir=.code-pushup/{projectName}" |
253 | | - ], |
254 | | - "env": { |
255 | | - "NODE_OPTIONS": "--import tsx", |
256 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 241 | + "command": "collect", |
| 242 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 243 | + "onlyPlugins": ["jsdocs"], |
| 244 | + "persist": { |
| 245 | + "outputDir": ".code-pushup/{projectName}" |
257 | 246 | } |
258 | 247 | } |
259 | 248 | }, |
|
267 | 256 | "outputs": [ |
268 | 257 | "{workspaceRoot}/.code-pushup/{projectName}/typescript/runner-output.json" |
269 | 258 | ], |
270 | | - "executor": "nx:run-commands", |
271 | 259 | "options": { |
272 | | - "command": "node packages/cli/src/index.ts collect", |
273 | | - "args": [ |
274 | | - "--config={projectRoot}/code-pushup.config.ts", |
275 | | - "--cache.write", |
276 | | - "--onlyPlugins=typescript", |
277 | | - "--persist.skipReports", |
278 | | - "--persist.outputDir=.code-pushup/{projectName}" |
279 | | - ], |
280 | | - "env": { |
281 | | - "NODE_OPTIONS": "--import tsx", |
282 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 260 | + "command": "collect", |
| 261 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 262 | + "onlyPlugins": ["typescript"], |
| 263 | + "persist": { |
| 264 | + "outputDir": ".code-pushup/{projectName}" |
283 | 265 | } |
284 | 266 | } |
285 | 267 | }, |
|
289 | 271 | "outputs": [ |
290 | 272 | "{workspaceRoot}/.code-pushup/{projectName}/axe/runner-output.json" |
291 | 273 | ], |
292 | | - "executor": "nx:run-commands", |
293 | 274 | "options": { |
294 | | - "command": "node packages/cli/src/index.ts collect", |
295 | | - "args": [ |
296 | | - "--config={projectRoot}/code-pushup.config.ts", |
297 | | - "--cache.write", |
298 | | - "--onlyPlugins=axe", |
299 | | - "--persist.outputDir=.code-pushup/{projectName}" |
300 | | - ], |
301 | | - "env": { |
302 | | - "NODE_OPTIONS": "--import tsx", |
303 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 275 | + "command": "collect", |
| 276 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 277 | + "onlyPlugins": ["axe"], |
| 278 | + "persist": { |
| 279 | + "outputDir": ".code-pushup/{projectName}" |
304 | 280 | } |
305 | 281 | } |
306 | 282 | }, |
|
311 | 287 | "packageRoot": "{projectRoot}/dist", |
312 | 288 | "registry": "https://registry.npmjs.org/" |
313 | 289 | } |
| 290 | + }, |
| 291 | + "validate-cp-targets": { |
| 292 | + "executor": "nx:run-commands", |
| 293 | + "cache": false, |
| 294 | + "options": { |
| 295 | + "command": "node tools/scripts/validate-cp-targets.mjs" |
| 296 | + } |
314 | 297 | } |
315 | 298 | }, |
316 | 299 | "workspaceLayout": { |
317 | 300 | "appsDir": "examples", |
318 | 301 | "libsDir": "packages" |
319 | 302 | }, |
| 303 | + "pluginsConfig": { |
| 304 | + "@code-pushup/nx-plugin": { |
| 305 | + "projectPrefix": "cli", |
| 306 | + "bin": "packages/cli/src/index.ts", |
| 307 | + "env": { |
| 308 | + "NODE_OPTIONS": "--import tsx", |
| 309 | + "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 310 | + } |
| 311 | + } |
| 312 | + }, |
320 | 313 | "generators": {}, |
321 | 314 | "release": { |
322 | 315 | "projects": ["packages/*"], |
|
346 | 339 | }, |
347 | 340 | "plugins": [ |
348 | 341 | "./tools/zod2md-jsdocs/src/nx-plugin.ts", |
| 342 | + { |
| 343 | + "plugin": "@code-pushup/nx-plugin", |
| 344 | + "options": { |
| 345 | + "targetName": "code-pushup", |
| 346 | + "projectPrefix": "cli" |
| 347 | + }, |
| 348 | + "exclude": ["tools/**", "testing/**", "examples/**"] |
| 349 | + }, |
| 350 | + { |
| 351 | + "plugin": "@code-pushup/nx-plugin", |
| 352 | + "options": { |
| 353 | + "targetName": "code-pushup-coverage" |
| 354 | + }, |
| 355 | + "exclude": ["tools/**", "testing/**", "examples/**"] |
| 356 | + }, |
| 357 | + { |
| 358 | + "plugin": "@code-pushup/nx-plugin", |
| 359 | + "options": { |
| 360 | + "targetName": "code-pushup-eslint" |
| 361 | + }, |
| 362 | + "exclude": ["testing/**", "examples/**"] |
| 363 | + }, |
| 364 | + { |
| 365 | + "plugin": "@code-pushup/nx-plugin", |
| 366 | + "options": { |
| 367 | + "targetName": "code-pushup-typescript" |
| 368 | + }, |
| 369 | + "exclude": [ |
| 370 | + "packages/models/**", |
| 371 | + "packages/plugin-lighthouse", |
| 372 | + "packages/plugin-js-packages", |
| 373 | + "tools/**", |
| 374 | + "testing/**", |
| 375 | + "examples/**" |
| 376 | + ] |
| 377 | + }, |
| 378 | + { |
| 379 | + "plugin": "@code-pushup/nx-plugin", |
| 380 | + "options": { |
| 381 | + "targetName": "code-pushup-jsdocs" |
| 382 | + }, |
| 383 | + "exclude": [ |
| 384 | + "packages/models", |
| 385 | + "packages/plugin-lighthouse", |
| 386 | + "tools/**", |
| 387 | + "testing/**", |
| 388 | + "examples/**" |
| 389 | + ] |
| 390 | + }, |
| 391 | + { |
| 392 | + "plugin": "@code-pushup/nx-plugin", |
| 393 | + "options": { |
| 394 | + "targetName": "code-pushup-js-packages" |
| 395 | + }, |
| 396 | + "exclude": ["packages/**", "tools/**", "testing/**", "examples/**"] |
| 397 | + }, |
| 398 | + { |
| 399 | + "plugin": "@code-pushup/nx-plugin", |
| 400 | + "options": { |
| 401 | + "targetName": "code-pushup-lighthouse" |
| 402 | + }, |
| 403 | + "exclude": ["packages/**", "tools/**", "testing/**", "examples/**"] |
| 404 | + }, |
| 405 | + { |
| 406 | + "plugin": "@code-pushup/nx-plugin", |
| 407 | + "options": { |
| 408 | + "targetName": "code-pushup-axe" |
| 409 | + }, |
| 410 | + "exclude": ["packages/**", "tools/**", "testing/**", "examples/**"] |
| 411 | + }, |
349 | 412 | { |
350 | 413 | "plugin": "@push-based/nx-verdaccio", |
351 | 414 | "options": { |
|
0 commit comments