From 7f1e85e236ce93c8be01e0f5fb14c9b19edf43c3 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Thu, 3 Apr 2025 15:19:22 -0300 Subject: [PATCH 01/13] Update tests --- src/__tests__/browserSuites/manager.spec.js | 3 ++- src/__tests__/consumer/node_redis.spec.js | 2 +- src/__tests__/nodeSuites/manager.spec.js | 3 ++- src/__tests__/offline/browser.spec.js | 6 +++--- src/__tests__/offline/node.spec.js | 24 ++++++++++++--------- ts-tests/index.ts | 3 ++- 6 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/__tests__/browserSuites/manager.spec.js b/src/__tests__/browserSuites/manager.spec.js index b595ffcce..8b76731dd 100644 --- a/src/__tests__/browserSuites/manager.spec.js +++ b/src/__tests__/browserSuites/manager.spec.js @@ -42,7 +42,8 @@ export default async function (settings, fetchMock, assert) { 'configs': mockSplits.ff.d[index].configurations || {}, 'sets': mockSplits.ff.d[index].sets || [], 'defaultTreatment': mockSplits.ff.d[index].defaultTreatment, - 'impressionsDisabled': false + 'impressionsDisabled': false, + 'prerequisites': [] }); assert.equal(manager.split('non_existent'), null, 'Trying to get a manager.split() of a Split that does not exist returns null.'); diff --git a/src/__tests__/consumer/node_redis.spec.js b/src/__tests__/consumer/node_redis.spec.js index a1be4de28..46045da53 100644 --- a/src/__tests__/consumer/node_redis.spec.js +++ b/src/__tests__/consumer/node_redis.spec.js @@ -61,7 +61,7 @@ const expectedImpressionCount = [ ]; const expectedSplitName = 'hierarchical_splits_testing_on'; -const expectedSplitView = { name: 'hierarchical_splits_testing_on', trafficType: 'user', killed: false, changeNumber: 1487277320548, treatments: ['on', 'off'], configs: {}, sets: [], defaultTreatment: 'off', impressionsDisabled: false }; +const expectedSplitView = { name: 'hierarchical_splits_testing_on', trafficType: 'user', killed: false, changeNumber: 1487277320548, treatments: ['on', 'off'], configs: {}, sets: [], defaultTreatment: 'off', impressionsDisabled: false, prerequisites: [] }; const MOCKS = { '': 'redis-commands', diff --git a/src/__tests__/nodeSuites/manager.spec.js b/src/__tests__/nodeSuites/manager.spec.js index 663a4df59..5b60434bb 100644 --- a/src/__tests__/nodeSuites/manager.spec.js +++ b/src/__tests__/nodeSuites/manager.spec.js @@ -41,7 +41,8 @@ export default async function (settings, fetchMock, assert) { 'configs': mockSplits.ff.d[index].configurations || {}, 'sets': mockSplits.ff.d[index].sets || [], 'defaultTreatment': mockSplits.ff.d[index].defaultTreatment, - 'impressionsDisabled': false + 'impressionsDisabled': false, + 'prerequisites': [] }); assert.equal(manager.split('non_existent'), null, 'Trying to get a manager.split() of a Split that does not exist returns null.'); diff --git a/src/__tests__/offline/browser.spec.js b/src/__tests__/offline/browser.spec.js index 4411914cf..8507e080b 100644 --- a/src/__tests__/offline/browser.spec.js +++ b/src/__tests__/offline/browser.spec.js @@ -168,10 +168,10 @@ tape('Browser offline mode', function (assert) { // Manager tests const expectedSplitView1 = { - name: 'testing_split', trafficType: 'localhost', killed: false, changeNumber: 0, treatments: ['on'], configs: {}, defaultTreatment: 'control', sets: [], impressionsDisabled: false + name: 'testing_split', trafficType: 'localhost', killed: false, changeNumber: 0, treatments: ['on'], configs: {}, defaultTreatment: 'control', sets: [], impressionsDisabled: false, prerequisites: [] }; const expectedSplitView2 = { - name: 'testing_split_with_config', trafficType: 'localhost', killed: false, changeNumber: 0, treatments: ['off'], configs: { off: '{ "color": "blue" }' }, defaultTreatment: 'control', sets: [], impressionsDisabled: false + name: 'testing_split_with_config', trafficType: 'localhost', killed: false, changeNumber: 0, treatments: ['off'], configs: { off: '{ "color": "blue" }' }, defaultTreatment: 'control', sets: [], impressionsDisabled: false, prerequisites: [] }; assert.deepEqual(manager.names(), ['testing_split', 'testing_split_with_config']); assert.deepEqual(manager.split('testing_split'), expectedSplitView1); @@ -282,7 +282,7 @@ tape('Browser offline mode', function (assert) { // Manager tests const expectedSplitView3 = { - name: 'testing_split_with_config', trafficType: 'localhost', killed: false, changeNumber: 0, treatments: ['nope'], configs: {}, defaultTreatment: 'control', sets: [], impressionsDisabled: false + name: 'testing_split_with_config', trafficType: 'localhost', killed: false, changeNumber: 0, treatments: ['nope'], configs: {}, defaultTreatment: 'control', sets: [], impressionsDisabled: false, prerequisites: [] }; assert.deepEqual(manager.names(), ['testing_split', 'testing_split_2', 'testing_split_3', 'testing_split_with_config']); assert.deepEqual(manager.split('testing_split'), expectedSplitView1); diff --git a/src/__tests__/offline/node.spec.js b/src/__tests__/offline/node.spec.js index cbc6e40d3..8c9698615 100644 --- a/src/__tests__/offline/node.spec.js +++ b/src/__tests__/offline/node.spec.js @@ -250,17 +250,17 @@ function ManagerDotSplitTests(assert) { const expectedView1 = { name: 'testing_split', changeNumber: 0, killed: false, trafficType: 'localhost', treatments: ['on'], configs: {}, defaultTreatment: 'control', - sets: [], impressionsDisabled: false + sets: [], impressionsDisabled: false, prerequisites: [] }; const expectedView2 = { name: 'testing_split2', changeNumber: 0, killed: false, trafficType: 'localhost', treatments: ['off'], configs: {}, defaultTreatment: 'control', - sets: [], impressionsDisabled: false + sets: [], impressionsDisabled: false, prerequisites: [] }; const expectedView3 = { name: 'testing_split3', changeNumber: 0, killed: false, trafficType: 'localhost', treatments: ['custom_treatment'], configs: {}, defaultTreatment: 'control', - sets: [], impressionsDisabled: false + sets: [], impressionsDisabled: false, prerequisites: [] }; assert.deepEqual(manager.split('testing_split'), expectedView1); @@ -295,7 +295,8 @@ function ManagerDotYamlTests(mockFileName, assert) { configs: {}, sets: [], defaultTreatment: 'control', - impressionsDisabled: false + impressionsDisabled: false, + prerequisites: [] }; const expectedView2 = { name: 'testing_split_only_wl', @@ -306,7 +307,8 @@ function ManagerDotYamlTests(mockFileName, assert) { configs: {}, sets: [], defaultTreatment: 'control', - impressionsDisabled: false + impressionsDisabled: false, + prerequisites: [] }; const expectedView3 = { name: 'testing_split_with_wl', @@ -320,7 +322,8 @@ function ManagerDotYamlTests(mockFileName, assert) { }, sets: [], defaultTreatment: 'control', - impressionsDisabled: false + impressionsDisabled: false, + prerequisites: [] }; const expectedView4 = { name: 'testing_split_off_with_config', @@ -333,7 +336,8 @@ function ManagerDotYamlTests(mockFileName, assert) { }, sets: [], defaultTreatment: 'control', - impressionsDisabled: false + impressionsDisabled: false, + prerequisites: [] }; assert.deepEqual(manager.split('testing_split_on'), expectedView1); @@ -414,15 +418,15 @@ function MultipleInstancesTests(assert) { const expectedView1 = { name: 'testing_split', changeNumber: 0, killed: false, trafficType: 'localhost', - treatments: ['on'], configs: {}, sets: [], impressionsDisabled: false + treatments: ['on'], configs: {}, sets: [], impressionsDisabled: false, prerequisites: [] }; const expectedView2 = { name: 'testing_split2', changeNumber: 0, killed: false, trafficType: 'localhost', - treatments: ['off'], configs: {}, sets: [], impressionsDisabled: false + treatments: ['off'], configs: {}, sets: [], impressionsDisabled: false, prerequisites: [] }; const expectedView3 = { name: 'testing_split3', changeNumber: 0, killed: false, trafficType: 'localhost', - treatments: ['custom_treatment'], configs: {}, sets: [], impressionsDisabled: false + treatments: ['custom_treatment'], configs: {}, sets: [], impressionsDisabled: false, prerequisites: [] }; assert.deepEqual(manager.split('testing_split'), expectedView1); diff --git a/ts-tests/index.ts b/ts-tests/index.ts index 588f5ec15..52ecade7e 100644 --- a/ts-tests/index.ts +++ b/ts-tests/index.ts @@ -143,7 +143,8 @@ splitView = { }, sets: ['set_a', 'set_b'], defaultTreatment: 'off', - impressionsDisabled: false + impressionsDisabled: false, + prerequisites: [{ flagName: 'flag1', treatments: ['on'] }] }; splitViews = [splitView]; From 612a8c317c93377f6538fc013915ae8a675f3729 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Fri, 4 Apr 2025 15:47:57 -0300 Subject: [PATCH 02/13] Add tests --- .../browserSuites/evaluations.spec.js | 8 ++- .../browserSuites/ready-from-cache.spec.js | 6 +- src/__tests__/browserSuites/telemetry.spec.js | 4 +- .../mocks/splitchanges.since.-1.json | 55 ++++++++++++++++++- src/__tests__/nodeSuites/evaluations.spec.js | 4 ++ src/__tests__/nodeSuites/telemetry.spec.js | 4 +- 6 files changed, 70 insertions(+), 11 deletions(-) diff --git a/src/__tests__/browserSuites/evaluations.spec.js b/src/__tests__/browserSuites/evaluations.spec.js index e4c5bf8d8..903e7c696 100644 --- a/src/__tests__/browserSuites/evaluations.spec.js +++ b/src/__tests__/browserSuites/evaluations.spec.js @@ -362,7 +362,7 @@ export default function (config, fetchMock, assert) { }; - const evaluationsWithRuleBasedSegments = async (splitio) => { + const evaluationsWithRuleBasedSegmentsAndPrerequisites = async (splitio) => { fetchMock.getOnce('https://sdk.split.io/api/memberships/emi%40split.io', { status: 200, body: { ms: { k: [{ n: 'segment_excluded_by_rbs' }] } } }); fetchMock.getOnce('https://sdk.split.io/api/memberships/mauro%40split.io', { status: 200, body: { ms: {} } }); fetchMock.getOnce('https://sdk.split.io/api/memberships/bilal%40split.io', { status: 200, body: { ms: {} } }); @@ -372,24 +372,28 @@ export default function (config, fetchMock, assert) { await client1.ready(); assert.equal(client1.getTreatment('rbs_test_flag'), 'v2', 'key in excluded segment'); assert.equal(client1.getTreatment('rbs_test_flag_negated'), 'v1', 'key in excluded segment'); + assert.equal(client1.getTreatment('always_on_if_prerequisite'), 'off', 'prerequisite not satisfied (key in excluded segment)'); await client1.destroy(); const client2 = splitio.client('mauro@split.io'); await client2.ready(); assert.equal(client2.getTreatment('rbs_test_flag'), 'v2', 'excluded key'); assert.equal(client2.getTreatment('rbs_test_flag_negated'), 'v1', 'excluded key'); + assert.equal(client2.getTreatment('always_on_if_prerequisite'), 'off', 'prerequisite not satisfied (excluded key)'); await client2.destroy(); const client3 = splitio.client('bilal@split.io'); await client3.ready(); assert.equal(client3.getTreatment('rbs_test_flag'), 'v1', 'key satisfies the rbs condition'); assert.equal(client3.getTreatment('rbs_test_flag_negated'), 'v2', 'key satisfies the rbs condition'); + assert.equal(client3.getTreatment('always_on_if_prerequisite'), 'on', 'prerequisite satisfied (key satisfies the rbs condition)'); await client3.destroy(); const client4 = splitio.client('other_key'); await client4.ready(); assert.equal(client4.getTreatment('rbs_test_flag'), 'v2', 'key not in segment'); assert.equal(client4.getTreatment('rbs_test_flag_negated'), 'v1', 'key not in segment'); + assert.equal(client4.getTreatment('always_on_if_prerequisite'), 'off', 'prerequisite not satisfied (key not in segment)'); await client4.destroy(); }; @@ -408,7 +412,7 @@ export default function (config, fetchMock, assert) { getTreatmentsWithConfigTests(client); getTreatmentsWithInMemoryAttributes(client); - evaluationsWithRuleBasedSegments(splitio).then(() => { + evaluationsWithRuleBasedSegmentsAndPrerequisites(splitio).then(() => { clientTABucket1.destroy(); client.destroy(); tested++; diff --git a/src/__tests__/browserSuites/ready-from-cache.spec.js b/src/__tests__/browserSuites/ready-from-cache.spec.js index 970a78df3..f88fc5163 100644 --- a/src/__tests__/browserSuites/ready-from-cache.spec.js +++ b/src/__tests__/browserSuites/ready-from-cache.spec.js @@ -818,7 +818,7 @@ export default function (fetchMock, assert) { }); await client.ready(); - t.equal(manager.names().sort().length, 35, 'active splits should be present for evaluation'); + t.equal(manager.names().sort().length, 36, 'active splits should be present for evaluation'); await splitio.destroy(); t.equal(localStorage.getItem('readyFromCache_10.SPLITIO.splits.till'), '1457552620999', 'splits.till must correspond to the till of the last successfully fetched Splits'); @@ -835,7 +835,7 @@ export default function (fetchMock, assert) { await new Promise(res => client.once(client.Event.SDK_READY_FROM_CACHE, res)); - t.equal(manager.names().sort().length, 35, 'active splits should be present for evaluation'); + t.equal(manager.names().sort().length, 36, 'active splits should be present for evaluation'); t.false(console.log.calledWithMatch('clearOnInit was set and cache was not cleared in the last 24 hours. Cleaning up cache'), 'It should log a message about cleaning up cache'); await splitio.destroy(); @@ -856,7 +856,7 @@ export default function (fetchMock, assert) { await new Promise(res => client.once(client.Event.SDK_READY, res)); - t.equal(manager.names().sort().length, 35, 'active splits should be present for evaluation'); + t.equal(manager.names().sort().length, 36, 'active splits should be present for evaluation'); t.true(console.log.calledWithMatch('clearOnInit was set and cache was not cleared in the last 24 hours. Cleaning up cache'), 'It should log a message about cleaning up cache'); await splitio.destroy(); diff --git a/src/__tests__/browserSuites/telemetry.spec.js b/src/__tests__/browserSuites/telemetry.spec.js index 82e031f2d..29facccf4 100644 --- a/src/__tests__/browserSuites/telemetry.spec.js +++ b/src/__tests__/browserSuites/telemetry.spec.js @@ -76,7 +76,7 @@ export default async function telemetryBrowserSuite(fetchMock, t) { // @TODO check if iDe value is correct assert.deepEqual(data, { - mE: {}, hE: { sp: { 500: 1 }, ms: { 500: 1 } }, tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 35, seC: 1, skC: 1, eQ: 1, eD: 0, sE: [], t: [], ufs: {} + mE: {}, hE: { sp: { 500: 1 }, ms: { 500: 1 } }, tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 36, seC: 1, skC: 1, eQ: 1, eD: 0, sE: [], t: [], ufs: {} }, 'metrics/usage JSON payload should be the expected'); finish.next(); @@ -96,7 +96,7 @@ export default async function telemetryBrowserSuite(fetchMock, t) { // @TODO check if iDe value is correct assert.deepEqual(data, { mL: {}, mE: {}, hE: {}, hL: {}, // errors and latencies were popped - tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 35, seC: 1, skC: 1, eQ: 1, eD: 0, sE: [], t: [], ufs: {} + tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 36, seC: 1, skC: 1, eQ: 1, eD: 0, sE: [], t: [], ufs: {} }, '2nd metrics/usage JSON payload should be the expected'); return 200; }); diff --git a/src/__tests__/mocks/splitchanges.since.-1.json b/src/__tests__/mocks/splitchanges.since.-1.json index 34cda08f2..4d414ef07 100644 --- a/src/__tests__/mocks/splitchanges.since.-1.json +++ b/src/__tests__/mocks/splitchanges.since.-1.json @@ -9,8 +9,13 @@ "status": "ACTIVE", "trafficTypeName": "user", "excluded": { - "keys": [ "mauro@split.io", "gaston@split.io" ], - "segments": [ "segment_excluded_by_rbs" ] + "keys": [ + "mauro@split.io", + "gaston@split.io" + ], + "segments": [ + "segment_excluded_by_rbs" + ] }, "conditions": [ { @@ -1730,6 +1735,52 @@ "configurations": {}, "sets": [], "impressionsDisabled": false + }, + { + "orgId": null, + "environment": null, + "trafficTypeId": null, + "trafficTypeName": null, + "name": "always_on_if_prerequisite", + "seed": -790401604, + "status": "ACTIVE", + "killed": false, + "defaultTreatment": "off", + "prerequisites": [ + { + "n": "rbs_test_flag", + "ts": [ + "v1" + ] + } + ], + "conditions": [ + { + "matcherGroup": { + "combiner": "AND", + "matchers": [ + { + "keySelector": { + "trafficType": "user", + "attribute": null + }, + "matcherType": "ALL_KEYS", + "negate": false, + "userDefinedSegmentMatcherData": null, + "whitelistMatcherData": null, + "unaryNumericMatcherData": null, + "betweenMatcherData": null + } + ] + }, + "partitions": [ + { + "treatment": "on", + "size": 100 + } + ] + } + ] } ], "s": -1, diff --git a/src/__tests__/nodeSuites/evaluations.spec.js b/src/__tests__/nodeSuites/evaluations.spec.js index 6c7208b09..ab6c20021 100644 --- a/src/__tests__/nodeSuites/evaluations.spec.js +++ b/src/__tests__/nodeSuites/evaluations.spec.js @@ -175,6 +175,10 @@ export default async function (config, key, assert) { assert.equal(client.getTreatment('mauro@split.io', 'rbs_test_flag_negated'), 'v1', 'excluded key'); assert.equal(client.getTreatment('bilal@split.io', 'rbs_test_flag_negated'), 'v2', 'key satisfies the rbs condition'); assert.equal(client.getTreatment('other_key', 'rbs_test_flag_negated'), 'v1', 'key not in segment'); + + // Prerequisites + assert.equal(client.getTreatment('bilal@split.io', 'always_on_if_prerequisite'), 'on', 'prerequisite satisfied (key satisfies the rbs condition)'); + assert.equal(client.getTreatment('emi@split.io', 'always_on_if_prerequisite'), 'off', 'prerequisite not satisfied (key in excluded segment)'); }; const getTreatmentsTests = (client, sdkInstance) => { diff --git a/src/__tests__/nodeSuites/telemetry.spec.js b/src/__tests__/nodeSuites/telemetry.spec.js index adbcfc311..85f7cdf67 100644 --- a/src/__tests__/nodeSuites/telemetry.spec.js +++ b/src/__tests__/nodeSuites/telemetry.spec.js @@ -66,7 +66,7 @@ export default async function telemetryNodejsSuite(key, fetchMock, assert) { // @TODO check if iDe value is correct assert.deepEqual(data, { - mE: {}, hE: { sp: { 500: 1 } }, tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 35, seC: 4, skC: 4, eQ: 1, eD: 0, sE: [], t: [], ufs: {} + mE: {}, hE: { sp: { 500: 1 } }, tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 36, seC: 4, skC: 4, eQ: 1, eD: 0, sE: [], t: [], ufs: {} }, 'metrics/usage JSON payload should be the expected'); finish.next(); @@ -85,7 +85,7 @@ export default async function telemetryNodejsSuite(key, fetchMock, assert) { // @TODO check if iDe value is correct assert.deepEqual(data, { mL: {}, mE: {}, hE: {}, hL: {}, // errors and latencies were popped - tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 35, seC: 4, skC: 4, eQ: 1, eD: 0, sE: [], t: [], ufs: {} + tR: 0, aR: 0, iQ: 4, iDe: 1, iDr: 0, spC: 36, seC: 4, skC: 4, eQ: 1, eD: 0, sE: [], t: [], ufs: {} }, '2nd metrics/usage JSON payload should be the expected'); return 200; }); From b0a8a1f1512d01d10c61b934170f6c4aedd86f05 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Tue, 15 Apr 2025 14:18:46 -0300 Subject: [PATCH 03/13] rc --- CHANGES.txt | 5 +++++ package-lock.json | 19 ++++++++++--------- package.json | 4 ++-- src/settings/defaults/version.js | 2 +- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index fcfcb6abf..8f5979639 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,8 @@ +11.3.0 (April XX, 2025) + - Added support for targeting rules based on rule-based segments. + - Added support for feature flag prerequisites. + - Updated @splitsoftware/splitio-commons package to version 2.3.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. - 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 1a8dddb1e..0063bd41a 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.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio", - "version": "11.2.0", + "version": "11.2.1-rc.0", "license": "Apache-2.0", "dependencies": { - "@splitsoftware/splitio-commons": "2.2.0", + "@splitsoftware/splitio-commons": "2.2.1-rc.0", "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.0", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.2.1-rc.0.tgz", + "integrity": "sha512-72/iBySz7Hliz0DfvCuaXOEe7VEn3s9uCRxR/uHpow2mXFv3WsaDr324Jv1FSGO17Dr3FyxUNPrxEvAwyTV6Wg==", + "license": "Apache-2.0", "dependencies": { "@types/ioredis": "^4.28.0", "tslib": "^2.3.1" @@ -7538,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.0", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.2.1-rc.0.tgz", + "integrity": "sha512-72/iBySz7Hliz0DfvCuaXOEe7VEn3s9uCRxR/uHpow2mXFv3WsaDr324Jv1FSGO17Dr3FyxUNPrxEvAwyTV6Wg==", "requires": { "@types/ioredis": "^4.28.0", "tslib": "^2.3.1" diff --git a/package.json b/package.json index c3ac42b76..28c3c9372 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio", - "version": "11.2.0", + "version": "11.2.1-rc.0", "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.0", "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..72dc13858 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.0'; From 37c8669d0565b6e9d9cb41660504caaf65402ff5 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Tue, 15 Apr 2025 14:21:03 -0300 Subject: [PATCH 04/13] cdn rc --- .github/workflows/ci-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 7621d4b33..8545a8a61 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -57,7 +57,7 @@ jobs: run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") npm run build - name: Store assets - if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master') }} + if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/prerequisites' || github.ref == 'refs/heads/master') }} uses: actions/upload-artifact@v4 with: name: assets @@ -68,7 +68,7 @@ jobs: name: Upload assets runs-on: ubuntu-20.04 needs: build - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/development' }} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/prerequisites' }} strategy: matrix: environment: From 628c62ad301a641014ebfaca21b04256bf8266ae Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Mon, 12 May 2025 16:13:44 -0300 Subject: [PATCH 05/13] stable version --- .github/workflows/ci-cd.yml | 4 ++-- CHANGES.txt | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index a9f4be81e..15766ad41 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -57,7 +57,7 @@ jobs: run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") npm run build - name: Store assets - if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/rb_segments_baseline' || github.ref == 'refs/heads/master') }} + if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master') }} uses: actions/upload-artifact@v4 with: name: assets @@ -68,7 +68,7 @@ jobs: name: Upload assets runs-on: ubuntu-latest needs: build - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/rb_segments_baseline' }} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/development' }} strategy: matrix: environment: diff --git a/CHANGES.txt b/CHANGES.txt index abe42ea31..8668b626d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,6 @@ -11.2.1 (May XX, 2025) - - Updated @splitsoftware/splitio-commons package to version 2.2.1, which optimizes the Redis storage to: +11.3.0 (May 12, 2025) + - Added support for targeting rules based on rule-based segments. + - Updated @splitsoftware/splitio-commons package to version 2.3.0, 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. From 26b260ca0d23b4ea8b4eae57104127605f421c18 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Thu, 15 May 2025 18:12:18 -0300 Subject: [PATCH 06/13] Add changelog entry --- CHANGES.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index abe42ea31..17976ec1a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,8 @@ -11.2.1 (May XX, 2025) - - Updated @splitsoftware/splitio-commons package to version 2.2.1, which optimizes the Redis storage to: +11.3.0 (May 16, 2025) + - Updated @splitsoftware/splitio-commons package to version 2.3.0, 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. + - Bugfix - Enhanced HTTP client module to implement timeouts for failing requests that might otherwise remain pending indefinitely on some Fetch API implementations. 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. @@ -35,7 +36,7 @@ - Renamed distribution folders from `/lib` to `/cjs` for CommonJS build, and `/es` to `/esm` for ECMAScript Modules build. - BREAKING CHANGES: - NOTE: Refer to ./MIGRATION-GUIDE.md for instructions on how to migrate your codebase from version 0.x to 1.0.0. - - Dropped support for Split Proxy below version 5.9.0, when using in the browser (client-side API). The SDK now requires Split Proxy 5.9.0 or above. + - Dropped support for Split Proxy below version 5.9.0 when the SDK runs in the browser (client-side API). The SDK now requires Split Proxy 5.9.0 or above for browser usage. - Dropped support for Node.js v6. The SDK now requires Node.js v14 or above. - Removed TypeScript `SplitIO` namespace from `@splitsoftware/splitio/types/splitio`. Reverted in 11.0.1. - Removed internal ponyfills for the `Map` and `Set` global objects, dropping support for IE and other outdated browsers. The SDK now requires the runtime environment to support these features natively or provide a polyfill. From 920ac0bd240c99f6b329ef8d0145ca2fd170e4a4 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Fri, 16 May 2025 17:16:31 -0300 Subject: [PATCH 07/13] Stable version --- package-lock.json | 18 +++++++++--------- package.json | 4 ++-- src/settings/defaults/version.js | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6f913e492..75e1bb986 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@splitsoftware/splitio", - "version": "11.2.1-rc.2", + "version": "11.3.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio", - "version": "11.2.1-rc.2", + "version": "11.3.0", "license": "Apache-2.0", "dependencies": { - "@splitsoftware/splitio-commons": "2.2.1-rc.3", + "@splitsoftware/splitio-commons": "2.3.0", "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.3", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.2.1-rc.3.tgz", - "integrity": "sha512-0d7LR/BBHOswCY2CvqGdFuBmr8nUfAC0ldA2n0YkbjrWbL4EQvT6ULMTlYdD3V25ubE04n41usf71L6vS0i15w==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.3.0.tgz", + "integrity": "sha512-TRxutKjGw2JtlYhGYFW5T/2srF76hLDn9pNlwkHx6R0qDK7CqkjhFx/KU6LRqsibnmlh2aMl1I+TxblDncMDyA==", "license": "Apache-2.0", "dependencies": { "@types/ioredis": "^4.28.0", @@ -7539,9 +7539,9 @@ "dev": true }, "@splitsoftware/splitio-commons": { - "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==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.3.0.tgz", + "integrity": "sha512-TRxutKjGw2JtlYhGYFW5T/2srF76hLDn9pNlwkHx6R0qDK7CqkjhFx/KU6LRqsibnmlh2aMl1I+TxblDncMDyA==", "requires": { "@types/ioredis": "^4.28.0", "tslib": "^2.3.1" diff --git a/package.json b/package.json index 6afdc6d3a..285f15601 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio", - "version": "11.2.1-rc.2", + "version": "11.3.0", "description": "Split SDK", "files": [ "README.md", @@ -38,7 +38,7 @@ "node": ">=14.0.0" }, "dependencies": { - "@splitsoftware/splitio-commons": "2.2.1-rc.3", + "@splitsoftware/splitio-commons": "2.3.0", "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 6410bf837..8132c030a 100644 --- a/src/settings/defaults/version.js +++ b/src/settings/defaults/version.js @@ -1 +1 @@ -export const packageVersion = '11.2.1-rc.2'; +export const packageVersion = '11.3.0'; From bb60f8eb7a8f254683470ce3d2240c844782301d Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Fri, 16 May 2025 17:19:05 -0300 Subject: [PATCH 08/13] Fix typo --- CHANGES.txt | 128 ++++++++++++++++++++++++++-------------------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 17976ec1a..2545572b8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,17 +17,17 @@ - Updated @splitsoftware/splitio-commons package to version 2.1.0. 11.0.4 (January 9, 2025) - - Bugfixing - Updated @splitsoftware/splitio-commons package to version 2.0.3, which properly handles rejected promises when using targeting rules with segment matchers in consumer modes (e.g., Redis and Pluggable storages). + - Bugfix - Updated @splitsoftware/splitio-commons package to version 2.0.3, which properly handles rejected promises when using targeting rules with segment matchers in consumer modes (e.g., Redis and Pluggable storages). 11.0.3 (December 4, 2024) - - Bugfixing - Updated @splitsoftware/splitio-commons package to version 2.0.2 that sanitizes the `SplitSDKMachineName` header value to avoid exceptions on HTTP/S requests when it contains non ISO-8859-1 characters (Related to issue https://github.com/splitio/javascript-client/issues/847). + - Bugfix - Updated @splitsoftware/splitio-commons package to version 2.0.2 that sanitizes the `SplitSDKMachineName` header value to avoid exceptions on HTTP/S requests when it contains non ISO-8859-1 characters (Related to issue https://github.com/splitio/javascript-client/issues/847). 11.0.2 (November 25, 2024) - Updated bloom-filters and fetch-mock dependencies for vulnerability fixes. - - Bugfixing - Updated @splitsoftware/splitio-commons package to version 2.0.1 that fixes an issue with the SDK_UPDATE event on Node.js, where it was not being emitted if there was an empty segment and the SDK received a feature flag update notification. + - Bugfix - Updated @splitsoftware/splitio-commons package to version 2.0.1 that fixes an issue with the SDK_UPDATE event on Node.js, where it was not being emitted if there was an empty segment and the SDK received a feature flag update notification. 11.0.1 (November 11, 2024) - - Bugfixing - Revert removal of TypeScript `SplitIO` namespace at `/types/splitio.d.ts` to allow explicit imports of types from the JavaScript SDK package. E.g., `import type { IBrowserSettings } from '@splitsoftware/splitio/types/splitio';`. + - Bugfix - Revert removal of TypeScript `SplitIO` namespace at `/types/splitio.d.ts` to allow explicit imports of types from the JavaScript SDK package. E.g., `import type { IBrowserSettings } from '@splitsoftware/splitio/types/splitio';`. 11.0.0 (November 1, 2024) - Added support for targeting rules based on large segments for browsers (client-side API). @@ -56,8 +56,8 @@ - Updated the internal imports of 'os' and 'ioredis' modules for Node.js, to use EcmaScript 'import' rather than CommonJS 'require' for the ES modules build. This avoids runtime errors on some scenarios when bundling the SDK into a .mjs file or importing it from a .mjs file. - Updated eventsource dependency for Node.js. The eventsource v1.1.2 dependency was removed, and the SDK now uses an embedded adaptation that can accept an HTTP(S) agent option, like other HTTP(S) requests. - Updated @splitsoftware/splitio-commons package to version 1.16.0 that includes some vulnerability and bug fixes. - - Bugfixing - Restored some input validation error logs that were removed in version 10.24.0. The logs inform the user when the `getTreatment(s)` methods are called with an invalid value as feature flag name or flag set name. - - Bugfixing - Fixed localhost mode to emit SDK_UPDATE when mocked feature flags are updated in the `features` object map of the config object (Related to issue https://github.com/splitio/javascript-browser-client/issues/119). + - Bugfix - Restored some input validation error logs that were removed in version 10.24.0. The logs inform the user when the `getTreatment(s)` methods are called with an invalid value as feature flag name or flag set name. + - Bugfix - Fixed localhost mode to emit SDK_UPDATE when mocked feature flags are updated in the `features` object map of the config object (Related to issue https://github.com/splitio/javascript-browser-client/issues/119). 10.26.0 (May 6, 2024) - Updated @splitsoftware/splitio-commons package to version 1.14.0 that includes minor updates: @@ -67,7 +67,7 @@ 10.25.2 (March 26, 2024) - Updated some transitive dependencies for vulnerability fixes. - - Bugfixing - Added tslib as an explicit dependency to avoid issues with some package managers that don't resolve it automatically as a transitive dependency from @splitsoftware/splitio-commons (Related to issue https://github.com/splitio/javascript-client/issues/795). + - Bugfix - Added tslib as an explicit dependency to avoid issues with some package managers that don't resolve it automatically as a transitive dependency from @splitsoftware/splitio-commons (Related to issue https://github.com/splitio/javascript-client/issues/795). 10.25.1 (January 16, 2024) - Updated @splitsoftware/splitio-commons package to version 1.13.1 and some transitive dependencies for vulnerability fixes. @@ -90,8 +90,8 @@ - Added `defaultTreatment` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager (Related to issue https://github.com/splitio/javascript-commons/issues/225). - Updated @splitsoftware/splitio-commons package to version 1.12.0 that includes vulnerability fixes, flag sets support, and other improvements. - Updated Redis adapter to handle timeouts and queueing of some missing commands: 'hincrby', 'popNRaw', and 'pipeline.exec'. - - Bugfixing - Fixed manager methods in consumer modes to return results in a promise when the SDK is not operational (not ready or destroyed). - - Bugfixing - Fixed SDK key validation in Node.js to ensure the SDK_READY_TIMED_OUT event is emitted when a client-side type SDK key is provided instead of a server-side one (Related to issue https://github.com/splitio/javascript-client/issues/768). + - Bugfix - Fixed manager methods in consumer modes to return results in a promise when the SDK is not operational (not ready or destroyed). + - Bugfix - Fixed SDK key validation in Node.js to ensure the SDK_READY_TIMED_OUT event is emitted when a client-side type SDK key is provided instead of a server-side one (Related to issue https://github.com/splitio/javascript-client/issues/768). 10.23.1 (September 22, 2023) - Updated @splitsoftware/splitio-commons package to version 1.9.1. This update removes the handler for 'unload' DOM events, that can prevent browsers from being able to put pages in the back/forward cache for faster back and forward loads (Related to issue https://github.com/splitio/javascript-client/issues/759). @@ -103,7 +103,7 @@ 10.22.6 (July 6, 2023) - Updated some transitive dependencies for vulnerability fixes. - Updated @splitsoftware/splitio-commons package to version 1.8.3 that includes the following bug fix: - - Bugfixing - The `destroy` method has been updated to immediately flag the SDK client as destroyed, to prevent access to the storage when `getTreatment` and `track` methods are called after the SDK is destroyed. + - Bugfix - The `destroy` method has been updated to immediately flag the SDK client as destroyed, to prevent access to the storage when `getTreatment` and `track` methods are called after the SDK is destroyed. 10.22.5 (May 15, 2023) - Updated @splitsoftware/splitio-commons package to version 1.8.2 that includes minor improvements. @@ -117,13 +117,13 @@ 10.22.3 (December 16, 2022) - Updated some transitive dependencies for vulnerability fixes. - - Bugfixing - Upgrade @splitsoftware/splitio-commons package to version 1.7.3 which includes a memory leak fix for localhost mode (Related to issue https://github.com/splitio/javascript-commons/issues/181) among other improvements. + - Bugfix - Upgrade @splitsoftware/splitio-commons package to version 1.7.3 which includes a memory leak fix for localhost mode (Related to issue https://github.com/splitio/javascript-commons/issues/181) among other improvements. 10.22.2 (November 3, 2022) - - Bugfixing - Replaced bloom filter dependency that caused dependency conflicts (with farmhash lib) in AWS Lambda. This change only affects Node.js flavor. + - Bugfix - Replaced bloom filter dependency that caused dependency conflicts (with farmhash lib) in AWS Lambda. This change only affects Node.js flavor. 10.22.1 (October 14, 2022) - - Bugfixing - Upgrade @splitsoftware/splitio-commons package to version 1.7.2, that handles `Navigator.sendBeacon` API exceptions in the browser, and fallback to regular Fetch/XHR transport in case of error. + - Bugfix - Upgrade @splitsoftware/splitio-commons package to version 1.7.2, that handles `Navigator.sendBeacon` API exceptions in the browser, and fallback to regular Fetch/XHR transport in case of error. 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. @@ -132,14 +132,14 @@ 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`. + - Bugfix - Added missed type definitions `enabled` from `sync`. 10.21.0 (July 22, 2022) - Added `autoRequire` configuration option to the Google Analytics to Split integration, which takes care of requiring the splitTracker plugin on trackers dynamically created by Google tag managers (See https://help.split.io/hc/en-us/articles/360040838752#set-up-with-gtm-and-gtag.js). - Updated browser listener to push remaining impressions and events on 'visibilitychange' and 'pagehide' DOM events, instead of 'unload', which is not reliable in modern mobile and desktop Web browsers. - Updated the synchronization flow to be more reliable in the event of an edge case generating delay in cache purge propagation, keeping the SDK cache properly synced. - Updated some dependencies for vulnerability fixes. - - Bugfixing - Moved js-yaml dependency from @splitsoftware/splitio-commons to avoid resolution to an incompatible version on certain npm versions when installing third-party dependencies that also define js-yaml as transitive dependency (Related to issue https://github.com/splitio/javascript-client/issues/662). + - Bugfix - Moved js-yaml dependency from @splitsoftware/splitio-commons to avoid resolution to an incompatible version on certain npm versions when installing third-party dependencies that also define js-yaml as transitive dependency (Related to issue https://github.com/splitio/javascript-client/issues/662). 10.20.0 (June 29, 2022) - Added a new config option to control the tasks that listen or poll for updates on feature flags and segments, via the new config `sync.enabled`. Running online Split will always pull the most recent updates upon initialization, this only affects updates fetching on a running instance. Useful when a consistent session experience is a must or to save resources when updates are not being used. @@ -148,21 +148,21 @@ 10.19.1 (Jun 13, 2022) - Updated eventsource dependency range to ^1.1.2 to avoid a vulnerability and dependency resolution to a vulnerable version of url-parse transitive dependency. - - Bugfixing - Updated submitters logic, to avoid dropping impressions and events that are being tracked while POST request is pending. + - Bugfix - Updated submitters logic, to avoid dropping impressions and events that are being tracked while POST request is pending. 10.19.0 (May 24, 2022) - Added `scheduler.telemetryRefreshRate` property to SDK configuration, and deprecated `scheduler.metricsRefreshRate` property. - Updated SDK telemetry storage, metrics and updater to be more effective and send less often. - - Bugfixing - Updated default values for `scheduler.impressionsRefreshRate` config parameter: 300s for OPTIMIZED impression mode and 60s for DEBUG impression mode, + - Bugfix - Updated default values for `scheduler.impressionsRefreshRate` config parameter: 300s for OPTIMIZED impression mode and 60s for DEBUG impression mode, in both Browser and Node.js (previously it was 60s and 300s in Browser and Node.js respectively, equal for DEBUG and OPTIMIZED impression modes). 10.18.2 (May 6, 2022) - - Bugfixing - Removed "ip" dependency to use an inline copy of it that fixes an error when using it in Node.js v18 (https://github.com/indutny/node-ip/issues/113). + - Bugfix - Removed "ip" dependency to use an inline copy of it that fixes an error when using it in Node.js v18 (https://github.com/indutny/node-ip/issues/113). 10.18.1 (April 20, 2022) - Updated some dependencies for vulnerability fixes. - - Bugfixing - Updated @splitsoftware/splitio-commons package to avoid an error when requiring some third-party dependencies used by the package (Related to issue https://github.com/splitio/javascript-client/issues/662). - - Bugfixing - Updated `ready` method to rejects the promise with an Error object instead of a string value (Related to issue https://github.com/splitio/javascript-client/issues/654). + - Bugfix - Updated @splitsoftware/splitio-commons package to avoid an error when requiring some third-party dependencies used by the package (Related to issue https://github.com/splitio/javascript-client/issues/662). + - Bugfix - Updated `ready` method to rejects the promise with an Error object instead of a string value (Related to issue https://github.com/splitio/javascript-client/issues/654). 10.18.0 (April 7, 2022) - Added user consent feature to allow delaying or disabling the data tracking from SDK until user consent is explicitly granted or declined. Read more in our docs. @@ -170,10 +170,10 @@ - Added support to accept TLS configuration options to the Redis storage in Node.js. Read more in our docs. - Updated type definitions to specialize the type of the `storage.options` object for Redis storage in Node.js. - Updated some dependencies for vulnerability fixes. - - Bugfixing - Updated internal isObject utility function, to avoid unexpected behaviors on frameworks and libraries that uses multiple VM contexts, like NuxtJS dev server. - - Bugfixing - Logging settings (i.e., the `debug` SDK configuration param and factory logger methods) are configurable per factory instance, instead of affecting all factories globally. - - Bugfixing - Fixed an issue with `connectionTimeout` options params of Redis storage, that was being ignored and not passed down to the underlying ioredis client. - - Bugfixing - Updated the validation of some SDK configuration params to log errors and throw exceptions with clear descriptions of the invalid setup: + - Bugfix - Updated internal isObject utility function, to avoid unexpected behaviors on frameworks and libraries that uses multiple VM contexts, like NuxtJS dev server. + - Bugfix - Logging settings (i.e., the `debug` SDK configuration param and factory logger methods) are configurable per factory instance, instead of affecting all factories globally. + - Bugfix - Fixed an issue with `connectionTimeout` options params of Redis storage, that was being ignored and not passed down to the underlying ioredis client. + - Bugfix - Updated the validation of some SDK configuration params to log errors and throw exceptions with clear descriptions of the invalid setup: - If passing a non-string value to `sync.impressionsMode`, the SDK logs the error: "you passed an invalid impressionsMode config param. It should be one of the following values: 'OPTIMIZED', 'DEBUG'. Defaulting to 'OPTIMIZED'.". - If passing 'REDIS' storage type without setting `mode` to 'consumer', the SDK logs the error: "The provided REDIS storage is invalid for this mode. It requires 'consumer' mode. Fallback into default MEMORY storage.". - If passing 'consumer' mode without setting `storage.type` to 'REDIS', the SDK throws an exception with message: "A REDIS storage is required on consumer mode.". @@ -187,20 +187,20 @@ 10.17.2 (January 31, 2022) - Updated some dependencies for vulnerability fixes. - - Bugfixing - Fixed internal handling of Fetch API promise rejection, to avoid unhandled exceptions on some Web browsers (issue https://github.com/splitio/javascript-client/issues/621) + - Bugfix - Fixed internal handling of Fetch API promise rejection, to avoid unhandled exceptions on some Web browsers (issue https://github.com/splitio/javascript-client/issues/621) 10.17.1 (January 13, 2022) - Updated some transitive dependencies for vulnerability fixes. - - Bugfixing - Fixed internal handling of SDK_READY_FROM_CACHE event, to avoid CSP issues in browsers. + - Bugfix - Fixed internal handling of SDK_READY_FROM_CACHE event, to avoid CSP issues in browsers. 10.17.0 (January 3, 2022) - Added support to SDK clients on browser to optionally bind attributes to the client, keeping these loaded within the SDK along with the user ID, for easier usage when requesting flag. - - Bugfixing - Fixed an issue returning dynamic configs when the treatment name contains a dot ("."). + - Bugfix - Fixed an issue returning dynamic configs when the treatment name contains a dot ("."). 10.16.1 (October 25, 2021) - Updated some internal modules to optimize the time efficiency of feature flag evaluations (i.e., `getTreatment(s)` method calls). - Updated some dependencies for vulnerability fixes (ioredis, @babel/cli, eslint, eslint-plugin-compat). - - Bugfixing - Fixed localhost mode with localStorage, to use a mock in memory instead of localStorage API directly but keep emitting emit SDK_READY_FROM_CACHE event. + - Bugfix - Fixed localhost mode with localStorage, to use a mock in memory instead of localStorage API directly but keep emitting emit SDK_READY_FROM_CACHE event. 10.16.0 (September 28, 2021) - Updated localhost mode to emit SDK_READY_FROM_CACHE event in Browser when using localStorage (issue https://github.com/splitio/react-client/issues/34). @@ -214,9 +214,9 @@ 10.15.9 (Aug 13, 2021) - Updated some dependencies with vulnerability fixes. - Updated some log messages related to HTTP request errors. - - Bugfixing - Fixed internal promise wrapper to avoid an error with Meteor framework. - - Bugfixing - Fixed type definitions for `ISettings['features']` (issue #560). - - Bugfixing - Name remaining anonymous functions that generate warnings when transpiling for IE11 (issue #557) + - Bugfix - Fixed internal promise wrapper to avoid an error with Meteor framework. + - Bugfix - Fixed type definitions for `ISettings['features']` (issue #560). + - Bugfix - Name remaining anonymous functions that generate warnings when transpiling for IE11 (issue #557) 10.15.8 (June 11, 2021) - Updated listener for 'unload' DOM events to close any remaining streaming connections. @@ -225,7 +225,7 @@ 10.15.7 (June 3, 2021) - Updated some dependencies with vulnerability fixes. - Removed "utfx" dependency to use an inline copy of it with the minimum features used by the SDK (issue #544). - - Bugfixing - Fixed some issues of localhost mode: + - Bugfix - Fixed some issues of localhost mode: - Support localhost mode on multiple SDK instances. Each instance handles its own mocked features, instead of sharing the same mock. - SDK_UPDATE is emitted only once if mocked features changes. - On shared clients, SDK_UPDATE event is now emitted if mocked features changes. @@ -235,7 +235,7 @@ - Updated ioredis version now that their incompatibility with Node.js <10 was already fixed. - Updated Karma and a transitive dependency with vulnerabilities. - Updated dev dependency on redis-dump to redis-dumpz package to be able to fix a vulnerability on Redis transitive dependency. - - Bugfixing - Name two anonymous functions that generate warnings when transpiling for IE11 (issue #535) + - Bugfix - Name two anonymous functions that generate warnings when transpiling for IE11 (issue #535) 10.15.5 (Apr 29, 2021) - Updated some dependencies, including a vulnerability fix. @@ -245,12 +245,12 @@ - Updated SSE error handling. - Extended publishers tracking to support multi-region infrastructure. - Enforced revalidation for requests stored in local caches, like proxies or browsers. - - Bugfixing - In Node.js, fetch new segments captured due to streaming notifications. + - Bugfix - In Node.js, fetch new segments captured due to streaming notifications. - Updated some dependencies, including a vulnerability fix. 10.15.3 (Feb 10, 2021) - Updated type definitions to remove `@types/node` dependency and avoid conflicts between Node.js and DOM type definitions. - - Bugfixing - Handle issue importing node-fetch library (issue #505). + - Bugfix - Handle issue importing node-fetch library (issue #505). 10.15.2 (Dec 3, 2020) - Updated requests for `/testImpressions/beacon` to include the impressions mode. @@ -258,9 +258,9 @@ 10.15.1 (Nov 12, 2020) - Updated the version for ioredis in the package.json to be fixed to 4.18.0 given after 4.19.0 it requires Node.js 10, in case this SDK is installed without considering our package-lock.json file on an old Node.js. - Updated TypeScript declarations to include the `urls` settings object (to connect to Split Synchronizer in proxy mode) for the non-async settings where it would be applicable. - - Bugfixing - Updating some imports of hashing utilities to use safe relative paths and avoid module resolution issues. - - Bugfixing - Updating logic to avoid a corner case issue with the sendHitTask callback handling of the GOOGLE_ANALYTICS_TO_SPLIT integration. - - Bugfixing - Updating the package.json version import to be compatible with latest standards (Related to issue https://github.com/splitio/javascript-client/pull/495, thanks @andrew-t-james-hm). + - Bugfix - Updating some imports of hashing utilities to use safe relative paths and avoid module resolution issues. + - Bugfix - Updating logic to avoid a corner case issue with the sendHitTask callback handling of the GOOGLE_ANALYTICS_TO_SPLIT integration. + - Bugfix - Updating the package.json version import to be compatible with latest standards (Related to issue https://github.com/splitio/javascript-client/pull/495, thanks @andrew-t-james-hm). 10.15.0 (Oct 6, 2020) - Added impressions dedupe logic to avoid sending duplicated impressions: @@ -274,15 +274,15 @@ - `DEBUG`: will send every impression generated to Split. - Updated JSON bulk properties for Impressions to decrease the payload size. - Updated `ImpressionsTracker` and `ImpressionTracker` to be only one and be used for both type of evaluations: `getTreatment` and `getTreatments`. - - Bugfixing - added URI encoding of user keys to avoid HTTP errors when fetching MySegments for keys with special characters. + - Bugfix - added URI encoding of user keys to avoid HTTP errors when fetching MySegments for keys with special characters. 10.14.2 (Sep 18, 2020) - Updated `node-fetch` dependency to fix a vulnerability. - - Bugfixing - updated the feature detection of Set global constructor to avoid possible reference errors. + - Bugfix - updated the feature detection of Set global constructor to avoid possible reference errors. 10.14.1 (Aug 13, 2020) - Updated push streaming support for Node.js to optimize requests to Split services. - - Bugfixing - Replaced the use of `for...in` statements since it iterates over enumerable properties on the prototype chain, which might be polluted by code external to the library. + - Bugfix - Replaced the use of `for...in` statements since it iterates over enumerable properties on the prototype chain, which might be polluted by code external to the library. 10.14.0 (Jul 31, 2020) - Added `sync.splitFilters` property to SDK configuration to pass a list of filters for the feature flags that will be downloaded. Read more in our docs. @@ -316,7 +316,7 @@ - Updated logging error messages priority to significantly reduce the amount of error level logs that can't be silenced. - Updated axios to 0.19.2 and few other minor updates on dev dependencies. - Updated default metricsRefreshRate from 60s to 120s and reduced the log level from ERROR to INFO for telemetry post failures. - - Bugfixing - Emit SDK_UPDATE in localhost only when mock was actually updated. + - Bugfix - Emit SDK_UPDATE in localhost only when mock was actually updated. 10.10.0 (Jan 10, 2020) - Added SDK_READY_FROM_CACHE event, which will be emitted in LocalStorage mode when the SDK finds feature flag definitions in the storage of the browser. @@ -324,12 +324,12 @@ - Updated multiple dependencies and dev dependencies (@types/node, axios, core-js, events, sinon, tape and the babel cli, core, preset-env, register and plugin-transform-runtime) 10.9.2 (Nov 20, 2019) - - Bugfixing - When using Redis, return expire result to avoid race condition with redis disconnection due to a client destroy. - Sonar - Removed extra parameter from function invocation to remove the only bug highlighted by Sonar. + - Bugfix - When using Redis, return expire result to avoid race condition with redis disconnection due to a client destroy. 10.9.1 (Nov 7, 2019) - - Bugfixing - Avoid certain keys (containing one of three keywords) on the browser to generate a request to the wrong endpoint. - Added SonarQube integration. + - Bugfix - Avoid certain keys (containing one of three keywords) on the browser to generate a request to the wrong endpoint. 10.9.0 (Oct 24, 2019) - Added listener for 'unload' DOM events to push remaining impressions and events when the browser page is closed or reloaded. @@ -352,8 +352,8 @@ 10.8.2 (Jul 26, 2019) - Added `/src` folder to the npm package distribution for users that needs to transpile the package themselves. - - Bugfixing - Incorrect warnings caused by TrafficType storage counter when a Split is updated for inMemory and LocalStorage mode. - Updated three dev dependencies to remove vulnerability warnings when running npm audit (lodash, set-value, mixin-deep). + - Bugfix - Incorrect warnings caused by TrafficType storage counter when a Split is updated for inMemory and LocalStorage mode. 10.8.1 (May 31, 2019) - Updated axios version to 0.19.0 to remove a DoS vulnerability (not affecting the SDK but worth updating). @@ -362,13 +362,13 @@ - Added support for optional event properties via our client.track() method. Read more in our docs! 10.7.2 (May 15, 2019) - - Bugfixing - Fixing ES6 import syntax for LabelConstants module. + - Bugfix - Fixing ES6 import syntax for LabelConstants module. 10.7.1 (May 10, 2019) - Added Block Until Ready functionality support for consumer clients (Redis mode on Node.js) to make integration code work the same between modes. - Added more Input and Usage Validation rules, including an extra label for impressions when the SDK is not ready. - Updated the SDK Redis adapter to handle pending commands when disconnecting from the Redis server. - - Bugfixing - Clearing up readyTimeout after we don't need it anymore. It also fixes the misleading SDK_READY_TIMED_OUT error log when using Redis. + - Bugfix - Clearing up readyTimeout after we don't need it anymore. It also fixes the misleading SDK_READY_TIMED_OUT error log when using Redis. 10.7.0 (Apr 30, 2019) - Added Block Until Ready functionality to the manager, shared with the main client. Now you can subscribe to SDK events or use the .ready() promise from the manager as well. @@ -392,11 +392,11 @@ - Updated default values on configuration for Node.js. - startup.readyTimeout default value went up from 0s (no timeout limit) to 15s. - startup.retriesOnFailureBeforeReady default value went up from 0 (no retries) to 1. - - Bugfixing - Preventing "Uncaught in promise (undefined)" error for .ready() promise when no error handlers are attached to it. - - Bugfixing - Always throw JS errors inside callbacks attached to the SDK, so developers don't miss them. + - Bugfix - Preventing "Uncaught in promise (undefined)" error for .ready() promise when no error handlers are attached to it. + - Bugfix - Always throw JS errors inside callbacks attached to the SDK, so developers don't miss them. 10.5.1 (Dec 20, 2018) - - Bugfixing - Fixing an issue where a Split with Traffic Allocation set to one would return the default treatment for 100% of the traffic (instead of 99%). + - Bugfix - Fixing an issue where a Split with Traffic Allocation set to one would return the default treatment for 100% of the traffic (instead of 99%). 10.5.0 (Nov 7, 2018) - Added custom impression listener feature, so customers can receive all the impressions data on a callback to handle as they place. @@ -406,8 +406,8 @@ will go to Redis and be sent to Split by the synchronizer. - Added a wrapper on top of ioredis to better handle operations and reduce unwanted library effects. - Removed unnecessary keys/scans on Redis. - - Bugfixing - Calling factory.client on the browser with the same key used on configuration created a new unnecessary instance. - - Bugfixing - Fixing multiple instances of the client without specific scheduler configurations cause overflow on timeout values. + - Bugfix - Calling factory.client on the browser with the same key used on configuration created a new unnecessary instance. + - Bugfix - Fixing multiple instances of the client without specific scheduler configurations cause overflow on timeout values. 10.4.0 (Oct 4, 2018) - Removed dependency for logging library. @@ -417,8 +417,8 @@ - Added automatic cleanup and data flush for Node.js on SIGTERM signals. - Updated default value for startup.requestTimeoutBeforeReady on the Browser from 0.8 seconds to 1.5 seconds to match startup.readyTimeout. - Updated dependency versions. - - Bugfixing - Capturing uncaught exception on some http and network errors. - - Bugfixing - IE - Producer names logged as undefined. + - Bugfix - Capturing uncaught exception on some http and network errors. + - Bugfix - IE - Producer names logged as undefined. 10.3.3 (Aug 8, 2018) - Removing logplease dependency hosted on GitHub. @@ -443,7 +443,7 @@ - Removed global polyfills. 10.1.1 (March 20, 2018) - - Bugfixing - getTreatment will return 'control' and the impression registered + - Bugfix - getTreatment will return 'control' and the impression registered will have label 'exception' when there is a Redis Exception. 10.1.0 (March 8, 2018) @@ -462,10 +462,10 @@ - Adding trafficType as an optional core setting. If provided on the browser it will be bound to the client as the key. - TypeScript declarations polishing. - Updated SDK labels. - - Bugfixing - Shared clients (browser) were ready even if the main client was not. - - Bugfixing - Shared clients (browser) from different SDK instances should be separate. - - Bugfixing - When using SDK key with wrong permissions, Node.js was throwing a false ready event (without segments). - - Bugfixing - Localhost mode was trying to flush impressions when client.destroy was invoked. + - Bugfix - Shared clients (browser) were ready even if the main client was not. + - Bugfix - Shared clients (browser) from different SDK instances should be separate. + - Bugfix - When using SDK key with wrong permissions, Node.js was throwing a false ready event (without segments). + - Bugfix - Localhost mode was trying to flush impressions when client.destroy was invoked. 9.3.7 (Dec 22, 2017) - Updated SDK labels. @@ -491,7 +491,7 @@ - Adding support for Node.js v0.10.X 9.3.1 (Jul 28, 2017) - - Bugfixing - Fixed a bug on Manager API which was not retrieving the right treatments for a Split on some cases. + - Bugfix - Fixed a bug on Manager API which was not retrieving the right treatments for a Split on some cases. 9.3.0 (Jul 25, 2017) - Several new matchers have been released: @@ -500,10 +500,10 @@ - Regex Matchers 9.2.2 (Jul 20, 2017) - - Bugfixing - Added support into the SDK to flush impressions before destroy the instance. + - Bugfix - Added support into the SDK to flush impressions before destroy the instance. 9.2.1 (May 19, 2017) - - Bugfixing - Issue with dependency that exposes untranspiled code through cjs require, causes + - Bugfix - Issue with dependency that exposes untranspiled code through cjs require, causes problems on IE and Node.js 3. 9.2.0 (May 11, 2017) @@ -550,10 +550,10 @@ - Added Time Tracker logs. When logs are enabled, we log how much time takes to complete SDK important tasks, like getting ready, downloading important information or pushing metrics and impressions to Split. - - Bugfixing - Return correct label when consulted Split is not found. + - Bugfix - Return correct label when consulted Split is not found. 9.1.1 (May 03, 2017) - - Bugfixing - Fixed invalid behavior when using native Fetch API and comparing statusText + - Bugfix - Fixed invalid behavior when using native Fetch API and comparing statusText instead of resp.ok 9.1.0 (April 21, 2017) From 919a99b539c0f5a2fcf798e936e65c2defff0401 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Fri, 16 May 2025 17:58:06 -0300 Subject: [PATCH 09/13] ci: update GitHub Actions runner to ubuntu-latest --- .github/workflows/ci-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 7621d4b33..15766ad41 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -66,7 +66,7 @@ jobs: upload-stage: name: Upload assets - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest needs: build if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/development' }} strategy: @@ -105,7 +105,7 @@ jobs: upload-prod: name: Upload assets - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest needs: build if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} strategy: From 1a4aa7dc29b146795380e0d81295dec71275b84a Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Mon, 19 May 2025 22:04:24 -0300 Subject: [PATCH 10/13] rc --- package-lock.json | 18 +++++++++--------- package.json | 4 ++-- src/settings/defaults/version.js | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 75e1bb986..06a24c52e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@splitsoftware/splitio", - "version": "11.3.0", + "version": "11.3.1-rc.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio", - "version": "11.3.0", + "version": "11.3.1-rc.0", "license": "Apache-2.0", "dependencies": { - "@splitsoftware/splitio-commons": "2.3.0", + "@splitsoftware/splitio-commons": "2.3.1-rc.0", "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.3.0", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.3.0.tgz", - "integrity": "sha512-TRxutKjGw2JtlYhGYFW5T/2srF76hLDn9pNlwkHx6R0qDK7CqkjhFx/KU6LRqsibnmlh2aMl1I+TxblDncMDyA==", + "version": "2.3.1-rc.0", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.3.1-rc.0.tgz", + "integrity": "sha512-+IQdkvy9FPD/r2v40vew8wpVFMPbFWmYXaQ1uhTgytax3nLI0TokoSjEBizEfE7B6xcQ22AZ4ogAqDnIvQBryw==", "license": "Apache-2.0", "dependencies": { "@types/ioredis": "^4.28.0", @@ -7539,9 +7539,9 @@ "dev": true }, "@splitsoftware/splitio-commons": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.3.0.tgz", - "integrity": "sha512-TRxutKjGw2JtlYhGYFW5T/2srF76hLDn9pNlwkHx6R0qDK7CqkjhFx/KU6LRqsibnmlh2aMl1I+TxblDncMDyA==", + "version": "2.3.1-rc.0", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.3.1-rc.0.tgz", + "integrity": "sha512-+IQdkvy9FPD/r2v40vew8wpVFMPbFWmYXaQ1uhTgytax3nLI0TokoSjEBizEfE7B6xcQ22AZ4ogAqDnIvQBryw==", "requires": { "@types/ioredis": "^4.28.0", "tslib": "^2.3.1" diff --git a/package.json b/package.json index 285f15601..16ebd0c2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio", - "version": "11.3.0", + "version": "11.3.1-rc.0", "description": "Split SDK", "files": [ "README.md", @@ -38,7 +38,7 @@ "node": ">=14.0.0" }, "dependencies": { - "@splitsoftware/splitio-commons": "2.3.0", + "@splitsoftware/splitio-commons": "2.3.1-rc.0", "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 8132c030a..8da8a17a7 100644 --- a/src/settings/defaults/version.js +++ b/src/settings/defaults/version.js @@ -1 +1 @@ -export const packageVersion = '11.3.0'; +export const packageVersion = '11.3.1-rc.0'; From 303b33317155d6764c777f907119f8665d8220cb Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Mon, 26 May 2025 14:31:26 -0300 Subject: [PATCH 11/13] Fix typos --- src/__tests__/mocks/splitchanges.since.-1.json | 2 ++ src/__tests__/push/browser.spec.js | 4 ++-- src/__tests__/push/node.spec.js | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/__tests__/mocks/splitchanges.since.-1.json b/src/__tests__/mocks/splitchanges.since.-1.json index 1cf627836..b08b71a3d 100644 --- a/src/__tests__/mocks/splitchanges.since.-1.json +++ b/src/__tests__/mocks/splitchanges.since.-1.json @@ -1745,6 +1745,8 @@ "trafficTypeId": null, "trafficTypeName": null, "name": "always_on_if_prerequisite", + "trafficAllocation": 100, + "trafficAllocationSeed": 1828377380, "seed": -790401604, "status": "ACTIVE", "killed": false, diff --git a/src/__tests__/push/browser.spec.js b/src/__tests__/push/browser.spec.js index 0d8dbeee1..99a38fbad 100644 --- a/src/__tests__/push/browser.spec.js +++ b/src/__tests__/push/browser.spec.js @@ -14,13 +14,13 @@ Math.random = () => 0.5; // SDKs without telemetry tape('## Browser JS - E2E CI Tests for PUSH ##', function (assert) { - // Non-recoverable issues on inizialization + // Non-recoverable issues on initialization assert.test('E2E / PUSH initialization: auth with push disabled', testAuthWithPushDisabled.bind(null, fetchMock)); assert.test('E2E / PUSH initialization: auth with 401', testAuthWith401.bind(null, fetchMock)); assert.test('E2E / PUSH initialization: fallback to polling if EventSource is not available', testNoEventSource.bind(null, fetchMock)); assert.test('E2E / PUSH initialization: sse with non-recoverable Ably error', testSSEWithNonRetryableError.bind(null, fetchMock)); - // Recoverable issues on inizialization + // Recoverable issues on initialization assert.test('E2E / PUSH initialization: auth failures and then success', testPushRetriesDueToAuthErrors.bind(null, fetchMock)); assert.test('E2E / PUSH initialization: SSE connection failures and then success', testPushRetriesDueToSseErrors.bind(null, fetchMock)); diff --git a/src/__tests__/push/node.spec.js b/src/__tests__/push/node.spec.js index 3922685ea..6a2957d58 100644 --- a/src/__tests__/push/node.spec.js +++ b/src/__tests__/push/node.spec.js @@ -15,14 +15,14 @@ fetchMock.post('https://telemetry.split.io/api/v1/metrics/usage', 200); tape('## Node.js - E2E CI Tests for PUSH ##', async function (assert) { - // Non-recoverable issues on inizialization + // Non-recoverable issues on initialization assert.test('E2E / PUSH initialization: auth with push disabled', testAuthWithPushDisabled.bind(null, fetchMock)); assert.test('E2E / PUSH initialization: auth with 401', testAuthWith401.bind(null, fetchMock)); assert.test('E2E / PUSH initialization: auth with 400', testAuthWith400.bind(null, fetchMock)); assert.test('E2E / PUSH initialization: fallback to polling if EventSource is not available', testNoEventSource.bind(null, fetchMock)); assert.test('E2E / PUSH initialization: sse with non-recoverable Ably error', testSSEWithNonRetryableError.bind(null, fetchMock)); - // Recoverable issues on inizialization + // Recoverable issues on initialization assert.test('E2E / PUSH initialization: auth failures and then success', testPushRetriesDueToAuthErrors.bind(null, fetchMock)); assert.test('E2E / PUSH initialization: SSE connection failures and then success', testPushRetriesDueToSseErrors.bind(null, fetchMock)); From ad5f02744306365892b87c7c6c1745cfb238e0ee Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Mon, 26 May 2025 16:00:22 -0300 Subject: [PATCH 12/13] Fix karma debug config for latest version of MacOS --- karma/config.debug.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/karma/config.debug.js b/karma/config.debug.js index 6c461f901..8b3949072 100644 --- a/karma/config.debug.js +++ b/karma/config.debug.js @@ -3,8 +3,14 @@ const merge = require('lodash/merge'); module.exports = merge({}, require('./config'), { + customLaunchers: { + ChromeNoSandbox: { + base: 'Chrome', + flags: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-gpu'] + } + }, browsers: [ - 'Chrome' + 'ChromeNoSandbox' ], webpack: { mode: 'development' From 9367b2f8bde5c500d49c9cbfd1d9e579c9a5aa48 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Tue, 27 May 2025 17:43:02 -0300 Subject: [PATCH 13/13] Stable version --- .github/workflows/ci-cd.yml | 4 ++-- CHANGES.txt | 6 +++--- package-lock.json | 18 +++++++++--------- package.json | 4 ++-- src/settings/defaults/version.js | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index bc9fcb3fe..15766ad41 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -57,7 +57,7 @@ jobs: run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") npm run build - name: Store assets - if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/prerequisites' || github.ref == 'refs/heads/master') }} + if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master') }} uses: actions/upload-artifact@v4 with: name: assets @@ -68,7 +68,7 @@ jobs: name: Upload assets runs-on: ubuntu-latest needs: build - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/prerequisites' }} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/development' }} strategy: matrix: environment: diff --git a/CHANGES.txt b/CHANGES.txt index ddde89f84..599c5d527 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,6 @@ -11.4.0 (May 20, 2025) - - Added support for targeting rules based on rule-based segments. - - Added support for feature flag prerequisites. +11.4.0 (May 28, 2025) + - Added support for rule-based segments. These segments determine membership at runtime by evaluating their configured rules against the user attributes provided to the SDK. + - Added support for feature flag prerequisites. This allows customers to define dependency conditions between flags, which are evaluated before any allowlists or targeting rules. - Updated @splitsoftware/splitio-commons package to version 2.4.0. 11.3.0 (May 16, 2025) diff --git a/package-lock.json b/package-lock.json index 06a24c52e..d299f1608 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@splitsoftware/splitio", - "version": "11.3.1-rc.0", + "version": "11.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio", - "version": "11.3.1-rc.0", + "version": "11.4.0", "license": "Apache-2.0", "dependencies": { - "@splitsoftware/splitio-commons": "2.3.1-rc.0", + "@splitsoftware/splitio-commons": "2.4.0", "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.3.1-rc.0", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.3.1-rc.0.tgz", - "integrity": "sha512-+IQdkvy9FPD/r2v40vew8wpVFMPbFWmYXaQ1uhTgytax3nLI0TokoSjEBizEfE7B6xcQ22AZ4ogAqDnIvQBryw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.4.0.tgz", + "integrity": "sha512-VjrzXe7zDM5oi+VWfNNAu1DtcsZl1he8c/MeC4O2SiNRid+Nurzs0ROziHEcBt/4nnCI7vZMNdM4FCcnZHMccA==", "license": "Apache-2.0", "dependencies": { "@types/ioredis": "^4.28.0", @@ -7539,9 +7539,9 @@ "dev": true }, "@splitsoftware/splitio-commons": { - "version": "2.3.1-rc.0", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.3.1-rc.0.tgz", - "integrity": "sha512-+IQdkvy9FPD/r2v40vew8wpVFMPbFWmYXaQ1uhTgytax3nLI0TokoSjEBizEfE7B6xcQ22AZ4ogAqDnIvQBryw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio-commons/-/splitio-commons-2.4.0.tgz", + "integrity": "sha512-VjrzXe7zDM5oi+VWfNNAu1DtcsZl1he8c/MeC4O2SiNRid+Nurzs0ROziHEcBt/4nnCI7vZMNdM4FCcnZHMccA==", "requires": { "@types/ioredis": "^4.28.0", "tslib": "^2.3.1" diff --git a/package.json b/package.json index 16ebd0c2f..c436bec33 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio", - "version": "11.3.1-rc.0", + "version": "11.4.0", "description": "Split SDK", "files": [ "README.md", @@ -38,7 +38,7 @@ "node": ">=14.0.0" }, "dependencies": { - "@splitsoftware/splitio-commons": "2.3.1-rc.0", + "@splitsoftware/splitio-commons": "2.4.0", "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 8da8a17a7..7c83e39ba 100644 --- a/src/settings/defaults/version.js +++ b/src/settings/defaults/version.js @@ -1 +1 @@ -export const packageVersion = '11.3.1-rc.0'; +export const packageVersion = '11.4.0';