Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@smithy/util-retry

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/util-retry - npm Package Compare versions

Comparing version 3.0.8 to 3.0.9

6

dist-cjs/index.js

@@ -87,3 +87,3 @@ var __defProp = Object.defineProperty;

const delay = (amount - this.currentCapacity) / this.fillRate * 1e3;
await new Promise((resolve) => setTimeout(resolve, delay));
await new Promise((resolve) => _DefaultRateLimiter.setTimeoutFn(resolve, delay));
}

@@ -155,2 +155,6 @@ this.currentCapacity = this.currentCapacity - amount;

__name(_DefaultRateLimiter, "DefaultRateLimiter");
/**
* Only used in testing.
*/
_DefaultRateLimiter.setTimeoutFn = setTimeout;
var DefaultRateLimiter = _DefaultRateLimiter;

@@ -157,0 +161,0 @@

3

dist-es/DefaultRateLimiter.js

@@ -35,3 +35,3 @@ import { isThrottlingError } from "@smithy/service-error-classification";

const delay = ((amount - this.currentCapacity) / this.fillRate) * 1000;
await new Promise((resolve) => setTimeout(resolve, delay));
await new Promise((resolve) => DefaultRateLimiter.setTimeoutFn(resolve, delay));
}

@@ -101,1 +101,2 @@ this.currentCapacity = this.currentCapacity - amount;

}
DefaultRateLimiter.setTimeoutFn = setTimeout;

@@ -16,2 +16,6 @@ import { RateLimiter } from "./types";

export declare class DefaultRateLimiter implements RateLimiter {
/**
* Only used in testing.
*/
private static setTimeoutFn;
private beta;

@@ -18,0 +22,0 @@ private minCapacity;

@@ -16,2 +16,6 @@ import { RateLimiter } from "./types";

export declare class DefaultRateLimiter implements RateLimiter {
/**
* Only used in testing.
*/
private static setTimeoutFn;
private beta;

@@ -18,0 +22,0 @@ private minCapacity;

{
"name": "@smithy/util-retry",
"version": "3.0.8",
"version": "3.0.9",
"description": "Shared retry utilities to be used in middleware packages.",

@@ -18,3 +18,4 @@ "main": "./dist-cjs/index.js",

"extract:docs": "api-extractor run --local",
"test": "yarn g:jest"
"test": "yarn g:vitest run",
"test:watch": "yarn g:vitest watch"
},

@@ -31,4 +32,4 @@ "keywords": [

"dependencies": {
"@smithy/service-error-classification": "^3.0.8",
"@smithy/types": "^3.6.0",
"@smithy/service-error-classification": "^3.0.9",
"@smithy/types": "^3.7.0",
"tslib": "^2.6.2"

@@ -35,0 +36,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc