Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable yarn workspaces nohoist for public packages #7672

Open
kylegwalsh opened this issue Nov 5, 2019 · 3 comments
Open

Enable yarn workspaces nohoist for public packages #7672

kylegwalsh opened this issue Nov 5, 2019 · 3 comments

Comments

@kylegwalsh
Copy link

Do you want to request a feature or report a bug?
feature

What is the current behavior?
Yarn workspaces' nohoist config is ignored in public packages

What is the expected behavior?
I would like to be able to use the nohoist option in a public package. We are trying to use husky for git hooks, but husky is hoisted out of the public package we are working on. This means that husky cannot be found when the git hooks attempt to run (so they are ignored).

Is there a good reason that the hoist config option was disabled for public packages? It seems like it would just make things more flexible for these kinds of use cases.

Please mention your node.js, yarn and operating system version.
Node - v10.15.0, Yarn - 1.19.1, OS - Windows 10 Home 1903

@johannes-z
Copy link

+1.
I have a similar issue, where @babel/runtime is hoisted out of the package and resolved to a relative path, breaking all consuming apps. Making the package private and adding @babel/runtime to nohoist works.

@dwjohnston
Copy link

+1 on a babel. We are working on a monorepo where. due to an earlier mistake, some packages have babel 7 and some have babel 6 and we're encountering all sorts of version mismatch issues. A short term solution we are investigation is nohoisting @babel to prevent the mismatching. The packages that use babel 7 though, still need to be published.

@Enteleform
Copy link

+1, same issue @ solid-start.

They specifically require the use of nohoist in their docs:
https://github.com/solidjs/solid-start#monorepo--projectjson-workspace-support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants