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.
- 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 setmoduleResolution
option toNode16
(#3645, #4576, #4584)
- 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 inpackage.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.
- Previously, this package shipped with only one variant of type declaration
files, and these files were only CommonJS-compatible, and the
- 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.
- BREAKING: Bump minimum Node version to 18.18 (#3611)
- Bump
@metamask/base-controller
to^6.0.0
(#4352)
- Bump
@metamask/base-controller
to^5.0.2
(#4232)
- Fix
types
field inpackage.json
(#4047)
- BREAKING: Add ESM build (#3998)
- It's no longer possible to import files from
./dist
directly.
- It's no longer possible to import files from
- Add and export types
RateLimitedApiMap
andRateLimitedRequests
(#3963)RateLimitedApiMap
represents the type of theRateLimitedApis
generic parameter used throughout the controller.RateLimitedRequests
represents the type of therequest
property ofRateLimitState
.
- BREAKING: Rename types to align with conventions followed by other controllers (#3963)
GetRateLimitState
is nowRateLimitControllerGetStateAction
.RateLimitStateChange
is nowRateLimitControllerStateChangeEvent
.CallApi
is nowRateLimitControllerCallApiAction
.
- 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)
- BREAKING: Correct action and event payloads for
RateLimitControllerGetStateAction
(formerlyGetRateLimitState)
andRateLimitStateChange
(formerlyRateLimitControllerStateChangeEvent
) by replacingRateLimitedApis
withRateLimitState<RateLimitedApis>
(#3949)- The wrong type was introduced in 4.0.0.
- Bump
@metamask/base-controller
to^4.0.1
(#3695)
- BREAKING: Enforce that
RateLimitedApi['method']
matches action handler type instead of usingany
(#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.
- This is breaking because the type of the
- 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)
- Update TypeScript to v4.8.x (#1718)
- Bump dependency on
@metamask/base-controller
to ^3.2.1
- BREAKING: Allow
RateLimitController
to define a rate-limit per method (#1355)- The constructor
implementations
option now maps API names to objects with amethod
property, rather than mapping to a function. This object may also haverateLimitCount
andrateLimitTimeout
properties, allowing custom rate limits for that method.
- The constructor
- BREAKING: Bump to Node 16 (#1262)
- deps: [email protected]>4.0.2 (#1215)
- BREAKING: Remove
isomorphic-fetch
(#1106)- Consumers must now import
isomorphic-fetch
or another polyfill themselves if they are running in an environment withoutfetch
- Consumers must now import
- Relax dependency on
@metamask/base-controller
(use^
instead of~
) (#998)
-
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.
- Everything in
-