Skip to content

Commit 60bef68

Browse files
Merge pull request #124 from splitio/breaking_change_baseline
Prepare release v2.0.0
2 parents da2ce96 + 8a99367 commit 60bef68

25 files changed

+476
-305
lines changed

.eslintrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module.exports = {
1717
'plugins': [
1818
'react',
1919
'@typescript-eslint',
20+
'eslint-plugin-tsdoc',
2021
'import'
2122
],
2223
'rules': {
@@ -56,5 +57,11 @@ module.exports = {
5657
'import/no-self-import': 'error',
5758
'import/no-default-export': 'error',
5859
}
60+
}, {
61+
// Enable TSDoc rules for TypeScript files, allowing the use of JSDoc in JS files.
62+
'files': ['**/*.ts'],
63+
'rules': {
64+
'tsdoc/syntax': 'warn'
65+
}
5966
}],
6067
};

.gitignore

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.DS_Store
2-
node_modules
3-
lib
4-
es
5-
types
6-
coverage
7-
examples
8-
.vscode
9-
.scannerwork
2+
/node_modules
3+
/cjs
4+
/esm
5+
/types
6+
/coverage
7+
/examples
8+
/.vscode
9+
/.scannerwork

CHANGES.txt

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2.0.0 (November 14, 2024)
2+
- Added support for targeting rules based on large segments.
3+
- Updated @splitsoftware/splitio package to version 11.0.1 that includes major updates, and updated some transitive dependencies for vulnerability fixes.
4+
- Updated `getTreatments` action creator to not dispatch an action when called while the SDK is not ready or ready from cache, to avoid unnecessary updates in the state.
5+
- Renamed distribution folders from `/lib` to `/cjs` for CommonJS build, and `/es` to `/esm` for ECMAScript Modules build.
6+
- BREAKING CHANGES:
7+
- Removed the `core.trafficType` option from the `config` object accepted by the `initSplitSdk` action creator, and made the `trafficType` argument of the `track` helper function mandatory.
8+
This is because traffic types can no longer be bound to SDK clients since JavaScript SDK v11.0.0, so the traffic type must now be provided as an argument in `track` function calls.
9+
Refer to ./MIGRATION-GUIDE.md for more details.
10+
- Updated peer dependencies to drop support for Redux library below v3.0.0.
11+
12+
1.14.1 (October 15, 2024)
13+
- Bugfixing - Fixed error in `splitReducer` when handling actions with a `null` payload, preventing crashes caused by accessing undefined payload properties (Related to https://github.com/splitio/redux-client/issues/121).
14+
115
1.14.0 (September 13, 2024)
216
- Added `status` property to Split reducer's slice of state to track the SDK events of non-default clients (Related to https://github.com/splitio/redux-client/issues/113).
317
- Added `lastUpdate` and `isTimedout` properties to the object returned by the `getStatus` helper and `selectTreatmentAndStatus` and `selectTreatmentWithConfigAndStatus` selectors, to expose the last event timestamp and the timedout status of the SDK clients (Related to https://github.com/splitio/redux-client/issues/113).
@@ -52,7 +66,7 @@
5266
- Updated linter dependencies and rules. The deprecated TSLint package was replaced by ESLint.
5367
- Updated some transitive dependencies for vulnerability fixes.
5468
- Updated @splitsoftware/splitio package to version 10.22.4 that includes minor improvements.
55-
- Bugfixing - Fixed error when using the SDK in localhost mode for testing with NodeJS test runners such as Jest (See https://help.split.io/hc/en-us/articles/360038851551-Redux-SDK#localhost-mode).
69+
- Bugfixing - Fixed error when using the SDK in localhost mode for testing with Node.js test runners such as Jest (See https://help.split.io/hc/en-us/articles/360038851551-Redux-SDK#localhost-mode).
5670

5771
1.7.1 (November 15, 2022)
5872
- Updated React Redux peer dependency range to include [email protected] and [email protected].

MIGRATION-GUIDE.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
# Migrating to Redux SDK v2.0.0
3+
4+
Redux SDK v2.0.0 introduces a breaking change that you should consider when migrating from a previous version.
5+
6+
If you were passing the `core.trafficType` option to the SDK configuration object, you should remove it since it is no longer supported.
7+
The `trafficType` must be passed as an argument of the `track` helper function. For example:
8+
9+
```js
10+
import { initSplitSdk, track } from '@splitsoftware/splitio-redux'
11+
12+
const CONFIG = {
13+
core: {
14+
authorizationKey: YOUR_CLIENT_SIDE_SDK_KEY,
15+
key: USER_KEY,
16+
trafficType: 'user'
17+
}
18+
}
19+
20+
store.dispatch(initSplitSdk({ config: CONFIG }))
21+
22+
track({ eventType: 'my_event' });
23+
```
24+
25+
should be refactored to:
26+
27+
```js
28+
import { initSplitSdk, track } from '@splitsoftware/splitio-redux'
29+
30+
const CONFIG = {
31+
core: {
32+
authorizationKey: YOUR_CLIENT_SIDE_SDK_KEY,
33+
key: USER_KEY
34+
}
35+
}
36+
37+
store.dispatch(initSplitSdk({ config: CONFIG }))
38+
39+
track({ eventType: 'my_event', trafficType: 'user' });
40+
```

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Split has built and maintains SDKs for:
9999
* Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
100100
* JavaScript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
101101
* JavaScript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
102-
* Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
102+
* Node.js [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
103103
* PHP [Github](https://github.com/splitio/php-client) [Docs](https://help.split.io/hc/en-us/articles/360020350372-PHP-SDK)
104104
* PHP thin-client [Github](https://github.com/splitio/php-thin-client) [Docs](https://help.split.io/hc/en-us/articles/18305128673933-PHP-Thin-Client-SDK)
105105
* Python [Github](https://github.com/splitio/python-client) [Docs](https://help.split.io/hc/en-us/articles/360020359652-Python-SDK)

0 commit comments

Comments
 (0)