question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support yarn workspaces, lerna packages

See original GitHub issue

Yarn natively supports monoropos through a setting called workspaces. When using npm, a project called lerna has a packages setting.

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:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
wldcordeirocommented, Mar 5, 2019

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. 🤷‍♂️

0reactions
jeffijoecommented, Mar 5, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found