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

@collabland/common

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@collabland/common - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [0.8.0](https://github.com/abridged/collabland-monorepo/compare/@collabland/common@0.7.0...@collabland/common@0.8.0) (2021-03-30)
### Features
* re-enable kchannel readiness check ([c300614](https://github.com/abridged/collabland-monorepo/commit/c3006146b39ea42aed954052228383ca1d93497e))
# [0.7.0](https://github.com/abridged/collabland-monorepo/compare/@collabland/common@0.6.0...@collabland/common@0.7.0) (2021-03-16)

@@ -8,0 +19,0 @@

15

package.json
{
"name": "@collabland/common",
"version": "0.7.0",
"version": "0.8.0",
"description": "CollabLand common utilities",

@@ -47,12 +47,11 @@ "main": "dist/index.js",

"devDependencies": {
"@loopback/build": "^6.2.9",
"@loopback/eslint-config": "^10.0.5",
"@loopback/testlab": "^3.2.12",
"@types/node": "^12.19.14",
"@loopback/build": "^6.3.0",
"@loopback/eslint-config": "^10.1.0",
"@loopback/testlab": "^3.3.0",
"@types/node": "^10.17.55",
"source-map-support": "^0.5.19",
"typescript": "^4.1.4"
"typescript": "~4.2.3"
},
"copyright.owner": "Abridged, Inc.",
"author": "Abridged, Inc.",
"gitHead": "11b009fdc594d9dfd365b2cb81e6264ef59c3f52"
"author": "Abridged, Inc."
}

@@ -57,5 +57,5 @@ // Copyright Abridged, Inc. 2021. All Rights Reserved.

*/
export type RetryOptions = {
export type RetryOptions<T = unknown> = {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
shouldRetry?: (err: any) => boolean;
shouldRetry?: (err?: any, data?: T) => boolean;
waitInMs?: number | ((retries: number) => number);

@@ -72,5 +72,5 @@ maxRetries?: number;

fn: () => Promise<T>,
options?: RetryOptions,
options?: RetryOptions<T>,
) {
const shouldRetry = options?.shouldRetry ?? (() => true);
const shouldRetry = options?.shouldRetry ?? ((err, data) => err != null);
const waitInMs = options?.waitInMs ?? exponentialBackoff(50);

@@ -83,3 +83,6 @@ const maxRetries = options?.maxRetries ?? 5;

const result = await fn();
return result;
if (!shouldRetry(undefined, result)) {
return result;
}
// Let's retry
} catch (err) {

@@ -86,0 +89,0 @@ if (retries >= maxRetries) {

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