Skip to content

Latest commit

 

History

History
181 lines (117 loc) · 8.93 KB

CHANGELOG.md

File metadata and controls

181 lines (117 loc) · 8.93 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Changed

  • Bump @metamask/utils from ^8.3.0 to ^9.1.0 (#4516, #4529)
  • Bump @metamask/rpc-errors from ^6.2.1 to ^6.3.1 (#4516)
  • Bump TypeScript from ~4.9.5 to ~5.2.2 and set moduleResolution option to Node16 (#3645, #4576, #4584)

Fixed

  • Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files (#4648)
    • Previously, this package shipped with only one variant of type declaration files, and these files were only CommonJS-compatible, and the exports field in package.json linked to these files. This is an anti-pattern and was rightfully flagged by the "Are the Types Wrong?" tool as "masquerading as CJS". All of the ATTW checks now pass.
  • Remove chunk files (#4648).
    • Previously, the build tool we used to generate JavaScript files extracted common code to "chunk" files. While this was intended to make this package more tree-shakeable, it also made debugging more difficult for our development teams. These chunk files are no longer present.

Changed

  • BREAKING: Bump minimum Node version to 18.18 (#3611)
  • Bump @metamask/base-controller to ^6.0.0 (#4352)

Changed

  • Bump @metamask/base-controller to ^5.0.2 (#4232)

Fixed

  • Fix types field in package.json (#4047)

Added

  • BREAKING: Add ESM build (#3998)
    • It's no longer possible to import files from ./dist directly.
  • Add and export types RateLimitedApiMap and RateLimitedRequests (#3963)
    • RateLimitedApiMap represents the type of the RateLimitedApis generic parameter used throughout the controller.
    • RateLimitedRequests represents the type of the request property of RateLimitState.

Changed

  • BREAKING: Rename types to align with conventions followed by other controllers (#3963)
    • GetRateLimitState is now RateLimitControllerGetStateAction.
    • RateLimitStateChange is now RateLimitControllerStateChangeEvent.
    • CallApi is now RateLimitControllerCallApiAction.
  • BREAKING: Bump @metamask/base-controller to ^5.0.0 (#4039)
    • This version has a number of breaking changes. See the changelog for more.
  • Bump @metamask/rpc-errors to ^6.2.1 (#3970)
  • Add @metamask/utils ^8.3.0 as a dependency (#3963)

Fixed

  • BREAKING: Correct action and event payloads for RateLimitControllerGetStateAction (formerly GetRateLimitState) and RateLimitStateChange (formerly RateLimitControllerStateChangeEvent) by replacing RateLimitedApis with RateLimitState<RateLimitedApis> (#3949)
    • The wrong type was introduced in 4.0.0.

Changed

  • Bump @metamask/base-controller to ^4.1.1 (#3760, #3821)

Changed

  • Bump @metamask/base-controller to ^4.0.1 (#3695)

Changed

  • BREAKING: Enforce that RateLimitedApi['method'] matches action handler type instead of using any (#1890)
  • BREAKING: Bump @metamask/base-controller to ^4.0.0 (#2063)
    • This is breaking because the type of the messenger has backward-incompatible changes. See the changelog for this package for more.

Changed

  • Bump dependency on @metamask/base-controller to ^3.2.3 (#1747)
  • Move from eth-rpc-errors ^4.0.2 to @metamask/rpc-errors ^6.1.0 (#1653)

Changed

  • Update TypeScript to v4.8.x (#1718)

Changed

  • Bump dependency on @metamask/base-controller to ^3.2.1

Changed

  • BREAKING: Allow RateLimitController to define a rate-limit per method (#1355)
    • The constructor implementations option now maps API names to objects with a method property, rather than mapping to a function. This object may also have rateLimitCount and rateLimitTimeout properties, allowing custom rate limits for that method.
  • BREAKING: Bump to Node 16 (#1262)

Changed

Removed

  • BREAKING: Remove isomorphic-fetch (#1106)
    • Consumers must now import isomorphic-fetch or another polyfill themselves if they are running in an environment without fetch

Changed

  • Rename this repository to core (#1031)
  • Update @metamask/controller-utils package (#1041)

Changed

  • Relax dependency on @metamask/base-controller (use ^ instead of ~) (#998)

Added

  • Initial release

    • As a result of converting our shared controllers repo into a monorepo (#831), we've created this package from select parts of @metamask/controllers v33.0.0, namely:

      • Everything in src/ratelimit

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