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

prepare 7.0.4 release #196

Merged
merged 20 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ buck-out/

# Auto-generated
test-types.js

.env
2 changes: 2 additions & 0 deletions ManualTestApp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ buck-out/

# CocoaPods
/ios/Pods/

.env
3 changes: 2 additions & 1 deletion ManualTestApp/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useState, useEffect, ReactNode } from 'react';
import { SafeAreaView, ScrollView, StyleSheet, Text, View, Button, TextInput, Alert, Switch } from 'react-native';
import { MOBILE_KEY } from '@env';
import { Picker } from '@react-native-picker/picker';
import LDClient, { LDMultiKindContext } from 'launchdarkly-react-native-client-sdk';
import MessageQueue from 'react-native/Libraries/BatchedBridge/MessageQueue';
Expand Down Expand Up @@ -29,7 +30,7 @@ const Body = () => {
async function initializeClient() {
let ldClient = new LDClient();
let config = {
mobileKey: 'MOBILE_KEY',
mobileKey: MOBILE_KEY,
debugMode: true,
application: {
id: 'rn-manual-test-app',
Expand Down
21 changes: 19 additions & 2 deletions ManualTestApp/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## Manual testing application
## Example app

Add your mobile key in `App.js`, `npx yarn install`, `npx pod-install`, `npx yarn run <android|ios>`.
To run the example app:

1. Create a `.env` file at the same level as this README
2. Add your mobile key to that `.env` file:

```shell
MOBILE_KEY=mob-xxx
```

3. Finally

```shell
# android
yarn && yarn android

# ios
yarn && npx pod-install && yarn ios
```
9 changes: 9 additions & 0 deletions ManualTestApp/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
[
'module:react-native-dotenv',
{
safe: true,
allowUndefined: false,
},
],
],
};
8 changes: 8 additions & 0 deletions ManualTestApp/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
* @format
*/

const crypto = require('crypto');
const fs = require('fs');

let hash = crypto.createHash('sha256');
hash.update(fs.readFileSync('.env'));
const cacheVersion = hash.digest('hex');

module.exports = {
transformer: {
getTransformOptions: async () => ({
Expand All @@ -14,4 +21,5 @@ module.exports = {
},
}),
},
cacheVersion,
};
16 changes: 11 additions & 5 deletions ManualTestApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"cc": "rimraf node_modules/.cache/babel-loader/*,",
"android": "yarn run cc && react-native run-android",
"ios": "yarn run cc && react-native run-ios",
"start": "yarn run cc && react-native start --reset-cache",
"postinstall": "cd ../ && yarn link-dev",
"lint": "eslint ."
},
Expand All @@ -16,8 +17,8 @@
"react-native": "0.70.7"
},
"devDependencies": {
"@babel/core": "^7.20.12",
"@babel/runtime": "^7.20.13",
"@babel/core": "^7.21.0",
"@babel/runtime": "^7.21.0",
"@react-native-community/eslint-config": "^3.2.0",
"@tsconfig/react-native": "2.0.3",
"@types/jest": "29.4.0",
Expand All @@ -26,7 +27,12 @@
"@types/react-test-renderer": "18.0.0",
"eslint": "^8.33.0",
"metro-react-native-babel-preset": "^0.75.0",
"react-native-dotenv": "^3.4.8",
"react-test-renderer": "^18.2.0",
"typescript": "4.9.5"
},
"resolutions": {
"@babel/core": "^7.21.0",
"babel-loader": "^9.1.2"
}
}
1 change: 1 addition & 0 deletions ManualTestApp/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "@tsconfig/react-native/tsconfig.json",
"typeRoots": ["./types"]
}
3 changes: 3 additions & 0 deletions ManualTestApp/types/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module '@env' {
export const MOBILE_KEY: string;
}
123 changes: 102 additions & 21 deletions ManualTestApp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# yarn lockfile v1


