Skip to content

monorepo: Migrate constraints from Prolog to JavaScript #17

@rekmarks

Description

@rekmarks

With Yarn v4, we no longer have to use Prolog for our constraints. @mcmire graciously did the hard work for us in MetaMask/core#4546, and we should replicate that for our own repository. Some customization will be necessary. Here's some things I've noticed that I'd like to change about our constraints, in no particular order:

  • Sometimes, the important thing is that there is a script with a particular name, not that the script matches some specific string. We should enforce existence of a script instead of exempting packages completely like we are forced to today.
    • Conversely, if there is no existing exemption, we should continue to enforce that the values of the scripts are identical.
  • Packages that are exempted from a set of rules (e.g. test-utils) should be listed in a single place (ideally), and then we should apply that list where appropriate.
    • /snaps and /core use whether a package is private as the indicator that they should be exempted from e.g. having an exports field, but we can't do that because all of our packages are currently private.

Metadata

Metadata

Assignees

Labels

choreNot a feature, not documentation, but something we still have to do.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions