From 96e66c0091d7da9c26e423161881048b4db50bd4 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Wed, 7 May 2025 12:21:06 -0300 Subject: [PATCH 1/3] rc --- CHANGES.txt | 3 +++ package-lock.json | 32 +++++++++++++++++--------------- package.json | 4 ++-- src/settings/defaults/version.js | 2 +- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index fdbf0d362..f24326ead 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +11.2.1 (May 7, 2025) + - Updated @splitsoftware/splitio-commons package to version 2.2.1, which optimizes Redis storage to avoid lazy require of the `ioredis` dependency when the SDK is initialized. + 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: diff --git a/package-lock.json b/package-lock.json index a5142e979..519aa5a6b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@splitsoftware/splitio", - "version": "11.2.0", + "version": "11.2.1-rc.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio", - "version": "11.2.0", + "version": "11.2.1-rc.1", "license": "Apache-2.0", "dependencies": { - "@splitsoftware/splitio-commons": "2.2.0", + "@splitsoftware/splitio-commons": "2.2.1-rc.2", "bloom-filters": "^3.0.4", "ioredis": "^4.28.0", "js-yaml": "^3.13.1", @@ -351,9 +351,10 @@ "dev": true }, "node_modules/@splitsoftware/splitio-commons": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.2.0.tgz", - "integrity": "sha512-ywWDh2fM4/EqJ1AByjXM13gAal+z/WSGiBQ5OZmjpL/iqFLENy3yo/GwsxR/ataOi27XbRQTeQbE/eD7HVnWiA==", + "version": "2.2.1-rc.2", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.2.1-rc.2.tgz", + "integrity": "sha512-XRrxiz05cL8kMCePQYf2wWvJc+FR3O/ukQNy7tRZDO/jQDS7dOzeoeGs6vMHwraJ3LDySGyB6hd78pVEI4unZw==", + "license": "Apache-2.0", "dependencies": { "@types/ioredis": "^4.28.0", "tslib": "^2.3.1" @@ -6364,10 +6365,11 @@ } }, "node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.2.tgz", + "integrity": "sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==", "dev": true, + "license": "MIT", "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -7537,9 +7539,9 @@ "dev": true }, "@splitsoftware/splitio-commons": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.2.0.tgz", - "integrity": "sha512-ywWDh2fM4/EqJ1AByjXM13gAal+z/WSGiBQ5OZmjpL/iqFLENy3yo/GwsxR/ataOi27XbRQTeQbE/eD7HVnWiA==", + "version": "2.2.1-rc.2", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.2.1-rc.2.tgz", + "integrity": "sha512-XRrxiz05cL8kMCePQYf2wWvJc+FR3O/ukQNy7tRZDO/jQDS7dOzeoeGs6vMHwraJ3LDySGyB6hd78pVEI4unZw==", "requires": { "@types/ioredis": "^4.28.0", "tslib": "^2.3.1" @@ -12221,9 +12223,9 @@ } }, "tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.2.tgz", + "integrity": "sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==", "dev": true, "requires": { "chownr": "^1.1.1", diff --git a/package.json b/package.json index c3ac42b76..e244e2c8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio", - "version": "11.2.0", + "version": "11.2.1-rc.1", "description": "Split SDK", "files": [ "README.md", @@ -38,7 +38,7 @@ "node": ">=14.0.0" }, "dependencies": { - "@splitsoftware/splitio-commons": "2.2.0", + "@splitsoftware/splitio-commons": "2.2.1-rc.2", "bloom-filters": "^3.0.4", "ioredis": "^4.28.0", "js-yaml": "^3.13.1", diff --git a/src/settings/defaults/version.js b/src/settings/defaults/version.js index e116c4aa8..e287d5d95 100644 --- a/src/settings/defaults/version.js +++ b/src/settings/defaults/version.js @@ -1 +1 @@ -export const packageVersion = '11.2.0'; +export const packageVersion = '11.2.1-rc.1'; From 6d87064432e0c92e5154be6446a48fac5ce51ee4 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Wed, 7 May 2025 16:51:58 -0300 Subject: [PATCH 2/3] rc --- CHANGES.txt | 5 +++-- package-lock.json | 18 +++++++++--------- package.json | 4 ++-- src/__tests__/consumer/node_redis.spec.js | 16 ++++++++-------- src/settings/defaults/version.js | 2 +- 5 files changed, 23 insertions(+), 22 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index f24326ead..289c9c6b1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ 11.2.1 (May 7, 2025) - - Updated @splitsoftware/splitio-commons package to version 2.2.1, which optimizes Redis storage to avoid lazy require of the `ioredis` dependency when the SDK is initialized. + - Updated @splitsoftware/splitio-commons package to version 2.2.1, which optimizes the Redis storage to avoid lazy require of the `ioredis` dependency and allow queueing feature flag evaluations before SDK_READY event is emitted (Reverted in v10.22.0). 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. @@ -124,7 +124,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`. diff --git a/package-lock.json b/package-lock.json index 519aa5a6b..6f913e492 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@splitsoftware/splitio", - "version": "11.2.1-rc.1", + "version": "11.2.1-rc.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio", - "version": "11.2.1-rc.1", + "version": "11.2.1-rc.2", "license": "Apache-2.0", "dependencies": { - "@splitsoftware/splitio-commons": "2.2.1-rc.2", + "@splitsoftware/splitio-commons": "2.2.1-rc.3", "bloom-filters": "^3.0.4", "ioredis": "^4.28.0", "js-yaml": "^3.13.1", @@ -351,9 +351,9 @@ "dev": true }, "node_modules/@splitsoftware/splitio-commons": { - "version": "2.2.1-rc.2", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.2.1-rc.2.tgz", - "integrity": "sha512-XRrxiz05cL8kMCePQYf2wWvJc+FR3O/ukQNy7tRZDO/jQDS7dOzeoeGs6vMHwraJ3LDySGyB6hd78pVEI4unZw==", + "version": "2.2.1-rc.3", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.2.1-rc.3.tgz", + "integrity": "sha512-0d7LR/BBHOswCY2CvqGdFuBmr8nUfAC0ldA2n0YkbjrWbL4EQvT6ULMTlYdD3V25ubE04n41usf71L6vS0i15w==", "license": "Apache-2.0", "dependencies": { "@types/ioredis": "^4.28.0", @@ -7539,9 +7539,9 @@ "dev": true }, "@splitsoftware/splitio-commons": { - "version": "2.2.1-rc.2", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.2.1-rc.2.tgz", - "integrity": "sha512-XRrxiz05cL8kMCePQYf2wWvJc+FR3O/ukQNy7tRZDO/jQDS7dOzeoeGs6vMHwraJ3LDySGyB6hd78pVEI4unZw==", + "version": "2.2.1-rc.3", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.2.1-rc.3.tgz", + "integrity": "sha512-0d7LR/BBHOswCY2CvqGdFuBmr8nUfAC0ldA2n0YkbjrWbL4EQvT6ULMTlYdD3V25ubE04n41usf71L6vS0i15w==", "requires": { "@types/ioredis": "^4.28.0", "tslib": "^2.3.1" diff --git a/package.json b/package.json index e244e2c8d..6afdc6d3a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio", - "version": "11.2.1-rc.1", + "version": "11.2.1-rc.2", "description": "Split SDK", "files": [ "README.md", @@ -38,7 +38,7 @@ "node": ">=14.0.0" }, "dependencies": { - "@splitsoftware/splitio-commons": "2.2.1-rc.2", + "@splitsoftware/splitio-commons": "2.2.1-rc.3", "bloom-filters": "^3.0.4", "ioredis": "^4.28.0", "js-yaml": "^3.13.1", diff --git a/src/__tests__/consumer/node_redis.spec.js b/src/__tests__/consumer/node_redis.spec.js index 7bc0c93b1..65b2306ba 100644 --- a/src/__tests__/consumer/node_redis.spec.js +++ b/src/__tests__/consumer/node_redis.spec.js @@ -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.')); @@ -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'); @@ -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(); diff --git a/src/settings/defaults/version.js b/src/settings/defaults/version.js index e287d5d95..6410bf837 100644 --- a/src/settings/defaults/version.js +++ b/src/settings/defaults/version.js @@ -1 +1 @@ -export const packageVersion = '11.2.1-rc.1'; +export const packageVersion = '11.2.1-rc.2'; From d40a1d7c3eb6f90029f52c8d326e83919ce2b9d0 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Fri, 9 May 2025 15:12:45 -0300 Subject: [PATCH 3/3] Update changelog entry --- CHANGES.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 289c9c6b1..94f19f0d0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,7 @@ -11.2.1 (May 7, 2025) - - Updated @splitsoftware/splitio-commons package to version 2.2.1, which optimizes the Redis storage to avoid lazy require of the `ioredis` dependency and allow queueing feature flag evaluations before SDK_READY event is emitted (Reverted in v10.22.0). +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.