-
Notifications
You must be signed in to change notification settings - Fork 12
/
CHANGES.txt
192 lines (162 loc) · 21.2 KB
/
CHANGES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
2.0.1 (December 4, 2024)
- Updated @splitsoftware/splitio package to version 11.0.3 that includes some improvements and bugfixes.
- Updated internal handling of the `updateOnSdkTimedout` param to remove the wrong log "[ERROR] A listener was added for SDK_READY_TIMED_OUT on the SDK, which has already fired and won't be emitted again".
- Updated implementation of `SplitFactoryProvider` component to support React Strict Mode (Related to https://github.com/splitio/react-client/issues/221).
- Bugfixing - Fixed an issue with the `updateOn***` object parameters of the `useSplitClient` and `useSplitTreatments` hooks, and their components and HOCs alternatives, which were not defaulting to `true` when a non-boolean value was provided.
2.0.0 (November 1, 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:
- NOTE: Refer to ./MIGRATION-GUIDE.md for instructions on how to migrate your codebase from version 1.x to 2.0.0.
- Updated the default value of the `updateOnSdkUpdate` and `updateOnSdkTimedout` parameters of the `useSplitClient` and `useSplitTreatments` hooks options object to `true`, to re-render on all SDK events by default. The same applies for the equivalent props in the `[with]SplitClient` and `[with]SplitTreatments` components.
- 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.
- Updated the `SplitFactoryProvider` component to not accept a child as a function (render prop), to avoid unnecessary re-renders when using the library hooks. Refer to ./MIGRATION-GUIDE.md for instructions on how to migrate your component to be passed as a regular React JSX element if you were using this pattern.
- Removed the `core.trafficType` option from the SDK configuration object, and the `trafficType` parameter from the SDK `client()` method, `useSplitClient`, `useTrack`, `withSplitClient` 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. Refer to ./MIGRATION-GUIDE.md for instructions on how to migrate to the new alternatives.
- Renamed `SplitSdk` to `SplitFactory` function, which is the underlying Split SDK factory, i.e., `import { SplitFactory } from '@splitsoftware/splitio'`.
- Renamed TypeScript interface: `ISplitFactoryProps` to `ISplitFactoryProviderProps`.
- 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.
1.13.0 (September 6, 2024)
- Updated @splitsoftware/splitio package to version 10.28.0 that includes minor updates:
- Added `sync.requestOptions.getHeaderOverrides` configuration option to enhance SDK HTTP request Headers for Authorization Frameworks.
- Updated some transitive dependencies for vulnerability fixes.
1.12.1 (August 2, 2024)
- Updated @splitsoftware/splitio package to version 10.27.0 and some transitive dependencies for vulnerability fixes.
1.12.0 (May 10, 2024)
- Updated @splitsoftware/splitio package to version 10.26.0 that includes minor updates:
- Added support for targeting rules based on semantic versions (https://semver.org/).
- Added special impression label "targeting rule type unsupported by sdk" when the matcher type is not supported by the SDK, which returns 'control' treatment.
- Updated Split API client to include the flags spec version query parameter for the `splitChanges` and `auth` endpoints.
- Updated internal use of the SDK client to remove EventEmitter memory leak warnings. These warnings were emitted when using multiple hooks and components from the SDK simultaneously, but they do not indicate an actual memory leak and are irrelevant for SDK usage (Related to https://github.com/splitio/react-client/issues/191).
1.11.1 (March 26, 2024)
- Bugfixing - Added tslib as an explicit dependency to avoid issues with some package managers that don't resolve it automatically as a transitive dependency from @splitsoftware/splitio-commons (Related to issue https://github.com/splitio/javascript-client/issues/795).
1.11.0 (January 16, 2024)
- Added new `SplitFactoryProvider` component as a replacement for the now deprecated `SplitFactory` component.
- Bugfixing: The new component is a revised version of `SplitFactory` that properly handles SDK side effects (i.e., factory creation and destruction) within the React component lifecycle,
- resolving memory leak issues in React development mode, strict mode and server-side rendering (Related to issues #11 and #109),
- and also ensuring that the SDK is updated if `config` or `factory` props change (Related to issues #11 and #148).
- Notable changes when migrating from `SplitFactory` to `SplitFactoryProvider`:
- `SplitFactoryProvider` utilizes the React Hooks API, requiring React 16.8.0 or later, while `SplitFactory` is compatible with React 16.3.0 or later.
- When using the `config` prop with `SplitFactoryProvider`, the `factory` and `client` properties in `SplitContext` and the `manager` property in `useSplitManager` results are `null` in the first render, until the context is updated when some event is emitted on the SDK main client (ready, ready from cache, timeout, or update, depending on the configuration of the `updateOn<Event>` props of the component). This differs from the previous behavior where `factory`, `client`, and `manager` were immediately available.
- Updating the `config` prop in `SplitFactoryProvider` reinitializes the SDK with the new configuration, while `SplitFactory` does not reinitialize the SDK. You should pass a reference to the configuration object (e.g., via a global variable, `useState`, or `useMemo`) rather than a new instance on each render, to avoid unnecessary reinitializations.
- Updating the `factory` prop in `SplitFactoryProvider` replaces the current SDK instance, unlike `SplitFactory` where it is ignored.
- Updated internal code to remove a circular dependency and avoid warning messages with tools like PNPM (Related to issue #176).
- Updated @splitsoftware/splitio package to version 10.25.1 for vulnerability fixes.
1.10.2 (December 12, 2023)
- Updated @splitsoftware/splitio package to version 10.24.1 that updates localStorage usage to clear cached feature flag definitions before initiating the synchronization process, if the cache was previously synchronized with a different SDK key (i.e., a different environment) or different Split Filter criteria, to avoid using invalid cached data when the SDK is ready from cache.
1.10.1 (November 21, 2023)
- Bugfixing - Resolved an issue with `useSplitClient` hook and `SplitClient` component, that were not re-rendering when an SDK client event was emitted between the render and the commit phases of component lifecycle.
1.10.0 (November 16, 2023)
- Added support for Flag Sets on the SDK, which enables grouping feature flags and interacting with the group rather than individually (more details in our documentation):
- Added a new `flagSets` prop to the `SplitTreatments` component and `flagSets` option to the `useSplitTreatments` hook options object, to support evaluating flags in given flag set/s. Either `names` or `flagSets` must be provided to the component and hook. If both are provided, `names` will be used.
- Added a new optional Split Filter configuration option. This allows the SDK and Split services to only synchronize the flags in the specified flag sets, avoiding unused or unwanted flags from being synced on the SDK instance, bringing all the benefits from a reduced payload.
- Added `sets` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager to expose flag sets on flag views.
- Added new `useSplitClient`, `useSplitTreatments` and `useSplitManager` hooks as replacements for the now deprecated `useClient`, `useTreatments` and `useManager` hooks.
- These new hooks return the Split context object along with the SDK client, treatments and manager respectively, enabling direct access to status properties like `isReady`, eliminating the need for using the `useContext` hook or the client's `ready` promise.
- `useSplitClient` and `useSplitTreatments` accept an options object as parameter, which support the same arguments as their predecessors, with additional boolean options for controlling re-rendering: `updateOnSdkReady`, `updateOnSdkReadyFromCache`, `updateOnSdkTimedout`, and `updateOnSdkUpdate`.
- `useSplitTreatments` optimizes feature flag evaluations by using the `useMemo` hook to memoize `getTreatmentsWithConfig` method calls from the SDK. This avoids re-evaluating feature flags when the hook is called with the same options and the feature flag definitions have not changed.
- They fixed a bug in the deprecated `useClient` and `useTreatments` hooks, which caused them to not re-render and re-evaluate feature flags when they access a different SDK client than the context and its status updates (i.e., when it emits SDK_READY or other event).
- Added TypeScript types and interfaces to the library index exports, allowing them to be imported from the library index, e.g., `import type { ISplitFactoryProps } from '@splitsoftware/splitio-react'` (Related to issue https://github.com/splitio/react-client/issues/162).
- Added `defaultTreatment` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager (Related to issue https://github.com/splitio/javascript-commons/issues/225).
- Updated type declarations of the library components to not restrict the type of the `children` prop to ReactElement, allowing to pass any valid ReactNode value (Related to issue https://github.com/splitio/react-client/issues/164).
- Updated linter and other dependencies for vulnerability fixes.
- Bugfixing - Removed conditional code within hooks to adhere to the rules of hooks and prevent React warnings. Previously, this code checked for the availability of the hooks API (available in React version 16.8.0 or above) and logged an error message. Now, using hooks with React versions below 16.8.0 will throw an error.
- Bugfixing - Updated `useClient` and `useTreatments` hooks to re-render and re-evaluate feature flags when they consume a different SDK client than the context and its status updates (i.e., when it emits SDK_READY or other event).
1.9.0 (July 18, 2023)
- Updated some transitive dependencies for vulnerability fixes.
- Updated @splitsoftware/splitio package to version 10.23.0 that includes:
- Updated streaming architecture implementation to apply feature flag updates from the notification received which is now enhanced, improving efficiency and reliability of the whole update system.
1.8.3 (May 16, 2023)
- Updated @splitsoftware/splitio package to version 10.22.5 that includes:
- 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.
- Updated some transitive dependencies for vulnerability fixes.
1.8.2 (April 3, 2023)
- Updated linter dependencies and rules. The deprecated TSLint package was replaced by ESLint.
- Updated some transitive dependencies for vulnerability fixes.
- Updated @splitsoftware/splitio package to version 10.22.4 that includes minor improvements.
1.8.1 (December 16, 2022)
- Updated some transitive dependencies for vulnerability fixes.
- Bugfixing - Upgrade @splitsoftware/splitio dependency to version 10.22.3 which includes a memory leak fix for localhost mode (Related to issue https://github.com/splitio/javascript-commons/issues/181) among other improvements.
1.8.0 (October 5, 2022)
- Updated @splitsoftware/splitio dependency to version 10.22.0, which includes:
- 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 storage implementations to improve the performance of split evaluations (i.e., `getTreatment(s)` method calls) when using the default storage in memory.
1.7.1 (July 25, 2022)
- Bugfixing - Updated @splitsoftware/splitio-commons dependency to include new features and updates.
1.7.0 (July 25, 2022)
- Updated @splitsoftware/splitio dependency to version 10.21.1, which includes:
- Added `autoRequire` configuration option to the Google Analytics to Split integration, which takes care of requiring the splitTracker plugin on trackers dynamically created by Google tag managers (See https://help.split.io/hc/en-us/articles/360040838752#set-up-with-gtm-and-gtag.js).
- Updated browser listener to push remaining impressions and events on 'visibilitychange' and 'pagehide' DOM events, instead of 'unload', which is not reliable in modern mobile and desktop Web browsers.
- 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 some dependencies for vulnerability fixes.
1.6.0 (June 30, 2022)
- Updated @splitsoftware/splitio dependency to version 10.20.0, which includes:
- 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.
- Updated telemetry logic to track the anonymous config for user consent flag set to declined or unknown.
- 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.
1.5.0 (June 13, 2022)
- 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.
- Updated @splitsoftware/splitio dependency to version 10.19.1, which includes:
- Added `scheduler.telemetryRefreshRate` property to SDK configuration, and deprecated `scheduler.metricsRefreshRate` property.
- Updated SDK telemetry storage, metrics and updater to be more effective and send less often.
- Updated eventsource dependency range to ^1.1.2 to avoid a vulnerability and dependency resolution to a vulnerable version of url-parse transitive dependency.
- Bugfixing - Updated submitters logic, to avoid dropping impressions and events that are being tracked while POST request is pending.
1.4.1 (May 11, 2022)
- Updated React peer dependency range to include [email protected].
- Updated @splitsoftware/splitio dependency to version 10.18.2, which includes some vulnerability fixes.
1.4.0 (April 11, 2022)
- Updated @splitsoftware/splitio dependency to version 10.18.0, which includes:
- Added user consent feature to allow delaying or disabling the data tracking from SDK until user consent is explicitly granted or declined. Read more in our docs.
- Added `scheduler.impressionsQueueSize` property to SDK configuration to limit the amount of impressions tracked in memory. Read more in our docs.
- Added support to SDK clients on browser to optionally bind attributes to the client, keeping these loaded within the SDK along with the user ID, for easier usage when requesting flag.
- Updated format for MySegments keys in LocalStorage, keeping backwards compatibility (issue https://github.com/splitio/javascript-client/issues/638).
- Updated dependencies for vulnerability fixes, general polishing, and bug fixes.
1.3.0 (September 29, 2021)
- Updated @splitsoftware/splitio dependency to version 10.16.0, which includes:
- Updated localhost mode to emit SDK_READY_FROM_CACHE event in Browser when using localStorage (issue https://github.com/splitio/react-client/issues/34).
- Updated streaming logic to use the newest version of our streaming service, including:
- Integration with Auth service V2, connecting to the new channels and applying the received connection delay.
- Implemented handling of the new MySegmentsV2 notification types (SegmentRemoval, KeyList, Bounded and Unbounded)
- New control notification for environment scoped streaming reset.
- Updated some development dependencies to their latest versions, including Webpack 4 to 5, to build a more optimized UMD bundle.
1.2.6 (June 3, 2021)
- Updated internal event listeners to avoid some misleading error logs.
- Updated @splitsoftware/splitio dependency to version 10.15.7, which fixes some issues with localhost mode (issue #13).
- Updated some NPM dependencies mostly for vulnerability fixes.
- Updated ES modules build to target ES5.
1.2.5 (April 29, 2021)
- Updated some NPM dependencies mostly for vulnerability fixes.
- Updated Split's SDK package for vulnerability fixes.
1.2.4 (February 11, 2021)
- Updated CommonJS and ES Modules builds to always resolve browser modules of the JavaScript SDK and avoid issues when using Node-based testing framework such as Jest (issues #13, #34).
1.2.3 (February 8, 2021)
- Updated React peer dependency range to include [email protected].
- Added `memoize-one` dependency for basic memoization utilities.
- Bugfixing - Optimizing feature flags evaluation via memoization in order to remove `shouldComponentUpdate` method of `SplitTreatments` component and avoid stopping render propagation (issue #42).
1.2.2 (December 15, 2020)
- Updated @splitsoftware/splitio dependency to version 10.15.2.
- Updated internal validation to avoid errors when passing an invalid list of feature flag names to `SplitTreatments` component and `useTreatments` hook.
- Updated node-fetch and init dev dependencies for vulnerability fixes
1.2.1 (Oct 7, 2020)
- 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.
- Updated some NPM dependencies mostly for vulnerability fixes.
1.2.0 (July 23, 2020)
- Updated @splitsoftware/splitio dependency to version 10.13.0, which uses streaming synchronization by default, amongst other updates. Learn more in our javascript-client changelog or documentation.
- Updated `shouldComponentUpdate` method of `SplitTreatments` component for optimization: it only updates if the treatment evaluation changes.
- Updated build configuration to exclude React library from UMD bundle.
- Added missing status properties of Split clients into SplitContext: `isReadyFromCache`, `hasTimedout`, and `isDestroyed`. They are passed down as props when using functions as a child of both SplitFactory, SplitClient and SplitTreatments components.
- Added an optional prop to `SplitFactory` and `SplitClient`: `updateOnSdkReadyFromCache`, to update the component when an SDK_READY_FROM_CACHE event is emitted. Its value is true by default.
- Added gracefull shutdown of the SDK, when SplitFactory component is unmounted.
- Added validation and error logs associated to the use of incompatible React library versions.
- Bugfixing - Incorrect status properties in SplitContext when using SplitClient component.
- Bugfixing - Properly handling side-effects (creating Split factory) in SplitFactory component constructor.
- Bugfixing - Properly handling component state updates in React commit phase.
1.1.0 (March 11, 2020)
- Exported `SplitContext` to access Split readiness state when using React hooks.
- Bugfixing - issue with SDK_READY_TIMED_OUT events.
1.0.0 (January 24, 2020)
- Initial public release!