Releases: optimizely/javascript-sdk
Releases · optimizely/javascript-sdk
Release 5.4.1
Release 6.3.0
[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
[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,
decideAsyncand related methods must be used. The syncdecidemethod 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 decisionsOptimizelyDecideOption.RESET_CMAB_CACHE: Clear and reset CMAB cache before making decisionsOptimizelyDecideOption.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
Release 5.4.0
Release 6.1.0
Release 6.0.0
[6.0.0] - May 29, 2025
Breaking Changes
- Modularized SDK architecture: The monolithic
createInstancecall 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.
onReadyPromise 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
eventProcessorto 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
vuidManagerto the client instance. - ODP functionality is no longer enabled by default. You must explicitly pass an
odpManagerto enable it. - Dropped support for older browser versions and Node.js versions earlier than 18.0.0.
New Features
- Added support for async user profile service and async decide methods (see dcoumentation for User Profile Service and Decide methods)
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
Release 4.10.1
Release 5.3.4
Release 5.3.3
[5.3.3] - June 06, 2024
Changed
- queueMicroTask fallback addition for embedded environments / unsupported platforms (#933)