-
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 yarn workspaces, lerna packages #11
Comments
Interesting. I am sure the slowness is caused by having to download and unzip the JSON multiple times. I wonder if I cache the download for like a few minutes, it should probably be faster instead of having to cater to every possible monorepo tool. What do you think, would that be enough? If anything, I should probably be doing this already. I wonder if there is a way to check when a new version of the JSON blob is available. |
It's both simultaneously overly verbose and not helpful when running through Here's a small snippet, this goes on for pages.
|
All I'm worried about is coupling to lerna/yarn workspaces format. But I guess there's benefit to it. I guess the globs represent folders that contain package json's, so my initial approach would be to filter out files from the glob results and attempt loading package.json's within them. It's definitely over verbose, how would you envision the output in this case? |
@dylang what do you think of this? |
Implemented as of v0.4.0. |
Amazing job, works great! |
This is pretty great, but with lerna at least most people would put all the type defs in the root |
I use neither, so I don't know what people do and don't do. 🤷♂️ Whatever the behavior needs to be, it needs to be consistent across both. |
Yarn natively supports monoropos through a setting called
workspaces
.When using
npm
, a project calledlerna
has apackages
setting.The
workspaces
config in the rootpackage.json
, orpackages
inlerna.json
lists glob patterns for all the workspaces.If
typesync
is run in a project with workspaces, it would be great if it ran across all of the workspaces simultaneously.A workaround is to run
yarn lerna exec typesync
to executetypesync
in every package directory, but it's much slower because it's spawning a copy oftypesync
for eachpackage.json
. My repo has 40+ packages and lots of duplication between them.The text was updated successfully, but these errors were encountered: