Skip to content

Commit

Permalink
Merge pull request #779 from splitio/update_localstorage_clear
Browse files Browse the repository at this point in the history
Update LocalStorage to clear storage if SDK key or filter criteria change
  • Loading branch information
EmilianoSanchez authored Dec 12, 2023
2 parents 5a9f7ac + 5c15bf4 commit 06f2cbb
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 89 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
10.24.1 (December 12, 2023)
- 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.
- Updated @splitsoftware/splitio-commons package to version 1.12.1.

10.24.0 (December 4, 2023)
- 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):
- Added new variations of the get treatment methods to support evaluating flags in given flag set/s.
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@splitsoftware/splitio",
"version": "10.24.0",
"version": "10.24.1",
"description": "Split SDK",
"files": [
"README.md",
Expand Down Expand Up @@ -40,7 +40,7 @@
"node": ">=6"
},
"dependencies": {
"@splitsoftware/splitio-commons": "1.12.0",
"@splitsoftware/splitio-commons": "1.12.1",
"@types/google.analytics": "0.0.40",
"@types/ioredis": "^4.28.0",
"bloom-filters": "^3.0.0",
Expand Down
2 changes: 2 additions & 0 deletions src/__tests__/browserSuites/push-corner-cases.spec.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getStorageHash } from '@splitsoftware/splitio-commons/src/storages/KeyBuilder';
import splitChangesMock1 from '../mocks/splitchanges.since.-1.json';
import splitKillMessage from '../mocks/message.SPLIT_KILL.1457552650000.json';
import authPushEnabledNicolas from '../mocks/auth.pushEnabled.nicolas@split.io.json';
Expand Down Expand Up @@ -47,6 +48,7 @@ export function testSplitKillOnReadyFromCache(fetchMock, assert) {

// prepare localstorage to allow SPLIT_KILL kill locally
localStorage.clear();
localStorage.setItem('pushCornerCase.SPLITIO.hash', getStorageHash(settings));
localStorage.setItem('pushCornerCase.SPLITIO.splits.till', 25);
localStorage.setItem('pushCornerCase.SPLITIO.split.whitelist', JSON.stringify({
'name': 'whitelist',
Expand Down
Loading

0 comments on commit 06f2cbb

Please sign in to comment.