Skip to content

Commit

Permalink
add exception for polling-controller peer depenency enforcement
Browse files Browse the repository at this point in the history
  • Loading branch information
adonesky1 committed Oct 2, 2023
1 parent 46d975f commit fb4260a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 3 additions & 2 deletions constraints.pro
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,15 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, null, DependencyType) :-
workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType),
DependencyType == 'devDependencies'.

% If a controller dependency (other than `base-controller` and
% `eth-keyring-controller`) is listed under "dependencies", it should also be
% If a controller dependency (other than `base-controller`, `eth-keyring-controller` and
% `polling-controller`) is listed under "dependencies", it should also be
% listed under "peerDependencies". Each controller is a singleton, so we need
% to ensure the versions used match expectations.
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, 'peerDependencies') :-
workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, 'dependencies'),
DependencyIdent \= '@metamask/base-controller',
DependencyIdent \= '@metamask/eth-keyring-controller',
DependencyIdent \= '@metamask/polling-controller',
is_controller(DependencyIdent).

% All packages must specify a minimum Node version of 16.
Expand Down
3 changes: 1 addition & 2 deletions packages/gas-fee-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@
"typescript": "~4.8.4"
},
"peerDependencies": {
"@metamask/network-controller": "^13.0.1",
"@metamask/polling-controller": "^0.0.0"
"@metamask/network-controller": "^13.0.1"
},
"engines": {
"node": ">=16.0.0"
Expand Down
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1827,7 +1827,6 @@ __metadata:
uuid: ^8.3.2
peerDependencies:
"@metamask/network-controller": ^13.0.1
"@metamask/polling-controller": ^0.0.0
languageName: unknown
linkType: soft

Expand Down

0 comments on commit fb4260a

Please sign in to comment.