New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@metamask/rate-limit-controller

Package Overview
Dependencies
Maintainers
12
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask/rate-limit-controller - npm Package Compare versions

Comparing version

to
4.0.1

7

CHANGELOG.md

@@ -9,2 +9,6 @@ # Changelog

## [4.0.1]
### Changed
- Bump `@metamask/base-controller` to `^4.0.1` ([#3695](https://github.com/MetaMask/core/pull/3695))
## [4.0.0]

@@ -61,3 +65,4 @@ ### Changed

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/rate-limit-controller@4.0.0...HEAD
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/rate-limit-controller@4.0.1...HEAD
[4.0.1]: https://github.com/MetaMask/core/compare/@metamask/rate-limit-controller@4.0.0...@metamask/rate-limit-controller@4.0.1
[4.0.0]: https://github.com/MetaMask/core/compare/@metamask/rate-limit-controller@3.0.3...@metamask/rate-limit-controller@4.0.0

@@ -64,0 +69,0 @@ [3.0.3]: https://github.com/MetaMask/core/compare/@metamask/rate-limit-controller@3.0.2...@metamask/rate-limit-controller@3.0.3

@@ -93,3 +93,7 @@ "use strict";

var _a;
// TODO: Replace `any` with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const previous = (_a = state.requests[api][origin]) !== null && _a !== void 0 ? _a : 0;
// TODO: Replace `any` with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
state.requests[api][origin] = previous + 1;

@@ -109,2 +113,4 @@ if (previous === 0) {

this.update((state) => {
// TODO: Replace `any` with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
state.requests[api][origin] = 0;

@@ -111,0 +117,0 @@ });

7

package.json
{
"name": "@metamask/rate-limit-controller",
"version": "4.0.0",
"version": "4.0.1",
"description": "Contains logic for rate-limiting API endpoints by requesting origin",

@@ -25,2 +25,3 @@ "keywords": [

"build:docs": "typedoc",
"changelog:update": "../../scripts/update-changelog.sh @metamask/rate-limit-controller",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/rate-limit-controller",

@@ -34,7 +35,7 @@ "publish:preview": "yarn npm publish --tag preview",

"dependencies": {
"@metamask/base-controller": "^4.0.0",
"@metamask/base-controller": "^4.0.1",
"@metamask/rpc-errors": "^6.1.0"
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.3",
"@metamask/auto-changelog": "^3.4.4",
"@types/jest": "^27.4.1",

@@ -41,0 +42,0 @@ "deepmerge": "^4.2.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet