New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@eppo/js-client-sdk-common

Package Overview
Dependencies
Maintainers
8
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eppo/js-client-sdk-common - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

dist/application-logger.d.ts

27

dist/poller.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const application_logger_1 = require("./application-logger");
const constants_1 = require("./constants");

@@ -24,10 +25,10 @@ // TODO: change this to a class with methods instead of something that returns a function

previousPollFailed = false;
console.log('Eppo SDK successfully requested initial configuration');
application_logger_1.logger.info('Eppo SDK successfully requested initial configuration');
}
catch (pollingError) {
previousPollFailed = true;
console.warn(`Eppo SDK encountered an error with initial poll of configurations: ${pollingError.message}`);
application_logger_1.logger.warn(`Eppo SDK encountered an error with initial poll of configurations: ${pollingError.message}`);
if (--startAttemptsRemaining > 0) {
const jitterMs = randomJitterMs(intervalMs);
console.warn(`Eppo SDK will retry the initial poll again in ${jitterMs} ms (${startAttemptsRemaining} attempts remaining)`);
application_logger_1.logger.warn(`Eppo SDK will retry the initial poll again in ${jitterMs} ms (${startAttemptsRemaining} attempts remaining)`);
await new Promise((resolve) => setTimeout(resolve, jitterMs));

@@ -37,6 +38,6 @@ }

if (options === null || options === void 0 ? void 0 : options.pollAfterFailedStart) {
console.warn('Eppo SDK initial poll failed; will attempt regular polling');
application_logger_1.logger.warn('Eppo SDK initial poll failed; will attempt regular polling');
}
else {
console.error('Eppo SDK initial poll failed. Aborting polling');
application_logger_1.logger.error('Eppo SDK initial poll failed. Aborting polling');
stop();

@@ -54,10 +55,10 @@ }

if (startRegularPolling) {
console.log(`Eppo SDK starting regularly polling every ${intervalMs} ms`);
application_logger_1.logger.info(`Eppo SDK starting regularly polling every ${intervalMs} ms`);
nextTimer = setTimeout(poll, intervalMs);
}
else {
console.log(`Eppo SDK will not poll for configuration updates`);
application_logger_1.logger.info(`Eppo SDK will not poll for configuration updates`);
}
if (startErrorToThrow) {
console.log('Eppo SDK rethrowing start error');
application_logger_1.logger.info('Eppo SDK rethrowing start error');
throw startErrorToThrow;

@@ -72,3 +73,3 @@ }

}
console.log('Eppo SDK polling stopped');
application_logger_1.logger.info('Eppo SDK polling stopped');
}

@@ -88,3 +89,3 @@ };

previousPollFailed = false;
console.log('Eppo SDK poll successful; resuming normal polling');
application_logger_1.logger.info('Eppo SDK poll successful; resuming normal polling');
}

@@ -94,3 +95,3 @@ }

previousPollFailed = true;
console.warn(`Eppo SDK encountered an error polling configurations: ${error.message}`);
application_logger_1.logger.warn(`Eppo SDK encountered an error polling configurations: ${error.message}`);
const maxTries = 1 + ((_a = options === null || options === void 0 ? void 0 : options.maxPollRetries) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_POLL_CONFIG_REQUEST_RETRIES);

@@ -101,6 +102,6 @@ if (++failedAttempts < maxTries) {

nextPollMs = failureWaitMultiplier * intervalMs + jitterMs;
console.warn(`Eppo SDK will try polling again in ${nextPollMs} ms (${maxTries - failedAttempts} attempts remaining)`);
application_logger_1.logger.warn(`Eppo SDK will try polling again in ${nextPollMs} ms (${maxTries - failedAttempts} attempts remaining)`);
}
else {
console.error(`Eppo SDK reached maximum of ${failedAttempts} failed polling attempts. Stopping polling`);
application_logger_1.logger.error(`Eppo SDK reached maximum of ${failedAttempts} failed polling attempts. Stopping polling`);
stop();

@@ -107,0 +108,0 @@ }

@@ -107,5 +107,3 @@ "use strict";

function compareNumber(attributeValue, conditionValue, compareFn) {
return (typeof attributeValue === 'number' &&
typeof conditionValue === 'number' &&
compareFn(attributeValue, conditionValue));
return compareFn(Number(attributeValue), Number(conditionValue));
}

@@ -112,0 +110,0 @@ function compareSemVer(attributeValue, conditionValue, compareFn) {

{
"name": "@eppo/js-client-sdk-common",
"version": "2.2.1",
"version": "2.2.2",
"description": "Eppo SDK for client-side JavaScript applications (base for both web and react native)",

@@ -70,2 +70,3 @@ "main": "dist/index.js",

"md5": "^2.3.0",
"pino": "^8.19.0",
"semver": "^7.5.4",

@@ -72,0 +73,0 @@ "universal-base64": "^2.1.0"

Sorry, the diff of this file is too big to display

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