-
Notifications
You must be signed in to change notification settings - Fork 22
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
Support monorepos #14
Comments
I'd love it, but I don't have any experience with monorepos. I'd love a PR, but if you can outline a plan that would be good too, and I might get to do it when I have time. |
This tool supports monorepos https://github.com/renovateapp/renovate and could be a reference. Basically, a monorepo has subdirectories that also contain package.json and lockfiles. Traversing the sub-directories (ignoring node_modules) and performing the code already performed in this repo in any subdirectory that has a package.json and a lockfile should do the trick. |
I had some time today and took a look at what can be done. I'd like to keep this tool simple so I tried to see what are the common traits of monorepos. Looks like most of them use I can implement today or in a few days or you can do it if you'd like it. It will be good to support this use case too. Thanks for the suggestion. |
It turned out to be trickier than I imagined. Also the current strategy for detecting a diff works only for a lockfile adjacent to a The current code is in |
I found how I think traversing all subdirectories can be expensive, this command must be very quick or it makes switching branches a pain. (A coworker experienced this internally, before we started checking for diff in lockfile.) It makes sense to get a list of subpackages from the
|
What if there was an optional argument or Sidebar: I would not even try to target specific monorepo tooling. That's a can of worms that you'd never be able to close |
Yeah, just being able to detect an package.json in a subfolder would be great! |
Thanks for the great lib!
Currently, doesn't detect changes in nested
package.json
andyarn.lock
. What do you think about adding support for monorepos?The text was updated successfully, but these errors were encountered: