Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Support react-native auto env #354

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e5507e4
chore: Added LDAutoEnv and modified LDContext to include that. Add th…
yusinto Jan 4, 2024
7a151e9
chore: Renamed ldAutoEnv to just autoEnv.
yusinto Jan 4, 2024
393f68b
chore: add autoEnv to internal Context class.
yusinto Jan 4, 2024
0f1700c
chore: Add skeletal rn autoEnv code.
yusinto Jan 4, 2024
7bf8e04
Update createAutoEnv.ts
yusinto Jan 5, 2024
46f1aa5
Merge branch 'main' into yus/sc-228043/rn-sdk-add-support-for-auto-en…
yusinto Jan 14, 2024
8917681
chore: move autoEnv to platform.info.
yusinto Jan 14, 2024
a36749c
chore: rename createAutoEnv to reconstruct.
yusinto Jan 14, 2024
0c5e20e
chore: Added react-native-device-info. Populated autoEnv attributes.
yusinto Jan 14, 2024
e7bff67
chore: Added react-native-localize. TODO: dev-info and localize packa…
yusinto Jan 14, 2024
00add5e
chore: Conditionally import device-info and localize packages. Refact…
yusinto Jan 15, 2024
f17be6b
chore: Removed 3rd party packages. Added locale.
yusinto Jan 15, 2024
d8609b5
chore: Add manufacturer and model.
yusinto Jan 15, 2024
3a7c733
chore: remove iosDeviceSelector.
yusinto Jan 15, 2024
0ba37cb
chore: moved dotenv in example app to dep. Removed redundant applicat…
yusinto Jan 16, 2024
bf843c4
chore: Simplify auto env by using application and device directly. Re…
yusinto Jan 19, 2024
bf972c7
chore: fix react native jest failures due to native dependencies re a…
yusinto Jan 19, 2024
84ec920
chore: clean up jest config, remove babel-jest dep.
yusinto Jan 19, 2024
27210ec
Merge branch 'main' into yus/sc-228043/rn-sdk-add-support-for-auto-en…
yusinto Jan 19, 2024
9f27fb3
chore: Inject context with autoEnv. Revert multikind interface change…
yusinto Jan 19, 2024
c3883a3
chore: Refactored internal inject functions.
yusinto Jan 19, 2024
cf67b77
chore: Improved mocks so crypto is more easily testable.
yusinto Jan 22, 2024
990cd5d
chore: Replace null coaslescence with falsy checks for empty strings.
yusinto Jan 22, 2024
ac612b6
chore: Removed CryptoWithHash. Added hasher to exports.
yusinto Jan 22, 2024
06cf961
chore: Improve mocks setup. Added readme instructions for mocks. Remo…
yusinto Jan 22, 2024
d39b47f
chore: Fixed eslint require complaint.
yusinto Jan 22, 2024
89cddc2
chore: Replace deprecated toBeCalledTimes with toHaveBeenCalledTimes.…
yusinto Jan 22, 2024
00090a7
chore: minor fixes related to previous mocks api changes.
yusinto Jan 22, 2024
419f793
chore: Added autoEnvAttributes config option. Fixed unit tests.
yusinto Jan 22, 2024
3f5b0f2
chore: Added more tests.
yusinto Jan 22, 2024
000687b
chore: Added more auto env tests and fixed related bugs. Changed mock…
yusinto Jan 23, 2024
ac33706
chore: replace the word inject with add to avoid confusion with DI.
yusinto Jan 23, 2024
b9bd289
chore: More auto env tests.
yusinto Jan 23, 2024
1a71637
chore: improve platform.crypto error messages.
yusinto Jan 23, 2024
5a78540
chore: Added third party sha library. Implemented rn crypto. Created …
yusinto Jan 24, 2024
8a9298f
chore: fix typescript build to ignore jest files and include js fromE…
yusinto Jan 24, 2024
cf1b4c8
fix: PlatformHasher incorrectly throws error after construction. Remo…
yusinto Jan 24, 2024
5ce5e45
chore: Added hasher tests. Improve unsupported encoding error message.
yusinto Jan 24, 2024
e71e131
Update README.md
yusinto Jan 24, 2024
b440dc3
chore: Fixed linting errors.
yusinto Jan 24, 2024
07abdea
chore: Run setup mocks for common.
yusinto Jan 24, 2024
b8a6f7b
chore: Fix common tests.
yusinto Jan 24, 2024
8e6a25e
chore: Improve mocks readme. Improve destructuring syntax.
yusinto Jan 24, 2024
28983fd
chore: Add jest to example app for detox to work.
yusinto Jan 24, 2024
6a4604f
Update autoEnv.ts
yusinto Jan 24, 2024
8e2382e
chore: Revert test data to look less real.
yusinto Jan 25, 2024
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: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
project: './tsconfig.eslint.json',
},
plugins: ['@typescript-eslint', 'prettier'],
ignorePatterns: ['**/dist/**', '**/vercel/examples/**'],
ignorePatterns: ['**/dist/**', '**/vercel/examples/**', '**/fromExternal/**'],
rules: {
'@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/no-unused-vars': [
Expand Down
3 changes: 3 additions & 0 deletions packages/sdk/react-native/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
};
5 changes: 3 additions & 2 deletions packages/sdk/react-native/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"expo-splash-screen": "~0.20.5",
"expo-status-bar": "~1.7.1",
"react": "18.2.0",
"react-native": "0.72.6"
"react-native": "0.72.6",
"react-native-dotenv": "^3.4.9"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand All @@ -37,7 +38,7 @@
"@types/react": "~18.2.14",
"@types/react-native-dotenv": "^0.2.1",
"detox": "^20.14.7",
"react-native-dotenv": "^3.4.9",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2"
}
Expand Down
Loading