Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit 96f1f5d

Browse files
prepare 5.1.0 release (#98)
1 parent 6b25145 commit 96f1f5d

File tree

9 files changed

+182
-399
lines changed

9 files changed

+182
-399
lines changed

.circleci/config.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
version: 2
1+
version: 2.1
22
jobs:
33
android:
4+
parameters:
5+
hello-app-branch:
6+
type: string
47
docker:
58
- image: circleci/android@sha256:9d2e4571898fd9b1dc97bfb9da942aaeea46859eb5b1e4cfc85a44c42733643c
69
environment:
@@ -26,7 +29,7 @@ jobs:
2629
no_output_timeout: 20m
2730
- run: sudo npm install -g react-native-cli
2831
- run: cd .. && git clone https://github.com/launchdarkly/hello-react-native.git
29-
- run: cd ../hello-react-native && npm install
32+
- run: cd ../hello-react-native && git checkout <<parameters.hello-app-branch>> && npm install
3033
- run: cp -r ../project/ ../hello-react-native/node_modules/launchdarkly-react-native-client-sdk/
3134
- run: circle-android wait-for-boot
3235
- run:
@@ -35,6 +38,9 @@ jobs:
3538
timeout: 1200
3639

3740
ios:
41+
parameters:
42+
hello-app-branch:
43+
type: string
3844
macos:
3945
xcode: "11.4"
4046
steps:
@@ -43,14 +49,14 @@ jobs:
4349
- run: xcrun simctl create rn-ios com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-12-2
4450
- run: xcrun simctl boot rn-ios
4551
- run: cd .. && git clone https://github.com/launchdarkly/hello-react-native.git
46-
- run: cd ../hello-react-native && npm install
52+
- run: cd ../hello-react-native && git checkout <<parameters.hello-app-branch>> && npm install
4753
- run: sudo npm install -g react-native-cli
4854
- run: cp -r ../project/ ../hello-react-native/node_modules/launchdarkly-react-native-client-sdk/
4955
# Newer cocoapods required for following pod install
5056
- run: sudo gem install cocoapods
5157
# RN 0.64 has an issue with embedding absolute paths in the cocoapods generated build files, so must regenerate.
5258
# https://github.com/facebook/react-native/issues/31121
53-
- run: cd ../hello-react-native/ios && pod install
59+
- run: cd ../hello-react-native/ios && pod update && pod install
5460
- run: cd ../hello-react-native && react-native run-ios --configuration Release --simulator rn-ios
5561

5662
common:
@@ -77,8 +83,23 @@ workflows:
7783
jobs:
7884
- common
7985
- android:
86+
name: Android + RN 0.63
87+
hello-app-branch: rn-0.63
8088
requires:
8189
- common
8290
- ios:
91+
name: iOS + RN 0.63
92+
hello-app-branch: rn-0.63
8393
requires:
8494
- common
95+
- android:
96+
name: Android + RN 0.64
97+
hello-app-branch: rn-0.64
98+
requires:
99+
- common
100+
- ios:
101+
name: iOS + RN 0.64
102+
hello-app-branch: rn-0.64
103+
requires:
104+
- common
105+

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ All notable changes to the LaunchDarkly React Native SDK will be documented in t
8080

8181
## [4.2.0] - 2021-05-19
8282
### Added:
83-
- `LDUser` now has an optional `secondary` attribute to match other LaunchDarkly SDKs. For more on the behavior of this attribute see [the documentation on targeting users](https://docs.launchdarkly.com/home/managing-flags/targeting-users).
83+
- `LDUser` now has an optional `secondary` attribute to match other LaunchDarkly SDKs. For more on the behavior of this attribute see [the documentation on targeting users](https://docs.launchdarkly.com/home/flags/targeting-users).
8484
- Support for multiple LaunchDarkly projects or environments. Each set of feature flags associated with a mobile key is called an environment. ([#10](https://github.com/launchdarkly/react-native-client-sdk/issues/10))
8585
- `secondaryMobileKeys` is now a config option which allows a mapping of names to the SDK keys for each additional environment. `mobileKey` is still required, and represents the primary environment.
8686
- Many methods including variations, track, and listeners now support an optional `environment` parameter to evaluate the method against the given `environment`.

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ LaunchDarkly overview
1414
Supported versions
1515
-------------------------
1616

17-
This SDK is currently compatible with React Native 0.64.x and Xcode 12 and is tested in Android 30 and iOS 14. Earlier versions of this SDK are compatible with prior versions of React Native, Android, and iOS.
17+
This SDK is currently compatible with React Native 0.63.x - 0.64.x and Xcode 12 and is tested in Android 30 and iOS 14. Earlier versions of this SDK are compatible with prior versions of React Native, Android, and iOS.
1818

19-
| SDK version | React Native version |
20-
|-----------------|----------------------|
21-
| 4.1.x - current | 0.64.x |
22-
| 3.2.x - 4.0.x | 0.63.x |
23-
| 3.1.x | 0.62.x |
19+
| SDK version | React Native version |
20+
|----------------------------------|----------------------|
21+
| 4.1.x - current | 0.64.x |
22+
| 5.1.0 - current<br>3.2.x - 4.0.x | 0.63.x |
23+
| 3.1.x | 0.62.x |
2424

2525
Getting started
2626
---------------
@@ -50,7 +50,7 @@ About LaunchDarkly
5050
* Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
5151
* Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
5252
* Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
53-
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out [our documentation](https://docs.launchdarkly.com) for a complete list.
53+
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Read [our documentation](https://docs.launchdarkly.com/sdk) for a complete list.
5454
* Explore LaunchDarkly
5555
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
5656
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides

android/src/main/java/com/launchdarkly/reactnative/LaunchdarklyReactNativeClientModule.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ enum ConfigMapping {
7474
CONFIG_DIAGNOSTIC_OPT_OUT("diagnosticOptOut", ConfigEntryType.Boolean),
7575
CONFIG_DIAGNOSTIC_RECORDING_INTERVAL("diagnosticRecordingIntervalMillis", ConfigEntryType.Integer),
7676
CONFIG_SECONDARY_MOBILE_KEYS("secondaryMobileKeys", ConfigEntryType.Map),
77-
CONFIG_AUTO_ALIASING_OPT_OUT("autoAliasingOptOut", ConfigEntryType.Boolean);
77+
CONFIG_AUTO_ALIASING_OPT_OUT("autoAliasingOptOut", ConfigEntryType.Boolean),
78+
CONFIG_INLINE_USERS_IN_EVENTS("inlineUsersInEvents", ConfigEntryType.Boolean);
7879

7980
final String key;
8081
final ConfigEntryType type;

index.d.ts

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,22 @@ declare module 'launchdarkly-react-native-client-sdk' {
172172
* The default is false.
173173
*/
174174
allUserAttributesPrivate?: boolean;
175+
176+
/**
177+
* Whether to disable the automatic sending of an alias event when [[LDClient.identify]] is
178+
* called with a non-anonymous user when the previous user is anonymous.
179+
*
180+
* The default value is `false`.
181+
*/
182+
autoAliasingOptOut?: boolean;
183+
184+
/**
185+
* Whether to include full user details in every analytics event.
186+
*
187+
* The default is `false`: events will only include the user key, except for one "identify" event
188+
* that provides the full details for the user.
189+
*/
190+
inlineUsersInEvents?: boolean;
175191
};
176192

177193
/**
@@ -186,7 +202,7 @@ declare module 'launchdarkly-react-native-client-sdk' {
186202

187203
/**
188204
* The secondary key for the user. See the
189-
* [documentation](https://docs.launchdarkly.com/home/managing-flags/targeting-users#percentage-rollout-logic)
205+
* [documentation](https://docs.launchdarkly.com/home/flags/targeting-users#percentage-rollouts)
190206
* for more information on it's use for percentage rollout bucketing.
191207
*/
192208
secondary?: string;
@@ -660,12 +676,12 @@ declare module 'launchdarkly-react-native-client-sdk' {
660676
* the client has successfully connected to LaunchDarkly and received feature flags, or the
661677
* client has been put into offline mode (in which case it will return only default flag values).
662678
*
663-
* This function will return a rejected promise in case it has not been isInitialized.
679+
* This function will return a rejected promise in case the client has not been initialized.
664680
*
665681
* @param environment
666682
* Optional environment name to obtain the result from the corresponding secondary environment
667683
* @returns
668-
* A promise contianing true if the client is initialized or offline, otherwise a rejected promise
684+
* A promise containing true if the client is initialized or offline, otherwise a rejected promise
669685
*/
670686
isInitialized(environment?: string): Promise<boolean>;
671687

ios/LaunchdarklyReactNativeClient.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class LaunchdarklyReactNativeClient: RCTEventEmitter {
8989
configField(&ldConfig.diagnosticRecordingInterval, config["diagnosticRecordingIntervalMillis"], millis)
9090
configField(&ldConfig.allUserAttributesPrivate, config["allUserAttributesPrivate"], id)
9191
configField(&ldConfig.autoAliasingOptOut, config["autoAliasingOptOut"], id)
92+
configField(&ldConfig.inlineUserInEvents, config["inlineUsersInEvents"], id)
9293

9394
if let val = config["secondaryMobileKeys"] as? [String: String] {
9495
try! ldConfig.setSecondaryMobileKeys(val)

0 commit comments

Comments
 (0)