Skip to content

[FSSDK-10843] prepare release 6.0.0 #1066

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

Merged
merged 2 commits into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [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
- Added support for async user profile service and async decide methods (see dcoumentation for [User Profile Service](https://docs.developers.optimizely.com/feature-experimentation/docs/implement-a-user-profile-service-for-the-javascript-sdk) and [Decide methods](https://docs.developers.optimizely.com/feature-experimentation/docs/decide-methods-for-the-javascript-sdk))

### Migration Guide

For detailed migration instructions, refer to the [Migration Guide](MIGRATION.md).

### Documentation

For more details, see the official documentation: [JavaScript SDK](https://docs.developers.optimizely.com/feature-experimentation/docs/javascript-sdk).

## [5.3.5] - Jan 29, 2025

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This guide will help you migrate your implementation from Optimizely JavaScript
In v6, the SDK architecture has been modularized to give you more control over different components:

- The monolithic `createInstance` call is now split into multiple factory functions
- Core functionality (project configuration, event processing, ODP, VUID, logging, and error handling) is 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.
- 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.
- Event dispatcher interface has been updated to use Promises
- onReady Promise behavior has changed

Expand Down
2 changes: 1 addition & 1 deletion lib/index.browser.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ describe('javascript-sdk (Browser)', function() {
});

assert.instanceOf(optlyInstance, Optimizely);
assert.equal(optlyInstance.clientVersion, '5.3.4');
assert.equal(optlyInstance.clientVersion, '6.0.0');
});

it('should set the JavaScript client engine and version', function() {
Expand Down
22 changes: 11 additions & 11 deletions lib/index.node.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ describe('optimizelyFactory', function() {
// // sinon.assert.calledOnce(fakeLogger.error);
// });

// it('should create an instance of optimizely', function() {
// var optlyInstance = optimizelyFactory.createInstance({
// projectConfigManager: getMockProjectConfigManager(),
// errorHandler: fakeErrorHandler,
// eventDispatcher: fakeEventDispatcher,
// logger: fakeLogger,
// });

// assert.instanceOf(optlyInstance, Optimizely);
// assert.equal(optlyInstance.clientVersion, '5.3.4');
// });
it('should create an instance of optimizely', function() {
var optlyInstance = optimizelyFactory.createInstance({
projectConfigManager: wrapConfigManager(getMockProjectConfigManager()),
// errorHandler: fakeErrorHandler,
// eventDispatcher: fakeEventDispatcher,
// logger: fakeLogger,
});

assert.instanceOf(optlyInstance, Optimizely);
assert.equal(optlyInstance.clientVersion, '6.0.0');
});
// TODO: user will create and inject an event processor
// these tests will be refactored accordingly
// describe('event processor configuration', function() {
Expand Down
2 changes: 1 addition & 1 deletion lib/index.react_native.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe('javascript-sdk/react-native', () => {
expect(optlyInstance).toBeInstanceOf(Optimizely);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
expect(optlyInstance.clientVersion).toEqual('5.3.4');
expect(optlyInstance.clientVersion).toEqual('6.0.0');
});

it('should set the React Native JS client engine and javascript SDK version', () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/enums/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const CONTROL_ATTRIBUTES = {
export const JAVASCRIPT_CLIENT_ENGINE = 'javascript-sdk';
export const NODE_CLIENT_ENGINE = 'node-sdk';
export const REACT_NATIVE_JS_CLIENT_ENGINE = 'react-native-js-sdk';
export const CLIENT_VERSION = '5.3.4';
export const CLIENT_VERSION = '6.0.0';

/*
* Represents the source of a decision for feature management. When a feature
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@optimizely/optimizely-sdk",
"version": "5.3.4",
"version": "6.0.0",
"description": "JavaScript SDK for Optimizely Feature Experimentation, Optimizely Full Stack (legacy), and Optimizely Rollouts",
"main": "./dist/index.node.min.js",
"browser": "./dist/index.browser.es.min.js",
Expand Down
Loading