"@ampproject/remapping@^2.1.0":
"@ampproject/remapping@^2.2.0":
version "2.2.0"
resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d"
integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==
Expand All @@ -22,21 +22,21 @@
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.10.tgz#9d92fa81b87542fff50e848ed585b4212c1d34ec"
integrity sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg==

"@babel/core@^7.13.16", "@babel/core@^7.14.0", "@babel/core@^7.20.0", "@babel/core@^7.20.12":
version "7.20.12"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.12.tgz#7930db57443c6714ad216953d1356dac0eb8496d"
integrity sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==
"@babel/core@^7.13.16", "@babel/core@^7.14.0", "@babel/core@^7.20.0", "@babel/core@^7.21.0":
version "7.21.0"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.0.tgz#1341aefdcc14ccc7553fcc688dd8986a2daffc13"
integrity sha512-PuxUbxcW6ZYe656yL3EAhpy7qXKq0DmYsrJLpbB8XrsCP9Nm+XCg9XFMb5vIDliPD7+U/+M+QJlH17XOcB7eXA==
dependencies:
"@ampproject/remapping" "^2.1.0"
"@ampproject/remapping" "^2.2.0"
"@babel/code-frame" "^7.18.6"
"@babel/generator" "^7.20.7"
"@babel/generator" "^7.21.0"
"@babel/helper-compilation-targets" "^7.20.7"
"@babel/helper-module-transforms" "^7.20.11"
"@babel/helpers" "^7.20.7"
"@babel/parser" "^7.20.7"
"@babel/helper-module-transforms" "^7.21.0"
"@babel/helpers" "^7.21.0"
"@babel/parser" "^7.21.0"
"@babel/template" "^7.20.7"
"@babel/traverse" "^7.20.12"
"@babel/types" "^7.20.7"
"@babel/traverse" "^7.21.0"
"@babel/types" "^7.21.0"
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.2"
Expand All @@ -61,6 +61,16 @@
"@jridgewell/gen-mapping" "^0.3.2"
jsesc "^2.5.1"

"@babel/generator@^7.21.0", "@babel/generator@^7.21.1":
version "7.21.1"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.1.tgz#951cc626057bc0af2c35cd23e9c64d384dea83dd"
integrity sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA==
dependencies:
"@babel/types" "^7.21.0"
"@jridgewell/gen-mapping" "^0.3.2"
"@jridgewell/trace-mapping" "^0.3.17"
jsesc "^2.5.1"

"@babel/helper-annotate-as-pure@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb"
Expand Down Expand Up @@ -141,6 +151,14 @@
"@babel/template" "^7.18.10"
"@babel/types" "^7.19.0"

"@babel/helper-function-name@^7.21.0":
version "7.21.0"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4"
integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==
dependencies:
"@babel/template" "^7.20.7"
"@babel/types" "^7.21.0"

"@babel/helper-hoist-variables@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678"
Expand Down Expand Up @@ -176,6 +194,20 @@
"@babel/traverse" "^7.20.10"
"@babel/types" "^7.20.7"

"@babel/helper-module-transforms@^7.21.0":
version "7.21.2"
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz#160caafa4978ac8c00ac66636cb0fa37b024e2d2"
integrity sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==
dependencies:
"@babel/helper-environment-visitor" "^7.18.9"
"@babel/helper-module-imports" "^7.18.6"
"@babel/helper-simple-access" "^7.20.2"
"@babel/helper-split-export-declaration" "^7.18.6"
"@babel/helper-validator-identifier" "^7.19.1"
"@babel/template" "^7.20.7"
"@babel/traverse" "^7.21.2"
"@babel/types" "^7.21.2"

"@babel/helper-optimise-call-expression@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe"
Expand Down Expand Up @@ -256,14 +288,14 @@
"@babel/traverse" "^7.20.5"
"@babel/types" "^7.20.5"

