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
Feature (I think). It's possible this is considered a bug.
What is the current behavior?
Private (all?) Github modules that exist as a package in a monorepo are installed locally to the package that depends on them.
monorepo/
node_modules/
package-1/ -> symlink
packages/
package-1/
package.json
{
version: "1.0.1"
}
package-2/
node_modules/
package-1/ => THIS IS THE PROBLEM
package.json
{
dependencies: {
package-1: "git+https://token:x-oauth-basic@github.com/user/package-1.git#v1.0.1"
}
}
package-1 is hoisted and installed at the root but is also installed in package-2 where it is listed as a dependency.
What is the expected behavior?
monorepo/
node_modules/
package-1/ -> symlink
packages/
package-1/ => Published to stand-alone git repo in some way. Not Yarn's problem.
package.json
{
version: "1.0.1"
}
package-2/
node_modules/
package-1-dir-is-not-here
package.json
{
dependencies: {
package-1: "git+https://token:x-oauth-basic@github.com/user/package-1.git#v1.0.1"
}
}
As long as package-1/package.json.version matches the commit-ish in package-2's dependency url then it should not be installed in package-2's node_modules/
Lerna gained this behavior here but I'd rather Yarn handled my deps.
The text was updated successfully, but these errors were encountered:
This is actually sort of a bug where your git dependency is actually being retrieved from github, not using the workspace package, which is why it can't be hoisted to the top level. This could be fixed by #6012 if it gets merged, but I'm not checking for a commit-ish hash at the end of the URL, I just took the simplistic approach of matching by name only if the "version" is not semver (is a git url instead).
Do you want to request a feature or report a bug?
Feature (I think). It's possible this is considered a bug.
What is the current behavior?
Private (all?) Github modules that exist as a package in a monorepo are installed locally to the package that depends on them.
package-1
is hoisted and installed at the root but is also installed inpackage-2
where it is listed as a dependency.What is the expected behavior?
As long as
package-1/package.json.version
matches the commit-ish inpackage-2
's dependency url then it should not be installed inpackage-2
'snode_modules/
Lerna gained this behavior here but I'd rather Yarn handled my deps.
The text was updated successfully, but these errors were encountered: