File tree Expand file tree Collapse file tree 5 files changed +23
-26
lines changed
Expand file tree Collapse file tree 5 files changed +23
-26
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ describe('nx-plugin', () => {
229229 } ) ;
230230
231231 it ( 'should consider plugin option projectPrefix in executor target' , async ( ) => {
232- const cwd = path . join ( testFileDir , 'configuration-option-bin ' ) ;
232+ const cwd = path . join ( testFileDir , 'configuration-option-projectPrefix ' ) ;
233233 registerPluginInWorkspace ( tree , {
234234 plugin : '@code-pushup/nx-plugin' ,
235235 options : {
Original file line number Diff line number Diff line change 1+ import type { CreateNodesV2 , NxPlugin } from '@nx/devkit' ;
12import { createNodes , createNodesV2 } from './plugin/index.js' ;
23
3- // default export for nx.json#plugins
4- const plugin = {
5- name : '@code-pushup/nx-plugin' ,
6- createNodesV2,
7- // Keep for backwards compatibility with Nx < 21
8- createNodes,
9- } ;
10-
11- export default plugin ;
12-
4+ export { createNodes , createNodesV2 } from './plugin/index.js' ;
135export type { AutorunCommandExecutorOptions } from './executors/cli/schema.js' ;
146export { objectToCliArgs } from './executors/internal/cli.js' ;
157export { generateCodePushupConfig } from './generators/configuration/code-pushup-config.js' ;
@@ -22,4 +14,9 @@ export {
2214 type ProcessConfig ,
2315} from './internal/execute-process.js' ;
2416export * from './internal/versions.js' ;
25- export { createNodes , createNodesV2 } from './plugin/index.js' ;
17+
18+ export default {
19+ name : 'code-pushup' ,
20+ createNodesV2 : createNodesV2 as CreateNodesV2 ,
21+ createNodes,
22+ } satisfies NxPlugin ;
Original file line number Diff line number Diff line change 1+ import { NxPlugin } from '@nx/devkit' ;
2+ import { createNodesV2 } from './plugin.js' ;
3+
14export { createNodes , createNodesV2 } from './plugin.js' ;
25export type { CreateNodesOptions } from './types.js' ;
6+
7+ const plugin = {
8+ createNodesV2,
9+ name : 'code-pushup-nx-plugin' ,
10+ } satisfies NxPlugin ;
11+
12+ export default plugin ;
Original file line number Diff line number Diff line change @@ -43,10 +43,11 @@ export const createNodesV2: CreateNodesV2<CreateNodesOptions> = [
4343 `**/${ PROJECT_JSON_FILE_NAME } ` ,
4444 async (
4545 projectConfigurationFiles : readonly string [ ] ,
46- createNodesOptions : unknown ,
46+ createNodesOptions : CreateNodesOptions | undefined ,
4747 context : CreateNodesContextV2 ,
4848 ) : Promise < CreateNodesResultV2 > => {
49- const parsedCreateNodesOptions = createNodesOptions as CreateNodesOptions ;
49+ const parsedCreateNodesOptions =
50+ ( createNodesOptions as CreateNodesOptions ) ?? { } ;
5051
5152 return await Promise . all (
5253 projectConfigurationFiles . map ( async projectConfigurationFile => {
Original file line number Diff line number Diff line change 11{
22 "name" : " cli-workspace" ,
33 "$schema" : " node_modules/nx/schemas/project-schema.json" ,
4- "targets" : {
5- "code-pushup" : {
6- "executor" : " nx:run-commands" ,
7- "options" : {
8- "command" : " node packages/cli/src/index.ts --no-progress --verbose" ,
9- "env" : {
10- "NODE_OPTIONS" : " --import tsx" ,
11- "TSX_TSCONFIG_PATH" : " tsconfig.base.json"
12- }
13- }
14- }
15- }
4+ "targets" : {}
165}
You can’t perform that action at this time.
0 commit comments