Skip to content

Commit 06f2cbb

Browse files
Merge pull request #779 from splitio/update_localstorage_clear
Update LocalStorage to clear storage if SDK key or filter criteria change
2 parents 5a9f7ac + 5c15bf4 commit 06f2cbb

File tree

7 files changed

+70
-89
lines changed

7 files changed

+70
-89
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
10.24.1 (December 12, 2023)
2+
- 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, to avoid using invalid cached data when the SDK is ready from cache.
3+
- Updated @splitsoftware/splitio-commons package to version 1.12.1.
4+
15
10.24.0 (December 4, 2023)
26
- 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):
37
- Added new variations of the get treatment methods to support evaluating flags in given flag set/s.

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",
3-
"version": "10.24.0",
3+
"version": "10.24.1",
44
"description": "Split SDK",
55
"files": [
66
"README.md",
@@ -40,7 +40,7 @@
4040
"node": ">=6"
4141
},
4242
"dependencies": {
43-
"@splitsoftware/splitio-commons": "1.12.0",
43+
"@splitsoftware/splitio-commons": "1.12.1",
4444
"@types/google.analytics": "0.0.40",
4545
"@types/ioredis": "^4.28.0",
4646
"bloom-filters": "^3.0.0",

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';
@@ -47,6 +48,7 @@ export function testSplitKillOnReadyFromCache(fetchMock, assert) {
4748

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

0 commit comments

Comments
 (0)