Open seansfkelley opened 10 months ago
At first blush I would expect constraints to be checked, since workspaces focus
is kind-of an install, even if it's not literally install
. But I think an argument could be made that it shouldn't, in which case, the resolution could be to punch a hole in installWithNewReport
to permit skipping constraint checks. This sounds easier than figuring out how to restore the mangled manifests in time to allow the constraints to be checked normally.
Self-service
Describe the bug
If I have a constraint on e.g. the presence of a script,
workspaces focus
will cause that constraint to fail because as part of its implementation it mangles the package manifests:https://github.com/yarnpkg/berry/blob/db6210f48355d2986e965f90009b22f18d3b6342/packages/plugin-workspace-tools/sources/commands/focus.ts#L83-L96C6
To reproduce
(The link to Sherlock is broken, and when I dug up an old version it appears to also be broken.)
I put a reproduction up at https://github.com/seansfkelley/yarn-repro
The important parts are:
Then reproduce the issue with
yarn workspaces focus b
.Environment
Additional context
No response