Skip to content

Commit 9dc039c

Browse files
committed
Merge branch 'main' into update-controller-guidelines
2 parents 453dcbd + 0f69373 commit 9dc039c

File tree

101 files changed

+8195
-1235
lines changed

Some content is hidden

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

101 files changed

+8195
-1235
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
## Notifications Team
3131
/packages/notification-services-controller @MetaMask/notifications
32-
/packages/profile-sync-controller @MetaMask/notifications
3332

3433
## Product Safety Team
3534
/packages/phishing-controller @MetaMask/product-safety
@@ -60,6 +59,7 @@
6059
/packages/permission-controller @MetaMask/wallet-api-platform-engineers @MetaMask/wallet-framework-engineers @MetaMask/snaps-devs
6160
/packages/permission-log-controller @MetaMask/wallet-api-platform-engineers @MetaMask/wallet-framework-engineers
6261
/packages/selected-network-controller @MetaMask/wallet-api-platform-engineers @MetaMask/wallet-framework-engineers @MetaMask/metamask-assets
62+
/packages/profile-sync-controller @MetaMask/notifications @MetaMask/identity
6363

6464
## Package Release related
6565
/packages/accounts-controller/package.json @MetaMask/accounts-engineers @MetaMask/wallet-framework-engineers
@@ -92,8 +92,8 @@
9292
/packages/notification-services-controller/CHANGELOG.md @MetaMask/notifications @MetaMask/wallet-framework-engineers
9393
/packages/phishing-controller/package.json @MetaMask/product-safety @MetaMask/wallet-framework-engineers
9494
/packages/phishing-controller/CHANGELOG.md @MetaMask/product-safety @MetaMask/wallet-framework-engineers
95-
/packages/profile-sync-controller/package.json @MetaMask/notifications @MetaMask/wallet-framework-engineers
96-
/packages/profile-sync-controller/CHANGELOG.md @MetaMask/notifications @MetaMask/wallet-framework-engineers
95+
/packages/profile-sync-controller/package.json @MetaMask/notifications @MetaMask/identity @MetaMask/wallet-framework-engineers
96+
/packages/profile-sync-controller/CHANGELOG.md @MetaMask/notifications @MetaMask/identity @MetaMask/wallet-framework-engineers
9797
/packages/queued-request-controller/package.json @MetaMask/wallet-api-platform-engineers @MetaMask/wallet-framework-engineers
9898
/packages/queued-request-controller/CHANGELOG.md @MetaMask/wallet-api-platform-engineers @MetaMask/wallet-framework-engineers
9999
/packages/signature-controller/package.json @MetaMask/confirmations @MetaMask/wallet-framework-engineers

README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,21 @@
22

