Skip to content

Commit 619dfbc

Browse files
authored
chore: Prepare for 4.0.0 release (#468)
Prepare for 4.0.0 release
1 parent 8559c52 commit 619dfbc

File tree

7 files changed

+37
-6
lines changed

7 files changed

+37
-6
lines changed

packages/optimizely-sdk/CHANGELOG.MD

+31
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
## [4.0.0] - April 30, 2020
11+
12+
### New Features
13+
14+
- Removed lodash dependency
15+
- 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))
16+
17+
### Breaking Changes
18+
19+
- Removed `Promise` polyfill from browser entry point ([417](https://github.com/optimizely/javascript-sdk/pull/417)).
20+
- Changed functionality of JSON schema validation in all entry points ([442](https://github.com/optimizely/javascript-sdk/pull/442)).
21+
- Previously, `skipJSONValidation` flag was used by the user to specify whether the JSON object should be validated.
22+
- 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:
23+
```js
24+
const optimizelySDK = require('@optimizely/optimizely-sdk');
25+
const jsonSchemaValidator = require('@optimizely/optimizely-sdk/dist/optimizely.json_schema_validator.min');
26+
27+
// Require JSON schema validation for the datafile
28+
var optimizelyClientInstance = optimizely.createInstance({
29+
datafile: datafile,
30+
jsonSchemaValidator: jsonSchemaValidator,
31+
});
32+
```
33+
- Dropped support for Node.js version <8 ([#456](https://github.com/optimizely/javascript-sdk/pull/456))
34+
35+
### Bug fixes
36+
37+
- 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))
38+
- Fixed return type for `close` method in TypeScript type definitions ([#410](https://github.com/optimizely/javascript-sdk/pull/410))
39+
- Node.js datafile manager uses gzip,deflate compression for requests ([#456](https://github.com/optimizely/javascript-sdk/pull/456))
40+
1041
## [4.0.0-rc.2] - April 24, 2020
1142

1243
### Bug fixes

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ describe('javascript-sdk', function() {
145145
optlyInstance.onReady().catch(function() {});
146146

147147
assert.instanceOf(optlyInstance, Optimizely);
148-
assert.equal(optlyInstance.clientVersion, '4.0.0-rc.2');
148+
assert.equal(optlyInstance.clientVersion, '4.0.0');
149149
});
150150

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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe('optimizelyFactory', function() {
9090
optlyInstance.onReady().catch(function() {});
9191

9292
assert.instanceOf(optlyInstance, Optimizely);
93-
assert.equal(optlyInstance.clientVersion, '4.0.0-rc.2');
93+
assert.equal(optlyInstance.clientVersion, '4.0.0');
9494
});
9595

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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ describe('javascript-sdk/react-native', function() {
8989
optlyInstance.onReady().catch(function() {});
9090

9191
assert.instanceOf(optlyInstance, Optimizely);
92-
assert.equal(optlyInstance.clientVersion, '4.0.0-rc.2');
92+
assert.equal(optlyInstance.clientVersion, '4.0.0');
9393
});
9494

9595
it('should set the Javascript client engine and version', function() {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export var CONTROL_ATTRIBUTES = {
173173
export var JAVASCRIPT_CLIENT_ENGINE = 'javascript-sdk';
174174
export var NODE_CLIENT_ENGINE = 'node-sdk';
175175
export var REACT_CLIENT_ENGINE = 'react-sdk';
176-
export var NODE_CLIENT_VERSION = '4.0.0-rc.2';
176+
export var NODE_CLIENT_VERSION = '4.0.0';
177177

178178
export var VALID_CLIENT_ENGINES = [
179179
NODE_CLIENT_ENGINE,

packages/optimizely-sdk/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/optimizely-sdk/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@optimizely/optimizely-sdk",
3-
"version": "4.0.0-rc.2",
3+
"version": "4.0.0",
44
"description": "JavaScript SDK for Optimizely X Full Stack",
55
"module": "dist/optimizely.browser.es.min.js",
66
"main": "dist/optimizely.node.min.js",

0 commit comments

Comments
 (0)