One of the reasons I really like Yarn 3, is the really good support for linking local dependencies. The whole “@internal/mypackage”: “workspace:*”.<p>That, and the plugin system.<p>Because it meant I could build on top of yarn a build/test system much like Bazel, Buck and Pants. But without the overhead of those tools.<p>Honestly, being able to build functionality into tooling like this is really awesome. Especially when it’s aware dependency graph.<p>I often have polyglot repos, with a heap of typescript, and some golang, and other stuff.<p>I spent a couple of weeks last year hacking away on a plugin, that can look at the whole dependency tree defined in yarn - and develop a build graph that can build everything in the required order, taking advantage of every cpu thread available. While keeping track of what’s previously been built.<p>From that, I extended the support to testing to do the same thing.<p>I wrapped it all up into a nice package and published it to:<p><a href="https://yarn.build" rel="nofollow">https://yarn.build</a><p>Can be installed with this command<p><pre><code> yarn plugin import https://yarn.build/latest
</code></pre>
Then it’s just `yarn build` which runs `package.json#scripts.build`, and `yarn test` which runs `package.json#scripts.test`.<p>—<p>Since then, there’s been plenty of development. I added a bundle command. You tell it which local package to bundle up, and it copies your repo to a temporary folder, removes everything that package doesn’t need (useful in a giant monorepo), leaves the other packages it depends on. Finally it adds a file `entrypoint.js` which sets up pnp for you, and re-exports the `main` file from your target package.<p>Then it zips it up for you ready for AWS Lambda (my use case), but also Docker and any other node runtime.<p>And recently I hacked another interesting plugin that yarn and pnp enabled. A really neat plugin that lets you write package.yaml instead of package.json.<p>If you replace package.json with package.yaml (or .yml), it will appear to yarn as a normal package.json. Everything works fine (with yarn, unsure about some node tooling), and you even get comments.<p>It’s a completely separate plugin (because it’s pretty out there), and it only has an effect if you don’t have a package.json in your package folder.<p>I’m using it on the golang packages in monorepo’s, because those developers are often a bit upset by seeing build tooling in a json file.<p>The package.yaml plugin can be installed with the following command:<p><pre><code> yarn plugin import https://yarn.build/yaml
</code></pre>
It’s still a bit experimental, but works pretty well.<p>—<p>It’s all open source on GitHub, if you have any issues using it feel free to post a bug report.<p><a href="https://github.com/ojkelly/yarn.build" rel="nofollow">https://github.com/ojkelly/yarn.build</a>