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

@splitsoftware/splitio

Package Overview
Dependencies
Maintainers
0
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 11.0.0-rc.2 to 11.0.0-rc.3

2

CHANGES.txt
11.0.0 (October XX, 2024)
- Added support for targeting rules based on large segments for browsers.
- Added `factory.getState()` method for standalone server-side SDKs, which returns the rollout plan snapshot from the storage.
- Added `preloadedData` configuration option for standalone client-side SDKs, which allows preloading the SDK storage with a snapshot of the rollout plan.
- Added `factory.destroy()` method, which invokes the `destroy` method of all clients created by the factory.

@@ -6,0 +4,0 @@ - Updated @splitsoftware/splitio-commons package to version 2.0.0 that includes major updates and updated some transitive dependencies for vulnerability fixes.

3

cjs/factory/browser.js

@@ -17,2 +17,3 @@ "use strict";

var sdkUserConsent_1 = require("@splitsoftware/splitio-commons/cjs/consent/sdkUserConsent");
var LocalhostFromObject_1 = require("@splitsoftware/splitio-commons/cjs/sync/offline/LocalhostFromObject");
var browser_1 = require("../settings/browser");

@@ -52,3 +53,3 @@ var platform_1 = require("../platform");

modules.splitApiFactory = undefined;
modules.syncManagerFactory = settings.sync.localhostMode;
modules.syncManagerFactory = LocalhostFromObject_1.localhostFromObjectFactory;
modules.SignalListener = undefined;

@@ -55,0 +56,0 @@ break;

@@ -10,3 +10,2 @@ "use strict";

var InMemoryStorage_1 = require("@splitsoftware/splitio-commons/cjs/storages/inMemory/InMemoryStorage");
var dataLoader_1 = require("@splitsoftware/splitio-commons/cjs/storages/dataLoader");
var sdkManager_1 = require("@splitsoftware/splitio-commons/cjs/sdkManager");

@@ -17,2 +16,3 @@ var sdkClientMethod_1 = require("@splitsoftware/splitio-commons/cjs/sdkClient/sdkClientMethod");

var constants_1 = require("@splitsoftware/splitio-commons/cjs/utils/constants");
var LocalhostFromFile_1 = require("../sync/offline/LocalhostFromFile");
var node_1 = require("../settings/node");

@@ -42,12 +42,3 @@ var platform_1 = require("../platform");

impressionsObserverFactory: impressionObserverSS_1.impressionObserverSSFactory,
filterAdapterFactory: bloomFilter_1.bloomFilterFactory,
extraProps: function (params) {
if (params.settings.mode !== constants_1.CONSUMER_MODE) {
return {
getState: function (userKeys) {
return (0, dataLoader_1.getSnapshot)(params.storage, userKeys);
}
};
}
}
filterAdapterFactory: bloomFilter_1.bloomFilterFactory
};

@@ -57,3 +48,3 @@ switch (settings.mode) {

modules.splitApiFactory = undefined;
modules.syncManagerFactory = settings.sync.localhostMode;
modules.syncManagerFactory = LocalhostFromFile_1.localhostFromFileFactory;
modules.SignalListener = undefined;

@@ -60,0 +51,0 @@ break;

@@ -7,3 +7,2 @@ "use strict";

var builtinLogger_1 = require("@splitsoftware/splitio-commons/cjs/utils/settingsValidation/logger/builtinLogger");
var LocalhostFromObject_1 = require("@splitsoftware/splitio-commons/cjs/sync/offline/LocalhostFromObject");
var consent_1 = require("@splitsoftware/splitio-commons/cjs/utils/settingsValidation/consent");

@@ -18,3 +17,2 @@ var browser_1 = require("./defaults/browser");

logger: builtinLogger_1.validateLogger,
localhost: function () { return (0, LocalhostFromObject_1.LocalhostFromObject)(); },
consent: consent_1.validateConsent,

@@ -21,0 +19,0 @@ };

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.packageVersion = void 0;
exports.packageVersion = '11.0.0-rc.2';
exports.packageVersion = '11.0.0-rc.3';

@@ -6,3 +6,2 @@ "use strict";

var builtinLogger_1 = require("@splitsoftware/splitio-commons/cjs/utils/settingsValidation/logger/builtinLogger");
var LocalhostFromFile_1 = require("../sync/offline/LocalhostFromFile");
var node_1 = require("./defaults/node");

@@ -17,3 +16,2 @@ var node_2 = require("./storage/node");

