diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c2ba709..fdbee806 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [2.3.2] - October 9th, 2020 +Upgrade `@optimizely/optimizely-sdk` to [4.3.4](https://github.com/optimizely/javascript-sdk/releases/tag/v4.3.4): + - Exported Optimizely Config Entities types from TypeScript type definitions. See [@optimizely/optimizely-sdk Release 4.3.3](https://github.com/optimizely/javascript-sdk/releases/tag/v4.3.3) for more details. + - Fixed return type of `getAllFeatureVariables` method in TypeScript type definitions. See [@optimizely/optimizely-sdk Release 4.3.2](https://github.com/optimizely/javascript-sdk/releases/tag/v4.3.2) for more details. + +### Bug fixes + - Fixed return type of `getAllFeatureVariables` method in ReactSDKClient ([#76](https://github.com/optimizely/react-sdk/pull/76)) + ## [2.3.1] - October 5th, 2020 Upgrade `@optimizely/optimizely-sdk` to [4.3.1](https://github.com/optimizely/javascript-sdk/releases/tag/v4.3.1). Added support for version audience evaluation and datafile accessor. See [@optimizely/optimizely-sdk Release 4.3.0](https://github.com/optimizely/javascript-sdk/releases/tag/v4.3.0) for more details. diff --git a/package.json b/package.json index 26d151ef..bdf251c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@optimizely/react-sdk", - "version": "2.3.1", + "version": "2.3.2", "description": "React SDK for Optimizely Full Stack and Optimizely Rollouts", "homepage": "https://github.com/optimizely/react-sdk", "license": "Apache-2.0", @@ -29,7 +29,7 @@ }, "dependencies": { "@optimizely/js-sdk-logging": "^0.1.0", - "@optimizely/optimizely-sdk": "4.3.1", + "@optimizely/optimizely-sdk": "^4.3.4", "hoist-non-react-statics": "^3.3.0", "prop-types": "^15.6.2", "utility-types": "^2.1.0 || ^3.0.0" diff --git a/src/client.spec.ts b/src/client.spec.ts index 03f715d8..6c77857e 100644 --- a/src/client.spec.ts +++ b/src/client.spec.ts @@ -91,7 +91,7 @@ describe('ReactSDKClient', () => { expect(createInstanceSpy).toBeCalledWith({ ...config, clientEngine: 'react-sdk', - clientVersion: '2.3.1', + clientVersion: '2.3.2', }); }); diff --git a/src/client.ts b/src/client.ts index a097d999..3b5070b4 100644 --- a/src/client.ts +++ b/src/client.ts @@ -35,7 +35,7 @@ export type OnReadyResult = { }; const REACT_SDK_CLIENT_ENGINE = 'react-sdk'; -const REACT_SDK_CLIENT_VERSION = '2.3.1'; +const REACT_SDK_CLIENT_VERSION = '2.3.2'; export interface ReactSDKClient extends optimizely.Client { user: UserContext; @@ -109,7 +109,7 @@ export interface ReactSDKClient extends optimizely.Client { featureKey: string, overrideUserId: string, overrideAttributes?: optimizely.UserAttributes - ): { [variableKey: string]: unknown }; + ): { [variableKey: string]: unknown } | null; isFeatureEnabled( featureKey: string, @@ -526,7 +526,7 @@ class OptimizelyReactSDKClient implements ReactSDKClient { featureKey: string, overrideUserId: string, overrideAttributes?: optimizely.UserAttributes - ): { [variableKey: string]: unknown } { + ): { [variableKey: string]: unknown } | null { const user = this.getUserContextWithOverrides(overrideUserId, overrideAttributes); if (user.id === null) { return {}; diff --git a/yarn.lock b/yarn.lock index 6019fcb8..3b0aebeb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -64,10 +64,10 @@ dependencies: uuid "^3.3.2" -"@optimizely/optimizely-sdk@4.3.1": - version "4.3.1" - resolved "https://registry.yarnpkg.com/@optimizely/optimizely-sdk/-/optimizely-sdk-4.3.1.tgz#667666bb55a5c9909764d3ebaafecbca66c8c6f6" - integrity sha512-22wglT1USthyVRn+TocFCQ4x0Z9sgQTe9dKhebE+tF6CJu/ocHexQY8cKMbPr4qvO270Y4zbNEYjdg3MvMeeDQ== +"@optimizely/optimizely-sdk@^4.3.4": + version "4.3.4" + resolved "https://registry.yarnpkg.com/@optimizely/optimizely-sdk/-/optimizely-sdk-4.3.4.tgz#b323b91dc8af9656dde8bcf696801bd71443e202" + integrity sha512-DqaEg9YwiwnfDjaDmbST2cu0/7W/yQJqQ+tBwIEwh/HqiSgs8oQJX7sNG2Ql2fFwlIzG7APkIx/oxwbXpp8LPg== dependencies: "@optimizely/js-sdk-datafile-manager" "^0.8.0" "@optimizely/js-sdk-event-processor" "^0.6.0"