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

prepare 5.0.0 release #87

Merged
merged 41 commits into from
Aug 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
67fb5ce
Removed the guides link
bwoskow-ld Feb 3, 2021
b6a113c
V4.0 (#68)
torchhound Apr 1, 2021
a193441
merge from public after release
LaunchDarklyCI Apr 1, 2021
510e581
Update iOS SDK dependency to fix Throttler behavior (#69)
torchhound Apr 7, 2021
0afc773
merge from public after release
LaunchDarklyCI Apr 7, 2021
9df202f
V4.1.0 (#72)
torchhound Apr 14, 2021
17e2d75
merge from public after release
LaunchDarklyCI Apr 14, 2021
35b61e1
Fixed jsonVariationDetail parsing on Android and fixed a typo in json…
torchhound Apr 16, 2021
fceade3
Merge branch 'master' of github.com:launchdarkly/react-native-client-sdk
bwoskow-ld Apr 23, 2021
82ba5fe
Releasing version 4.0.2
bwoskow-ld Apr 23, 2021
5489162
Merge branch 'v4.0.x-squashed' of github.com:launchdarkly/react-nativ…
bwoskow-ld Apr 23, 2021
ccc28c3
Merge branch 'master' of github.com:launchdarkly/react-native-client-sdk
bwoskow-ld Apr 24, 2021
c4a2891
Merge branch 'master' of github.com:launchdarkly/react-native-client-sdk
bwoskow-ld Apr 24, 2021
cae667b
Removes Typescript enums and replaces them with types that extend str…
torchhound Apr 28, 2021
f975de3
Releasing version 4.0.3
bwoskow-ld Apr 28, 2021
881c2fb
Merge branch 'v4.0.x-squashed'
bwoskow-ld Apr 28, 2021
b23e1c0
Merge branch 'master' of github.com:launchdarkly/react-native-client-…
bwoskow-ld Apr 28, 2021
c261c78
Merge branch 'master' of github.com:launchdarkly/react-native-client-sdk
bwoskow-ld Apr 28, 2021
5ad0499
Multi Environment (#65)
torchhound May 11, 2021
4ca1a1f
Add secondary user attribute (#76)
torchhound May 11, 2021
4a9530e
Merge branch 'master' of github.com:launchdarkly/react-native-client-sdk
bwoskow-ld May 11, 2021
81ae48d
Fix multi environment on restwrapper (#77)
torchhound May 19, 2021
0029ba5
merge from public after release
LaunchDarklyCI May 19, 2021
83640b7
[ch109800] Await Android client initialization. (#78)
gwhelanLD May 28, 2021
2668c2a
Update iOS method signature to match implementation (#79)
bwoskow-ld Jun 1, 2021
9703765
Merge remote-tracking branch 'public/master'
gwhelanLD Jun 1, 2021
b1a94ca
merge from public after release
LaunchDarklyCI Jun 1, 2021
8399a02
Releasing version 4.0.4
bwoskow-ld Jun 2, 2021
14c3993
Merge tag '4.0.4'
bwoskow-ld Jun 2, 2021
4d003c0
[ch110474] Fixes for undeclared variables and other callback issues. …
gwhelanLD Jun 15, 2021
36516d0
Merge remote-tracking branch 'public/master'
gwhelanLD Jun 15, 2021
093d62d
Changes for Android 3. (#82)
gwhelanLD Jun 15, 2021
894de0f
Add unit tests for JS native bridge wrapper. (#83)
gwhelanLD Jun 16, 2021
3da41af
Docs improvements (#84)
gwhelanLD Jun 16, 2021
493d554
[ch94513] Add aliasing support (#85)
gwhelanLD Jun 16, 2021
a735bab
Requiring default values to be specified. Remove intVariation. (#86)
gwhelanLD Jun 29, 2021
0364d51
Safer and cleaner configuration on iOS (#87)
gwhelanLD Jul 1, 2021
eb1aecb
Cleanup Android variation implementation (#88)
gwhelanLD Jul 1, 2021
9f8dbc9
Merge remote-tracking branch 'public/master'
gwhelanLD Aug 19, 2021
cbad402
Use latest iOS and Android SDKs (#89)
gwhelanLD Aug 19, 2021
f0ade3f
Fix issue with numeric variation calls. (#90)
gwhelanLD Aug 20, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

19 changes: 16 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,30 @@ jobs:

common:
docker:
- image: circleci/node:11.10.1
- image: cimg/node:current
steps:
- checkout

- run: npm install
- run: mkdir -p reports/jest
- run:
command: npm run test:junit
environment:
JEST_JUNIT_OUTPUT_DIR: "./reports/jest"

- run: npm run check-typescript

- store_test_results:
path: reports

workflows:
version: 2
android-ios:
jobs:
- android
- ios
- common
- android:
requires:
- common
- ios:
requires:
- common
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ All notable changes to the LaunchDarkly React Native SDK will be documented in t
### Fixed:
- Correct usages of undeclared variables when registering or un-registering connection mode or all flags listeners. ([#82](https://github.com/launchdarkly/react-native-client-sdk/issues/82))


## [4.0.4] - 2021-06-02
### Fixed:
- iOS: Fixed an issue where an exception was thrown when calling `LDClient.configure` with an optional `timeout` ([#80](https://github.com/launchdarkly/react-native-client-sdk/issues/80)).
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
LaunchDarkly Client-Side SDK for React Native
===========================

[![CircleCI](https://circleci.com/gh/launchdarkly/react-native-client-sdk.svg?style=svg)](https://circleci.com/gh/launchdarkly/react-native-client-sdk)
[![NPM](https://img.shields.io/npm/v/launchdarkly-react-native-client-sdk.svg)](https://www.npmjs.com/package/launchdarkly-react-native-client-sdk)
[![CircleCI](https://circleci.com/gh/launchdarkly/react-native-client-sdk.svg?style=shield)](https://circleci.com/gh/launchdarkly/react-native-client-sdk)
[![Documentation](https://img.shields.io/static/v1?label=GitHub+Pages&message=API+reference&color=00add8)](https://launchdarkly.github.io/react-native-client-sdk)

LaunchDarkly overview
-------------------------
Expand All @@ -23,12 +25,12 @@ This SDK is currently compatible with React Native 0.64.x and Xcode 12 and is te
Getting started
---------------

Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/client-side/react-native#getting-started) for instructions on getting started with using the SDK.
Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/client-side/react/react-native#getting-started) for instructions on getting started with using the SDK.

Learn more
-----------

Check out our [documentation](https://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/client-side/react-native).
Check out our [documentation](https://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/client-side/react/react-native).

Testing
-------
Expand Down
84 changes: 84 additions & 0 deletions __mocks__/native.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
const mockNativeModule = {
FLAG_PREFIX: "test-flag-prefix",
ALL_FLAGS_PREFIX: "test-all-flags-prefix",
CONNECTION_MODE_PREFIX: "test-connection-mode-prefix",

configure: jest.fn(),
configureWithTimeout: jest.fn(),

boolVariation: jest.fn(),
boolVariationDefaultValue: jest.fn(),
numberVariation: jest.fn(),
numberVariationDefaultValue: jest.fn(),
stringVariation: jest.fn(),
stringVariationDefaultValue: jest.fn(),
jsonVariationNone: jest.fn(),
jsonVariationNumber: jest.fn(),
jsonVariationBool: jest.fn(),
jsonVariationString: jest.fn(),
jsonVariationArray: jest.fn(),
jsonVariationObject: jest.fn(),

boolVariationDetail: jest.fn(),
boolVariationDetailDefaultValue: jest.fn(),
numberVariationDetail: jest.fn(),
numberVariationDetailDefaultValue: jest.fn(),
stringVariationDetail: jest.fn(),
stringVariationDetailDefaultValue: jest.fn(),
jsonVariationDetailNone: jest.fn(),
jsonVariationDetailNumber: jest.fn(),
jsonVariationDetailBool: jest.fn(),
jsonVariationDetailString: jest.fn(),
jsonVariationDetailArray: jest.fn(),
jsonVariationDetailObject: jest.fn(),

allFlags: jest.fn(),

trackNumber: jest.fn(),
trackBool: jest.fn(),
trackString: jest.fn(),
trackArray: jest.fn(),
trackObject: jest.fn(),
track: jest.fn(),

trackNumberMetricValue: jest.fn(),
trackBoolMetricValue: jest.fn(),
trackStringMetricValue: jest.fn(),
trackArrayMetricValue: jest.fn(),
trackObjectMetricValue: jest.fn(),
trackMetricValue: jest.fn(),

setOffline: jest.fn(),
isOffline: jest.fn(),
setOnline: jest.fn(),
isInitialized: jest.fn(),
flush: jest.fn(),
close: jest.fn(),
identify: jest.fn(),
alias: jest.fn(),
getConnectionMode: jest.fn(),
getLastSuccessfulConnection: jest.fn(),
getLastFailedConnection: jest.fn(),
getLastFailure: jest.fn(),

registerFeatureFlagListener: jest.fn(),
unregisterFeatureFlagListener: jest.fn(),
registerCurrentConnectionModeListener: jest.fn(),
unregisterCurrentConnectionModeListener: jest.fn(),
registerAllFlagsListener: jest.fn(),
unregisterAllFlagsListener: jest.fn()
};

jest.mock('react-native',
() => {
return {
NativeModules: {
LaunchdarklyReactNativeClient: mockNativeModule
},
NativeEventEmitter: jest.fn().mockImplementation(() => {
return { addListener: jest.fn() };
})
}
},
{ virtual: true }
);
19 changes: 11 additions & 8 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

buildscript {
ext {
buildToolsVersion = "28.0.2"
minSdkVersion = 16
minSdkVersion = 21
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
Expand All @@ -13,7 +12,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:4.1.3'
}
}

Expand All @@ -24,14 +23,18 @@ android {
buildToolsVersion "28.0.3"

defaultConfig {
minSdkVersion 16
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

allprojects {
Expand All @@ -48,9 +51,9 @@ allprojects {
}

dependencies {
implementation 'com.facebook.react:react-native:+'
implementation 'com.launchdarkly:launchdarkly-android-client-sdk:2.14.1'
implementation 'com.jakewharton.timber:timber:4.7.1'
implementation "com.google.code.gson:gson:2.8.5"
implementation("com.facebook.react:react-native:+")
implementation("com.launchdarkly:launchdarkly-android-client-sdk:3.1.0")
implementation("com.jakewharton.timber:timber:4.7.1")
implementation("com.google.code.gson:gson:2.8.6")
}

1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
android.useAndroidX=true
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
Loading