feat: support for yarn@berry#19
Conversation
…ll agent names using satisfies never
✅ Deploy Preview for node-modules-inspector ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
It looks very promising already, thank you! Do you think we could merge it as-is, let the community to play with it and iterate together? |
commit: |
|
I tried to take a look into it, but it seems that |
|
Oh, pnp doesn't have a node_modules 😇 |
|
Maybe we can have a first version without pnp? The node modules linker is still widely used |
| break | ||
| } | ||
| case 'yarn@berry': { | ||
| console.warn('Yarn Berry support is experimental, if you encounter any issues, please open an issue with a reproduction') |
There was a problem hiding this comment.
Does this need additional handrails to ensure
yarn config get nodeLinker is node-modules? Then the strategy outlined by @antfu would be guaranteed to work.
|
|
||
| return { | ||
| root, | ||
| packageManager: 'berry', |
There was a problem hiding this comment.
Should we keep this consistent as yarn@berry?
There was a problem hiding this comment.
I don't think so. It's consistent with agent name (see file path). pnpm also has just "pnpm" and not "pnpm@6".
|
Since yarn berry with npmLinker is easy to parse, I think this PR is good enough. We can add support for PnP in a future iteration. |
|
This current PR doesn't pick up on package sizes BTW. |
We can add it in a subsequent pr before the release. |
Description
This is a DRAFT that adds support for yarn@berry. I sadly can't contribute more but I'll be honored if you use my code as a starting point. Please, feel free to close if you don't find this useful! No offense taken. :D
Linked Issues
#13
Additional context