Skip to content

Commit b9e0b30

Browse files
authored
chore: Prepare for 2.0.0 release (#48)
Prepare for 2.0.0 release
1 parent 34a6a9b commit b9e0b30

File tree

5 files changed

+41
-8
lines changed

5 files changed

+41
-8
lines changed

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,39 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
## [2.0.0] - April 30th, 2020
11+
12+
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.
13+
14+
### Breaking Changes
15+
16+
- Changed supported React version to 16.8+
17+
18+
- @optimizely/optimizely-sdk no longer adds `Promise` polyfill in its browser entry point
19+
20+
- Dropped support for Node.js version <8
21+
22+
### New Features
23+
24+
- 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.
25+
26+
- 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.
27+
28+
- Added `useExperiment` hook
29+
30+
- Can be used to retrieve the variation for an experiment. See [#36](https://github.com/optimizely/react-sdk/pull/36) for more details.
31+
32+
- Added `useFeature` hook
33+
- 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.
34+
35+
- Removed lodash dependency
36+
37+
### Enhancements
38+
39+
- Exposed the entire context object used by `<OptimizelyProvider>`.
40+
- 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.
41+
42+
1043
## [2.0.0-rc.2] - April 24th, 2020
1144

1245
### Bug Fixes

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@optimizely/react-sdk",
3-
"version": "2.0.0-rc.2",
3+
"version": "2.0.0",
44
"description": "React SDK for Optimizely Full Stack and Optimizely Rollouts",
55
"homepage": "https://github.com/optimizely/react-sdk",
66
"license": "Apache-2.0",
@@ -29,7 +29,7 @@
2929
},
3030
"dependencies": {
3131
"@optimizely/js-sdk-logging": "^0.1.0",
32-
"@optimizely/optimizely-sdk": "4.0.0-rc.2",
32+
"@optimizely/optimizely-sdk": "4.0.0",
3333
"hoist-non-react-statics": "^3.3.0",
3434
"prop-types": "^15.6.2",
3535
"utility-types": "^2.1.0"

src/client.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('ReactSDKClient', () => {
8686
expect(createInstanceSpy).toBeCalledWith({
8787
...config,
8888
clientEngine: 'react-sdk',
89-
clientVersion: '2.0.0-rc.2',
89+
clientVersion: '2.0.0',
9090
});
9191
});
9292

src/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export type OnReadyResult = {
3434
};
3535

3636
const REACT_SDK_CLIENT_ENGINE = 'react-sdk';
37-
const REACT_SDK_CLIENT_VERSION = '2.0.0-rc.2';
37+
const REACT_SDK_CLIENT_VERSION = '2.0.0';
3838

3939
export interface ReactSDKClient extends optimizely.Client {
4040
user: UserContext;

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@
6464
dependencies:
6565
uuid "^3.3.2"
6666

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

0 commit comments

Comments
 (0)