33
This monorepo is a collection of packages used across multiple MetaMask clients (e.g. [`metamask-extension`](https://github.com/MetaMask/metamask-extension/), [`metamask-mobile`](https://github.com/MetaMask/metamask-mobile/)).
44

5-
## Modules
5+
## Contributing
66

7-
This repository contains the following packages [^fn1]:
7+
See the [Contributor Guide](./docs/contributing.md) for help on:
8+
9+
- Setting up your development environment
10+
- Working with the monorepo
11+
- Testing changes in clients
12+
- Issuing new releases
13+
- Creating a new package
14+
15+
## Installation/Usage
16+
17+
Each package in this repository has its own README where you can find installation and usage instructions. See `packages/` for more.
18+
19+
## Packages
820

921
<!-- start package list -->
1022

@@ -46,8 +58,6 @@ This repository contains the following packages [^fn1]:
4658

4759
<!-- end package list -->
4860

49-
Or, in graph form [^fn1]:
50-
5161
<!-- start dependency graph -->
5262

5363
```mermaid
@@ -122,6 +132,9 @@ linkStyle default opacity:0.5
122132
logging_controller --> controller_utils;
123133
message_manager --> base_controller;
124134
message_manager --> controller_utils;
135+
multichain --> controller_utils;
136+
multichain --> network_controller;
137+
multichain --> permission_controller;
125138
name_controller --> base_controller;
126139
name_controller --> controller_utils;
127140
network_controller --> base_controller;
@@ -185,10 +198,4 @@ linkStyle default opacity:0.5
185198

186199
<!-- end dependency graph -->
187200

188-
Refer to individual packages for usage instructions.
189-
190-
## Learn more
191-
192-
For instructions on performing common development-related tasks, see [contributing to the monorepo](./docs/contributing.md).
193-
194-
[^fn1]: The package list and dependency graph should be programmatically generated by running `yarn update-readme-content`.
201+
(This section may be regenerated at any time by running `yarn update-readme-content`.)

docs/contributing.md

Lines changed: 116 additions & 95 deletions
Large diffs are not rendered by default.

docs/package-migration-process-guide.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,27 @@ This document outlines the process for migrating a MetaMask library into the cor
1212

1313
- [Example PR](https://github.com/MetaMask/eth-json-rpc-provider/pull/38)
1414

15-
### 2. Disable `dependabot` dependency version updates and security alerts
15+
### 2. Add the source repo to the ZenHub workspace repo filter so that its issues/PRs show up on the board
1616

17-
- [Disable dependabot alerts](https://docs.github.com/en/code-security/dependabot/dependabot-alerts/configuring-dependabot-alerts#enabling-or-disabling-dependabot-alerts-for-a-repository) for the repo.
18-
- [Disable dependabot dependency version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates#disabling-dependabot-version-updates) from settings, or delete the source repo's `.github/dependabot.yml` file.
19-
- Contact a [**maintainer**](https://github.com/orgs/MetaMask/teams/engineering?query=role%3Amaintainer) to perform this step.
20-
21-
### 3. Add the source repo to the ZenHub workspace repo filter so that its issues/PRs show up on the board
22-
23-
### **[PR#2]** 4. Align dependency versions and TypeScript, ESLint, Prettier configurations with the core monorepo
17+
### **[PR#2]** 3. Align dependency versions and TypeScript, ESLint, Prettier configurations with the core monorepo
2418

2519
- If the dependency versions of the migration target are ahead of core, consider updating the core dependencies first.
2620
- Apply the configurations of the core monorepo to the source repo files.
2721
- Preserve any TypeScript compiler flags that are enabled in the source repo but not in core.
2822
- Resolve any errors or issues resulting from these changes.
2923
- [Example PR](https://github.com/MetaMask/eth-json-rpc-provider/pull/28)
3024

31-
### **[PR#3]** 5. Review the `metamask-module-template`, and add any missing files or elements (e.g. LICENSE)
25+
### **[PR#3]** 4. Review the `metamask-module-template`, and add any missing files or elements (e.g. LICENSE)
3226

3327
- [Example PR](https://github.com/MetaMask/eth-json-rpc-provider/pull/24)
3428

35-
### **[PR#4]** 6. Rename the migration target package so that it is prepended by the `@metamask/` namespace (skip if not applicable)
29+
### **[PR#4]** 5. Rename the migration target package so that it is prepended by the `@metamask/` namespace (skip if not applicable)
3630

3731
- Modify the "name" field in `package.json`.
3832
- Update the title of the README.md.
3933
- Add a CHANGELOG entry for the rename.
4034

41-
### **[PR#5]** 7. Create a new release of the migration target from the source repo
35+
### **[PR#5]** 6. Create a new release of the migration target from the source repo
4236

4337
- All subsequent releases of the migration target will be made from the core monorepo.
4438
- [Example PR](https://github.com/MetaMask/eth-json-rpc-provider/pull/29)

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.2",
55+
"@metamask/controller-utils": "^11.4.3",
5656
"@types/jest": "^27.4.1",
5757
"deepmerge": "^4.2.2",
5858
"jest": "^27.5.1",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metamask/core-monorepo",
3-
"version": "244.0.0",
3+
"version": "248.0.0",
44
"private": true,
55
"description": "Monorepo for packages shared between MetaMask clients",
66
"repository": {

packages/accounts-controller/CHANGELOG.md

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

88
## [Unreleased]
99

10+
## [19.0.0]
11+
12+
### Changed
13+
14+
- **BREAKING:** Bump peer dependency `@metamask/keyring-controller` from `^17.0.0` to `^18.0.0` ([#4915](https://github.com/MetaMask/core/pull/4915))
15+
1016
## [18.2.3]
1117

1218
### Changed
@@ -337,7 +343,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
337343

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

340-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.2.3...HEAD
346+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@19.0.0...HEAD
347+
[19.0.0]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.2.3...@metamask/accounts-controller@19.0.0
341348
[18.2.3]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.2.2...@metamask/accounts-controller@18.2.3
342349
[18.2.2]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.2.1...@metamask/accounts-controller@18.2.2
343350
[18.2.1]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.2.0...@metamask/accounts-controller@18.2.1

packages/accounts-controller/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metamask/accounts-controller",
3-
"version": "18.2.3",
3+
"version": "19.0.0",
44
"description": "Manages internal accounts",
55
"keywords": [
66
"MetaMask",
@@ -61,7 +61,7 @@
6161
},
6262
"devDependencies": {
6363
"@metamask/auto-changelog": "^3.4.4",
64-
"@metamask/keyring-controller": "^17.3.1",
64+
"@metamask/keyring-controller": "^18.0.0",
6565
"@metamask/snaps-controllers": "^9.7.0",
6666
"@types/jest": "^27.4.1",
6767
"@types/readable-stream": "^2.3.0",
@@ -72,7 +72,7 @@
7272
"typescript": "~5.2.2"
7373
},
7474
"peerDependencies": {
75-
"@metamask/keyring-controller": "^17.0.0",
75+
"@metamask/keyring-controller": "^18.0.0",
7676
"@metamask/snaps-controllers": "^9.7.0"
7777
},
7878
"engines": {

packages/address-book-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
},
4949
"dependencies": {
5050
"@metamask/base-controller": "^7.0.2",
51-
"@metamask/controller-utils": "^11.4.2",
51+
"@metamask/controller-utils": "^11.4.3",
5252
"@metamask/utils": "^10.0.0"
5353
},
5454
"devDependencies": {

packages/assets-controllers/CHANGELOG.md

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

88
## [Unreleased]
99

10+
## [44.0.0]
11+
12+
### Changed
13+
14+
- **BREAKING**: The `TokenBalancesController` state is now across all chains and accounts under the field `tokenBalances`, as a mapping from account address -> chain id -> token address -> balance. ([#4782](https://github.com/MetaMask/core/pull/4782))
15+
16+
- **BREAKING**: The `TokenBalancesController` now extends `StaticIntervalPollingController`, and the new polling API `startPolling` must be used to initiate polling (`startPolling`, `stopPollingByPollingToken`). ([#4782](https://github.com/MetaMask/core/pull/4782))
17+
18+
- **BREAKING**: `TokenBalancesController` now requires subscriptions to the `PreferencesController:stateChange` and `NetworkController:stateChange` events. And access to the `NetworkController:getNetworkClientById`, `NetworkController:getState`, `TokensController:getState`, and `PreferencesController:getState` actions. ([#4782](https://github.com/MetaMask/core/pull/4782))
19+
20+
- **BREAKING**: `TokensController` requires a subscription to the `NetworkController:stateChange` event. It now now removes state for chain IDs when their network is removed. ([#4782](https://github.com/MetaMask/core/pull/4782))
21+
22+
- `TokenRatesController` now removes state for chain IDs when their network is removed. ([#4782](https://github.com/MetaMask/core/pull/4782))
23+
24+
## [43.1.1]
25+
26+
### Changed
27+
28+
- Fix a bug in `TokensController.addTokens` where tokens could be added from the wrong chain. ([#4924](https://github.com/MetaMask/core/pull/4924))
29+
30+
## [43.1.0]
31+
32+
### Added
33+
34+
- Add Solana to the polled exchange rates ([#4914](https://github.com/MetaMask/core/pull/4914))
35+
36+
## [43.0.0]
37+
38+
### Added
39+
40+
- `AccountTrackerController` now tracks balances of staked ETH for each account, under the state property `stakedBalance`. ([#4879](https://github.com/MetaMask/core/pull/4879))
41+
42+
### Changed
43+
44+
- **BREAKING**: The polling input for`TokenListController` is now `{chainId: Hex}` instead of `{networkClientId: NetworkClientId}`. ([#4878](https://github.com/MetaMask/core/pull/4878))
45+
- **BREAKING**: The polling input for`TokenDetectionController` is now `{ chainIds: Hex[]; address: string; }` instead of `{ networkClientId: NetworkClientId; address: string; }`. ([#4894](https://github.com/MetaMask/core/pull/4894))
46+
- **BREAKING:** Bump `@metamask/keyring-controller` peer dependency from `^17.0.0` to `^18.0.0` ([#4195](https://github.com/MetaMask/core/pull/4195))
47+
- **BREAKING:** Bump `@metamask/preferences-controller` peer dependency from `^13.2.0` to `^14.0.0` ([#4909](https://github.com/MetaMask/core/pull/4909), [#4915](https://github.com/MetaMask/core/pull/4915))
48+
- **BREAKING:** Bump `@metamask/accounts-controller` peer dependency from `^18.0.0` to `^19.0.0` ([#4915](https://github.com/MetaMask/core/pull/4915))
49+
- Bump `@metamask/controller-utils` from `^11.4.2` to `^11.4.3` ([#4195](https://github.com/MetaMask/core/pull/4195))
50+
1051
## [42.0.0]
1152

1253
### Added
@@ -1189,7 +1230,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11891230
11901231
- Use Ethers for AssetsContractController ([#845](https://github.com/MetaMask/core/pull/845))
11911232
1192-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@42.0.0...HEAD
1233+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@44.0.0...HEAD
1234+
[44.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@43.1.1...@metamask/assets-controllers@44.0.0
1235+
[43.1.1]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@43.1.0...@metamask/assets-controllers@43.1.1
1236+
[43.1.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@43.0.0...@metamask/assets-controllers@43.1.0
1237+
[43.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@42.0.0...@metamask/assets-controllers@43.0.0
11931238
[42.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@41.0.0...@metamask/assets-controllers@42.0.0
11941239
[41.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@40.0.0...@metamask/assets-controllers@41.0.0
11951240
[40.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@39.0.0...@metamask/assets-controllers@40.0.0

0 commit comments

Comments
 (0)