Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Breaking change] null context properties to undefined #207

Merged
merged 20 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e8e0d2a
Refactor context value to use undefined rather than null for factory …
EmilianoSanchez Oct 21, 2024
f23f0a4
Upgrade JS SDK to v11, which has clients without bound traffic type
EmilianoSanchez Oct 22, 2024
4688ff0
Update changelog entry
EmilianoSanchez Oct 22, 2024
628b185
Make factory and client context properties available in first render …
EmilianoSanchez Oct 23, 2024
833d6c9
Added test to validate bugfix
EmilianoSanchez Oct 24, 2024
6bfb15b
Polishing
EmilianoSanchez Oct 24, 2024
e1bad0a
Added test to validate useTrack does not re-render
EmilianoSanchez Oct 24, 2024
2cbc1d0
Merge branch 'breaking_changes_baseline' into issue_198_factory_avail…
EmilianoSanchez Oct 24, 2024
bafcfd9
Update JS SDK to use updated Type declaration files
EmilianoSanchez Oct 25, 2024
465af41
Fix import
EmilianoSanchez Oct 25, 2024
2d1a0d0
test namespace implicit import
EmilianoSanchez Oct 26, 2024
dff8b1f
Update changelog entry
EmilianoSanchez Oct 26, 2024
2c311b9
Add TSDoc linter rules
EmilianoSanchez Oct 29, 2024
d26572e
Update changelog entry
EmilianoSanchez Oct 30, 2024
eb475cd
Upgrade JS SDK
EmilianoSanchez Oct 31, 2024
54b13ca
Polishing
EmilianoSanchez Oct 31, 2024
41d960b
rollback ci-cd
EmilianoSanchez Oct 31, 2024
6a723c7
Merge pull request #213 from splitio/refactor_type_definitions
EmilianoSanchez Oct 31, 2024
3b3eabc
Merge pull request #211 from splitio/issue_198_factory_available_in_i…
EmilianoSanchez Oct 31, 2024
6a7c8db
Merge pull request #208 from splitio/clients_without_tt
EmilianoSanchez Oct 31, 2024
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
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
'plugins': [
'react',
'@typescript-eslint',
'eslint-plugin-tsdoc',
'import'
],
'rules': {
Expand Down Expand Up @@ -63,5 +64,11 @@ module.exports = {
'import/no-self-import': 'error',
'import/no-default-export': 'error',
}
}, {
// Enable TSDoc rules for TypeScript files, allowing the use of JSDoc in JS files.
'files': ['**/*.ts', '**/*.tsx'],
'rules': {
'tsdoc/syntax': 'warn'
}
}]
}
13 changes: 8 additions & 5 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
2.0.0 (October XX, 2024)
- Added support for targeting rules based on large segments for browsers.
- Updated @splitsoftware/splitio package to version 10.29.0 that includes minor updates, and updated some transitive dependencies for vulnerability fixes.
- Renamed distribution folders from `/lib` to `/cjs` for CommonJS build, and `/es` to `/esm` for EcmaScript Modules build.
2.0.0 (November XX, 2024)
- Added support for targeting rules based on large segments.
- 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.
- Updated @splitsoftware/splitio package to version 11.0.0 that includes major updates, and updated some transitive dependencies for vulnerability fixes.
- Renamed distribution folders from `/lib` to `/cjs` for CommonJS build, and `/es` to `/esm` for ECMAScript Modules build.
- 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.
- BREAKING CHANGES:
- 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.
- 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.
- 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.
- Renamed TypeScript interfaces `ISplitFactoryProps` to `ISplitFactoryProviderProps`, and `ISplitFactoryChildProps` to `ISplitFactoryProviderChildProps`.
- Renamed some TypeScript interfaces: `ISplitFactoryProps` to `ISplitFactoryProviderProps`, and `ISplitFactoryChildProps` to `ISplitFactoryProviderChildProps`.
- Renamed `SplitSdk` to `SplitFactory` function, which is the underlying Split SDK factory, i.e., `import { SplitFactory } from '@splitsoftware/splitio'`.
- 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.

Expand Down
Loading
Loading