Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
0.7.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.
- Updated telemetry logic to track the anonymous config for user consent flag set to declined or unknown.
- Updated submitters logic, to avoid duplicating the post of impressions to Split cloud when the SDK is destroyed while its periodic post of impressions is running.


0.6.0 (May 24, 2022)
- Added `scheduler.telemetryRefreshRate` property to SDK configuration.
- Updated SDK telemetry storage, metrics and updater to be more effective and send less often.
Expand Down
2,341 changes: 186 additions & 2,155 deletions package-lock.json

Large diffs are not rendered by default.

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-browserjs",
"version": "0.6.0",
"version": "0.7.0",
"description": "Split SDK for Javascript on Browser",
"main": "cjs/index.js",
"module": "esm/index.js",
Expand Down Expand Up @@ -61,7 +61,7 @@
"bugs": "https://github.com/splitio/javascript-browser-client/issues",
"homepage": "https://github.com/splitio/javascript-browser-client#readme",
"dependencies": {
"@splitsoftware/splitio-commons": "1.4.0",
"@splitsoftware/splitio-commons": "1.5.0",
"@types/google.analytics": "0.0.40"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/push/push-corner-cases.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ export function testSplitKillOnReadyFromCache(fetchMock, assert) {
fetchMock.get({ url: url(settings, '/mySegments/nicolas%40split.io'), repeat: 2 }, { status: 200, body: { mySegments: [] } });

// 2 splitChanges request: initial sync and after SSE opened. Sync after SPLIT_KILL is not performed because SplitsSyncTask is "executing"
fetchMock.getOnce(url(settings, '/splitChanges?since=25'), { status: 200, body: splitChangesMock1}, {delay: MILLIS_SPLIT_CHANGES_RESPONSE, /* delay response */ });
fetchMock.getOnce(url(settings, '/splitChanges?since=25'), { status: 200, body: splitChangesMock1}, {delay: MILLIS_SPLIT_CHANGES_RESPONSE, /* delay response */ });
fetchMock.getOnce(url(settings, '/splitChanges?since=25'), { status: 200, body: splitChangesMock1 }, { delay: MILLIS_SPLIT_CHANGES_RESPONSE, /* delay response */ });
fetchMock.getOnce(url(settings, `/splitChanges?since=${splitChangesMock1.till}`), { status: 200, body: { splits: [], since: splitChangesMock1.till, till: splitChangesMock1.till } }, { delay: MILLIS_SPLIT_CHANGES_RESPONSE - 100, /* delay response */ });

fetchMock.get(new RegExp('.*'), function (url) {
assert.fail('unexpected GET request with url: ' + url);
Expand Down
2 changes: 1 addition & 1 deletion src/settings/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/src/
import { ConsentStatus, LogLevel } from '@splitsoftware/splitio-commons/src/types';
import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/src/utils/constants';

const packageVersion = '0.6.0';
const packageVersion = '0.7.0';

/**
* In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
Expand Down
4 changes: 3 additions & 1 deletion ts-tests/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,8 @@ let fullBrowserSettings: SplitIO.IBrowserSettings = {
sync: {
splitFilters: splitFilters,
impressionsMode: 'DEBUG',
localhostMode: LocalhostFromObject()
localhostMode: LocalhostFromObject(),
enabled: true
},
userConsent: 'GRANTED'
};
Expand Down Expand Up @@ -576,6 +577,7 @@ let fullBrowserAsyncSettings: SplitIO.IBrowserAsyncSettings = {
streamingEnabled: true,
sync: {
impressionsMode: 'DEBUG',
enabled: true
},
userConsent: 'GRANTED'
};
Expand Down
13 changes: 12 additions & 1 deletion types/splitio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ interface ISettings {
readonly sync: {
splitFilters: SplitIO.SplitFilter[],
impressionsMode: SplitIO.ImpressionsMode,
localhostMode?: SplitIO.LocalhostFactory
localhostMode?: SplitIO.LocalhostFactory,
enabled?: boolean
},
readonly userConsent: SplitIO.ConsentStatus
}
Expand Down Expand Up @@ -242,6 +243,16 @@ interface ISharedSettings {
* @property {Object} localhostMode
*/
localhostMode?: SplitIO.LocalhostFactory
/**
* Controls the SDK continuous synchronization flags.
*
* When `true` a running SDK will process rollout plan updates performed on the UI (default).
* When false it'll just fetch all data upon init
*
* @property {boolean} enabled
* @default true
*/
enabled?: boolean
}
}
/**
Expand Down