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-nightly.2 to 1.4.0-nightly.3

6

CHANGELOG.md
# @ledgerhq/live-network
## 1.4.0-nightly.3
### Minor Changes
- [#7334](https://github.com/LedgerHQ/ledger-live/pull/7334) [`53ff78c`](https://github.com/LedgerHQ/ledger-live/commit/53ff78c541d3ed69a3e74854d77f58a7e0d93978) Thanks [@gre](https://github.com/gre)! - live-network no longer retry network calls on HTTP status code that shouldn't be retried like 401 & some others.
## 1.3.1-nightly.2

@@ -4,0 +10,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-nightly.2",
"version": "1.4.0-nightly.3",
"description": "Ledger Live network and cache utilities",

@@ -5,0 +5,0 @@ "keywords": [

@@ -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

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