Skip to content

Commit b9cbb48

Browse files
Merge pull request #207 from splitio/refactor_null_to_undefined
[Breaking change] `null` context properties to `undefined`
2 parents c33577f + 6a7c8db commit b9cbb48

21 files changed

+419
-260
lines changed

.eslintrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module.exports = {
1818
'plugins': [
1919
'react',
2020
'@typescript-eslint',
21+
'eslint-plugin-tsdoc',
2122
'import'
2223
],
2324
'rules': {
@@ -63,5 +64,11 @@ module.exports = {
6364
'import/no-self-import': 'error',
6465
'import/no-default-export': 'error',
6566
}
67+
}, {
68+
// Enable TSDoc rules for TypeScript files, allowing the use of JSDoc in JS files.
69+
'files': ['**/*.ts', '**/*.tsx'],
70+
'rules': {
71+
'tsdoc/syntax': 'warn'
72+
}
6673
}]
6774
}

CHANGES.txt

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
2.0.0 (October XX, 2024)
2-
- Added support for targeting rules based on large segments for browsers.
3-
- Updated @splitsoftware/splitio package to version 10.29.0 that includes minor updates, and updated some transitive dependencies for vulnerability fixes.
4-
- Renamed distribution folders from `/lib` to `/cjs` for CommonJS build, and `/es` to `/esm` for EcmaScript Modules build.
1+
2.0.0 (November XX, 2024)
2+
- Added support for targeting rules based on large segments.
3+
- Added support for passing factory instances to the `factory` prop of the `SplitFactoryProvider` component from other SDK packages that extends the `SplitIO.IBrowserSDK` interface, such as `@splitsoftware/splitio-react-native`, `@splitsoftware/splitio-browserjs` and `@splitsoftware/browser-suite` packages.
4+
- Updated @splitsoftware/splitio package to version 11.0.0 that includes major updates, and updated some transitive dependencies for vulnerability fixes.
5+
- Renamed distribution folders from `/lib` to `/cjs` for CommonJS build, and `/es` to `/esm` for ECMAScript Modules build.
6+
- Bugfixing - When the `config` prop is provided, the `SplitFactoryProvider` now makes the SDK factory and client instances available in the context immediately during the initial render, instead of waiting for the first SDK event (Related to https://github.com/splitio/react-client/issues/198). This change fixes a bug in the `useTrack` hook, which was not retrieving the client's `track` method during the initial render.
57
- BREAKING CHANGES:
68
- Updated error handling: using the library modules without wrapping them in a `SplitFactoryProvider` component will now throw an error instead of logging it, as the modules requires the `SplitContext` to work properly.
9+
- Removed the `core.trafficType` configuration option and the `trafficType` parameter from the SDK `client()` method, `useSplitClient`, `useTrack`, and `SplitClient` component. This is because traffic types can no longer be bound to SDK clients in JavaScript SDK v11.0.0, and so the traffic type must be provided as first argument in the `track` method calls.
710
- Removed deprecated modules: `SplitFactory` component, `useClient`, `useTreatments` and `useManager` hooks, and `withSplitFactory`, `withSplitClient` and `withSplitTreatments` high-order components. Refer to ./MIGRATION-GUIDE.md for instructions on how to migrate to the new alternatives.
8-
- Renamed TypeScript interfaces `ISplitFactoryProps` to `ISplitFactoryProviderProps`, and `ISplitFactoryChildProps` to `ISplitFactoryProviderChildProps`.
11+
- Renamed some TypeScript interfaces: `ISplitFactoryProps` to `ISplitFactoryProviderProps`, and `ISplitFactoryChildProps` to `ISplitFactoryProviderChildProps`.
912
- Renamed `SplitSdk` to `SplitFactory` function, which is the underlying Split SDK factory, i.e., `import { SplitFactory } from '@splitsoftware/splitio'`.
1013
- Dropped support for React below 16.8.0, as the library components where rewritten using the React Hooks API available in React v16.8.0 and above. This refactor simplifies code maintenance and reduces bundle size.
1114

0 commit comments

Comments
 (0)