Skip to content

Commit

Permalink
Merge branch 'main' into MMI-5803-deferral-proposal-2
Browse files Browse the repository at this point in the history
  • Loading branch information
shane-t authored Dec 9, 2024
2 parents 5deafba + f5ff895 commit 2f7ffb1
Show file tree
Hide file tree
Showing 166 changed files with 6,762 additions and 4,479 deletions.
17 changes: 15 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
root: true,
extends: ['@metamask/eslint-config', '@metamask/eslint-config-nodejs'],
extends: ['@metamask/eslint-config'],
ignorePatterns: [
'!.eslintrc.js',
'!jest.config.js',
'!.prettierrc.js',
'node_modules',
'**/dist',
'**/docs',
Expand All @@ -12,6 +12,19 @@ module.exports = {
'scripts/create-package/package-template',
],
overrides: [
{
files: [
'**/jest.config.js',
'**/jest.environment.js',
'**/tests/**/*.{ts,js}',
'*.js',
'*.test.{ts,js}',
'scripts/*.ts',
'scripts/create-package/*.ts',
'yarn.config.cjs',
],
extends: ['@metamask/eslint-config-nodejs'],
},
{
files: ['*.test.{ts,js}', '**/tests/**/*.{ts,js}'],
extends: ['@metamask/eslint-config-jest'],
Expand Down
6 changes: 1 addition & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Note: Please keep this synchronized with the `teams.json` file in the repository root.
# That file is used for some automated workflows, and maps controller to owning team(s).

* @MetaMask/engineering
/.github/ @MetaMask/wallet-framework-engineers

## Accounts Team
Expand All @@ -13,7 +12,7 @@
/packages/chain-controller @MetaMask/accounts-engineers

## Assets Team
/packages/assets-controller @MetaMask/metamask-assets
/packages/assets-controllers @MetaMask/metamask-assets

## Confirmations Team
/packages/address-book-controller @MetaMask/confirmations
Expand All @@ -34,7 +33,6 @@
/packages/phishing-controller @MetaMask/product-safety

## Snaps Team
/packages/notification-controller @MetaMask/snaps-devs
/packages/rate-limit-controller @MetaMask/snaps-devs

## Wallet API Platform Team
Expand Down Expand Up @@ -86,8 +84,6 @@
/packages/message-manager/CHANGELOG.md @MetaMask/confirmations @MetaMask/wallet-framework-engineers
/packages/name-controller/package.json @MetaMask/confirmations @MetaMask/wallet-framework-engineers
/packages/name-controller/CHANGELOG.md @MetaMask/confirmations @MetaMask/wallet-framework-engineers
/packages/notification-controller/package.json @MetaMask/snaps-devs @MetaMask/wallet-framework-engineers
/packages/notification-controller/CHANGELOG.md @MetaMask/snaps-devs @MetaMask/wallet-framework-engineers
/packages/notification-services-controller/package.json @MetaMask/notifications @MetaMask/wallet-framework-engineers
/packages/notification-services-controller/CHANGELOG.md @MetaMask/notifications @MetaMask/wallet-framework-engineers
/packages/phishing-controller/package.json @MetaMask/product-safety @MetaMask/wallet-framework-engineers
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-update-issues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
if [[ $version == *.0.0 ]]; then
# Fetch responsible team from file
teams=$(jq -r --arg key "$package_name" '.[$key]' teams.json)
gh issue create --title "Update ${package_name} to version ${version}" --body "Please update ${package_name} to version ${version}" --repo "MetaMask/metamask-extension" --label "$teams"
gh issue create --title "Update ${package_name} to version ${version}" --body "Please update ${package_name} to version ${version}" --repo "MetaMask/metamask-mobile" --label "$teams"
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"
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"
fi
fi
done
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Each package in this repository has its own README where you can find installati
- [`@metamask/multichain`](packages/multichain)
- [`@metamask/name-controller`](packages/name-controller)
- [`@metamask/network-controller`](packages/network-controller)
- [`@metamask/notification-controller`](packages/notification-controller)
- [`@metamask/notification-services-controller`](packages/notification-services-controller)
- [`@metamask/permission-controller`](packages/permission-controller)
- [`@metamask/permission-log-controller`](packages/permission-log-controller)
Expand Down Expand Up @@ -85,7 +84,6 @@ linkStyle default opacity:0.5
multichain(["@metamask/multichain"]);
name_controller(["@metamask/name-controller"]);
network_controller(["@metamask/network-controller"]);
notification_controller(["@metamask/notification-controller"]);
notification_services_controller(["@metamask/notification-services-controller"]);
permission_controller(["@metamask/permission-controller"]);
permission_log_controller(["@metamask/permission-log-controller"]);
Expand Down Expand Up @@ -141,7 +139,6 @@ linkStyle default opacity:0.5
network_controller --> controller_utils;
network_controller --> eth_json_rpc_provider;
network_controller --> json_rpc_engine;
notification_controller --> base_controller;
notification_services_controller --> base_controller;
notification_services_controller --> controller_utils;
notification_services_controller --> keyring_controller;
Expand All @@ -162,8 +159,8 @@ linkStyle default opacity:0.5
preferences_controller --> keyring_controller;
profile_sync_controller --> base_controller;
profile_sync_controller --> keyring_controller;
profile_sync_controller --> accounts_controller;
profile_sync_controller --> network_controller;
profile_sync_controller --> accounts_controller;
queued_request_controller --> base_controller;
queued_request_controller --> controller_utils;
queued_request_controller --> json_rpc_engine;
Expand All @@ -179,6 +176,7 @@ linkStyle default opacity:0.5
signature_controller --> approval_controller;
signature_controller --> keyring_controller;
signature_controller --> logging_controller;
signature_controller --> network_controller;
transaction_controller --> base_controller;
transaction_controller --> controller_utils;
transaction_controller --> accounts_controller;
Expand Down
8 changes: 4 additions & 4 deletions docs/writing-controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class FooController extends BaseController</* ... */> {
state = {},
}: {
messenger: FooControllerMessenger;
state: Partial<FooControllerState>;
state?: Partial<FooControllerState>;
}) {
super({
// ...
Expand Down Expand Up @@ -87,7 +87,7 @@ class FooController extends BaseController</* ... */> {
state = {},
}: {
messenger: FooControllerMessenger;
state: Partial<FooControllerState>;
state?: Partial<FooControllerState>;
}) {
super({
name,
Expand Down Expand Up @@ -158,7 +158,7 @@ class FooController extends BaseController</* ... */> {
state = {},
}: {
messenger: FooControllerMessenger;
state: Partial<FooControllerState>;
state?: Partial<FooControllerState>;
},
isEnabled: boolean,
) {
Expand All @@ -177,7 +177,7 @@ class FooController extends BaseController</* ... */> {
isEnabled,
}: {
messenger: FooControllerMessenger;
state: Partial<FooControllerState>;
state?: Partial<FooControllerState>;
isEnabled: boolean;
}) {
// ...
Expand Down
2 changes: 1 addition & 1 deletion examples/example-controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@metamask/controller-utils": "^11.4.3",
"@metamask/controller-utils": "^11.4.4",
"@types/jest": "^27.4.1",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/example-controllers/src/gas-prices-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export type GasPricesControllerActions =
/**
* All actions that {@link GasPricesController} calls internally.
*/
export type AllowedActions = NetworkControllerGetStateAction;
type AllowedActions = NetworkControllerGetStateAction;

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

/**
* The messenger which is restricted to actions and events accessed by
Expand Down
4 changes: 2 additions & 2 deletions examples/example-controllers/src/pet-names-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export type PetNamesControllerActions = PetNamesControllerGetStateAction;
/**
* All actions that {@link PetNamesController} calls internally.
*/
export type AllowedActions = never;
type AllowedActions = never;

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

/**
* The messenger which is restricted to actions and events accessed by
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/core-monorepo",
"version": "259.0.0",
"version": "266.0.0",
"private": true,
"description": "Monorepo for packages shared between MetaMask clients",
"repository": {
Expand Down Expand Up @@ -51,16 +51,17 @@
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@lavamoat/allow-scripts": "^3.0.4",
"@lavamoat/preinstall-always-fail": "^2.1.0",
"@metamask/create-release-branch": "^3.1.0",
"@metamask/eslint-config": "^12.2.0",
"@metamask/eslint-config-jest": "^12.1.0",
"@metamask/eslint-config-nodejs": "^12.1.0",
"@metamask/eslint-config-typescript": "^12.1.0",
"@metamask/eth-block-tracker": "^11.0.2",
"@metamask/eth-block-tracker": "^11.0.3",
"@metamask/eth-json-rpc-provider": "^4.1.6",
"@metamask/json-rpc-engine": "^10.0.1",
"@metamask/utils": "^10.0.0",
"@ts-bridge/cli": "^0.5.1",
"@ts-bridge/cli": "^0.6.1",
"@types/jest": "^27.4.1",
"@types/lodash": "^4.14.191",
"@types/node": "^16.18.54",
Expand Down
17 changes: 16 additions & 1 deletion packages/accounts-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [20.0.1]

### Fixed

- Make implicit peer dependencies explicit ([#4974](https://github.com/MetaMask/core/pull/4974))
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
- `@metamask/providers` `^18.1.0` (required by `@metamask/keyring-api`)
- `webextension-polyfill` `^0.10.0 || ^0.11.0 || ^0.12.0` (required by `@metamask/providers`)
- These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
- 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.
- 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))
- `@metamask/keyring-api`
- `@metamask/eth-snap-keyring`

## [20.0.0]

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

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

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[20.0.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[20.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[19.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[18.2.3]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
Expand Down
12 changes: 8 additions & 4 deletions packages/accounts-controller/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/accounts-controller",
"version": "20.0.0",
"version": "20.0.1",
"description": "Manages internal accounts",
"keywords": [
"MetaMask",
Expand Down Expand Up @@ -61,19 +61,23 @@
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@metamask/keyring-controller": "^19.0.0",
"@metamask/keyring-controller": "^19.0.1",
"@metamask/providers": "^18.1.1",
"@metamask/snaps-controllers": "^9.10.0",
"@types/jest": "^27.4.1",
"@types/readable-stream": "^2.3.0",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.2.2"
"typescript": "~5.2.2",
"webextension-polyfill": "^0.12.0"
},
"peerDependencies": {
"@metamask/keyring-controller": "^19.0.0",
"@metamask/snaps-controllers": "^9.7.0"
"@metamask/providers": "^18.1.0",
"@metamask/snaps-controllers": "^9.7.0",
"webextension-polyfill": "^0.10.0 || ^0.11.0 || ^0.12.0"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
11 changes: 10 additions & 1 deletion packages/address-book-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [6.0.2]

### Changed

- Bump `@metamask/utils` from `^9.1.0` to `^10.0.0` ([#4831](https://github.com/MetaMask/core/pull/4831))
- Bump `@metamask/base-controller` from `^7.0.1` to `^7.0.2` ([#4862](https://github.com/MetaMask/core/pull/4862))
- Bump `@metamask/controller-utils` from `^11.3.0` to `^11.4.4` ([#4834](https://github.com/MetaMask/core/pull/4834), [#4862](https://github.com/MetaMask/core/pull/4862), [#4870](https://github.com/MetaMask/core/pull/4870), [#4915](https://github.com/MetaMask/core/pull/4915), [#5012](https://github.com/MetaMask/core/pull/5012))

## [6.0.1]

### Fixed
Expand Down Expand Up @@ -186,7 +194,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

All changes listed after this point were applied to this package following the monorepo conversion.

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[6.0.2]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[6.0.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[6.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[5.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions packages/address-book-controller/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/address-book-controller",
"version": "6.0.1",
"version": "6.0.2",
"description": "Manages a list of recipient addresses associated with nicknames",
"keywords": [
"MetaMask",
Expand Down Expand Up @@ -48,7 +48,7 @@
},
"dependencies": {
"@metamask/base-controller": "^7.0.2",
"@metamask/controller-utils": "^11.4.3",
"@metamask/controller-utils": "^11.4.4",
"@metamask/utils": "^10.0.0"
},
"devDependencies": {
Expand Down
9 changes: 8 additions & 1 deletion packages/announcement-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [7.0.2]

### Changed

- Bump `@metamask/base-controller` from `^7.0.1` to `^7.0.2` ([#4862](https://github.com/MetaMask/core/pull/4862))

## [7.0.1]

### Changed
Expand Down Expand Up @@ -164,7 +170,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

All changes listed after this point were applied to this package following the monorepo conversion.

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[7.0.2]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[7.0.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[7.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[6.1.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion packages/announcement-controller/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/announcement-controller",
"version": "7.0.1",
"version": "7.0.2",
"description": "Manages in-app announcements",
"keywords": [
"MetaMask",
Expand Down
Loading

0 comments on commit 2f7ffb1

Please sign in to comment.