Releases: Kameleoon-new/client-react
Releases · Kameleoon-new/client-react
Release list
React/React Native 10.28.0
Features
- Added the new
dataFileCacheTtlconfiguration parameter (in minutes, default90). It controls how long the data file cached in the storage is considered fresh:- While the cached data file is older than
dataFileRefreshIntervalbut younger thandataFileCacheTtl,initialize()completes immediately with the cached data file and refreshes it in the background (previous behavior with a hardcoded 90-minute period). - Once the cached data file is older than
dataFileCacheTtl,initialize()waits for a fresh data file before completing, so visitors returning after a long inactivity are evaluated against the up-to-date configuration. The cached data file is still used as a fallback if the request fails. SettingdataFileCacheTtl: 0disables the background refresh entirely:initialize()always waits for a fresh data file once a refresh is due. - Note: lowering
dataFileCacheTtlincreases the number of blocking data file requests during SDK initialization and therefore adds the request time to the page load for the affected visitors. KeepdataFileCacheTtlgreater thandataFileRefreshInterval(for exampledataFileRefreshInterval: 5,dataFileCacheTtl: 10) unless every refresh must be applied before initialization completes.
- While the cached data file is older than
- Added the new
dataFileRefreshIntervalconfiguration parameter (in minutes, default60) as a more explicit replacement forupdateInterval. When both are passed,dataFileRefreshIntervalis used. - The
updateIntervalconfiguration parameter has been deprecated in favor ofdataFileRefreshIntervaland will be removed in the next major version.
Patch Changes
- Updated dependencies
- @kameleoon/javascript-sdk@4.26.0
React/React Native 10.27.1
Patch Changes
- Updated dependencies
- @kameleoon/javascript-sdk@4.25.1
React/React Native 10.27.0
Features
- Added support for SDK event handlers through the new
setEventHandlermethod:EventType.DataFileUpdatenotifies when the SDK data file (configuration) is updated with polling or streaming modes.EventType.HttpRequestnotifies when SDK HTTP requests complete successfully or fail.- HTTP request events include the request type, HTTP status or failure details, and request duration.
- Passing
nulltosetEventHandlerclears the handler for the selected event type.
- The
onEventmethod and theEventType.ConfigurationUpdateevent type have been deprecated in favor ofsetEventHandlerwith theEventType.DataFileUpdateevent type. - Deprecate the
isInitializedmethod in favor ofisReady.
Patch Changes
- Updated dependencies
- @kameleoon/javascript-sdk@4.25.0
- Fix an issue where a failed configuration fetch marked the in-memory cache as fresh, so a repeated [
initialize][initialize] call in an environment with unavailable storage could resolve successfully with an empty configuration instead of fetching again. - Targeting conditions of a type unsupported by the SDK are now evaluated as
falseinstead oftrue, so visitors are no longer targeted by conditions the SDK cannot evaluate.
React/React Native 10.26.5
Patch Changes
- Updated dependencies
- @kameleoon/javascript-sdk@4.24.5
React/React Native 10.26.4
Patch Changes
- Increased the visitor activity tracking interval from 15 to 60 seconds, reducing the number of activity tracking requests sent for engaged visitors.
- Updated dependencies
- @kameleoon/javascript-sdk@4.24.4
React/React Native 10.26.3
Patch Changes
- Tracking requests are now performed only when the visitor genuinely interacted with the page (
mousemove/scroll) since the last tick, so hidden/backgrounded tabs no longer inflate visits. This helps reduce the number of requests sent to Kameleoon servers and prevents inflated visit counts. To continue sending data while the page isn't active, explicitly call [flush({instant: true})][flush] - Prevented duplicate activity tracking when the Kameleoon Engine (Engine.js) is present on the page (
window.Kameleoon). - Updated dependencies
- @kameleoon/javascript-sdk@4.24.3
React/React Native 10.26.2
Patch Changes
- Updated dependencies
- @kameleoon/javascript-sdk@4.24.2
React/React Native 10.26.1
Patch Changes
- Fixed the
/fullimport for legacy TypeScript subpath export mapping to type declarations, ensuring it works regardless of themoduleResolutionsetting. - Updated dependencies
- @kameleoon/javascript-sdk@4.24.1
React/React Native 10.26.0
Warning
If you're upgrading from a version earlier than 10.26.0 and run into any unexpected build or SDK-related issues, please reach out to the Kameleoon Support Team. We're here to ensure your transition is smooth and will promptly address any concerns.
Features
- Removed [
INFO][logging] and [DEBUG][logging] log messages from the standard bundles to significantly reduce the default JavaScript SDK bundle size. - Added
/fullpackage exports for customers who require verbose SDK logging. Use@kameleoon/react-sdk/fullwhen enabling logging withKameleoonLogger.setLogLevel(LogLevel.INFO)orKameleoonLogger.setLogLevel(LogLevel.DEBUG).
Patch Changes
- Updated dependencies
- @kameleoon/javascript-sdk@4.24.0
React/React Native 10.25.0
Features
- Added support for processing and tracking visitor variations from
window.kameleoonQueue, generated by the server-side SDK's [getEngineTrackingCode][getenginetrackingcode] method. Processing is initiated withingetVisitorCode(), immediately after the visitor code is determined. - Improved [
getEngineTrackingCode][getenginetrackingcode] performance by caching experiment metadata for reuse across calls.
Patch Changes
- Updated dependencies
- @kameleoon/javascript-sdk@4.23.0