Skip to content

Commit

Permalink
chore: Prepare for 2.0.0 release (#48)
Browse files Browse the repository at this point in the history
Prepare for 2.0.0 release
  • Loading branch information
mjc1283 authored Apr 30, 2020
1 parent 34a6a9b commit b9e0b30
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 8 deletions.
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,39 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [2.0.0] - April 30th, 2020

Upgrade `@optimizely/optimizely-sdk` to 4.0.0. See [@optimizely/optimizely-sdk Release 4.0.0](https://github.com/optimizely/javascript-sdk/releases/tag/v4.0.0) for more details.

### Breaking Changes

- Changed supported React version to 16.8+

- @optimizely/optimizely-sdk no longer adds `Promise` polyfill in its browser entry point

- Dropped support for Node.js version <8

### New Features

- Refactored `<OptimizelyFeature>` to a functional component that uses the `useFeature` hook under the hood. See [#32](https://github.com/optimizely/react-sdk/pull/32) for more details.

- Refactored `<OptimizelyExperiment>` to a functional component that uses the `useExperiment` hook under the hood. See [#36](https://github.com/optimizely/react-sdk/pull/36) for more details.

- Added `useExperiment` hook

- Can be used to retrieve the variation for an experiment. See [#36](https://github.com/optimizely/react-sdk/pull/36) for more details.

- Added `useFeature` hook
- Can be used to retrieve the status of a feature flag and its variables. See [#28](https://github.com/optimizely/react-sdk/pull/28) for more details.

- Removed lodash dependency

### Enhancements

- Exposed the entire context object used by `<OptimizelyProvider>`.
- Enables support for using APIs which require passing reference to a context object, like `useContext`. [#27](https://github.com/optimizely/react-sdk/pull/27) for more details.


## [2.0.0-rc.2] - April 24th, 2020

### Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@optimizely/react-sdk",
"version": "2.0.0-rc.2",
"version": "2.0.0",
"description": "React SDK for Optimizely Full Stack and Optimizely Rollouts",
"homepage": "https://github.com/optimizely/react-sdk",
"license": "Apache-2.0",
Expand Down Expand Up @@ -29,7 +29,7 @@
},
"dependencies": {
"@optimizely/js-sdk-logging": "^0.1.0",
"@optimizely/optimizely-sdk": "4.0.0-rc.2",
"@optimizely/optimizely-sdk": "4.0.0",
"hoist-non-react-statics": "^3.3.0",
"prop-types": "^15.6.2",
"utility-types": "^2.1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('ReactSDKClient', () => {
expect(createInstanceSpy).toBeCalledWith({
...config,
clientEngine: 'react-sdk',
clientVersion: '2.0.0-rc.2',
clientVersion: '2.0.0',
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export type OnReadyResult = {
};

const REACT_SDK_CLIENT_ENGINE = 'react-sdk';
const REACT_SDK_CLIENT_VERSION = '2.0.0-rc.2';
const REACT_SDK_CLIENT_VERSION = '2.0.0';

export interface ReactSDKClient extends optimizely.Client {
user: UserContext;
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
dependencies:
uuid "^3.3.2"

"@optimizely/[email protected]-rc.2":
version "4.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@optimizely/optimizely-sdk/-/optimizely-sdk-4.0.0-rc.2.tgz#e6b6580f09f05eb1356f9986dc5f503b4f5ef45a"
integrity sha512-5sYzg3lB3URK4szRapBOqsrNsyrss3UXoTDhocYMiUrp6Yc3Lst5TcNhy2nlc8jhIUoGSDvcvsOrSm/T6xr9BQ==
"@optimizely/[email protected]":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@optimizely/optimizely-sdk/-/optimizely-sdk-4.0.0.tgz#0e63fb3fdd70e95481029025b2c633e9bd93f88d"
integrity sha512-ufwndTjg6wPXnJmbW/3SK2F3Dt7E1S1VQZ5oCoYrsLZ2oFrhES/urbWWTzC1t83gAokbqzSEZDuc/OBdZ6c9SA==
dependencies:
"@optimizely/js-sdk-datafile-manager" "^0.5.0"
"@optimizely/js-sdk-event-processor" "^0.4.0"
Expand Down

0 comments on commit b9e0b30

Please sign in to comment.