Skip to content

Commit dbeaf1c

Browse files
prepare 2.15.2 release (#188)
1 parent 89d6c45 commit dbeaf1c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/__tests__/LDClient-test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import sinon from 'sinon';
22

33
import * as common from 'launchdarkly-js-sdk-common';
44
import * as LDClient from '../index';
5+
import * as pkg from '../../package.json';
56

67
describe('LDClient', () => {
78
const envName = 'UNKNOWN_ENVIRONMENT_ID';
@@ -30,6 +31,10 @@ describe('LDClient', () => {
3031
expect(LDClient).toBeDefined();
3132
});
3233

34+
it('should return current version', () => {
35+
expect(LDClient.version).toEqual(pkg.version);
36+
});
37+
3338
describe('initialization', () => {
3439
it('should trigger the ready event', async () => {
3540
const client = LDClient.initialize(envName, user, { bootstrap: {}, sendEvents: false });

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function initialize(env, user, options = {}) {
5656

5757
export const createConsoleLogger = common.createConsoleLogger;
5858

59-
export const version = common.version;
59+
export const version = VERSION;
6060

6161
function deprecatedInitialize(env, user, options = {}) {
6262
console && console.warn && console.warn(common.messages.deprecated('default export', 'named LDClient export'));

0 commit comments

Comments
 (0)