Skip to content

Commit

Permalink
eth-json-rpc-provider migration - B4: Add exceptions in `constraint…
Browse files Browse the repository at this point in the history
…s.pro` for ISC license. (#1767)

## Explanation

This PR implements the following incremental step in the process for
migrating `eth-json-rpc-provider` into the core monorepo:

***

### Phase B: Staging in `migrated-packages/`
#### 4. Add exception for non-MIT license.
- [x] If migration target uses a non-MIT license, add exception entries
in the root `constraints.pro` file.
- [x] Make sure the new rule doesn't break any of the existing
package.json files by running `yarn constraints`.

***

See #1551 (comment)
for an outline of the entire process.

## References

- Contributes to #1685
- Contributes to #1551

## Changelog

N/A

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
  • Loading branch information
MajorLift committed Oct 12, 2023
1 parent 28292f2 commit 89c8647
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions constraints.pro
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,14 @@ gen_enforced_field(WorkspaceCwd, 'repository.url', RepoUrl) :-
repo_name(RepoUrl, _).
WorkspaceCwd \= '.'.

% The license for all published packages must be MIT.
% The license for all published packages must be MIT unless otherwise specified.
gen_enforced_field(WorkspaceCwd, 'license', 'MIT') :-
\+ workspace_field(WorkspaceCwd, 'private', true).
\+ workspace_field(WorkspaceCwd, 'private', true),
WorkspaceCwd \= 'packages/eth-json-rpc-provider'.
% The following published packages use an ISC license instead of MIT.
gen_enforced_field(WorkspaceCwd, 'license', 'ISC') :-
\+ workspace_field(WorkspaceCwd, 'private', true),
WorkspaceCwd == 'packages/eth-json-rpc-provider'.
% Non-published packages do not have a license.
gen_enforced_field(WorkspaceCwd, 'license', null) :-
workspace_field(WorkspaceCwd, 'private', true).
Expand Down

0 comments on commit 89c8647

Please sign in to comment.