Skip to content

Bump version to 1.0.0 #10

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 1 commit into from
Oct 3, 2016
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
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ node_js:
branches:
only:
- master
- devel
install: "npm install"
script:
- "npm test"
9 changes: 9 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
-------------------------------------------------------------------------------
1.0.0
-------------------------------------------------------------------------------
* Introduce support for Full Stack projects in Optimizely X with no breaking changes from previous version.
* Introduce more graceful exception handling in instantiation and core methods.
* Update whitelisting to take precedence over audience condition evaluation.
* Fix bug activating/tracking with attributes not in the datafile.
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
0.1.4
-------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Optimizely JavaScript SDK

This repository houses the JavaScript SDK for Optimizely's server-side testing product, which is currently in private beta.
This repository houses the JavaScript SDK for Optimizely X Full Stack.

##Getting Started

Expand All @@ -13,7 +13,7 @@ npm install optimizely-client-sdk --save
```

###Using the SDK
See the Optimizely server-side testing [developer documentation](http://developers.optimizely.com/server/reference/index.html) to learn how to set up your first custom project and use the SDK. **Please note that you must be a member of the private server-side testing beta to create custom projects and use this SDK.**
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.

##Development

Expand Down
8 changes: 4 additions & 4 deletions dist/optimizely.min.js

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ var logger = require('optimizely-server-sdk/lib/plugins/logger');

var Optimizely = require('optimizely-server-sdk/lib/optimizely');

var JAVASCRIPT_CLIENT_VERSION = '1.0.0';
var MODULE_NAME = 'INDEX';

/**
* Entry point into the Optimizely Node testing SDK
*/
Expand All @@ -26,12 +29,21 @@ module.exports = {
if (config) {
try {
configValidator.validate(config);
config.isValidInstance = true;
} catch (ex) {
defaultLogger.log(enums.LOG_LEVEL.ERROR, ex.message);
var errorMessage = MODULE_NAME + ':' + ex.message;
if (config.logger) {
config.logger.log(enums.LOG_LEVEL.ERROR, errorMessage);
} else {
defaultLogger.log(enums.LOG_LEVEL.ERROR, errorMessage);
}
config.isValidInstance = false;
}
}

config = _.assignIn({
clientEngine: enums.JAVASCRIPT_CLIENT_ENGINE,
clientVersion: JAVASCRIPT_CLIENT_VERSION,
errorHandler: defaultErrorHandler,
eventDispatcher: defaultEventDispatcher,
logger: logger.createLogger({ logLevel: enums.LOG_LEVEL.INFO }),
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "optimizely-client-sdk",
"version": "0.1.4",
"description": "Javascript SDK for client testing",
"version": "1.0.0",
"description": "JavaScript SDK for client testing",
"main": "index.js",
"scripts": {
"test": "./node_modules/.bin/mocha ./tests.js",
Expand All @@ -21,7 +21,7 @@
"dependencies": {
"es6-promise": "^3.3.1",
"lodash": "^4.13.1",
"optimizely-server-sdk": "^0.1.4"
"optimizely-server-sdk": "^1.0.0"
},
"devDependencies": {
"chai": "^3.5.0",
Expand Down
13 changes: 13 additions & 0 deletions tests.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var configValidator = require('optimizely-server-sdk/lib/utils/config_validator');
var Optimizely = require('optimizely-server-sdk/lib/optimizely');
var optimizelyFactory = require('./');
var packageJSON = require('./package.json');

var chai = require('chai');
var assert = chai.assert;
Expand Down Expand Up @@ -42,6 +43,18 @@ describe('javascript-sdk', function() {

assert.instanceOf(optlyInstance, Optimizely);
});

it('should set the Javascript client engine and version', function() {
var optlyInstance = optimizelyFactory.createInstance({
datafile: {},
errorHandler: fakeErrorHandler,
eventDispatcher: fakeEventDispatcher,
logger: fakeLogger,
});

assert.equal('javascript-sdk', optlyInstance.clientEngine);
assert.equal(packageJSON.version, optlyInstance.clientVersion);
});
});
});
});