"@babel/helpers@^7.20.7":
version "7.20.13"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.13.tgz#e3cb731fb70dc5337134cadc24cbbad31cc87ad2"
integrity sha512-nzJ0DWCL3gB5RCXbUO3KIMMsBY2Eqbx8mBpKGE/02PgyRQFcPQLbkQ1vyy596mZLaP+dAfD+R4ckASzNVmW3jg==
"@babel/helpers@^7.21.0":
version "7.21.0"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.0.tgz#9dd184fb5599862037917cdc9eecb84577dc4e7e"
integrity sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==
dependencies:
"@babel/template" "^7.20.7"
"@babel/traverse" "^7.20.13"
"@babel/types" "^7.20.7"
"@babel/traverse" "^7.21.0"
"@babel/types" "^7.21.0"

"@babel/highlight@^7.18.6":
version "7.18.6"
Expand All @@ -284,6 +316,11 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.13.tgz#ddf1eb5a813588d2fb1692b70c6fce75b945c088"
integrity sha512-gFDLKMfpiXCsjt4za2JA9oTMn70CeseCehb11kRZgvd7+F67Hih3OHOK24cRrWECJ/ljfPGac6ygXAs/C8kIvw==

"@babel/parser@^7.21.0", "@babel/parser@^7.21.2":
version "7.21.2"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.2.tgz#dacafadfc6d7654c3051a66d6fe55b6cb2f2a0b3"
integrity sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ==

"@babel/plugin-proposal-async-generator-functions@^7.0.0":
version "7.20.7"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz#bfb7276d2d573cb67ba379984a2334e262ba5326"
Expand Down Expand Up @@ -702,13 +739,20 @@
pirates "^4.0.5"
source-map-support "^0.5.16"

"@babel/runtime@^7.0.0", "@babel/runtime@^7.20.13":
"@babel/runtime@^7.0.0":
version "7.20.13"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.13.tgz#7055ab8a7cff2b8f6058bf6ae45ff84ad2aded4b"
integrity sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==
dependencies:
regenerator-runtime "^0.13.11"

"@babel/runtime@^7.21.0":
version "7.21.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673"
integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==
dependencies:
regenerator-runtime "^0.13.11"

"@babel/template@^7.0.0", "@babel/template@^7.18.10", "@babel/template@^7.20.7":
version "7.20.7"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8"
Expand All @@ -718,7 +762,7 @@
"@babel/parser" "^7.20.7"
"@babel/types" "^7.20.7"

"@babel/traverse@^7.14.0", "@babel/traverse@^7.20.10", "@babel/traverse@^7.20.12", "@babel/traverse@^7.20.13", "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.7.4":
"@babel/traverse@^7.14.0", "@babel/traverse@^7.20.10", "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.7.4":
version "7.20.13"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.13.tgz#817c1ba13d11accca89478bd5481b2d168d07473"
integrity sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==
Expand All @@ -734,6 +778,22 @@
debug "^4.1.0"
globals "^11.1.0"

"@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2":
version "7.21.2"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.2.tgz#ac7e1f27658750892e815e60ae90f382a46d8e75"
integrity sha512-ts5FFU/dSUPS13tv8XiEObDu9K+iagEKME9kAbaP7r0Y9KtZJZ+NGndDvWoRAYNpeWafbpFeki3q9QoMD6gxyw==
dependencies:
"@babel/code-frame" "^7.18.6"
"@babel/generator" "^7.21.1"
"@babel/helper-environment-visitor" "^7.18.9"
"@babel/helper-function-name" "^7.21.0"
"@babel/helper-hoist-variables" "^7.18.6"
"@babel/helper-split-export-declaration" "^7.18.6"
"@babel/parser" "^7.21.2"
"@babel/types" "^7.21.2"
debug "^4.1.0"
globals "^11.1.0"

"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7":
version "7.20.7"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.7.tgz#54ec75e252318423fc07fb644dc6a58a64c09b7f"
Expand All @@ -743,6 +803,15 @@
"@babel/helper-validator-identifier" "^7.19.1"
to-fast-properties "^2.0.0"

"@babel/types@^7.21.0", "@babel/types@^7.21.2":
version "7.21.2"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.2.tgz#92246f6e00f91755893c2876ad653db70c8310d1"
integrity sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==
dependencies:
"@babel/helper-string-parser" "^7.19.4"
"@babel/helper-validator-identifier" "^7.19.1"
to-fast-properties "^2.0.0"

