diff --git a/packages/optimizely-sdk/CHANGELOG.MD b/packages/optimizely-sdk/CHANGELOG.MD index fb822dcd1..0024e57b2 100644 --- a/packages/optimizely-sdk/CHANGELOG.MD +++ b/packages/optimizely-sdk/CHANGELOG.MD @@ -9,10 +9,17 @@ Changes that have landed but are not yet released. ### New Features - Updated the `close` method to return a `Promise` representing the process of closing the instance. When `close` is called, any events waiting to be sent as part of a batched event request will be immediately batched and sent to the event dispatcher. - - If any such requests were sent to the event dispatcher, `close` returns a `Promise` that fulfills after the event dispatcher calls the response callback for each request. Otherwise, `close` returns an immediately-fulfilled `Promise`. - - The `Promise` returned from `close` is fulfilled with a result object containing `success` (boolean) and `reason` (string, only when success is `false`) properties. In the result object, `success` is `true` if all events in the queue at the time close was called were combined into requests, sent to the event dispatcher, and the event dispatcher called the callbacks for each request. `success` is false if an unexpected error was encountered during the close process. +- If any such requests were sent to the event dispatcher, `close` returns a `Promise` that fulfills after the event dispatcher calls the response callback for each request. Otherwise, `close` returns an immediately-fulfilled `Promise`. +- The `Promise` returned from `close` is fulfilled with a result object containing `success` (boolean) and `reason` (string, only when success is `false`) properties. In the result object, `success` is `true` if all events in the queue at the time close was called were combined into requests, sent to the event dispatcher, and the event dispatcher called the callbacks for each request. `success` is false if an unexpected error was encountered during the close process. - Added non-typed `getFeatureVariable` method ([#298](https://github.com/optimizely/javascript-sdk/pull/298)) as a more idiomatic approach to getting values of feature variables. - - Typed `getFeatureVariable` methods will still be available for use. +- Typed `getFeatureVariable` methods will still be available for use. + +## [3.2.2] - August 20th, 2019 + +### Bug fixes +- Dont use pendingEventsDispatcher with user defined eventDispatcher ([#289](https://github.com/optimizely/javascript-sdk/issues/289)) +Note: This was supposed to be released in 3.2.1 but did not make it into the release. +- Updated lodash dependency to ^4.17.11 to address security vulnerabilities ([#296](https://github.com/optimizely/javascript-sdk/issues/296)) ## [3.2.1] - July 1st, 2019 diff --git a/packages/optimizely-sdk/lib/index.browser.tests.js b/packages/optimizely-sdk/lib/index.browser.tests.js index 6e3edff9c..6b069a8ad 100644 --- a/packages/optimizely-sdk/lib/index.browser.tests.js +++ b/packages/optimizely-sdk/lib/index.browser.tests.js @@ -148,7 +148,7 @@ describe('javascript-sdk', function() { optlyInstance.onReady().catch(function() {}); assert.instanceOf(optlyInstance, Optimizely); - assert.equal(optlyInstance.clientVersion, '3.2.1'); + assert.equal(optlyInstance.clientVersion, '3.2.2'); }); it('should set the JavaScript client engine and version', function() { diff --git a/packages/optimizely-sdk/lib/index.node.tests.js b/packages/optimizely-sdk/lib/index.node.tests.js index 2421f3c25..a55baa804 100644 --- a/packages/optimizely-sdk/lib/index.node.tests.js +++ b/packages/optimizely-sdk/lib/index.node.tests.js @@ -92,7 +92,7 @@ describe('optimizelyFactory', function() { optlyInstance.onReady().catch(function() {}); assert.instanceOf(optlyInstance, Optimizely); - assert.equal(optlyInstance.clientVersion, '3.2.1'); + assert.equal(optlyInstance.clientVersion, '3.2.2'); }); describe('event processor configuration', function() { diff --git a/packages/optimizely-sdk/lib/utils/enums/index.js b/packages/optimizely-sdk/lib/utils/enums/index.js index edec5ea8d..5e31167bf 100644 --- a/packages/optimizely-sdk/lib/utils/enums/index.js +++ b/packages/optimizely-sdk/lib/utils/enums/index.js @@ -159,7 +159,7 @@ exports.CONTROL_ATTRIBUTES = { exports.JAVASCRIPT_CLIENT_ENGINE = 'javascript-sdk'; exports.NODE_CLIENT_ENGINE = 'node-sdk'; exports.REACT_CLIENT_ENGINE = 'react-sdk'; -exports.NODE_CLIENT_VERSION = '3.2.1'; +exports.NODE_CLIENT_VERSION = '3.2.2'; exports.VALID_CLIENT_ENGINES = [ exports.NODE_CLIENT_ENGINE, diff --git a/packages/optimizely-sdk/package-lock.json b/packages/optimizely-sdk/package-lock.json index 5172cd12f..6b38d1b30 100644 --- a/packages/optimizely-sdk/package-lock.json +++ b/packages/optimizely-sdk/package-lock.json @@ -1,6 +1,6 @@ { "name": "@optimizely/optimizely-sdk", - "version": "3.2.1", + "version": "3.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/optimizely-sdk/package.json b/packages/optimizely-sdk/package.json index 1a4706736..d291546f9 100644 --- a/packages/optimizely-sdk/package.json +++ b/packages/optimizely-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@optimizely/optimizely-sdk", - "version": "3.2.1", + "version": "3.2.2", "description": "JavaScript SDK for Optimizely X Full Stack", "main": "lib/index.node.js", "browser": "lib/index.browser.js",