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: 5 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.6.3 (May 15, 2023)
- Updated @splitsoftware/splitio-commons package to version 1.8.2 that includes updated terminology on codebase to be more aligned with current standard without causing a breaking change. The core change is the term split for feature flag on things like logs and IntelliSense comments.
- Updated some transitive dependencies for vulnerability fixes.

0.6.2 (March 15, 2023)
- Updated @splitsoftware/splitio-commons package to version 1.8.1 that includes minor improvements.
- Updated some transitive dependencies for vulnerability fixes.
Expand All @@ -10,7 +14,7 @@
- Added a new impressions mode for the SDK called NONE, to be used in factory when there is no desire to capture impressions on an SDK factory to feed Split's analytics engine. Running NONE mode, the SDK will only capture unique keys evaluated for a particular feature flag instead of full blown impressions.
- Updated default value of `scheduler.featuresRefreshRate` config parameter from 30 seconds to 60 seconds.
- Updated the synchronization flow to be more reliable in the event of an edge case generating delay in cache purge propagation, keeping the SDK cache properly synced.
- Updated @splitsoftware/splitio-commons package to version 1.7.1, that improves the performance of split evaluations, among other improvements.
- Updated @splitsoftware/splitio-commons package to version 1.7.1, that improves the performance of feature flag evaluations, among other improvements.

0.5.0 (July 6, 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.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![npm version](https://badge.fury.io/js/%40splitsoftware%2Fsplitio-react-native.svg)](https://badge.fury.io/js/%40splitsoftware%2Fsplitio) [![Build Status](https://github.com/splitio/react-native-client/actions/workflows/ci.yml/badge.svg)](https://github.com/splitio/react-native-client/actions/workflows/ci.yml)

## Overview
This SDK is designed to work with Split, the platform for controlled rollouts, which serves features to your users via a Split feature flag to manage your complete customer experience.
This SDK is designed to work with Split, the platform for controlled rollouts, which serves features to your users via feature flags to manage your complete customer experience.

[![Twitter Follow](https://img.shields.io/twitter/follow/splitsoftware.svg?style=social&label=Follow&maxAge=1529000)](https://twitter.com/intent/follow?screen_name=splitsoftware)

Expand All @@ -19,14 +19,14 @@ import { SplitFactory } from '@splitsoftware/splitio-react-native';
// Instantiate the SDK
var factory = SplitFactory({
core: {
authorizationKey: 'YOUR_SDK_API_KEY',
authorizationKey: 'YOUR_SDK_KEY',
key: 'CUSTOMER_ID'
}
});

// Set a callback to listen for the SDK_READY event, to make sure the SDK is properly loaded before asking for a treatment
client.on(client.Event.SDK_READY, function() {
var treatment = client.getTreatment('SPLIT_NAME');
var treatment = client.getTreatment('FEATURE_FLAG_NAME');
if (treatment == 'on') {
// insert code here for on treatment
} else if (treatment == 'off') {
Expand Down Expand Up @@ -61,8 +61,8 @@ Split has built and maintains SDKs for:
* GO [Github](https://github.com/splitio/go-client) [Docs](https://help.split.io/hc/en-us/articles/360020093652-Go-SDK)
* iOS [Github](https://github.com/splitio/ios-client) [Docs](https://help.split.io/hc/en-us/articles/360020401491-iOS-SDK)
* Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
* Javascript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
* Javascript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
* JavaScript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
* JavaScript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
* Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
* PHP [Github](https://github.com/splitio/php-client) [Docs](https://help.split.io/hc/en-us/articles/360020350372-PHP-SDK)
* Python [Github](https://github.com/splitio/python-client) [Docs](https://help.split.io/hc/en-us/articles/360020359652-Python-SDK)
Expand Down
10 changes: 5 additions & 5 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const App = () => {
if (!isReady && !hasTimedout) client.once(client.Event.SDK_READY_TIMED_OUT, () => { setSdkState('SDK has timedout') });

// const [userKey, setUserKey] = useState<string>();
const [splitName, setSplitName] = useState<string>();
const [featureFlagName, setFeatureFlagName] = useState<string>();
const [treatment, setTreatment] = useState<string>();
const [eventType, setEventType] = useState<string>();
const [trackResult, setTrackResult] = useState<boolean>();
Expand All @@ -124,16 +124,16 @@ const App = () => {
underlineColorAndroid='#0000ff'
autoCapitalize='none'
/> */}
<Text>Split name:</Text>
<Text>Feature flag name:</Text>
<TextInput
onChangeText={(etSplitName) => setSplitName(etSplitName)}
value={splitName}
onChangeText={(etFeatureFlagName) => setFeatureFlagName(etFeatureFlagName)}
value={featureFlagName}
underlineColorAndroid='#0000ff'
autoCapitalize='none'
/>
<Button
title='Get Treatment'
onPress={() => { setTreatment(client.getTreatment(splitName as string)) }}
onPress={() => { setTreatment(client.getTreatment(featureFlagName as string)) }}
/>
<Text>Treatment: {treatment}</Text>

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-react-native",
"version": "0.6.2",
"version": "0.6.3",
"description": "Split SDK for React Native",
"main": "lib/commonjs/index.js",
"module": "lib/module/index.js",
Expand Down Expand Up @@ -55,7 +55,7 @@
},
"homepage": "https://github.com/splitio/react-native-client#readme",
"dependencies": {
"@splitsoftware/splitio-commons": "1.8.1"
"@splitsoftware/splitio-commons": "1.8.2"
},
"devDependencies": {
"@react-native-community/eslint-config": "^2.0.0",
Expand Down
16 changes: 0 additions & 16 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
Copyright 2022 Split Software

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
**/

export { SplitFactory } from './splitFactory';
export { ErrorLogger } from '@splitsoftware/splitio-commons/src/logger/browser/ErrorLogger';
export { WarnLogger } from '@splitsoftware/splitio-commons/src/logger/browser/WarnLogger';
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.6.2';
const packageVersion = '0.6.3';

export const defaults = {
startup: {
Expand Down
Loading