|
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": { |
|
123 | 146 | }, |
124 | 147 | "code-pushup": { |
125 | 148 | "cache": false, |
126 | | - "executor": "nx:run-commands", |
127 | 149 | "dependsOn": ["code-pushup-*"], |
128 | 150 | "options": { |
129 | | - "command": "node packages/cli/src/index.ts", |
130 | | - "args": [ |
131 | | - "--config={projectRoot}/code-pushup.config.ts", |
132 | | - "--cache.read", |
133 | | - "--persist.outputDir=.code-pushup/{projectName}" |
134 | | - ], |
135 | | - "env": { |
136 | | - "NODE_OPTIONS": "--import tsx", |
137 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 151 | + "command": "autorun", |
| 152 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 153 | + "persist": { |
| 154 | + "outputDir": ".code-pushup/{projectName}" |
138 | 155 | } |
139 | 156 | } |
140 | 157 | }, |
141 | 158 | "code-pushup-coverage": { |
| 159 | + "executor": "@code-pushup/nx-plugin:cli", |
142 | 160 | "dependsOn": ["*-test"], |
143 | 161 | "cache": true, |
144 | 162 | "inputs": ["default", "code-pushup-inputs"], |
145 | 163 | "outputs": [ |
146 | 164 | "{workspaceRoot}/.code-pushup/{projectName}/coverage/runner-output.json" |
147 | 165 | ], |
148 | | - "executor": "nx:run-commands", |
149 | 166 | "options": { |
150 | | - "command": "node packages/cli/src/index.ts collect", |
151 | | - "args": [ |
152 | | - "--config={projectRoot}/code-pushup.config.ts", |
153 | | - "--cache.write", |
154 | | - "--onlyPlugins=coverage", |
155 | | - "--persist.skipReports=true", |
156 | | - "--persist.outputDir=.code-pushup/{projectName}" |
157 | | - ], |
158 | | - "env": { |
159 | | - "NODE_OPTIONS": "--import tsx", |
160 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 167 | + "command": "collect", |
| 168 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 169 | + "onlyPlugins": ["coverage"], |
| 170 | + "persist": { |
| 171 | + "outputDir": ".code-pushup/{projectName}" |
161 | 172 | } |
162 | 173 | } |
163 | 174 | }, |
164 | 175 | "code-pushup-eslint": { |
| 176 | + "executor": "@code-pushup/nx-plugin:cli", |
165 | 177 | "dependsOn": ["lint"], |
166 | 178 | "cache": true, |
167 | 179 | "inputs": ["default", "code-pushup-inputs"], |
168 | 180 | "outputs": [ |
169 | 181 | "{workspaceRoot}/.code-pushup/{projectName}/eslint/runner-output.json" |
170 | 182 | ], |
171 | | - "executor": "nx:run-commands", |
172 | 183 | "options": { |
173 | | - "command": "node packages/cli/src/index.ts collect", |
174 | | - "args": [ |
175 | | - "--config={projectRoot}/code-pushup.config.ts", |
176 | | - "--cache.write", |
177 | | - "--onlyPlugins=eslint", |
178 | | - "--persist.skipReports", |
179 | | - "--persist.outputDir=.code-pushup/{projectName}" |
180 | | - ], |
181 | | - "env": { |
182 | | - "NODE_OPTIONS": "--import tsx", |
183 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 184 | + "command": "collect", |
| 185 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 186 | + "onlyPlugins": ["eslint"], |
| 187 | + "persist": { |
| 188 | + "outputDir": ".code-pushup/{projectName}" |
184 | 189 | } |
185 | 190 | } |
186 | 191 | }, |
187 | 192 | "code-pushup-js-packages": { |
| 193 | + "executor": "@code-pushup/nx-plugin:cli", |
188 | 194 | "cache": false, |
189 | 195 | "inputs": [ |
190 | 196 | { |
|
194 | 200 | "outputs": [ |
195 | 201 | "{workspaceRoot}/.code-pushup/{projectName}/js-packages/runner-output.json" |
196 | 202 | ], |
197 | | - "executor": "nx:run-commands", |
198 | 203 | "options": { |
199 | | - "command": "node packages/cli/src/index.ts collect", |
200 | | - "args": [ |
201 | | - "--config={projectRoot}/code-pushup.config.ts", |
202 | | - "--onlyPlugins=js-packages", |
203 | | - "--persist.outputDir=.code-pushup/{projectName}" |
204 | | - ], |
205 | | - "env": { |
206 | | - "NODE_OPTIONS": "--import tsx", |
207 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 204 | + "command": "collect", |
| 205 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 206 | + "onlyPlugins": ["js-packages"], |
| 207 | + "persist": { |
| 208 | + "outputDir": ".code-pushup/{projectName}" |
208 | 209 | } |
209 | 210 | } |
210 | 211 | }, |
211 | 212 | "code-pushup-lighthouse": { |
| 213 | + "executor": "@code-pushup/nx-plugin:cli", |
212 | 214 | "cache": true, |
213 | 215 | "inputs": ["production", "^production", "code-pushup-inputs"], |
214 | 216 | "outputs": [ |
215 | 217 | "{workspaceRoot}/.code-pushup/{projectName}/lighthouse/runner-output.json" |
216 | 218 | ], |
217 | | - "executor": "nx:run-commands", |
218 | 219 | "options": { |
219 | | - "command": "node packages/cli/src/index.ts collect", |
220 | | - "args": [ |
221 | | - "--config={projectRoot}/code-pushup.config.ts", |
222 | | - "--cache.write", |
223 | | - "--onlyPlugins=lighthouse", |
224 | | - "--persist.skipReports", |
225 | | - "--persist.outputDir=.code-pushup/{projectName}" |
226 | | - ], |
227 | | - "env": { |
228 | | - "NODE_OPTIONS": "--import tsx", |
229 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 220 | + "command": "collect", |
| 221 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 222 | + "onlyPlugins": ["lighthouse"], |
| 223 | + "persist": { |
| 224 | + "outputDir": ".code-pushup/{projectName}" |
230 | 225 | } |
231 | 226 | } |
232 | 227 | }, |
233 | 228 | "code-pushup-jsdocs": { |
| 229 | + "executor": "@code-pushup/nx-plugin:cli", |
234 | 230 | "cache": true, |
235 | 231 | "inputs": [ |
236 | 232 | "default", |
|
240 | 236 | "outputs": [ |
241 | 237 | "{workspaceRoot}/.code-pushup/{projectName}/jsdocs/runner-output.json" |
242 | 238 | ], |
243 | | - "executor": "nx:run-commands", |
244 | 239 | "options": { |
245 | | - "command": "node packages/cli/src/index.ts collect", |
246 | | - "args": [ |
247 | | - "--config={projectRoot}/code-pushup.config.ts", |
248 | | - "--cache.write", |
249 | | - "--onlyPlugins=jsdocs", |
250 | | - "--persist.skipReports", |
251 | | - "--persist.outputDir=.code-pushup/{projectName}" |
252 | | - ], |
253 | | - "env": { |
254 | | - "NODE_OPTIONS": "--import tsx", |
255 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 240 | + "command": "collect", |
| 241 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 242 | + "onlyPlugins": ["jsdocs"], |
| 243 | + "persist": { |
| 244 | + "outputDir": ".code-pushup/{projectName}" |
256 | 245 | } |
257 | 246 | } |
258 | 247 | }, |
259 | 248 | "code-pushup-typescript": { |
| 249 | + "executor": "@code-pushup/nx-plugin:cli", |
260 | 250 | "cache": true, |
261 | 251 | "inputs": [ |
262 | 252 | "default", |
|
266 | 256 | "outputs": [ |
267 | 257 | "{workspaceRoot}/.code-pushup/{projectName}/typescript/runner-output.json" |
268 | 258 | ], |
269 | | - "executor": "nx:run-commands", |
270 | 259 | "options": { |
271 | | - "command": "node packages/cli/src/index.ts collect", |
272 | | - "args": [ |
273 | | - "--config={projectRoot}/code-pushup.config.ts", |
274 | | - "--cache.write", |
275 | | - "--onlyPlugins=typescript", |
276 | | - "--persist.skipReports", |
277 | | - "--persist.outputDir=.code-pushup/{projectName}" |
278 | | - ], |
279 | | - "env": { |
280 | | - "NODE_OPTIONS": "--import tsx", |
281 | | - "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}" |
282 | 265 | } |
283 | 266 | } |
284 | 267 | }, |
285 | 268 | "code-pushup-axe": { |
| 269 | + "executor": "@code-pushup/nx-plugin:cli", |
286 | 270 | "cache": true, |
287 | 271 | "inputs": ["default", "code-pushup-inputs"], |
288 | 272 | "outputs": [ |
289 | 273 | "{workspaceRoot}/.code-pushup/{projectName}/axe/runner-output.json" |
290 | 274 | ], |
291 | | - "executor": "nx:run-commands", |
292 | 275 | "options": { |
293 | | - "command": "node packages/cli/src/index.ts collect", |
294 | | - "args": [ |
295 | | - "--config={projectRoot}/code-pushup.config.ts", |
296 | | - "--cache.write", |
297 | | - "--onlyPlugins=axe", |
298 | | - "--persist.outputDir=.code-pushup/{projectName}" |
299 | | - ], |
300 | | - "env": { |
301 | | - "NODE_OPTIONS": "--import tsx", |
302 | | - "TSX_TSCONFIG_PATH": "tsconfig.base.json" |
| 276 | + "command": "collect", |
| 277 | + "config": "{projectRoot}/code-pushup.config.ts", |
| 278 | + "onlyPlugins": ["axe"], |
| 279 | + "persist": { |
| 280 | + "outputDir": ".code-pushup/{projectName}" |
303 | 281 | } |
304 | 282 | } |
305 | 283 | }, |
|
310 | 288 | "packageRoot": "{projectRoot}/dist", |
311 | 289 | "registry": "https://registry.npmjs.org/" |
312 | 290 | } |
| 291 | + }, |
| 292 | + "validate-cp-targets": { |
| 293 | + "executor": "nx:run-commands", |
| 294 | + "cache": false, |
| 295 | + "options": { |
| 296 | + "command": "node tools/scripts/validate-cp-targets.mjs" |
| 297 | + } |
313 | 298 | } |
314 | 299 | }, |
315 | 300 | "workspaceLayout": { |
|
344 | 329 | "releaseTagPattern": "v{version}" |
345 | 330 | }, |
346 | 331 | "plugins": [ |
347 | | - "@code-pushup/nx-plugin", |
| 332 | + { |
| 333 | + "plugin": "@code-pushup/nx-plugin", |
| 334 | + "options": { |
| 335 | + "targetName": "code-pushup" |
| 336 | + }, |
| 337 | + "exclude": ["tools/**", "testing/**", "examples/**"] |
| 338 | + }, |
| 339 | + { |
| 340 | + "plugin": "@code-pushup/nx-plugin", |
| 341 | + "options": { |
| 342 | + "targetName": "code-pushup-coverage" |
| 343 | + }, |
| 344 | + "exclude": ["tools/**", "testing/**", "examples/**"] |
| 345 | + }, |
| 346 | + { |
| 347 | + "plugin": "@code-pushup/nx-plugin", |
| 348 | + "options": { |
| 349 | + "targetName": "code-pushup-eslint" |
| 350 | + }, |
| 351 | + "exclude": ["testing/**", "examples/**"] |
| 352 | + }, |
| 353 | + { |
| 354 | + "plugin": "@code-pushup/nx-plugin", |
| 355 | + "options": { |
| 356 | + "targetName": "code-pushup-typescript" |
| 357 | + }, |
| 358 | + "exclude": [ |
| 359 | + "packages/models/**", |
| 360 | + "packages/plugin-lighthouse", |
| 361 | + "packages/plugin-js-packages", |
| 362 | + "tools/**", |
| 363 | + "testing/**", |
| 364 | + "examples/**" |
| 365 | + ] |
| 366 | + }, |
| 367 | + { |
| 368 | + "plugin": "@code-pushup/nx-plugin", |
| 369 | + "options": { |
| 370 | + "targetName": "code-pushup-jsdocs" |
| 371 | + }, |
| 372 | + "exclude": [ |
| 373 | + "packages/models", |
| 374 | + "packages/plugin-lighthouse", |
| 375 | + "tools/**", |
| 376 | + "testing/**", |
| 377 | + "examples/**" |
| 378 | + ] |
| 379 | + }, |
| 380 | + { |
| 381 | + "plugin": "@code-pushup/nx-plugin", |
| 382 | + "options": { |
| 383 | + "targetName": "code-pushup-js-packages" |
| 384 | + }, |
| 385 | + "exclude": ["packages/**", "tools/**", "testing/**", "examples/**"] |
| 386 | + }, |
| 387 | + { |
| 388 | + "plugin": "@code-pushup/nx-plugin", |
| 389 | + "options": { |
| 390 | + "targetName": "code-pushup-lighthouse" |
| 391 | + }, |
| 392 | + "exclude": ["packages/**", "tools/**", "testing/**", "examples/**"] |
| 393 | + }, |
| 394 | + { |
| 395 | + "plugin": "@code-pushup/nx-plugin", |
| 396 | + "options": { |
| 397 | + "targetName": "code-pushup-axe" |
| 398 | + }, |
| 399 | + "exclude": ["packages/**", "tools/**", "testing/**", "examples/**"] |
| 400 | + }, |
348 | 401 | { |
349 | 402 | "plugin": "@push-based/nx-verdaccio", |
350 | 403 | "options": { |
|
0 commit comments