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
5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.4.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.
- Bugfixing - Updated default values for `scheduler.impressionsRefreshRate` config parameter: 300s for OPTIMIZED impression mode and 60s for DEBUG impression mode (previously it was 60s for both).

0.3.0 (April 7, 2022)
- Added user consent feature to allow delaying or disabling the data tracking from SDK until user consent is explicitly granted or declined. Read more in our docs.

Expand Down
20 changes: 10 additions & 10 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-react-native",
"version": "0.3.0",
"version": "0.4.0",
"description": "Split SDK for React Native",
"main": "lib/commonjs/index.js",
"module": "lib/module/index.js",
Expand Down Expand Up @@ -54,7 +54,7 @@
},
"homepage": "https://github.com/splitio/react-native-client#readme",
"dependencies": {
"@splitsoftware/splitio-commons": "1.3.0"
"@splitsoftware/splitio-commons": "1.4.0"
},
"devDependencies": {
"@react-native-community/eslint-config": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/full/splitFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type { ISdkFactoryParams } from '@splitsoftware/splitio-commons/src/sdkFa
* caution since, unlike `config`, this param is not validated neither considered part of the public API.
* @throws Will throw an error if the provided config is invalid.
*/
export function SplitFactory(config: any, __updateModules: (modules: ISdkFactoryParams) => void) {
export function SplitFactory(config: any, __updateModules?: (modules: ISdkFactoryParams) => void) {
const settings = settingsValidator(config);
const modules = getModules(settings);
if (__updateModules) __updateModules(modules);
Expand Down
2 changes: 2 additions & 0 deletions src/platform/getModules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { ISdkFactoryParams } from '@splitsoftware/splitio-commons/src/sdkFactory
import { ISettings } from '@splitsoftware/splitio-commons/src/types';
import { LOCALHOST_MODE } from '@splitsoftware/splitio-commons/src/utils/constants';
import { createUserConsentAPI } from '@splitsoftware/splitio-commons/src/consent/sdkUserConsent';
import { now } from '@splitsoftware/splitio-commons/src/utils/timeTracker/now/browser';

import { RNSignalListener } from './RNSignalListener';
import { getEventSource } from './getEventSource';
Expand All @@ -23,6 +24,7 @@ const platform = {
},
EventEmitter,
getEventSource,
now,
};

const syncManagerOnlineCSFactory = syncManagerOnlineFactory(pollingManagerCSFactory, pushManagerFactory);
Expand Down
2 changes: 1 addition & 1 deletion src/settings/defaults.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ConsentStatus } from '@splitsoftware/splitio-commons/src/types';
import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/src/utils/constants';

const packageVersion = '0.3.0';
const packageVersion = '0.4.0';

export const defaults = {
startup: {
Expand Down
2 changes: 1 addition & 1 deletion src/splitFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type { ISdkFactoryParams } from '@splitsoftware/splitio-commons/src/sdkFa
* caution since, unlike `config`, this param is not validated neither considered part of the public API.
* @throws Will throw an error if the provided config is invalid.
*/
export function SplitFactory(config: any, __updateModules: (modules: ISdkFactoryParams) => void) {
export function SplitFactory(config: any, __updateModules?: (modules: ISdkFactoryParams) => void) {
const settings = settingsValidator(config);
const modules = getModules(settings);
if (__updateModules) __updateModules(modules);
Expand Down
26 changes: 20 additions & 6 deletions types/splitio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ interface ISettings {
featuresRefreshRate: number,
impressionsRefreshRate: number,
impressionsQueueSize: number,
telemetryRefreshRate: number,
segmentsRefreshRate: number,
offlineRefreshRate: number,
eventsPushRate: number,
Expand All @@ -68,7 +69,8 @@ interface ISettings {
events: string,
sdk: string,
auth: string,
streaming: string
streaming: string,
telemetry: string
},
readonly integrations?: SplitIO.IntegrationFactory[],
readonly debug: boolean | LogLevel | SplitIO.ILogger,
Expand Down Expand Up @@ -593,7 +595,13 @@ declare namespace SplitIO {
* @property {string} streaming
* @default 'https://streaming.split.io'
*/
streaming?: string
streaming?: string,
/**
* String property to override the base URL where the SDK will post telemetry data.
* @property {string} telemetry
* @default 'https://telemetry.split.io/api'
*/
telemetry?: string
};

/**
Expand Down Expand Up @@ -697,6 +705,12 @@ declare namespace SplitIO {
* @default 30000
*/
impressionsQueueSize?: number,
/**
* The SDK sends diagnostic metrics to Split servers. This parameters controls this metric flush period in seconds.
* @property {number} telemetryRefreshRate
* @default 3600
*/
telemetryRefreshRate?: number,
/**
* The SDK polls Split servers for changes to segment definitions. This parameter controls this polling period in seconds.
* @property {number} segmentsRefreshRate
Expand Down Expand Up @@ -778,10 +792,10 @@ declare namespace SplitIO {
integrations?: IntegrationFactory[],
/**
* User consent status. Possible values are `'GRANTED'`, which is the default, `'DECLINED'` or `'UNKNOWN'`.
* - `'GRANTED'`: the user has granted consent for tracking events and impressions. The SDK will send them to Split cloud.
* - `'DECLINED'`: the user has declined consent for tracking events and impressions. The SDK will not send them to Split cloud.
* - `'UNKNOWN'`: the user has neither granted nor declined consent for tracking events and impressions. The SDK will track them in its internal storage, and eventually send
* them or not if the consent status is updated to 'GRANTED' or 'DECLINED' respectively. The status can be updated at any time with the `setUserConsent` factory method.
* - `'GRANTED'`: the user grants consent for tracking events and impressions. The SDK sends them to Split cloud.
* - `'DECLINED'`: the user declines consent for tracking events and impressions. The SDK does not send them to Split cloud.
* - `'UNKNOWN'`: the user neither grants nor declines consent for tracking events and impressions. The SDK tracks them in its internal storage, and eventually either sends
* them or not if the consent status is updated to 'GRANTED' or 'DECLINED' respectively. The status can be updated at any time with the `UserConsent.setStatus` factory method.
*
* @typedef {string} userConsent
* @default 'GRANTED'
Expand Down