Hacker News new | ask | show | jobs
by nwlieb 3209 days ago
This is fantastic! The biggest standout feature in my opinion is workspaces. I've been using workspaces on a client project with many sub-projects and it has been a pleasure.

Shared modularized code without creating private npm packages or doing some "linking" magic has been wonderful for productivity. It's as simple as creating another local package and symatically everything else has remained the same as a regular npm package, plus the benefits of having immediately updating code. For anyone with a large modular codebase wanting to forray into a monorepo approach I highly recommend checking it out. They also released a blog post here detailing the feature: https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/

2 comments

How are people handling CI/CD servers/services with the mono repo?

The barrier to mono repo seems to have always been the need to create massive amounts of bespoke tooling to handle the build pipelines(how do I build just this proj?, how do I run tests on just this proj?, how do I build just this proj and its deps?, etc). These are totally solvable with dedicated dev resources, but these are typically the problems you try to avoid rather than spend time on at a lot of companies; say < 1k engineers(snark).

Workspaces and Lerna seem to be a small piece of the puzzle even if critical. Are there tools to help out with rest? For instance if I'm using Bitbucket pipelines, what should I be looking for to help building from a mono repo?

Subversion used to let you check out a subdirectory of a repo, which generally helped with this problem. The chapter on SVN in Beautiful Code does a great job of explaining how this works and why it helps with concurrent access to the repo.

This is a giant blind spot in Git, and none of the proposed workarounds come anywhere close to the tiny cognitive load of svn's answer to this problem.

But nobody on the git design committee seems to give a shit about cognitive load, so I'm probably just shouting into the tempest.

We've also published a more detailed documentation here: https://yarnpkg.com/en/docs/workspaces!