Skip to content
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 4 commits into from
Aug 20, 2024
Merged

Release 188.0.0 #4625

merged 4 commits into from
Aug 20, 2024

Conversation

MajorLift
Copy link
Contributor

@MajorLift MajorLift commented Aug 20, 2024

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

### Changed

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

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))
Copy link
Contributor Author

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))

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))
Copy link
Contributor Author

@MajorLift MajorLift Aug 20, 2024

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`.

@MajorLift MajorLift marked this pull request as ready for review August 20, 2024 18:02
@MajorLift MajorLift requested review from a team as code owners August 20, 2024 18:02
@MajorLift MajorLift requested a review from a team August 20, 2024 18:27
@MajorLift MajorLift merged commit 40cc4dc into main Aug 20, 2024
116 checks passed
@MajorLift MajorLift deleted the release/188.0.0 branch August 20, 2024 18:32
@AugmentedMode AugmentedMode mentioned this pull request Aug 28, 2024
3 tasks
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants