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

@splitsoftware/splitio

Package Overview
Dependencies
Maintainers
8
Versions
487
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@splitsoftware/splitio - npm Package Compare versions

Comparing version 10.24.1 to 10.24.2-rc.0

3

CHANGES.txt

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

10.25.0 (January 4, 2024)
- Updated SDK to support URLs using 'http://' scheme in NodeJS, for connecting to the Split Synchronizer in proxy mode using HTTP.
10.24.1 (December 12, 2023)

@@ -2,0 +5,0 @@ - Updated SDK cache for browsers using localStorage, to clear cached feature flag definitions before initiating the synchronization process if the cache was previously synchronized with a different SDK key (i.e., a different environment) or different Split Filter criteria, to avoid using invalid cached data when the SDK is ready from cache.

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

/* eslint-disable compat/compat */
import https from 'https';
// @TODO
// 1- handle multiple protocols automatically
// 2- destroy it once the sdk is destroyed
var agent = new https.Agent({
keepAlive: true,
keepAliveMsecs: 1500
});
var nodeFetch;

@@ -16,4 +25,12 @@ try {

}
/**
* Retrieves 'node-fetch', a Fetch API polyfill for NodeJS, with fallback to global 'fetch' if available.
* It passes an https agent with keepAlive enabled if URL is https.
*/
export function getFetch() {
return nodeFetch;
if (nodeFetch) {
return function (url, options) {
return nodeFetch(url, Object.assign({ agent: url.startsWith('https://') ? agent : undefined }, options));
};
}
}

2

es/platform/node.js
import EventEmitter from 'events';
import { getFetch } from '../platform/getFetch/node';
import { getEventSource } from '../platform/getEventSource/node';
import { getOptions } from '../platform/request/options/node';
import { NodeSignalListener } from '@splitsoftware/splitio-commons/esm/listeners/node';
import { now } from '@splitsoftware/splitio-commons/esm/utils/timeTracker/now/node';
export var platform = {
getOptions: getOptions,
getFetch: getFetch,

@@ -10,0 +8,0 @@ getEventSource: getEventSource,

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

export var packageVersion = '10.24.1';
export var packageVersion = '10.24.2-rc.0';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFetch = exports.__setFetch = void 0;
var tslib_1 = require("tslib");
/* eslint-disable compat/compat */
var https_1 = (0, tslib_1.__importDefault)(require("https"));
// @TODO
// 1- handle multiple protocols automatically
// 2- destroy it once the sdk is destroyed
var agent = new https_1.default.Agent({
keepAlive: true,
keepAliveMsecs: 1500
});
var nodeFetch;

@@ -20,5 +30,13 @@ try {

exports.__setFetch = __setFetch;
/**
* Retrieves 'node-fetch', a Fetch API polyfill for NodeJS, with fallback to global 'fetch' if available.
* It passes an https agent with keepAlive enabled if URL is https.
*/
function getFetch() {
return nodeFetch;
if (nodeFetch) {
return function (url, options) {
return nodeFetch(url, Object.assign({ agent: url.startsWith('https://') ? agent : undefined }, options));
};
}
}
exports.getFetch = getFetch;

@@ -8,12 +8,10 @@ "use strict";

var node_2 = require("../platform/getEventSource/node");
var node_3 = require("../platform/request/options/node");
var node_4 = require("@splitsoftware/splitio-commons/cjs/listeners/node");
var node_5 = require("@splitsoftware/splitio-commons/cjs/utils/timeTracker/now/node");
var node_3 = require("@splitsoftware/splitio-commons/cjs/listeners/node");
var node_4 = require("@splitsoftware/splitio-commons/cjs/utils/timeTracker/now/node");
exports.platform = {
getOptions: node_3.getOptions,
getFetch: node_1.getFetch,
getEventSource: node_2.getEventSource,
EventEmitter: events_1.default,
now: node_5.now
now: node_4.now
};
exports.SignalListener = node_4.NodeSignalListener;
exports.SignalListener = node_3.NodeSignalListener;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.packageVersion = void 0;
exports.packageVersion = '10.24.1';
exports.packageVersion = '10.24.2-rc.0';
{
"name": "@splitsoftware/splitio",
"version": "10.24.1",
"version": "10.24.2-rc.0",
"description": "Split SDK",

@@ -43,3 +43,3 @@ "files": [

"dependencies": {
"@splitsoftware/splitio-commons": "1.12.1",
"@splitsoftware/splitio-commons": "1.12.2-rc.0",
"@types/google.analytics": "0.0.40",

@@ -50,3 +50,3 @@ "@types/ioredis": "^4.28.0",

"js-yaml": "^3.13.1",
"node-fetch": "^2.6.7",
"node-fetch": "^2.7.0",
"unfetch": "^4.2.0"

@@ -58,3 +58,3 @@ },

"devDependencies": {
"@types/node-fetch": "^2.5.12",
"@types/node-fetch": "^2.6.10",
"@types/seedrandom": "^3.0.2",

@@ -61,0 +61,0 @@ "copyfiles": "^2.4.1",

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

/* eslint-disable compat/compat */
import https from 'https';
// @TODO
// 1- handle multiple protocols automatically
// 2- destroy it once the sdk is destroyed
const agent = new https.Agent({
keepAlive: true,
keepAliveMsecs: 1500
});
let nodeFetch;

@@ -19,4 +30,12 @@

/**
* Retrieves 'node-fetch', a Fetch API polyfill for NodeJS, with fallback to global 'fetch' if available.
* It passes an https agent with keepAlive enabled if URL is https.
*/
export function getFetch() {
return nodeFetch;
if (nodeFetch) {
return (url, options) => {
return nodeFetch(url, Object.assign({ agent: url.startsWith('https://') ? agent : undefined }, options));
};
}
}
import EventEmitter from 'events';
import { getFetch } from '../platform/getFetch/node';
import { getEventSource } from '../platform/getEventSource/node';
import { getOptions } from '../platform/request/options/node';
import { NodeSignalListener } from '@splitsoftware/splitio-commons/src/listeners/node';

@@ -9,3 +8,2 @@ import { now } from '@splitsoftware/splitio-commons/src/utils/timeTracker/now/node';

export const platform = {
getOptions,
getFetch,

@@ -12,0 +10,0 @@ getEventSource,

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

export const packageVersion = '10.24.1';
export const packageVersion = '10.24.2-rc.0';
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