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

unleash-client

Package Overview
Dependencies
Maintainers
3
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unleash-client - npm Package Compare versions

Comparing version 3.16.0 to 3.16.1

2

lib/details.json

@@ -1,1 +0,1 @@

{ "name": "unleash-client-node", "version": "3.15.0", "sdkVersion": "unleash-client-node:3.15.0" }
{ "name": "unleash-client-node", "version": "3.16.0", "sdkVersion": "unleash-client-node:3.16.0" }

@@ -56,3 +56,3 @@ /// <reference types="node" />

constructor({ url, appName, instanceId, projectName, refreshInterval, timeout, headers, customHeadersFunction, httpOptions, namePrefix, tags, bootstrapProvider, bootstrapOverride, storageProvider, }: RepositoryOptions);
timedFetch(): void;
timedFetch(interval: number): void;
validateFeature(feature: FeatureInterface): void;

@@ -59,0 +59,0 @@ start(): Promise<void>;

@@ -121,6 +121,6 @@ "use strict";

}
Repository.prototype.timedFetch = function () {
Repository.prototype.timedFetch = function (interval) {
var _this = this;
if (this.refreshInterval > 0) {
this.timer = setTimeout(function () { return _this.fetch(); }, this.refreshInterval);
if (interval > 0) {
this.timer = setTimeout(function () { return _this.fetch(); }, interval);
if (process.env.NODE_ENV !== 'test' && typeof this.timer.unref === 'function') {

@@ -272,3 +272,3 @@ this.timer.unref();

return __awaiter(this, void 0, void 0, function () {
var mergedTags, url, headers, _a, res, error, data, err_3, err_4;
var nextFetch, mergedTags, url, headers, _a, res, error, data, err_3, err_4, e;
return __generator(this, function (_b) {

@@ -280,2 +280,3 @@ switch (_b.label) {

}
nextFetch = this.refreshInterval;
_b.label = 1;

@@ -342,6 +343,13 @@ case 1:

err_4 = _b.sent();
this.emit(events_2.UnleashEvents.Error, err_4);
e = err_4;
if (e.code === 'ECONNRESET') {
nextFetch = Math.max(Math.floor(this.refreshInterval / 2), 1000);
this.emit(events_2.UnleashEvents.Warn, "Socket keep alive error, retrying in ".concat(nextFetch, "ms"));
}
else {
this.emit(events_2.UnleashEvents.Error, err_4);
}
return [3 /*break*/, 14];
case 13:
this.timedFetch();
this.timedFetch(nextFetch);
return [7 /*endfinally*/];

@@ -348,0 +356,0 @@ case 14: return [2 /*return*/];

{
"name": "unleash-client",
"version": "3.16.0",
"version": "3.16.1",
"description": "Unleash Client for Node",

@@ -33,3 +33,3 @@ "license": "Apache-2.0",

"ip": "^1.1.5",
"make-fetch-happen": "^10.0.0",
"make-fetch-happen": "^10.2.1",
"murmurhash3js": "^3.0.1",

@@ -49,6 +49,6 @@ "semver": "^7.3.5"

"@types/ip": "1.1.0",
"@types/make-fetch-happen": "10.0.0",
"@types/make-fetch-happen": "10.0.1",
"@types/murmurhash3js": "3.0.3",
"@types/node": "14.18.26",
"@types/semver": "7.3.12",
"@types/node": "14.18.32",
"@types/semver": "7.3.13",
"@typescript-eslint/eslint-plugin": "5.29.0",

@@ -68,3 +68,3 @@ "@unleash/client-specification": "4.2.2",

"husky": "7.0.4",
"lint-staged": "12.4.1",
"lint-staged": "12.5.0",
"mkdirp": "1.0.4",

@@ -71,0 +71,0 @@ "nock": "13.2.4",

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