Skip to content
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

chore: Prepare for 4.0.0 release #468

Merged
merged 3 commits into from
Apr 30, 2020
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
31 changes: 31 additions & 0 deletions packages/optimizely-sdk/CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [4.0.0] - April 30, 2020

### New Features

- Removed lodash dependency
- ES module entry point for the browser - `"module"` property of `package.json` points to `dist/optimizely.browser.es.min.js` ([#445](https://github.com/optimizely/javascript-sdk/pull/445))

### Breaking Changes

- Removed `Promise` polyfill from browser entry point ([417](https://github.com/optimizely/javascript-sdk/pull/417)).
- Changed functionality of JSON schema validation in all entry points ([442](https://github.com/optimizely/javascript-sdk/pull/442)).
- Previously, `skipJSONValidation` flag was used by the user to specify whether the JSON object should be validated.
- Now, `skipJSONValidation` has been removed entirely from all entry points. Instead, a user will need to import `jsonSchemaValidator` from `@optimizely/optimizely-sdk/dist/optimizely.json_schema_validator.min.js` and pass it to `createInstance` to perform validation as shown below:
```js
const optimizelySDK = require('@optimizely/optimizely-sdk');
const jsonSchemaValidator = require('@optimizely/optimizely-sdk/dist/optimizely.json_schema_validator.min');

// Require JSON schema validation for the datafile
var optimizelyClientInstance = optimizely.createInstance({
datafile: datafile,
jsonSchemaValidator: jsonSchemaValidator,
});
```
- Dropped support for Node.js version <8 ([#456](https://github.com/optimizely/javascript-sdk/pull/456))

### Bug fixes

- Changed `track()` to log a warning instead of an error when the event isn't in the datafile ([#418](https://github.com/optimizely/javascript-sdk/pull/418))
- Fixed return type for `close` method in TypeScript type definitions ([#410](https://github.com/optimizely/javascript-sdk/pull/410))
- Node.js datafile manager uses gzip,deflate compression for requests ([#456](https://github.com/optimizely/javascript-sdk/pull/456))

## [4.0.0-rc.2] - April 24, 2020

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

assert.instanceOf(optlyInstance, Optimizely);
assert.equal(optlyInstance.clientVersion, '4.0.0-rc.2');
assert.equal(optlyInstance.clientVersion, '4.0.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 @@ -90,7 +90,7 @@ describe('optimizelyFactory', function() {
optlyInstance.onReady().catch(function() {});

assert.instanceOf(optlyInstance, Optimizely);
assert.equal(optlyInstance.clientVersion, '4.0.0-rc.2');
assert.equal(optlyInstance.clientVersion, '4.0.0');
});

describe('event processor configuration', function() {
Expand Down
2 changes: 1 addition & 1 deletion packages/optimizely-sdk/lib/index.react_native.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('javascript-sdk/react-native', function() {
optlyInstance.onReady().catch(function() {});

assert.instanceOf(optlyInstance, Optimizely);
assert.equal(optlyInstance.clientVersion, '4.0.0-rc.2');
assert.equal(optlyInstance.clientVersion, '4.0.0');
});

it('should set the Javascript client engine and version', 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 @@ -173,7 +173,7 @@ export var CONTROL_ATTRIBUTES = {
export var JAVASCRIPT_CLIENT_ENGINE = 'javascript-sdk';
export var NODE_CLIENT_ENGINE = 'node-sdk';
export var REACT_CLIENT_ENGINE = 'react-sdk';
export var NODE_CLIENT_VERSION = '4.0.0-rc.2';
export var NODE_CLIENT_VERSION = '4.0.0';

export var VALID_CLIENT_ENGINES = [
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": "4.0.0-rc.2",
"version": "4.0.0",
"description": "JavaScript SDK for Optimizely X Full Stack",
"module": "dist/optimizely.browser.es.min.js",
"main": "dist/optimizely.node.min.js",
Expand Down