if a semver range, it will select the workspace matching the specified version.
If a module has a non-compatible dependency with the rest of the monorepo, yarn 1 will resolve this inside a node_modules folder inside the module folder - but only for this module. Whereas the current logic will use this to resolve dependencies for other modules
I recommend avoiding re-implementing the dependency resolution logic in this library and instead re-using the resolution logic of the build tool chosen by the plugin
Based on https://github.com/azu/monorepo-utils/blob/8ccf1c70c2582770ee6fc5fd71bf3b6e5e95400f/packages/%40monorepo-utils/workspaces-to-typescript-project-references/src/manager/workspaces.ts#L26-L30, the dependency resolution logic is:
workspace:
ORThis does not match the Yarn resolution logic in at least the following scenarios:
workspace
and semver doesn't match (which does not resolve as per https://yarnpkg.com/features/workspaces#workspace-ranges-workspace, specifially):node_modules
folder inside the module folder - but only for this module. Whereas the current logic will use this to resolve dependencies for other modulesI recommend avoiding re-implementing the dependency resolution logic in this library and instead re-using the resolution logic of the build tool chosen by the plugin