From b312696a8a3ff5f38ed7195d812ebc13e36baae0 Mon Sep 17 00:00:00 2001 From: Craigory Coppola Date: Tue, 9 Nov 2021 12:15:02 -0600 Subject: [PATCH] fix(testing): first generated cypress project should not include tsconfig specification (#7629) Closes #6917 --- .../src/generators/cypress-project/cypress-project.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/cypress/src/generators/cypress-project/cypress-project.ts b/packages/cypress/src/generators/cypress-project/cypress-project.ts index 648e0411f70ea..5f1ee391ee541 100644 --- a/packages/cypress/src/generators/cypress-project/cypress-project.ts +++ b/packages/cypress/src/generators/cypress-project/cypress-project.ts @@ -20,7 +20,10 @@ import { runTasksInSerial } from '@nrwl/workspace/src/utilities/run-tasks-in-ser import { join } from 'path'; // app import { Schema } from './schema'; -import { eslintPluginCypressVersion } from '../../utils/versions'; +import { + cypressVersion, + eslintPluginCypressVersion, +} from '../../utils/versions'; import { filePathPrefix } from '../../utils/project-name'; import { installedCypressVersion } from '../../utils/cypress-version'; @@ -84,7 +87,8 @@ function addProject(tree: Tree, options: CypressProjectSchema) { tags: [], implicitDependencies: options.project ? [options.project] : undefined, }; - if (installedCypressVersion() < 7) { + const detectedCypressVersion = installedCypressVersion() ?? cypressVersion; + if (detectedCypressVersion < 7) { project.targets.e2e.options.tsConfig = joinPathFragments( options.projectRoot, 'tsconfig.json'