Skip to content

Releases: optimizely/javascript-sdk

Release 5.4.1

08 Dec 13:24
781499b

Choose a tag to compare

[5.4.1] - Dec 8, 2025

Changed

  • Widen React Native peer dependency version ranges (#1118)
  • Improve notification center type definitions with strongly-typed listener payloads (#1119)

Release 6.3.0

19 Nov 14:15
860fca0

Choose a tag to compare

[6.3.0] - November 19, 2025

New Features

  • Added Holdouts support: Holdouts Feature Experimentation feature is now officially supported.
  • Added configurable prediction endpoint: Added ability to configure custom prediction endpoint for CMAB (#1102)
  • Added HTTP support in NodeRequestHandler: Added support for HTTP protocol in addition to HTTPS (#1104)
  • Added TTL support for events in event store: Events in event store now have configurable time-to-live (TTL) functionality (#1103)
  • Exposed maxRetries option for createBatchEventProcessor: Added ability to configure maximum retry attempts for batch event processing (#1106)
  • Added customHeaders option to polling config manager: Added support for custom HTTP headers in polling config manager (#1107)

Changed

  • Excluded CMAB from user profile service: CMAB experiments are now properly excluded from user profile service operations (#1105)

Bug Fixes

  • Fixed ODP logging: Log error instead of silently ignoring when ODP methods are called without providing an OdpManager (#1108)

Release 6.2.0

23 Oct 15:48
3ae698b

Choose a tag to compare

[6.2.0] - October 23, 2025

New Features

  • Added support for Contextual Multi-Armed Bandit (CMAB): Added support for CMAB experiments(Contextual Bandits rules) with new configuration options and cache control. To get decision from CMAB rules, decideAsync and related methods must be used. The sync decide method does not support CMABs and will just skip CMAB rules while making decision for a flag.

    CMAB Configuration Options

    The following new options have been added to configure the cmab cache:

    import { createInstance } from '@optimizely/optimizely-sdk'
    
    const optimizely = createInstance({
      // ... other config options
      cmab: {
        cacheSize: 1000,      // Optional: Set CMAB cache size (default: 1000)
        cacheTtl: 30 * 60 * 1000,     // Optional: Set CMAB cache TTL in milliseconds (default: 30 * 60 * 1000)
        cache: customCache    // Optional: Custom cache implementation, instance of CacheWithRemove interface
      }
    });

    CMAB-Related OptimizelyDecideOptions

    New decide options are available to control CMAB caching behavior:

    • OptimizelyDecideOption.IGNORE_CMAB_CACHE: Bypass CMAB cache for fresh decisions
    • OptimizelyDecideOption.RESET_CMAB_CACHE: Clear and reset CMAB cache before making decisions
    • OptimizelyDecideOption.INVALIDATE_USER_CMAB_CACHE: Invalidate CMAB cache for the particular user and experiment
    // Example usage with CMAB decide options
    const decision = await userContext.decideAsync('feature-flag-key', [
      optimizelySdk.enums.OptimizelyDecideOption.IGNORE_CMAB_CACHE
    ]);

Bug Fixes

  • Flush events without closing client on page unload which causes event processing to stop working when page is loaded from bfcache (#1087)
  • Fixed typo in clientEngine option (#1095)

Release 5.4.0

13 Oct 12:23
ae2b895

Choose a tag to compare

[5.4.0] - Oct 13, 2025

New Features

  • Added customHeaders option to datafileOptions for passing custom HTTP headers in datafile requests (#1092)

Bug Fixes

  • Fix the EventTags type to allow event properties (#1040)
  • Fix typo in event.experimentIds field in project config (#1088)

Release 6.1.0

08 Sep 18:22
f04de07

Choose a tag to compare

[6.1.0] - September 8, 2025

New Features

  • Added multi-region support for logx events (#1072)

Performance Improvements

  • Improved performance of variations parsing from datafile (#1080)
  • General cleanups and improvements in event processing (#1073)

Release 6.0.0

29 May 18:13
760c72b

Choose a tag to compare

[6.0.0] - May 29, 2025

Breaking Changes

  • Modularized SDK architecture: The monolithic createInstance call has been split into multiple factory functions for greater flexibility and control.
  • Core functionalities (project configuration, event processing, ODP, VUID, logging, and error handling) are now configured through dedicated components created via factory functions, giving you greater flexibility and control in enabling/disabling certain components and allowing optimizing the bundle size for frontend projects.
  • onReady Promise behavior changed: It now resolves only when the SDK is ready and rejects on initialization errors.
  • event processing is disabled by default and must be explicitly enabled by passing a eventProcessor to the client.
  • Event dispatcher interface updated to use Promises instead of callbacks.
  • Logging is disabled by default and must be explicitly enabled using a logger created via a factory function.
  • VUID tracking is disabled by default and must be explicitly enabled by passing a vuidManager to the client instance.
  • ODP functionality is no longer enabled by default. You must explicitly pass an odpManager to enable it.
  • Dropped support for older browser versions and Node.js versions earlier than 18.0.0.

New Features

Migration Guide

For detailed migration instructions, refer to the Migration Guide.

Documentation

For more details, see the official documentation: JavaScript SDK.

Release 5.3.5

29 Jan 14:31
90ef0d7

Choose a tag to compare

[5.3.5] - Jan 29, 2025

Bug Fixes

  • Rollout experiment key exclusion from activate method(#949)
  • Using optimizely.readyPromise instead of optimizely.onReady to avoid setTimeout call in edge environments. (#995)

Release 4.10.1

18 Nov 14:32
036a033

Choose a tag to compare

[4.10.1] - November 18, 2024

Changed

  • update uuid module improt and usage (#961)

Release 5.3.4

28 Jun 15:31
b588824

Choose a tag to compare

[5.3.4] - Jun 28, 2024

Changed

  • crypto and text encoder polyfill addition for React native (#936)

Release 5.3.3

06 Jun 15:03
4909efb

Choose a tag to compare

[5.3.3] - June 06, 2024

Changed

  • queueMicroTask fallback addition for embedded environments / unsupported platforms (#933)