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

@ledgerhq/live-network

Package Overview
Dependencies
Maintainers
8
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ledgerhq/live-network - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2-nightly.0

7

CHANGELOG.md
# @ledgerhq/live-network
## 1.3.2-nightly.0
### Patch Changes
- Updated dependencies [[`4bd91de`](https://github.com/LedgerHQ/ledger-live/commit/4bd91de13442d12acce3ee83d5f2fd5f087570cf)]:
- @ledgerhq/live-env@2.2.0-nightly.0
## 1.3.1

@@ -4,0 +11,0 @@

7

lib-es/network.js

@@ -133,2 +133,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

};
// inspired by https://github.com/sindresorhus/got/blob/main/documentation/7-retry.md#retry
const retryableHttpStatusCodes = [408, 413, 429, 500, 502, 503, 504, 521, 522, 524];
/**

@@ -152,5 +154,4 @@ * Network call

if (error && error.status) {
// A 422 shouldn't be retried without change as explained in this documentation
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422
return error.status !== 422;
// not all status codes are retryable
return retryableHttpStatusCodes.includes(error.status);
}

@@ -157,0 +158,0 @@ return true;

@@ -142,2 +142,4 @@ "use strict";

};
// inspired by https://github.com/sindresorhus/got/blob/main/documentation/7-retry.md#retry
const retryableHttpStatusCodes = [408, 413, 429, 500, 502, 503, 504, 521, 522, 524];
/**

@@ -161,5 +163,4 @@ * Network call

if (error && error.status) {
// A 422 shouldn't be retried without change as explained in this documentation
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422
return error.status !== 422;
// not all status codes are retryable
return retryableHttpStatusCodes.includes(error.status);
}

@@ -166,0 +167,0 @@ return true;

{
"name": "@ledgerhq/live-network",
"version": "1.3.1",
"version": "1.3.2-nightly.0",
"description": "Ledger Live network and cache utilities",

@@ -68,3 +68,3 @@ "keywords": [

"@ledgerhq/errors": "^6.18.0",
"@ledgerhq/live-env": "^2.1.0",
"@ledgerhq/live-env": "^2.2.0-nightly.0",
"@ledgerhq/live-promise": "^0.1.0",

@@ -71,0 +71,0 @@ "@ledgerhq/logs": "^6.12.0"

@@ -178,2 +178,6 @@ import axios, {

};
// inspired by https://github.com/sindresorhus/got/blob/main/documentation/7-retry.md#retry
const retryableHttpStatusCodes = [408, 413, 429, 500, 502, 503, 504, 521, 522, 524];
/**

@@ -202,5 +206,4 @@ * Network call

if (error && error.status) {
// A 422 shouldn't be retried without change as explained in this documentation
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422
return error.status !== 422;
// not all status codes are retryable
return retryableHttpStatusCodes.includes(error.status);
}

@@ -207,0 +210,0 @@ return true;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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