-
-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(constraints): allow exceptions for dependency-range consistency #4772
chore(constraints): allow exceptions for dependency-range consistency #4772
Conversation
8be8f73
to
d7c7bd1
Compare
d7c7bd1
to
4502883
Compare
ae521de
to
f23be0c
Compare
const ALLOWED_INCONSISTENT_DEPENDENCIES = Object.entries({ | ||
// '@metamask/foo': ['^1.0.0'], | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be near the top of the file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking co-locating is clearer (esp since other exceptions are also currently inlined) but I will move it out of the function body in a follow-up!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Based on the conversation on Slack, it seems like the wallet framework team agrees with this change as well.
Explanation
This allows adding explicit exceptions for the Yarn constraint
expectConsistentDependenciesAndDevDependencies
.An exception entry consists of a package name and a set of exact version ranges to be ignored in checking.
This is useful when we have "repo-circular" dependencies, where package A (in this repo) depends on package B (in another repo), which in its turn depends on package C (back again in this repo), finally depending on some package D.
In some cases, bumping D atomically in the monorepo makes things very heavy-handed. This change allows to slice it up in such situations.
References
C = @metamask/json-rpc-engine
D = @metamask/rpc-errors
Changelog
None
Checklist