logger: builtinLogger_1.validateLogger,
localhost: function () { return (0, LocalhostFromFile_1.LocalhostFromFile)(); },
flagSpec: function () { return FLAG_SPEC_VERSION; }

@@ -20,0 +18,0 @@ // In Node.js the SDK ignores `config.integrations`, so a validator for integrations is not required

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LocalhostFromFile = void 0;
exports.localhostFromFileFactory = void 0;
var splitsParserFromFile_1 = require("./splitsParserFromFile");
var syncManagerOffline_1 = require("@splitsoftware/splitio-commons/cjs/sync/offline/syncManagerOffline");
// Singleton instance of the factory function for offline SyncManager from YAML file (a.k.a. localhostFromFile)
// Singleton instance of the factory function for offline SyncManager from YAML file
// It uses NodeJS APIs.
var localhostFromFile = (0, syncManagerOffline_1.syncManagerOfflineFactory)(splitsParserFromFile_1.splitsParserFromFileFactory);
localhostFromFile.type = 'LocalhostFromFile';
function LocalhostFromFile() {
return localhostFromFile;
}
exports.LocalhostFromFile = LocalhostFromFile;
exports.localhostFromFileFactory = (0, syncManagerOffline_1.syncManagerOfflineFactory)(splitsParserFromFile_1.splitsParserFromFileFactory);

@@ -14,2 +14,3 @@ import { splitApiFactory } from '@splitsoftware/splitio-commons/esm/services/splitApi';

import { createUserConsentAPI } from '@splitsoftware/splitio-commons/esm/consent/sdkUserConsent';
import { localhostFromObjectFactory } from '@splitsoftware/splitio-commons/esm/sync/offline/LocalhostFromObject';
import { settingsFactory } from '../settings/browser';

@@ -49,3 +50,3 @@ import { platform, SignalListener } from '../platform';

modules.splitApiFactory = undefined;
modules.syncManagerFactory = settings.sync.localhostMode;
modules.syncManagerFactory = localhostFromObjectFactory;
modules.SignalListener = undefined;

@@ -52,0 +53,0 @@ break;

@@ -7,3 +7,2 @@ import { splitApiFactory } from '@splitsoftware/splitio-commons/esm/services/splitApi';

import { InMemoryStorageFactory } from '@splitsoftware/splitio-commons/esm/storages/inMemory/InMemoryStorage';
import { getSnapshot } from '@splitsoftware/splitio-commons/esm/storages/dataLoader';
import { sdkManagerFactory } from '@splitsoftware/splitio-commons/esm/sdkManager';

@@ -14,2 +13,3 @@ import { sdkClientMethodFactory } from '@splitsoftware/splitio-commons/esm/sdkClient/sdkClientMethod';

import { CONSUMER_MODE, LOCALHOST_MODE } from '@splitsoftware/splitio-commons/esm/utils/constants';
import { localhostFromFileFactory } from '../sync/offline/LocalhostFromFile';
import { settingsFactory } from '../settings/node';

@@ -39,12 +39,3 @@ import { platform, SignalListener } from '../platform';

impressionsObserverFactory: impressionObserverSSFactory,
filterAdapterFactory: bloomFilterFactory,
extraProps: function (params) {
if (params.settings.mode !== CONSUMER_MODE) {
return {
getState: function (userKeys) {
return getSnapshot(params.storage, userKeys);
}
};
}
}
filterAdapterFactory: bloomFilterFactory
};

@@ -54,3 +45,3 @@ switch (settings.mode) {

modules.splitApiFactory = undefined;
modules.syncManagerFactory = settings.sync.localhostMode;
modules.syncManagerFactory = localhostFromFileFactory;
modules.SignalListener = undefined;

@@ -57,0 +48,0 @@ break;

import { settingsValidation } from '@splitsoftware/splitio-commons/esm/utils/settingsValidation';
import { validateRuntime } from '@splitsoftware/splitio-commons/esm/utils/settingsValidation/runtime';
import { validateLogger } from '@splitsoftware/splitio-commons/esm/utils/settingsValidation/logger/builtinLogger';
import { LocalhostFromObject } from '@splitsoftware/splitio-commons/esm/sync/offline/LocalhostFromObject';
import { validateConsent } from '@splitsoftware/splitio-commons/esm/utils/settingsValidation/consent';

@@ -14,3 +13,2 @@ import { defaults } from './defaults/browser';

logger: validateLogger,
localhost: function () { return LocalhostFromObject(); },
consent: validateConsent,

@@ -17,0 +15,0 @@ };

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

