Skip to content

Commit

Permalink
fix(core): set the right project graph node type for e2e project with…
Browse files Browse the repository at this point in the history
… name e2e
  • Loading branch information
leosvelperez committed Nov 25, 2022
1 parent f0fc786 commit d4f7c17
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions packages/nx/src/project-graph/build-nodes/workspace-projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import { ProjectGraphBuilder } from '../project-graph-builder';
import { PackageJson } from '../../utils/package-json';
import { readJsonFile } from '../../utils/fileutils';
import { NxJsonConfiguration } from '../../config/nx-json';
import { TargetConfiguration } from '../../config/workspace-json-project-json';
import {
ProjectType,
TargetConfiguration,
} from '../../config/workspace-json-project-json';
import { NX_PREFIX } from '../../utils/logger';

export function buildWorkspaceProjectNodes(
Expand Down Expand Up @@ -51,12 +54,14 @@ export function buildWorkspaceProjectNodes(
loadNxPlugins(ctx.workspace.plugins)
);

const projectType =
p.projectType === 'application'
? key.endsWith('-e2e')
? 'e2e'
: 'app'
: 'lib';
// TODO: remove in v16
let projectType: ProjectType | 'e2e' = p.projectType;
if (
p.projectType === 'application' &&
(key.endsWith('-e2e') || key === 'e2e')
) {
projectType = 'e2e';
}
const tags =
ctx.workspace.projects && ctx.workspace.projects[key]
? ctx.workspace.projects[key].tags || []
Expand Down

0 comments on commit d4f7c17

Please sign in to comment.