Skip to content

Commit 274ef4b

Browse files
authored
chore: Prepare for 3.3.0 release (#357)
Prepare for 3.3.0 release
1 parent 1a3f078 commit 274ef4b

File tree

6 files changed

+22
-5
lines changed

6 files changed

+22
-5
lines changed

packages/optimizely-sdk/CHANGELOG.MD

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77
## [Unreleased]
88
Changes that have landed but are not yet released.
99

10+
## [3.3.0] - September 25th, 2019
11+
12+
### New Features
13+
14+
- Added support for event batching via the event processor.
15+
- Events generated by methods like `activate`, `track`, and `isFeatureEnabled` will be held in a queue until the configured batch size is reached, or the configured flush interval has elapsed. Then, they will be combined into a request and sent to the event dispatcher.
16+
- To configure event batching, include the `eventBatchSize` and `eventFlushInterval` number properties in the object you pass to `createInstance`.
17+
- Event batching is enabled by default. `eventBatchSize` defaults to `10`. `eventFlushInterval` defaults to `30000` in Node and `1000` in browsers.
18+
- Added `localStorage` mitigation against lost events in the browser
19+
- When event requests are dispatched, they are written to `localStorage`, and when a response is received, they are removed from `localStorage`.
20+
- When the SDK is initialized for the first time in the browser, if any requests remain in `localStorage`, they will be sent, and removed from `localStorage` when a response is received.
21+
- 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.
22+
- 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`.
23+
- 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.
24+
- 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.
25+
- Typed `getFeatureVariable` methods will still be available for use.
26+
1027
## [3.3.0-beta] - August 21th, 2019
1128

1229
### New Features

packages/optimizely-sdk/lib/index.browser.tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ describe('javascript-sdk', function() {
148148
optlyInstance.onReady().catch(function() {});
149149

150150
assert.instanceOf(optlyInstance, Optimizely);
151-
assert.equal(optlyInstance.clientVersion, '3.3.0-beta');
151+
assert.equal(optlyInstance.clientVersion, '3.3.0');
152152
});
153153

154154
it('should set the JavaScript client engine and version', function() {

packages/optimizely-sdk/lib/index.node.tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ describe('optimizelyFactory', function() {
9292
optlyInstance.onReady().catch(function() {});
9393

9494
assert.instanceOf(optlyInstance, Optimizely);
95-
assert.equal(optlyInstance.clientVersion, '3.3.0-beta');
95+
assert.equal(optlyInstance.clientVersion, '3.3.0');
9696
});
9797

9898
describe('event processor configuration', function() {

packages/optimizely-sdk/lib/utils/enums/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ exports.CONTROL_ATTRIBUTES = {
159159
exports.JAVASCRIPT_CLIENT_ENGINE = 'javascript-sdk';
160160
exports.NODE_CLIENT_ENGINE = 'node-sdk';
161161
exports.REACT_CLIENT_ENGINE = 'react-sdk';
162-
exports.NODE_CLIENT_VERSION = '3.3.0-beta';
162+
exports.NODE_CLIENT_VERSION = '3.3.0';
163163

164164
exports.VALID_CLIENT_ENGINES = [
165165
exports.NODE_CLIENT_ENGINE,

packages/optimizely-sdk/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/optimizely-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@optimizely/optimizely-sdk",
3-
"version": "3.3.0-beta",
3+
"version": "3.3.0",
44
"description": "JavaScript SDK for Optimizely X Full Stack",
55
"main": "lib/index.node.js",
66
"browser": "lib/index.browser.js",

0 commit comments

Comments
 (0)