export var packageVersion = '11.0.0-rc.2';
export var packageVersion = '11.0.0-rc.3';
import { settingsValidation } from '@splitsoftware/splitio-commons/esm/utils/settingsValidation';
import { validateLogger } from '@splitsoftware/splitio-commons/esm/utils/settingsValidation/logger/builtinLogger';
import { LocalhostFromFile } from '../sync/offline/LocalhostFromFile';
import { defaults } from './defaults/node';

@@ -13,3 +12,2 @@ import { validateStorage } from './storage/node';

logger: validateLogger,
localhost: function () { return LocalhostFromFile(); },
flagSpec: function () { return FLAG_SPEC_VERSION; }

@@ -16,0 +14,0 @@ // In Node.js the SDK ignores `config.integrations`, so a validator for integrations is not required

import { splitsParserFromFileFactory } from './splitsParserFromFile';
import { syncManagerOfflineFactory } from '@splitsoftware/splitio-commons/esm/sync/offline/syncManagerOffline';
// Singleton instance of the factory function for offline SyncManager from YAML file (a.k.a. localhostFromFile)
// Singleton instance of the factory function for offline SyncManager from YAML file
// It uses NodeJS APIs.
var localhostFromFile = syncManagerOfflineFactory(splitsParserFromFileFactory);
localhostFromFile.type = 'LocalhostFromFile';
export function LocalhostFromFile() {
return localhostFromFile;
}
export var localhostFromFileFactory = syncManagerOfflineFactory(splitsParserFromFileFactory);
{
"name": "@splitsoftware/splitio",
"version": "11.0.0-rc.2",
"version": "11.0.0-rc.3",
"description": "Split SDK",

@@ -41,4 +41,3 @@ "files": [

"dependencies": {
"@splitsoftware/splitio-commons": "2.0.0-rc.2",
"@types/ioredis": "^4.28.0",
"@splitsoftware/splitio-commons": "2.0.0-rc.4",
"bloom-filters": "^3.0.0",

@@ -113,5 +112,3 @@ "ioredis": "^4.28.0",

"test-node-e2e-redis": "cross-env NODE_ENV=test tape -r ./ts-node.register src/__tests__/consumer/node_redis.spec.js | tap-min",
"pretest-ts-decls": "npm run build-esm && npm run build-cjs && npm link",
"test-ts-decls": "./scripts/ts-tests.sh",
"posttest-ts-decls": "npm rm --location=global @splitsoftware/splitio && npm install",
"test-ts-decls": "tsc --build ts-tests",
"test": "npm run test-node && npm run test-browser",

@@ -118,0 +115,0 @@ "all": "npm run check && npm run build && npm run test-ts-decls && npm run test",

@@ -14,2 +14,3 @@ import { splitApiFactory } from '@splitsoftware/splitio-commons/src/services/splitApi';

import { createUserConsentAPI } from '@splitsoftware/splitio-commons/src/consent/sdkUserConsent';
import { localhostFromObjectFactory } from '@splitsoftware/splitio-commons/src/sync/offline/LocalhostFromObject';

@@ -64,3 +65,3 @@ import { settingsFactory } from '../settings/browser';

modules.splitApiFactory = undefined;
modules.syncManagerFactory = settings.sync.localhostMode;
modules.syncManagerFactory = localhostFromObjectFactory;
modules.SignalListener = undefined;

@@ -67,0 +68,0 @@ break;

@@ -7,3 +7,2 @@ import { splitApiFactory } from '@splitsoftware/splitio-commons/src/services/splitApi';

import { InMemoryStorageFactory } from '@splitsoftware/splitio-commons/src/storages/inMemory/InMemoryStorage';
import { getSnapshot } from '@splitsoftware/splitio-commons/src/storages/dataLoader';
import { sdkManagerFactory } from '@splitsoftware/splitio-commons/src/sdkManager';

@@ -15,2 +14,3 @@ import { sdkClientMethodFactory } from '@splitsoftware/splitio-commons/src/sdkClient/sdkClientMethod';

import { localhostFromFileFactory } from '../sync/offline/LocalhostFromFile';
import { settingsFactory } from '../settings/node';

@@ -53,13 +53,3 @@ import { platform, SignalListener } from '../platform';

filterAdapterFactory: bloomFilterFactory,
extraProps: (params) => {
if (params.settings.mode !== CONSUMER_MODE) {
return {
getState(userKeys) {
return getSnapshot(params.storage, userKeys);
}
};
}
}
filterAdapterFactory: bloomFilterFactory
};

@@ -70,3 +60,3 @@

modules.splitApiFactory = undefined;
modules.syncManagerFactory = settings.sync.localhostMode;
modules.syncManagerFactory = localhostFromFileFactory;
modules.SignalListener = undefined;

@@ -73,0 +63,0 @@ break;

import { settingsValidation } from '@splitsoftware/splitio-commons/src/utils/settingsValidation';
import { validateRuntime } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/runtime';
import { validateLogger } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/logger/builtinLogger';
import { LocalhostFromObject } from '@splitsoftware/splitio-commons/src/sync/offline/LocalhostFromObject';
import { validateConsent } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/consent';

@@ -16,3 +15,2 @@

logger: validateLogger,
localhost: () => LocalhostFromObject(),
consent: validateConsent,

@@ -19,0 +17,0 @@ };

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

export const packageVersion = '11.0.0-rc.2';
export const packageVersion = '11.0.0-rc.3';
import { settingsValidation } from '@splitsoftware/splitio-commons/src/utils/settingsValidation';
import { validateLogger } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/logger/builtinLogger';
import { LocalhostFromFile } from '../sync/offline/LocalhostFromFile';

@@ -16,3 +15,2 @@ import { defaults } from './defaults/node';

logger: validateLogger,
localhost: () => LocalhostFromFile(),
flagSpec: () => FLAG_SPEC_VERSION

@@ -19,0 +17,0 @@ // In Node.js the SDK ignores `config.integrations`, so a validator for integrations is not required

import { splitsParserFromFileFactory } from './splitsParserFromFile';
import { syncManagerOfflineFactory } from '@splitsoftware/splitio-commons/src/sync/offline/syncManagerOffline';
// Singleton instance of the factory function for offline SyncManager from YAML file (a.k.a. localhostFromFile)
// Singleton instance of the factory function for offline SyncManager from YAML file
// It uses NodeJS APIs.
const localhostFromFile = syncManagerOfflineFactory(splitsParserFromFileFactory);
localhostFromFile.type = 'LocalhostFromFile';
export function LocalhostFromFile() {
return localhostFromFile;
}
export const localhostFromFileFactory = syncManagerOfflineFactory(splitsParserFromFileFactory);
// Declaration file for JavaScript Split Software SDK
// Project: http://www.split.io/
/// <reference path="../splitio.d.ts" />
import '@splitsoftware/splitio-commons';
export = JsSdk;

@@ -13,3 +14,3 @@

*/
export function SplitFactory(settings: SplitIO.IBrowserSettings): SplitIO.IBrowserSDK;
export function SplitFactory(settings: SplitIO.IBrowserSettings): SplitIO.ISDK;
}

