-
-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release 188.0.0 #4625
Merged
Merged
Release 188.0.0 #4625
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MajorLift
commented
Aug 20, 2024
Comment on lines
12
to
15
### Uncategorized | ||
|
||
- Bump `typescript` from `~5.1.6` to `~5.2.2` ([#4584](https://github.com/MetaMask/core/pull/4584)) | ||
- Bump `typescript` from `~5.0.4` to `~5.1.6` ([#4576](https://github.com/MetaMask/core/pull/4576)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
### Uncategorized | |
- Bump `typescript` from `~5.1.6` to `~5.2.2` ([#4584](https://github.com/MetaMask/core/pull/4584)) | |
- Bump `typescript` from `~5.0.4` to `~5.1.6` ([#4576](https://github.com/MetaMask/core/pull/4576)) | |
### Changed | |
- Bump `typescript` from `~5.0.4` to `~5.2.2` ([#4576](https://github.com/MetaMask/core/pull/4576), [#4584](https://github.com/MetaMask/core/pull/4584)) |
MajorLift
commented
Aug 20, 2024
Comment on lines
12
to
20
### Uncategorized | ||
|
||
- [composable-controller] Fix incorrect behavior and improve type-level safeguards ([#4467](https://github.com/MetaMask/core/pull/4467)) | ||
- Bump `typescript` from `~5.1.6` to `~5.2.2` ([#4584](https://github.com/MetaMask/core/pull/4584)) | ||
- Bump `typescript` from `~5.0.4` to `~5.1.6` ([#4576](https://github.com/MetaMask/core/pull/4576)) | ||
- Release 179.0.0 ([#4544](https://github.com/MetaMask/core/pull/4544)) | ||
- Upgrade to TypeScript v5.0 and set `module{,Resolution}` option to `Node16` ([#3645](https://github.com/MetaMask/core/pull/3645)) | ||
- Release/172.0.0 ([#4517](https://github.com/MetaMask/core/pull/4517)) | ||
- Restore ESLint warnings as errors (ignoring them for now) ([#4382](https://github.com/MetaMask/core/pull/4382)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
### Uncategorized | |
- [composable-controller] Fix incorrect behavior and improve type-level safeguards ([#4467](https://github.com/MetaMask/core/pull/4467)) | |
- Bump `typescript` from `~5.1.6` to `~5.2.2` ([#4584](https://github.com/MetaMask/core/pull/4584)) | |
- Bump `typescript` from `~5.0.4` to `~5.1.6` ([#4576](https://github.com/MetaMask/core/pull/4576)) | |
- Release 179.0.0 ([#4544](https://github.com/MetaMask/core/pull/4544)) | |
- Upgrade to TypeScript v5.0 and set `module{,Resolution}` option to `Node16` ([#3645](https://github.com/MetaMask/core/pull/3645)) | |
- Release/172.0.0 ([#4517](https://github.com/MetaMask/core/pull/4517)) | |
- Restore ESLint warnings as errors (ignoring them for now) ([#4382](https://github.com/MetaMask/core/pull/4382)) | |
### Changed | |
- **BREAKING:** Add two required generic parameters to the `ComposableController` class: `ComposedControllerState` (constrained by `LegacyComposableControllerStateConstraint`) and `ChildControllers` (constrained by `ControllerInstance`) ([#4467](https://github.com/MetaMask/core/pull/4467)) | |
- **BREAKING:** The type guard `isBaseController` now validates that the input has an object-type property named `metadata` in addition to its existing checks ([#4467](https://github.com/MetaMask/core/pull/4467)) | |
- **BREAKING:** The type guard `isBaseControllerV1` now validates that the input has object-type properties `config`, `state`, and function-type property `subscribe`, in addition to its existing checks ([#4467](https://github.com/MetaMask/core/pull/4467)) | |
- **BREAKING:** Narrow `LegacyControllerStateConstraint` type from `BaseState | StateConstraint` to `BaseState & object | StateConstraint` ([#4467](https://github.com/MetaMask/core/pull/4467)) | |
- Add an optional generic parameter `ControllerName` to the `RestrictedControllerMessengerConstraint` type, which extends `string` and defaults to `string` ([#4467](https://github.com/MetaMask/core/pull/4467)) | |
- Bump `@metamask/base-controller` from `~6.0.0` to `~6.0.3` ([#4517](https://github.com/MetaMask/core/pull/4517), [#4544](https://github.com/MetaMask/core/pull/4544), [#4625](https://github.com/MetaMask/core/pull/4625)) | |
- Bump `typescript` from `~4.9.5` to `~5.2.2` and set `module{,Resolution}` options to `Node16` ([#3645](https://github.com/MetaMask/core/pull/3645), [#4576](https://github.com/MetaMask/core/pull/4576), [#4584](https://github.com/MetaMask/core/pull/4584)) | |
### Fixed | |
- **BREAKING:** The `ComposableController` class raises a type error if a non-controller with no `state` property is passed into the `ChildControllers` generic parameter or the `controllers` constructor option ([#4467](https://github.com/MetaMask/core/pull/4467)) | |
- Previously, a runtime error was thrown at class instantiation with no type-level enforcement. | |
- When the `ComposableController` class is instantiated, its messenger now attempts to subscribe to all child controller `stateChange` events that are included in the messenger's events allowlist ([#4467](https://github.com/MetaMask/core/pull/4467)) | |
- This was always the expected behavior, but a bug introduced in `@metamask/composable-controller@6.0.0` caused `stateChange` event subscriptions to fail. | |
- `isBaseController` and `isBaseControllerV1` no longer return false negatives ([#4467](https://github.com/MetaMask/core/pull/4467)) | |
- The `instanceof` operator is no longer used to validate that the input is a subclass of `BaseController` or `BaseControllerV1`. | |
- The `ChildControllerStateChangeEvents` type checks that the child controller's state extends from the `StateConstraintV1` type instead of from `Record<string, unknown>` ([#4467](https://github.com/MetaMask/core/pull/4467)) | |
- V1 controllers define their state types using the `interface` keyword, which are incompatible with `Record<string, unknown>` by default. This resulted in `ChildControllerStateChangeEvents` failing to generate `stateChange` events for V1 controllers and returning `never`. |
f23010b
to
22fe3b9
Compare
sleepytanya
approved these changes
Aug 20, 2024
Mrtenz
approved these changes
Aug 20, 2024
AugmentedMode
approved these changes
Aug 20, 2024
AugmentedMode
added a commit
that referenced
this pull request
Aug 28, 2024
## Explanation ### Dependency Updates: - **BREAKING**: Added `@noble/hashes` dependency version `^1.4.0`. - **BREAKING**: Added `ethereum-cryptography` dependency version `^2.1.2`. These dependencies were added to support hashing C2 requests for comparison against a C2 blocklist, enhancing the security and cryptographic capabilities within the package. ## Changelog ### `@metamask/phishing-controller` #### Breaking - **BREAKING**: Added `@noble/hashes` dependency version `^1.4.0`. - **BREAKING**: Added `ethereum-cryptography` dependency version `^2.1.2`. - **BREAKING**: `PhishingControllerMessenger` must allow internal events defined in the `PhishingControllerEvents` type ([#4633](#4633)). #### Added - **ADDED**: Added the ability to block Client Side C2 Requests by managing a hashed C2 Request Blocklist. - **ADDED**: Defined and exported new types: `PhishingControllerGetStateAction`, `PhishingControllerStateChangeEvent`, `PhishingControllerEvents` ([#4633](#4633)). - Added `requestBlocklist` type to `ListTypes`. - **ADDED**: `isBlockedRequest` method to `PhishingController`. - **ADDED**: Logic to update and check `requestBlocklist` in `#updateStalelist`. - **ADDED**: `isMaliciousRequestDomain` method to `PhishingDetector`. - **ADDED**: Handling of `requestBlocklist` in `PhishingDetector` configuration. - **ADDED**: `sha256` and `toHex` imports from `ethereum-cryptography`. - **ADDED**: `sha256Hash` function to generate SHA-256 hash of a domain. - **ADDED**: Allowlist functionality to the C2 domain detection system. #### Changed - `PhishingControllerActions` is widened to include the `PhishingController:getState` action ([#4633](#4633)). - Bumped `@metamask/base-controller` from `^6.0.2` to `^6.0.3` ([#4625](#4625)). - Bumped `@metamask/controller-utils` from `^11.0.2` to `^11.1.0` ([#4639](#4639)). ## 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. --------- Co-authored-by: Jongsun Suh <jongsun.suh@icloud.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation
This is a release candidate for
v188.0.0
:@metamask/base-controller@6.0.3
(patch)@metamask/composable-controller@8.0.0
(major)Changelog