website icon indicating copy to clipboard operation
website copied to clipboard

Inconsistency about symlinks created by workspaces

Open tzimmermann opened this issue 4 years ago • 0 comments

I noticed an inconsistency in the documentation about workspaces and the actual observed behaviour.

If I understand it correctly, the documentation tells me in this line: https://github.com/yarnpkg/website/blame/master/lang/en/docs/workspaces.md#L77 that a dependency will not be symlinked under /node_modules if it's not actually required as a dependency somewhere.

Given a minimal yarn workspaces repo like https://github.com/pedronauck/yarn-workspaces-example, I observed that after running yarn install (with v1.19.1) created both symlinks:

/node_modules/a -> /a /node_modules/b -> /b

Although package b is not a dependency of anything.

So either the docs are wrong here, or it is an actual yarn implementation bug.

tzimmermann avatar Nov 08 '19 17:11 tzimmermann