@@ -5,3 +5,3 @@ // Declaration file for JavaScript and Node Split Software SDK v8.1.0

/// <reference path="./splitio.d.ts" />
import '@splitsoftware/splitio-commons';

@@ -16,3 +16,3 @@ export = JsSdk;

*/
export function SplitFactory(settings: SplitIO.INodeAsyncSettings): SplitIO.IAsyncSDK;
export function SplitFactory(settings: SplitIO.INodeAsyncSettings): SplitIO.INodeAsyncSDK;
/**

@@ -23,3 +23,3 @@ * Split.io SDK factory function.

*/
export function SplitFactory(settings: SplitIO.INodeSettings): SplitIO.ISDK;
export function SplitFactory(settings: SplitIO.INodeSettings): SplitIO.INodeSDK;
/**

@@ -30,3 +30,3 @@ * Split.io SDK factory function.

*/
export function SplitFactory(settings: SplitIO.IBrowserSettings): SplitIO.IBrowserSDK;
export function SplitFactory(settings: SplitIO.IBrowserSettings): SplitIO.ISDK;
}
// Declaration file for JavaScript Split Software SDK
// Project: http://www.split.io/
/// <reference path="../splitio.d.ts" />
import '@splitsoftware/splitio-commons';
export = JsSdk;

@@ -13,3 +14,3 @@

*/
export function SplitFactory(settings: SplitIO.INodeAsyncSettings): SplitIO.IAsyncSDK;
export function SplitFactory(settings: SplitIO.INodeAsyncSettings): SplitIO.INodeAsyncSDK;
/**

@@ -20,3 +21,3 @@ * Split.io SDK factory function.

*/
export function SplitFactory(settings: SplitIO.INodeSettings): SplitIO.ISDK;
export function SplitFactory(settings: SplitIO.INodeSettings): SplitIO.INodeSDK;
}
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