"@eslint/eslintrc@^1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e"
Expand Down Expand Up @@ -876,7 +945,7 @@
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24"
integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==

"@jridgewell/trace-mapping@^0.3.9":
"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9":
version "0.3.17"
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985"
integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==
Expand Down Expand Up @@ -2111,6 +2180,11 @@ doctrine@^3.0.0:
dependencies:
esutils "^2.0.2"

dotenv@^16.0.3:
version "16.0.3"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07"
integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==

ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
Expand Down Expand Up @@ -4621,6 +4695,13 @@ react-native-codegen@^0.70.6:
jscodeshift "^0.13.1"
nullthrows "^1.1.1"

react-native-dotenv@^3.4.8:
version "3.4.8"
resolved "https://registry.yarnpkg.com/react-native-dotenv/-/react-native-dotenv-3.4.8.tgz#42284070a9994076cd700805c2dd28051c9e1432"
integrity sha512-fg9F8X/cG1kDTwRLgLz3t+AMbsULoFHbUVltdQarmrJ3kNllD1Zq7ZgY85bp8BnPwk0DnYQzKbooiLsUoKd10w==
dependencies:
dotenv "^16.0.3"

react-native-gradle-plugin@^0.70.3:
version "0.70.3"
resolved "https://registry.yarnpkg.com/react-native-gradle-plugin/-/react-native-gradle-plugin-0.70.3.tgz#cbcf0619cbfbddaa9128701aa2d7b4145f9c4fc8"
Expand Down
2 changes: 1 addition & 1 deletion modd-android.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
android/src/main/**/* index.js src/**/* ManualTestApp/App.js {
android/src/main/**/* index.js src/**/* ManualTestApp/**/*.ts* ManualTestApp/.env {
prep: rsync -av android ManualTestApp/node_modules/launchdarkly-react-native-client-sdk --exclude .gradle --exclude .idea --exclude gradle --exclude src/test
prep: rsync -av src ManualTestApp/node_modules/launchdarkly-react-native-client-sdk
prep: rsync -aq index.js ManualTestApp/node_modules/launchdarkly-react-native-client-sdk
Expand Down
2 changes: 1 addition & 1 deletion modd-ios.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ios/LaunchdarklyReactNativeClient.swift index.js src/**/* ManualTestApp/App.js {
ios/LaunchdarklyReactNativeClient.swift index.js src/**/* ManualTestApp/**/*.ts* ManualTestApp/.env {
prep: rsync -av ios ManualTestApp/node_modules/launchdarkly-react-native-client-sdk --exclude LaunchdarklyReactNativeClient.xcworkspace --exclude build --exclude Pods --exclude Tests --exclude Podfile --exclude Podfile.lock
prep: rsync -av src ManualTestApp/node_modules/launchdarkly-react-native-client-sdk
prep: rsync -aq index.js ManualTestApp/node_modules/launchdarkly-react-native-client-sdk
Expand Down
2 changes: 1 addition & 1 deletion modd.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
android/src/main/**/* ios/LaunchdarklyReactNativeClient.swift index.js src/**/* ManualTestApp/App.js {
android/src/main/**/* ios/LaunchdarklyReactNativeClient.swift index.js src/**/* ManualTestApp/**/*.ts* ManualTestApp/.env {
prep: rsync -av android ManualTestApp/node_modules/launchdarkly-react-native-client-sdk --exclude .gradle --exclude build --exclude .idea --exclude gradle --exclude src/test
prep: rsync -av ios ManualTestApp/node_modules/launchdarkly-react-native-client-sdk --exclude LaunchdarklyReactNativeClient.xcworkspace --exclude build --exclude Pods --exclude Tests --exclude Podfile --exclude Podfile.lock
prep: rsync -av src ManualTestApp/node_modules/launchdarkly-react-native-client-sdk
Expand Down
Loading