From 8b7b1e45a581e0a0edb7d3d3566aa058c0fb93e8 Mon Sep 17 00:00:00 2001 From: Craigory Coppola Date: Wed, 20 Sep 2023 09:06:43 -0400 Subject: [PATCH] chore(testing): move cypress invocations of parseTargetString to pass executor context (#19134) --- packages/cypress/src/executors/cypress/cypress.impl.ts | 2 +- packages/cypress/src/utils/find-target-options.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/cypress/src/executors/cypress/cypress.impl.ts b/packages/cypress/src/executors/cypress/cypress.impl.ts index f351df2080599..01a7fd2c65d77 100644 --- a/packages/cypress/src/executors/cypress/cypress.impl.ts +++ b/packages/cypress/src/executors/cypress/cypress.impl.ts @@ -168,7 +168,7 @@ async function* startDevServer( const parsedDevServerTarget = parseTargetString( opts.devServerTarget, - context.projectGraph + context ); const [targetSupportsWatchOpt] = getValueFromSchema( diff --git a/packages/cypress/src/utils/find-target-options.ts b/packages/cypress/src/utils/find-target-options.ts index c5b8d2a02a1fb..a47f37e941282 100644 --- a/packages/cypress/src/utils/find-target-options.ts +++ b/packages/cypress/src/utils/find-target-options.ts @@ -77,7 +77,8 @@ function findInTarget( options: FindTargetOptions ): TargetConfiguration { const { project, target, configuration } = parseTargetString( - options.buildTarget + options.buildTarget, + graph ); const projectConfig = readProjectConfiguration(tree, project); const executorName = projectConfig?.targets?.[target]?.executor;