Skip to content

Commit 4e9f462

Browse files
Merge pull request #105 from splitio/SDKS-7797-flagsets_in_pluggable_storage
[SDKS-7797] Add flag sets support for pluggable storage
2 parents 074d1ad + 26d1467 commit 4e9f462

11 files changed

Lines changed: 225 additions & 98 deletions

File tree

CHANGES.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1+
0.13.0 (December 12, 2023)
2+
- Added support for Flag Sets in "consumer" and "partial consumer" modes (pluggable storage).
3+
- Updated SDK cache for browsers using localStorage, to clear cached feature flag definitions before initiating the synchronization process, if the cache was previously synchronized with a different SDK key (i.e., a different environment) or different Split Filter criteria.
4+
- Updated @splitsoftware/splitio-commons package to version 1.12.1 that includes flag sets support for consumer modes, and other improvements.
5+
- Bugfixing - Fixed manager methods in consumer modes to return results in a promise when the SDK is not operational (not ready or destroyed).
6+
17
0.12.0 (November 3, 2023)
2-
- Added support for Flag Sets on the SDK, which enables grouping feature flags and interacting with the group rather than individually (more details in our documentation):
8+
- Added support for Flag Sets on the SDK, which enables grouping feature flags and interacting with the group rather than individually (more details in our documentation):
39
- Added new variations of the get treatment methods to support evaluating flags in given flag set/s.
410
- getTreatmentsByFlagSet and getTreatmentsByFlagSets
511
- getTreatmentsWithConfigByFlagSets and getTreatmentsWithConfigByFlagSets
612
- Added a new optional Split Filter configuration option. This allows the SDK and Split services to only synchronize the flags in the specified flag sets, avoiding unused or unwanted flags from being synced on the SDK instance, bringing all the benefits from a reduced payload.
713
- Note: Only applicable when the SDK is in charge of the rollout data synchronization. When not applicable, the SDK will log a warning on init.
814
- Added `sets` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager to expose flag sets on flag views.
9-
- Updated @splitsoftware/splitio-commons package to version 1.11.0.
15+
- Updated @splitsoftware/splitio-commons package to version 1.11.0.
1016

1117
0.11.0 (October 31, 2023)
1218
- 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).

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splitsoftware/splitio-browserjs",
3-
"version": "0.12.0",
3+
"version": "0.13.0",
44
"description": "Split SDK for JavaScript on Browser",
55
"main": "cjs/index.js",
66
"module": "esm/index.js",
@@ -64,7 +64,7 @@
6464
"bugs": "https://github.com/splitio/javascript-browser-client/issues",
6565
"homepage": "https://github.com/splitio/javascript-browser-client#readme",
6666
"dependencies": {
67-
"@splitsoftware/splitio-commons": "1.11.0",
67+
"@splitsoftware/splitio-commons": "1.12.1",
6868
"@types/google.analytics": "0.0.40",
6969
"unfetch": "^4.2.0"
7070
},

src/__tests__/browserSuites/push-corner-cases.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { getStorageHash } from '@splitsoftware/splitio-commons/src/storages/KeyBuilder';
12
import splitChangesMock1 from '../mocks/splitchanges.since.-1.json';
23
import splitKillMessage from '../mocks/message.SPLIT_KILL.1457552650000.json';
34
import authPushEnabledNicolas from '../mocks/auth.pushEnabled.nicolas@split.io.json';
@@ -46,6 +47,7 @@ export function testSplitKillOnReadyFromCache(fetchMock, assert) {
4647

4748
// prepare localstorage to allow SPLIT_KILL kill locally
4849
localStorage.clear();
50+
localStorage.setItem('pushCornerCase.SPLITIO.hash', getStorageHash(settings));
4951
localStorage.setItem('pushCornerCase.SPLITIO.splits.till', 25);
5052
localStorage.setItem('pushCornerCase.SPLITIO.split.whitelist', JSON.stringify({
5153
'name': 'whitelist',

0 commit comments

Comments
 (0)