From afd089068da3770792625c07845e638b6aee0267 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Wed, 28 May 2025 12:32:22 -0300 Subject: [PATCH] Stable version --- CHANGES.txt | 20 ++++++++---- package-lock.json | 46 +++++++++++++-------------- package.json | 4 +-- src/__tests__/helpers.browser.test.ts | 2 ++ src/__tests__/helpers.node.test.ts | 2 ++ 5 files changed, 42 insertions(+), 32 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9b6a55e..2018482 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,9 @@ +2.2.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. + - Bugfix - Enhanced HTTP client module to implement timeouts for failing requests that might otherwise remain pending indefinitely on some Fetch API implementations. + - Updated @splitsoftware/splitio package to version 11.4.0. + 2.1.0 (April 1, 2025) - Added a new optional `properties` argument to the options object of the `getTreatments` action creator, allowing to pass a map of properties to append to the generated impressions sent to Split backend. Read more in our docs. - Updated @splitsoftware/splitio package to version 11.2.0 that includes some minor updates: @@ -9,7 +15,7 @@ 2.0.1 (December 5, 2024) - Updated @splitsoftware/splitio package to version 11.0.3 that includes some improvements and bugfixes. - - Bugfixing - Fixed issue where the `SplitIO` namespace from `@splitsoftware/splitio` was not accessible through the library, enabling users to use the namespace without additional imports (Related to https://github.com/splitio/redux-client/issues/130). + - Bugfix - Fixed issue where the `SplitIO` namespace from `@splitsoftware/splitio` was not accessible through the library, enabling users to use the namespace without additional imports (Related to https://github.com/splitio/redux-client/issues/130). 2.0.0 (November 14, 2024) - Added support for targeting rules based on large segments. @@ -23,7 +29,7 @@ - Updated peer dependencies to drop support for Redux library below v3.0.0. 1.14.1 (October 15, 2024) - - Bugfixing - Fixed error in `splitReducer` when handling actions with a `null` payload, preventing crashes caused by accessing undefined payload properties (Related to https://github.com/splitio/redux-client/issues/121). + - Bugfix - Fixed error in `splitReducer` when handling actions with a `null` payload, preventing crashes caused by accessing undefined payload properties (Related to https://github.com/splitio/redux-client/issues/121). 1.14.0 (September 13, 2024) - Added `status` property to Split reducer's slice of state to track the SDK events of non-default clients (Related to https://github.com/splitio/redux-client/issues/113). @@ -45,7 +51,7 @@ - Added support for targeting rules based on semantic versions (https://semver.org/). - Added special impression label "targeting rule type unsupported by sdk" when the matcher type is not supported by the SDK, which returns 'control' treatment. - Updated Split API client to include the flags spec version query parameter for the `splitChanges` and `auth` endpoints. - - Bugfixing - Fixed error when calling `selectTreatmentValue` and `selectTreatmentWithConfig` selectors with an object as a key, caused by the key being stringified rather than using the `matchingKey` property of the object. + - Bugfix - Fixed error when calling `selectTreatmentValue` and `selectTreatmentWithConfig` selectors with an object as a key, caused by the key being stringified rather than using the `matchingKey` property of the object. 1.11.0 (April 3, 2024) - Added `sideEffects: false` property in the package.json file to allow tree shaking. @@ -79,7 +85,7 @@ - Updated linter dependencies and rules. The deprecated TSLint package was replaced by ESLint. - Updated some transitive dependencies for vulnerability fixes. - Updated @splitsoftware/splitio package to version 10.22.4 that includes minor improvements. - - Bugfixing - Fixed error when using the SDK in localhost mode for testing with Node.js test runners such as Jest (See https://help.split.io/hc/en-us/articles/360038851551-Redux-SDK#localhost-mode). + - Bugfix - Fixed error when using the SDK in localhost mode for testing with Node.js test runners such as Jest (See https://help.split.io/hc/en-us/articles/360038851551-Redux-SDK#localhost-mode). 1.7.1 (November 15, 2022) - Updated React Redux peer dependency range to include React-redux@8.x.x and React@18.x.x. @@ -103,7 +109,7 @@ - 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. - 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. 1.5.0 (April 20, 2022) - Updated @splitsoftware/splitio dependency to version 10.18.1, which includes: @@ -146,13 +152,13 @@ - Added an optional callback parameter to `destroySplitSdk` action creator: `onDestroy`, to listen when the SDK has gracefully shut down. 1.1.0 (May 11, 2020) - - Bugfixing - Incorrect evaluation of feature flags on browser when using `getTreatments` with a different user key than the default, caused by not waiting the fetch of segments (Related to issue https://github.com/splitio/redux-client/issues/9). + - Bugfix - Incorrect evaluation of feature flags on browser when using `getTreatments` with a different user key than the default, caused by not waiting the fetch of segments (Related to issue https://github.com/splitio/redux-client/issues/9). - Added `destroySplitSdk` action creator to gracefully shutdown the SDK. - Added two new status properties to split's piece of state: `hasTimedout` and `isDestroyed` to better reflect the current state of the associated factory. 1.0.1 (April 6, 2020) - Updated dependencies to fix vulnerabilities. - - Bugfixing - Support numbers as user keys. + - Bugfix - Support numbers as user keys. 1.0.0 (January 24, 2020) - Initial public release! diff --git a/package-lock.json b/package-lock.json index 39523f9..51d998b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@splitsoftware/splitio-redux", - "version": "2.1.0", + "version": "2.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio-redux", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "dependencies": { - "@splitsoftware/splitio": "11.2.0", + "@splitsoftware/splitio": "11.4.0", "tslib": "^2.3.1" }, "devDependencies": { @@ -1579,12 +1579,12 @@ } }, "node_modules/@splitsoftware/splitio": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio/-/splitio-11.2.0.tgz", - "integrity": "sha512-M0TK8jlhLBv4+PchzBvn5R33MZzvRTInauGKGeaTpbxI+zq/g58meaNEiLRJxNw1lAWOjPhPRLIVg+V3Mf+uaA==", + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio/-/splitio-11.4.0.tgz", + "integrity": "sha512-j7QInokgm2egXFU8dJwHrUQH7S0BMzawa/5SNLBDWN7Y9QrDQ0J+gHrRFgEH0b36lmaFVhGlSjGw/2RaZLOrCA==", "license": "Apache-2.0", "dependencies": { - "@splitsoftware/splitio-commons": "2.2.0", + "@splitsoftware/splitio-commons": "2.4.0", "bloom-filters": "^3.0.4", "ioredis": "^4.28.0", "js-yaml": "^3.13.1", @@ -1597,9 +1597,9 @@ } }, "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.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", @@ -5196,9 +5196,9 @@ } }, "node_modules/ioredis": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.29.1.tgz", - "integrity": "sha512-iq4u3AC9h9/P/gBXH1cUR7Ln0exKexqMaYDwUaoZJzkvvgJs9W5+CLQFS0APyG8uyvJJjn6q6Vx7LwmZQu3h5A==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.30.0.tgz", + "integrity": "sha512-P9F4Eo6zicYsIJbEy/mPJmSxKY0rVcmiy5H8oXPxPDotQRCvCBjBuI5QWoQQanVE9jdeocnum5iqYAHl4pHdLA==", "license": "MIT", "dependencies": { "@ioredis/commands": "^1.0.2", @@ -11498,11 +11498,11 @@ } }, "@splitsoftware/splitio": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/@splitsoftware/splitio/-/splitio-11.2.0.tgz", - "integrity": "sha512-M0TK8jlhLBv4+PchzBvn5R33MZzvRTInauGKGeaTpbxI+zq/g58meaNEiLRJxNw1lAWOjPhPRLIVg+V3Mf+uaA==", + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/@splitsoftware/splitio/-/splitio-11.4.0.tgz", + "integrity": "sha512-j7QInokgm2egXFU8dJwHrUQH7S0BMzawa/5SNLBDWN7Y9QrDQ0J+gHrRFgEH0b36lmaFVhGlSjGw/2RaZLOrCA==", "requires": { - "@splitsoftware/splitio-commons": "2.2.0", + "@splitsoftware/splitio-commons": "2.4.0", "bloom-filters": "^3.0.4", "ioredis": "^4.28.0", "js-yaml": "^3.13.1", @@ -11512,9 +11512,9 @@ } }, "@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.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" @@ -14163,9 +14163,9 @@ } }, "ioredis": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.29.1.tgz", - "integrity": "sha512-iq4u3AC9h9/P/gBXH1cUR7Ln0exKexqMaYDwUaoZJzkvvgJs9W5+CLQFS0APyG8uyvJJjn6q6Vx7LwmZQu3h5A==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.30.0.tgz", + "integrity": "sha512-P9F4Eo6zicYsIJbEy/mPJmSxKY0rVcmiy5H8oXPxPDotQRCvCBjBuI5QWoQQanVE9jdeocnum5iqYAHl4pHdLA==", "requires": { "@ioredis/commands": "^1.0.2", "cluster-key-slot": "^1.1.0", diff --git a/package.json b/package.json index d5fa821..73fafb9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio-redux", - "version": "2.1.0", + "version": "2.2.0", "description": "A library to easily use Split JS SDK with Redux and React Redux", "main": "cjs/index.js", "module": "esm/index.js", @@ -59,7 +59,7 @@ }, "homepage": "https://github.com/splitio/redux-client#readme", "dependencies": { - "@splitsoftware/splitio": "11.2.0", + "@splitsoftware/splitio": "11.4.0", "tslib": "^2.3.1" }, "devDependencies": { diff --git a/src/__tests__/helpers.browser.test.ts b/src/__tests__/helpers.browser.test.ts index 7ad9756..cd94266 100644 --- a/src/__tests__/helpers.browser.test.ts +++ b/src/__tests__/helpers.browser.test.ts @@ -35,6 +35,7 @@ const featureFlagViews: SplitIO.SplitViews = [ sets: [], defaultTreatment: 'off', impressionsDisabled: false, + prerequisites: [] }, { name: 'split_2', trafficType: 'user', @@ -45,6 +46,7 @@ const featureFlagViews: SplitIO.SplitViews = [ sets: [], defaultTreatment: 'off', impressionsDisabled: false, + prerequisites: [{ flagName: 'flag_1', treatments: ['on'] }] }, ]; diff --git a/src/__tests__/helpers.node.test.ts b/src/__tests__/helpers.node.test.ts index de25924..3ec7dbe 100644 --- a/src/__tests__/helpers.node.test.ts +++ b/src/__tests__/helpers.node.test.ts @@ -34,6 +34,7 @@ const featureFlagViews: SplitIO.SplitViews = [ sets: [], defaultTreatment: 'off', impressionsDisabled: false, + prerequisites: [] }, { name: 'split_2', trafficType: 'user', @@ -44,6 +45,7 @@ const featureFlagViews: SplitIO.SplitViews = [ sets: [], defaultTreatment: 'off', impressionsDisabled: false, + prerequisites: [{ flagName: 'flag_1', treatments: ['on'] }] }, ];