Skip to content

Commit 8a942d9

Browse files
mungodewarAgentEnderleosvelperez
authored
fix(testing): include config file path in plugin hash calculation (#35346)
## Current Behavior The createNodesV2 function in the nx/cypress plugin calculates the hash based only on the output of the standard `calculateHashForCreateNodes`. This means that when multiple Cypress configuration files exist within a single application hash. As a result, only one set of inferred targets is generated, and the additional configuration variants are effectively ignored. ## Expected Behavior The createNodesV2 function now takes the configuration file name into the hash calculation, removing the limitation of a single config within an application. --------- Co-authored-by: Craigory Coppola <[email protected]> Co-authored-by: Leosvel Pérez Espinosa <[email protected]>
1 parent 4c11b62 commit 8a942d9

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

packages/cypress/src/plugins/plugin.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,10 @@ async function createNodesInternal(
8989
return {};
9090
}
9191

92-
const hash = await calculateHashForCreateNodes(
93-
projectRoot,
94-
options,
95-
context,
96-
[getLockFileName(detectPackageManager(context.workspaceRoot))]
97-
);
92+
const hash =
93+
(await calculateHashForCreateNodes(projectRoot, options, context, [
94+
getLockFileName(detectPackageManager(context.workspaceRoot)),
95+
])) + configFilePath;
9896

9997
if (!pluginCache.has(hash)) {
10098
pluginCache.set(

0 commit comments

Comments
 (0)