Skip to content

Commit f2e7b46

Browse files
authored
Bump to 2.0 for GA release. (#85)
1 parent efaa0f7 commit f2e7b46

File tree

4 files changed

+42
-4
lines changed

4 files changed

+42
-4
lines changed

packages/optimizely-sdk/CHANGELOG.MD

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
## 2.0.0
2+
April 11th, 2018
3+
4+
This major release of the Optimizely SDK introduces APIs for Feature Management. It also introduces some breaking changes listed below.
5+
6+
### New Features
7+
* Introduces the `isFeatureEnabled` API to determine whether to show a feature to a user or not.
8+
```
9+
var enabled = optimizelyClient.isFeatureEnabled('my_feature_key', 'user_1', userAttributes);
10+
```
11+
12+
* You can also get all the enabled features for the user by calling the following method which returns a list of strings representing the feature keys:
13+
```
14+
var enabledFeatures = optimizelyClient.getEnabledFeatures('user_1', userAttributes);
15+
```
16+
17+
* Introduces Feature Variables to configure or parameterize your feature. There are four variable types: `Integer`, `String`, `Double`, `Boolean`.
18+
```
19+
var stringVariable = optimizelyClient.getFeatureVariableString('my_feature_key', 'string_variable_key', 'user_1');
20+
var integerVariable = optimizelyClient.getFeatureVariableInteger('my_feature_key', 'integer_variable_key', 'user_1');
21+
var doubleVariable = optimizelyClient.getFeatureVariableDouble('my_feature_key', 'double_variable_key', 'user_1');
22+
var booleanVariable = optimizelyClient.getFeatureVariableBoolean('my_feature_key', 'boolean_variable_key', 'user_1');
23+
```
24+
25+
### Breaking changes
26+
* The `track` API with revenue value as a stand-alone parameter has been removed. The revenue value should be passed in as an entry of the event tags map. The key for the revenue tag is `revenue` and will be treated by Optimizely as the key for analyzing revenue data in results.
27+
```
28+
var eventTags = {
29+
'revenue': 1200
30+
};
31+
32+
optimizelyClient.track('event_key', 'user_id', userAttributes, eventTags);
33+
```
34+
* The package name has changed from `optimizely-client-sdk` to `optimizely-sdk` as we have consolidated both Node and JavaScript SDKs into one.
35+
136
## 2.0.0-beta1
237
March 29th, 2018
338

packages/optimizely-sdk/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The SDK is available through [npm](https://npmjs.com/package/optimizely-sdk). To
1212
npm install @optimizely/optimizely-sdk --save
1313
```
1414

15-
Or to use in a non CommonJS fashion:
15+
Or to use in a non CommonJS fashion in the Browser:
1616

1717
1. Run `npm run build`
1818
2. Pull in `dist/optimizely.browser.umd.min.js` as a `<script>`
@@ -28,6 +28,10 @@ This version represents a major version change and, as such, introduces some bre
2828

2929
- You will no longer be able to pass in `revenue` value as a stand-alone argument to the `track` call. Instead you will need to pass it as an entry in the [`eventTags`](https://developers.optimizely.com/x/solutions/sdks/reference/index.html?language=javascript#event-tags).
3030

31+
### Feature Management Access
32+
33+
To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely account executive.
34+
3135
### Using the SDK
3236
See the Optimizely X Full Stack testing [developer documentation](http://developers.optimizely.com/server/reference/index.html) to learn how to set up your first JavaScript project and use the SDK.
3337

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,8 @@ exports.RESERVED_EVENT_KEYWORDS = {
128128
};
129129

130130
exports.JAVASCRIPT_CLIENT_ENGINE = 'javascript-sdk';
131-
exports.NEW_OPTIMIZELY_VERSION = '2';
132131
exports.NODE_CLIENT_ENGINE = 'node-sdk';
133-
exports.NODE_CLIENT_VERSION = '2.0.0-beta1';
132+
exports.NODE_CLIENT_VERSION = '2.0.0';
134133

135134
/*
136135
* Notification types for use with NotificationCenter

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": "2.0.0-beta1",
3+
"version": "2.0.0",
44
"description": "JavaScript SDK package for Optimizely X Full Stack",
55
"main": "dist/optimizely.node.js",
66
"browser": "dist/optimizely.browser.cjs.js",

0 commit comments

Comments
 (0)