You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
notice @lmiller1990/cypress-ct-solid-js is in the root node_modules
cd packages/foo
yarn cypress open
Select CT
Notice Solid.js is NOT shown in the list
Problem is we can't just require.resolve - we first need to find all node_modules matching the cypress-ct- glob. We currently do this by globbing the projectRoot - that's where the Cypress project is currently, so in this case it'll be packages/foo/node_modules/cypress-ct-*. Code here:
We need to recursively check up to the workspace root, I think - how you identify this, I'm not sure (eg if we are in an Nx repo, how to know the top level? Yarn monorepo? Other type of repo)?
Cypress Version
12.7.0
Node version
v16.17
Operating System
All
Debug Logs
n/a
Other
n/a
The text was updated successfully, but these errors were encountered:
use findUp to get a list of all of the node_modules directories inside a project (could stop the search once the module has detected the git root or the location Cypress was launched from - we can say this is the top level for a project/monorepo). Then we could loop through the resulting node_modules and apply our cypress-ct-* glob against the discovered node_module directories.
Current behavior
Cypress does not resolve CT Framework Definition correctly in monorepos with hoisted modules.
Desired behavior
Should correctly resolve.
Test code to reproduce
Use a monorepo, eg https://github.com/lmiller1990/ct-monorepo-bug
@lmiller1990/cypress-ct-solid-js
is in the root node_modulescd packages/foo
yarn cypress open
Problem is we can't just
require.resolve
- we first need to find all node_modules matching thecypress-ct-
glob. We currently do this by globbing the projectRoot - that's where the Cypress project is currently, so in this case it'll bepackages/foo/node_modules/cypress-ct-*
. Code here:cypress/packages/scaffold-config/src/ct-detect-third-party.ts
Lines 49 to 56 in e674f43
We need to recursively check up to the workspace root, I think - how you identify this, I'm not sure (eg if we are in an Nx repo, how to know the top level? Yarn monorepo? Other type of repo)?
Cypress Version
12.7.0
Node version
v16.17
Operating System
All
Debug Logs
Other
n/a
The text was updated successfully, but these errors were encountered: