Skip to content

Commit 645d2ab

Browse files
Merge pull request #141 from splitio/development
Release v1.8.3
2 parents 1d34d39 + 92b78b5 commit 645d2ab

21 files changed

Lines changed: 139 additions & 133 deletions

CHANGES.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
1.8.3 (May 16, 2023)
2+
- Updated @splitsoftware/splitio package to version 10.22.5 that includes:
3+
- Updated terminology on the SDKs 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.
4+
- Updated some transitive dependencies for vulnerability fixes.
5+
16
1.8.2 (April 3, 2023)
27
- Updated linter dependencies and rules. The deprecated TSLint package was replaced by ESLint.
38
- Updated some transitive dependencies for vulnerability fixes.
@@ -30,7 +35,7 @@
3035
- 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.
3136

3237
1.5.0 (June 13, 2022)
33-
- Bugfixing - Fixed issue with useTreatments hooks, to return control treatments without evaluating splits when the SDK client is not ready or is destroyed, to avoid not ready impressions and warning log.
38+
- Bugfixing - Fixed issue with useTreatments hooks, to return control treatments without evaluating feature flags when the SDK client is not ready or is destroyed, to avoid not ready impressions and warning log.
3439
- Updated @splitsoftware/splitio dependency to version 10.19.1, which includes:
3540
- Added `scheduler.telemetryRefreshRate` property to SDK configuration, and deprecated `scheduler.metricsRefreshRate` property.
3641
- Updated SDK telemetry storage, metrics and updater to be more effective and send less often.
@@ -74,15 +79,15 @@
7479
1.2.3 (February 8, 2021)
7580
- Updated React peer dependency range to include React@17.x.x.
7681
- Added `memoize-one` dependency for basic memoization utilities.
77-
- Bugfixing - Optimizing splits evaluation via memoization in order to remove `shouldComponentUpdate` method of `SplitTreatments` component and avoid stopping render propagation (issue #42).
82+
- Bugfixing - Optimizing feature flags evaluation via memoization in order to remove `shouldComponentUpdate` method of `SplitTreatments` component and avoid stopping render propagation (issue #42).
7883

7984
1.2.2 (December 15, 2020)
8085
- Updated @splitsoftware/splitio dependency to version 10.15.2.
81-
- Updated internal validation to avoid errors when passing an invalid list of split names to `SplitTreatments` component and `useTreatments` hook.
86+
- Updated internal validation to avoid errors when passing an invalid list of feature flag names to `SplitTreatments` component and `useTreatments` hook.
8287
- Updated node-fetch and init dev dependencies for vulnerability fixes
8388

8489
1.2.1 (Oct 7, 2020)
85-
- Updated @splitsoftware/splitio dependency to version 10.15.0, which uses the optimized impressions sending and supports filtering the splits to be synced. Learn more in our javascript-client changelog or documentation.
90+
- Updated @splitsoftware/splitio dependency to version 10.15.0, which uses the optimized impressions sending and supports filtering the feature flags to be synced. Learn more in our javascript-client changelog or documentation.
8691
- Updated some NPM dependencies mostly for vulnerability fixes.
8792

8893
1.2.0 (July 23, 2020)

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![npm version](https://badge.fury.io/js/%40splitsoftware%2Fsplitio-react.svg)](https://badge.fury.io/js/%40splitsoftware%2Fsplitio-react) [![Build Status](https://github.com/splitio/react-client/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/splitio/react-client/actions/workflows/ci-cd.yml)
44

55
## Overview
6-
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.
6+
This SDK is designed to work with Split, the platform for controlled rollouts, which serves features to your users via feature flag to manage your complete customer experience.
77

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

@@ -25,7 +25,7 @@ import { SplitFactory, SplitTreatments } from '@splitsoftware/splitio-react';
2525
// Define your config object
2626
const CONFIG = {
2727
core: {
28-
authorizationKey: 'YOUR_BROWSER_API_KEY',
28+
authorizationKey: 'YOUR_SDK_KEY',
2929
key: 'CUSTOMER_ID'
3030
}
3131
};
@@ -34,15 +34,15 @@ function MyReactComponent() {
3434
return (
3535
/* Use SplitFactory to instantiate the SDK and makes it available to nested components */
3636
<SplitFactory config={CONFIG} >
37-
{/* Evaluate splits with SplitTreatments component */}
38-
<SplitTreatments names={['SPLIT_NAME']} >
39-
{({ treatments: { SPLIT_NAME }, isReady }) => {
37+
{/* Evaluate feature flags with SplitTreatments component */}
38+
<SplitTreatments names={['FEATURE_FLAG_NAME']} >
39+
{({ treatments: { FEATURE_FLAG_NAME }, isReady }) => {
4040
// Check SDK readiness using isReady prop
4141
if (!isReady)
4242
return <div>Loading SDK ...</div>;
43-
if (SPLIT_NAME.treatment === 'on') {
43+
if (FEATURE_FLAG_NAME.treatment === 'on') {
4444
// return JSX for on treatment
45-
} else if (SPLIT_NAME.treatment === 'off') {
45+
} else if (FEATURE_FLAG_NAME.treatment === 'off') {
4646
// return JSX for off treatment
4747
} else {
4848
// return JSX for control treatment
@@ -76,6 +76,7 @@ Split has built and maintains SDKs for:
7676

7777
* .NET [Github](https://github.com/splitio/dotnet-client) [Docs](https://help.split.io/hc/en-us/articles/360020240172--NET-SDK)
7878
* Android [Github](https://github.com/splitio/android-client) [Docs](https://help.split.io/hc/en-us/articles/360020343291-Android-SDK)
79+
* Angular [Github](https://github.com/splitio/angular-sdk-plugin) [Docs](https://help.split.io/hc/en-us/articles/6495326064397-Angular-utilities)
7980
* GO [Github](https://github.com/splitio/go-client) [Docs](https://help.split.io/hc/en-us/articles/360020093652-Go-SDK)
8081
* iOS [Github](https://github.com/splitio/ios-client) [Docs](https://help.split.io/hc/en-us/articles/360020401491-iOS-SDK)
8182
* Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)

package-lock.json

Lines changed: 23 additions & 23 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-react",
3-
"version": "1.8.2",
3+
"version": "1.8.3",
44
"description": "A React library to easily integrate and use Split JS SDK",
55
"main": "lib/index.js",
66
"module": "es/index.js",
@@ -62,7 +62,7 @@
6262
},
6363
"homepage": "https://github.com/splitio/react-client#readme",
6464
"dependencies": {
65-
"@splitsoftware/splitio": "10.22.4",
65+
"@splitsoftware/splitio": "10.22.5",
6666
"memoize-one": "^5.1.1",
6767
"shallowequal": "^1.1.0"
6868
},

src/SplitTreatments.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ function argsAreEqual(newArgs: any[], lastArgs: any[]): boolean {
1313
shallowEqual(newArgs[4], lastArgs[4]); // client attributes
1414
}
1515

16-
function evaluateSplits(client: SplitIO.IBrowserClient, lastUpdate: number, names: SplitIO.SplitNames, attributes?: SplitIO.Attributes, _clientAttributes?: SplitIO.Attributes) {
16+
function evaluateFeatureFlags(client: SplitIO.IBrowserClient, lastUpdate: number, names: SplitIO.SplitNames, attributes?: SplitIO.Attributes, _clientAttributes?: SplitIO.Attributes) {
1717
return client.getTreatmentsWithConfig(names, attributes);
1818
}
1919

2020
/**
21-
* SplitTreatments accepts a list of split names and optional attributes. It access the client at SplitContext to
21+
* SplitTreatments accepts a list of feature flag names and optional attributes. It access the client at SplitContext to
2222
* call 'client.getTreatmentsWithConfig()' method, and passes the returned treatments to a child as a function.
2323
*
2424
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#get-treatments-with-configurations}
@@ -28,8 +28,8 @@ class SplitTreatments extends React.Component<ISplitTreatmentsProps> {
2828
private logWarning?: boolean;
2929

3030
// Attaching a memoized `client.getTreatmentsWithConfig` function to the component instance, to avoid duplicated impressions because
31-
// the function result is the same given the same `client` instance, `lastUpdate` timestamp, and list of split `names` and `attributes`.
32-
private evaluateSplits = memoizeOne(evaluateSplits, argsAreEqual);
31+
// the function result is the same given the same `client` instance, `lastUpdate` timestamp, and list of feature flag `names` and `attributes`.
32+
private evaluateFeatureFlags = memoizeOne(evaluateFeatureFlags, argsAreEqual);
3333

3434
render() {
3535
const { names, children, attributes } = this.props;
@@ -43,7 +43,7 @@ class SplitTreatments extends React.Component<ISplitTreatmentsProps> {
4343
if (client && isOperational) {
4444
// Cloning `client.getAttributes` result for memoization, because it returns the same reference unless `client.clearAttributes` is called.
4545
// Caveat: same issue happens with `names` and `attributes` props if the user follows the bad practice of mutating the object instead of providing a new one.
46-
treatments = this.evaluateSplits(client, lastUpdate, names, attributes, { ...client.getAttributes() });
46+
treatments = this.evaluateFeatureFlags(client, lastUpdate, names, attributes, { ...client.getAttributes() });
4747
} else {
4848
treatments = getControlTreatmentsWithConfig(names);
4949
if (!client) { this.logWarning = true; }

0 commit comments

Comments
 (0)