Skip to content

Commit 2f7ffb1

Browse files
authored
Merge branch 'main' into MMI-5803-deferral-proposal-2
2 parents 5deafba + f5ff895 commit 2f7ffb1

File tree

166 files changed

+6762
-4479
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+6762
-4479
lines changed

.eslintrc.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module.exports = {
22
root: true,
3-
extends: ['@metamask/eslint-config', '@metamask/eslint-config-nodejs'],
3+
extends: ['@metamask/eslint-config'],
44
ignorePatterns: [
55
'!.eslintrc.js',
6-
'!jest.config.js',
6+
'!.prettierrc.js',
77
'node_modules',
88
'**/dist',
99
'**/docs',
@@ -12,6 +12,19 @@ module.exports = {
1212
'scripts/create-package/package-template',
1313
],
1414
overrides: [
15+
{
16+
files: [
17+
'**/jest.config.js',
18+
'**/jest.environment.js',
19+
'**/tests/**/*.{ts,js}',
20+
'*.js',
21+
'*.test.{ts,js}',
22+
'scripts/*.ts',
23+
'scripts/create-package/*.ts',
24+
'yarn.config.cjs',
25+
],
26+
extends: ['@metamask/eslint-config-nodejs'],
27+
},
1528
{
1629
files: ['*.test.{ts,js}', '**/tests/**/*.{ts,js}'],
1730
extends: ['@metamask/eslint-config-jest'],

.github/CODEOWNERS

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# Note: Please keep this synchronized with the `teams.json` file in the repository root.
55
# That file is used for some automated workflows, and maps controller to owning team(s).
66

7-
* @MetaMask/engineering
87
/.github/ @MetaMask/wallet-framework-engineers
98

109
## Accounts Team
@@ -13,7 +12,7 @@
1312
/packages/chain-controller @MetaMask/accounts-engineers
1413

1514
## Assets Team
16-
/packages/assets-controller @MetaMask/metamask-assets
15+
/packages/assets-controllers @MetaMask/metamask-assets
1716

1817
## Confirmations Team
1918
/packages/address-book-controller @MetaMask/confirmations
@@ -34,7 +33,6 @@
3433
/packages/phishing-controller @MetaMask/product-safety
3534

3635
## Snaps Team
37-
/packages/notification-controller @MetaMask/snaps-devs
3836
/packages/rate-limit-controller @MetaMask/snaps-devs
3937

4038
## Wallet API Platform Team
@@ -86,8 +84,6 @@
8684
/packages/message-manager/CHANGELOG.md @MetaMask/confirmations @MetaMask/wallet-framework-engineers
8785
/packages/name-controller/package.json @MetaMask/confirmations @MetaMask/wallet-framework-engineers
8886
/packages/name-controller/CHANGELOG.md @MetaMask/confirmations @MetaMask/wallet-framework-engineers
89-
/packages/notification-controller/package.json @MetaMask/snaps-devs @MetaMask/wallet-framework-engineers
90-
/packages/notification-controller/CHANGELOG.md @MetaMask/snaps-devs @MetaMask/wallet-framework-engineers
9187
/packages/notification-services-controller/package.json @MetaMask/notifications @MetaMask/wallet-framework-engineers
9288
/packages/notification-services-controller/CHANGELOG.md @MetaMask/notifications @MetaMask/wallet-framework-engineers
9389
/packages/phishing-controller/package.json @MetaMask/product-safety @MetaMask/wallet-framework-engineers

.github/workflows/create-update-issues.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
if [[ $version == *.0.0 ]]; then
3737
# Fetch responsible team from file
3838
teams=$(jq -r --arg key "$package_name" '.[$key]' teams.json)
39-
gh issue create --title "Update ${package_name} to version ${version}" --body "Please update ${package_name} to version ${version}" --repo "MetaMask/metamask-extension" --label "$teams"
40-
gh issue create --title "Update ${package_name} to version ${version}" --body "Please update ${package_name} to version ${version}" --repo "MetaMask/metamask-mobile" --label "$teams"
39+
gh issue create --title "Update ${package_name} to version ${version}" --body "Please update ${package_name} to version ${version}" --repo "MetaMask/metamask-extension" --label "$teams, client-controller-update"
40+
gh issue create --title "Update ${package_name} to version ${version}" --body "Please update ${package_name} to version ${version}" --repo "MetaMask/metamask-mobile" --label "$teams, client-controller-update"
4141
fi
4242
fi
4343
done

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ Each package in this repository has its own README where you can find installati
4141
- [`@metamask/multichain`](packages/multichain)
4242
- [`@metamask/name-controller`](packages/name-controller)
4343
- [`@metamask/network-controller`](packages/network-controller)
44-
- [`@metamask/notification-controller`](packages/notification-controller)
4544
- [`@metamask/notification-services-controller`](packages/notification-services-controller)
4645
- [`@metamask/permission-controller`](packages/permission-controller)
4746
- [`@metamask/permission-log-controller`](packages/permission-log-controller)
@@ -85,7 +84,6 @@ linkStyle default opacity:0.5
8584
multichain(["@metamask/multichain"]);
8685
name_controller(["@metamask/name-controller"]);
8786
network_controller(["@metamask/network-controller"]);
88-
notification_controller(["@metamask/notification-controller"]);
8987
notification_services_controller(["@metamask/notification-services-controller"]);
9088
permission_controller(["@metamask/permission-controller"]);
9189
permission_log_controller(["@metamask/permission-log-controller"]);
@@ -141,7 +139,6 @@ linkStyle default opacity:0.5
141139
network_controller --> controller_utils;
142140
network_controller --> eth_json_rpc_provider;
143141
network_controller --> json_rpc_engine;
144-
notification_controller --> base_controller;
145142
notification_services_controller --> base_controller;
146143
notification_services_controller --> controller_utils;
147144
notification_services_controller --> keyring_controller;
@@ -162,8 +159,8 @@ linkStyle default opacity:0.5
162159
preferences_controller --> keyring_controller;
163160
profile_sync_controller --> base_controller;
164161
profile_sync_controller --> keyring_controller;
165-
profile_sync_controller --> accounts_controller;
166162
profile_sync_controller --> network_controller;
163+
profile_sync_controller --> accounts_controller;
167164
queued_request_controller --> base_controller;
168165
queued_request_controller --> controller_utils;
169166
queued_request_controller --> json_rpc_engine;
@@ -179,6 +176,7 @@ linkStyle default opacity:0.5
179176
signature_controller --> approval_controller;
180177
signature_controller --> keyring_controller;
181178
signature_controller --> logging_controller;
179+
signature_controller --> network_controller;
182180
transaction_controller --> base_controller;
183181
transaction_controller --> controller_utils;
184182
transaction_controller --> accounts_controller;

docs/writing-controllers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class FooController extends BaseController</* ... */> {
4949
state = {},
5050
}: {
5151
messenger: FooControllerMessenger;
52-
state: Partial<FooControllerState>;
52+
state?: Partial<FooControllerState>;
5353
}) {
5454
super({
5555
// ...
@@ -87,7 +87,7 @@ class FooController extends BaseController</* ... */> {
8787
state = {},
8888
}: {
8989
messenger: FooControllerMessenger;
90-
state: Partial<FooControllerState>;
90+
state?: Partial<FooControllerState>;
9191
}) {
9292
super({
9393
name,
@@ -158,7 +158,7 @@ class FooController extends BaseController</* ... */> {
158158
state = {},
159159
}: {
160160
messenger: FooControllerMessenger;
161-
state: Partial<FooControllerState>;
161+
state?: Partial<FooControllerState>;
162162
},
163163
isEnabled: boolean,
164164
) {
@@ -177,7 +177,7 @@ class FooController extends BaseController</* ... */> {
177177
isEnabled,
178178
}: {
179179
messenger: FooControllerMessenger;
180-
state: Partial<FooControllerState>;
180+
state?: Partial<FooControllerState>;
181181
isEnabled: boolean;
182182
}) {
183183
// ...

examples/example-controllers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
},
5353
"devDependencies": {
5454
"@metamask/auto-changelog": "^3.4.4",
55-
"@metamask/controller-utils": "^11.4.3",
55+
"@metamask/controller-utils": "^11.4.4",
5656
"@types/jest": "^27.4.1",
5757
"deepmerge": "^4.2.2",
5858
"jest": "^27.5.1",

examples/example-controllers/src/gas-prices-controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export type GasPricesControllerActions =
9696
/**
9797
* All actions that {@link GasPricesController} calls internally.
9898
*/
99-
export type AllowedActions = NetworkControllerGetStateAction;
99+
type AllowedActions = NetworkControllerGetStateAction;
100100

101101
/**
102102
* The event that {@link GasPricesController} publishes when updating state.
@@ -115,7 +115,7 @@ export type GasPricesControllerEvents = GasPricesControllerStateChangeEvent;
115115
/**
116116
* All events that {@link GasPricesController} subscribes to internally.
117117
*/
118-
export type AllowedEvents = never;
118+
type AllowedEvents = never;
119119

120120
/**
121121
* The messenger which is restricted to actions and events accessed by

examples/example-controllers/src/pet-names-controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export type PetNamesControllerActions = PetNamesControllerGetStateAction;
6464
/**
6565
* All actions that {@link PetNamesController} calls internally.
6666
*/
67-
export type AllowedActions = never;
67+
type AllowedActions = never;
6868

6969
/**
7070
* The event that {@link PetNamesController} publishes when updating state.
@@ -83,7 +83,7 @@ export type PetNamesControllerEvents = PetNamesControllerStateChangeEvent;
8383
/**
8484
* All events that {@link PetNamesController} subscribes to internally.
8585
*/
86-
export type AllowedEvents = never;
86+
type AllowedEvents = never;
8787

8888
/**
8989
* The messenger which is restricted to actions and events accessed by

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metamask/core-monorepo",
3-
"version": "259.0.0",
3+
"version": "266.0.0",
44
"private": true,
55
"description": "Monorepo for packages shared between MetaMask clients",
66
"repository": {
@@ -51,16 +51,17 @@
5151
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
5252
"@babel/preset-typescript": "^7.23.3",
5353
"@lavamoat/allow-scripts": "^3.0.4",
54+
"@lavamoat/preinstall-always-fail": "^2.1.0",
5455
"@metamask/create-release-branch": "^3.1.0",
5556
"@metamask/eslint-config": "^12.2.0",
5657
"@metamask/eslint-config-jest": "^12.1.0",
5758
"@metamask/eslint-config-nodejs": "^12.1.0",
5859
"@metamask/eslint-config-typescript": "^12.1.0",
59-
"@metamask/eth-block-tracker": "^11.0.2",
60+
"@metamask/eth-block-tracker": "^11.0.3",
6061
"@metamask/eth-json-rpc-provider": "^4.1.6",
6162
"@metamask/json-rpc-engine": "^10.0.1",
6263
"@metamask/utils": "^10.0.0",
63-
"@ts-bridge/cli": "^0.5.1",
64+
"@ts-bridge/cli": "^0.6.1",
6465
"@types/jest": "^27.4.1",
6566
"@types/lodash": "^4.14.191",
6667
"@types/node": "^16.18.54",

packages/accounts-controller/CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [20.0.1]
11+
12+
### Fixed
13+
14+
- Make implicit peer dependencies explicit ([#4974](https://github.com/MetaMask/core/pull/4974))
15+
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
16+
- `@metamask/providers` `^18.1.0` (required by `@metamask/keyring-api`)
17+
- `webextension-polyfill` `^0.10.0 || ^0.11.0 || ^0.12.0` (required by `@metamask/providers`)
18+
- These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
19+
- Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.
20+
- Correct ESM-compatible build so that imports of the following packages that re-export other modules via `export *` are no longer corrupted: ([#5011](https://github.com/MetaMask/core/pull/5011))
21+
- `@metamask/keyring-api`
22+
- `@metamask/eth-snap-keyring`
23+
1024
## [20.0.0]
1125

1226
### Changed
@@ -354,7 +368,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
354368

355369
- Initial release ([#1637](https://github.com/MetaMask/core/pull/1637))
356370

357-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
371+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
372+
[20.0.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
358373
[20.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
359374
[19.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
360375
[18.2.3]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]

0 commit comments

Comments
 (0)