You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep used dependency ranges in sync across workspaces
Specify dependencies in each workspace explicitly
yarn constraints is great for the enforcement side of this story - I can quite easily check for adherence of the rules above.
I noticed that the main source of yarn constraints build failures is dependency versions going out of sync when someone uses yarn workspace <workspace> add <external-dependency>.
I advise my team mates to use --cached to get the desired result of reusing an existing version range if there is any but then that's annoying and hard to always remember.
We could make this frictionless if add could be configured to use picking strategies by default. I've created a PR to demonstrate the concept here: #4221
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In many of my workspace projects I want to
yarn constraints
is great for the enforcement side of this story - I can quite easily check for adherence of the rules above.I noticed that the main source of
yarn constraints
build failures is dependency versions going out of sync when someone usesyarn workspace <workspace> add <external-dependency>
.I advise my team mates to use
--cached
to get the desired result of reusing an existing version range if there is any but then that's annoying and hard to always remember.We could make this frictionless if
add
could be configured to use picking strategies by default. I've created a PR to demonstrate the concept here: #4221Let me know what you think!
Beta Was this translation helpful? Give feedback.
All reactions