yarnpkg / berry

📦🐈 Active development trunk for Yarn ⚒
https://yarnpkg.com
BSD 2-Clause "Simplified" License
7.23k stars 1.07k forks source link

[Feature] Copy LICENSE file from monorepo root on publish #6359

Open tien opened 4 days ago

tien commented 4 days ago

Describe the user story

As a package publisher, I would like to have my root LICENSE be included in all packages that doesn't explicitly have one.

Describe the solution you'd like

pnpm has this really cool feature pnpm/pnpm#1804, where the LICENSE will be temporary copied to all your workspace packages before publish.

Describe the drawbacks of your solution

It's a fairly straight forward task imo. But it involves some extra side effects during publish, which some people might not like.

Describe alternatives you've considered

Having this as part of a plugin? But it's a minimal change, and I believe many people would like to have this as the default behaviour.

arcanis commented 4 days ago

Yes, I think this makes a lot of sense 👍

But it involves some extra side effects during publish, which some people might not like.

I don't think we'd need a disk side effect. We'd only add the file to the generated archive via genPackStream.