Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
11.2.1 (May XX, 2025)
- Updated @splitsoftware/splitio-commons package to version 2.2.1, which optimizes the Redis storage to:
- Avoid lazy require of the `ioredis` dependency when the SDK is initialized, and
- Flag the SDK as ready from cache immediately to allow queueing feature flag evaluations before SDK_READY event is emitted.

11.2.0 (March 28, 2025)
- Added a new optional argument to the client `getTreatment` methods to allow passing additional evaluation options, such as a map of properties to append to the generated impressions sent to Split backend. Read more in our docs.
- Added two new configuration options for the SDK's `LOCALSTORAGE` storage type to control the behavior of the persisted rollout plan cache in the browser:
Expand Down Expand Up @@ -122,7 +127,8 @@
10.22.0 (October 5, 2022)
- Added a new impressions mode for the SDK called NONE, to be used in factory when there is no desire to capture impressions on an SDK factory to feed Split's analytics engine. Running NONE mode, the SDK will only capture unique keys evaluated for a particular feature flag instead of full blown impressions.
- Updated default value of `scheduler.featuresRefreshRate` config parameter from 5 seconds to 60 seconds for Node.js and from 30 seconds to 60 seconds for Browser.
- Updated @splitsoftware/splitio-commons package to version 1.7.1, that improves the performance of feature flag evaluations (i.e., `getTreatment(s)` method calls) when using the default storage in memory, among other improvements.
- Updated @splitsoftware/splitio-commons package to version 1.7.1, that improves the performance of feature flag evaluations (i.e., `getTreatment(s)` method calls) when using the default storage in memory,
and avoid calling the storage for cached feature flags when the SDK is not ready or ready from cache, among other improvements.

10.21.1 (July 25, 2022)
- Bugfixing - Added missed type definitions `enabled` from `sync`.
Expand Down
19 changes: 10 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@splitsoftware/splitio",
"version": "11.2.0",
"version": "11.2.1-rc.2",
"description": "Split SDK",
"files": [
"README.md",
Expand Down Expand Up @@ -38,7 +38,7 @@
"node": ">=14.0.0"
},
"dependencies": {
"@splitsoftware/splitio-commons": "2.2.0",
"@splitsoftware/splitio-commons": "2.2.1-rc.3",
"bloom-filters": "^3.0.4",
"ioredis": "^4.28.0",
"js-yaml": "^3.13.1",
Expand Down
16 changes: 8 additions & 8 deletions src/__tests__/consumer/node_redis.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ tape('Node.js Redis', function (t) {
const client = sdk.client();
const manager = sdk.manager();

/** Evaluation, track and manager methods before SDK_READY */
client.getTreatment('UT_Segment_member', 'UT_IN_SEGMENT').then(result => assert.equal(result, 'control', 'Evaluations using Redis storage should be control until connection is stablished.'));
client.getTreatment('other', 'UT_IN_SEGMENT').then(result => assert.equal(result, 'control', 'Evaluations using Redis storage should be control until connection is stablished.'));
/** Evaluation, track and manager methods before SDK_READY (but SDK_READY_FROM_CACHE) */
client.getTreatment('UT_Segment_member', 'UT_IN_SEGMENT').then(result => assert.equal(result, 'on', 'Evaluations using Redis storage should be control until connection is stablished.'));
client.getTreatment('other', 'UT_IN_SEGMENT').then(result => assert.equal(result, 'off', 'Evaluations using Redis storage should be control until connection is stablished.'));

manager.names().then((result) => assert.deepEqual(result, [], 'manager `names` method returns an empty list of split names if called before SDK_READY or Redis operation fail'));
manager.split(expectedSplitName).then((result) => assert.deepEqual(result, null, 'manager `split` method returns a null split view if called before SDK_READY or Redis operation fail'));
manager.splits().then((result) => assert.deepEqual(result, [], 'manager `splits` method returns an empty list of split views if called before SDK_READY or Redis operation fail'));
manager.names().then((result) => assert.equal(result.length, 26, 'manager `names` method returns an empty list of split names if called before SDK_READY or Redis operation fail'));
manager.split(expectedSplitName).then((result) => assert.deepEqual(result, expectedSplitView, 'manager `split` method returns a null split view if called before SDK_READY or Redis operation fail'));
manager.splits().then((result) => assert.equal(result.length, 26, 'manager `splits` method returns an empty list of split views if called before SDK_READY or Redis operation fail'));

client.track('nicolas@split.io', 'user', 'before.ready', 18).then((result) => assert.true(result, 'Redis adapter queue "rpush" operations until it is ready.'));

Expand Down Expand Up @@ -453,7 +453,7 @@ tape('Node.js Redis', function (t) {
assert.plan(18);

client.getTreatment('UT_Segment_member', 'always-on').then(treatment => {
assert.equal(treatment, 'control', 'Evaluations using Redis storage should be control until Redis connection is stablished.');
assert.equal(treatment, 'on', 'Evaluations using Redis storage should be control until Redis connection is stablished.');
});
client.track('nicolas@split.io', 'user', 'test.redis.event', 18).then(result => {
assert.true(result, 'If the event was successfully queued the promise will resolve to true once Redis connection is stablished');
Expand Down Expand Up @@ -687,7 +687,7 @@ tape('Node.js Redis', function (t) {

const client = sdk.client();

client.getTreatmentsWithConfigByFlagSets('other', ['set_one']).then(result => assert.deepEqual(result, {}, 'Flag sets evaluations using Redis storage should be empty until connection is ready.'));
client.getTreatmentsWithConfigByFlagSets('other', ['set_one']).then(result => assert.deepEqual(result, { 'always-on': { treatment: 'on', config: null }, 'always-off': { treatment: 'off', config: null } }, 'Flag sets evaluations using Redis storage should be empty until connection is ready.'));

await client.ready();

Expand Down
2 changes: 1 addition & 1 deletion src/settings/defaults/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const packageVersion = '11.2.0';
export const packageVersion = '11.2.1-rc.2';