Support yarn workspaces, lerna packages
See original GitHub issueYarn natively supports monoropos through a setting called workspaces
.
When using npm
, a project called lerna
has a packages
setting.
- https://yarnpkg.com/lang/en/docs/workspaces/
- https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/
- https://github.com/lerna/lerna#lernajson
The workspaces
config in the root package.json
, or packages
in lerna.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 execute typesync
in every package directory, but it’s much slower because it’s spawning a copy of typesync
for each package.json
. My repo has 40+ packages and lots of duplication between them.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
A Beginner's Guide to Lerna with Yarn Workspaces | by jsilvax
Lerna adds utility functionality on top of Yarn Workspaces for working with multiple packages. Yarn workspaces make it so that all dependencies ...
Read more >Monorepo Javascript Projects with Yarn Workspaces and Lerna
Yarn workspaces are used to optimize dependency management. When we use yarn workspaces, all project dependencies are installed in one go. Tools ...
Read more >Managing Monorepo using Lerna and Yarn workspaces
Lerna provides an option for you to use it with Yarn Workspaces. To use Yarn instead of the npm client, you have to...
Read more >Managing monorepos with Lerna and Yarn ... - Polar Signals
Using Lerna, you can iterate through all the packages, run a series of operations (such as linting, testing, and building) on each package....
Read more >Why Lerna and Yarn Workspaces is a Perfect Match for ...
As with yarn workspaces, lerna adds Mono-Rep capabilities to a frontend project. However, as described above, lerna operates on "user land" and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is pretty great, but with lerna at least most people would put all the type defs in the root
devDependencies
rather than spread across the packages. 🤷♂️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.