Skip to content

Commit

Permalink
Convert constraints from Prolog to JavaScript
Browse files Browse the repository at this point in the history
The existing Yarn constraints have been difficult to maintain because
they are written in Prolog. More recent versions of Yarn support
JavaScript-based constraints, so this commit rewrites the existing
constraints in JavaScript.

Instead of `constraints.pro`, all constraints are now kept in
`yarn.config.cjs`. This file can be used for other things in the future
besides constraints. (And constraints can be used in the future to check
more than just dependencies!)

Note that we have had discussions in the past around the peer dependency
constraints, and we know that they are not quite correct. This will be
fixed in another PR.
  • Loading branch information
mcmire committed Jul 23, 2024
1 parent 0f80f16 commit aa6fa92
Show file tree
Hide file tree
Showing 5 changed files with 681 additions and 435 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ module.exports = {
},
},
{
files: ['*.js'],
files: ['*.js', '*.cjs'],
parserOptions: {
sourceType: 'script',
ecmaVersion: '2018',
ecmaVersion: '2020',
},
},
{
Expand Down Expand Up @@ -121,5 +121,8 @@ module.exports = {
'import/resolver': {
typescript: {},
},
jsdoc: {
mode: 'typescript',
},
},
};
Loading

0 comments on commit aa6fa92

Please sign in to comment.