8000 chore: Prepare for 3.3.0 release by mjc1283 · Pull Request #357 · optimizely/javascript-sdk · GitHub
[go: up one dir, main page]

Skip to content

chore: Prepare for 3.3.0 release #357

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 3 commits into from
Sep 25, 2019
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
17 changes: 17 additions & 0 deletions packages/optimizely-sdk/CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
Changes that have landed but are not yet released.

## [3.3.0] - September 25th, 2019

### New Features

- Added support for event batching via the event processor.
- 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.
- To configure event batching, include the `eventBatchSize` and `eventFlushInterval` number properties in the object you pass to `createInstance`.
- Event batching is enabled by default. `eventBatchSize` defaults to `10`. `eventFlushInterval` defaults to `30000` in Node and `1000` in browsers.
- Added `localStorage` mitigation against lost events in the browser
- When event requests are dispatched, they are written to `localStorage`, and when a response is received, they are removed from `localStorage`.
- 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.
- 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.
- 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.

## [3.3.0-beta] - August 21th, 2019

### New Features
Expand Down
2 changes: 1 addition & 1 deletion packages/optimizely-sdk/lib/index.browser.tests.js
10000
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ describe('javascript-sdk', function() {
optlyInstance.onReady().catch(function() {});

assert.instanceOf(optlyInstance, Optimizely);
assert.equal(optlyInstance.clientVersion, '3.3.0-beta');
assert.equal(optlyInstance.clientVersion, '3.3.0');
});

it('should set the JavaScript client engine and version', function() {
Expand Down
2 changes: 1 addition & 1 deletion packages/optimizely-sdk/lib/index.node.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe('optimizelyFactory', function() {
optlyInstance.onReady().catch(function() {});

assert.instanceOf(optlyInstance, Optimizely);
assert.equal(optlyInstance.clientVersion, '3.3.0-beta');
assert.equal(optlyInstance.clientVersion, '3.3.0');
});

describe('event processor configuration', function() {
Expand Down
2 changes: 1 addition & 1 deletion packages/optimizely-sdk/lib/utils/enums/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.0-beta';
exports.NODE_CLIENT_VERSION = '3.3.0';

exports.VALID_CLIENT_ENGINES = [
exports.NODE_CLIENT_ENGINE,
Expand Down
2 changes: 1 addition & 1 deletion packages/optimizely-sdk/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 packages/optimizely-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@optimizely/optimizely-sdk",
"version": "3.3.0-beta",
"version": "3.3.0",
"description": "JavaScript SDK for Optimizely X Full Stack",
"main": "lib/index.node.js",
"browser": "lib/index.browser.js",
Expand Down
0