From fc7042b4422aa82b405e86f8c1237134aa2969ff Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Wed, 7 Jul 2021 10:23:48 +0300 Subject: [PATCH 1/5] chore: switch async-storage repository --- package-lock.json | 37 ++++++++++++++++++------------------- package.json | 4 ++-- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6227b8309940..5fabfb395cdb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5270,10 +5270,10 @@ "react-lifecycles-compat": "^3.0.4" } }, - "@react-native-community/async-storage": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@react-native-community/async-storage/-/async-storage-1.12.1.tgz", - "integrity": "sha512-70WGaH3PKYASi4BThuEEKMkyAgE9k7VytBqmgPRx3MzJx9/MkspwqJGmn3QLCgHLIFUgF1pit2mWICbRJ3T3lg==", + "@react-native-async-storage/async-storage": { + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.15.5.tgz", + "integrity": "sha512-4AYehLH39B9a8UXCMf3ieOK+G61wGMP72ikx6/XSMA0DUnvx0PgaeaT2Wyt06kTrDTy8edewKnbrbeqwaM50TQ==", "requires": { "deep-assign": "^3.0.0" } @@ -14054,9 +14054,9 @@ "dev": true }, "appdirsjs": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/appdirsjs/-/appdirsjs-1.2.4.tgz", - "integrity": "sha512-WO5StDORR6JF/xYnXk/Fm0yu+iULaV5ULKuUw0Tu+jbgiTlSquaWBCgbpnsHLMXldf+fM3Gxn5p7vjond7He6w==" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/appdirsjs/-/appdirsjs-1.2.5.tgz", + "integrity": "sha512-UyaAyzj+7XLoKhbXJi4zoAw8IDXCiLNCKfQEiuCsCCTkDmiG1vpCliQn/MoUvO3DZqCN1i6gOahokcFtNSIrVA==" }, "aproba": { "version": "1.2.0", @@ -27391,9 +27391,9 @@ "integrity": "sha512-sqKVVVOe5ivCaXDWivIJYVSaEgdQK9ul7a4Kity5Iw7u9+wBAPbX1RMSnLLmp7O4Vzj0WOWwMAJsTL00xwaNug==" }, "@hapi/topo": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.0.0.tgz", - "integrity": "sha512-tFJlT47db0kMqVm3H4nQYgn6Pwg10GTZHb1pwmSiv1K4ks6drQOtfEF5ZnPjkvC+y4/bUPHK+bc87QvLcL+WMw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", "requires": { "@hapi/hoek": "^9.0.0" } @@ -32765,9 +32765,9 @@ }, "dependencies": { "ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.2.tgz", + "integrity": "sha512-lkF7AWRicoB9mAgjeKbGqVUekLnSNO4VjKVnuPHpQeOxZOErX6BPXwJk70nFslRCEEA8EVW7ZjKwXaP9N+1sKQ==" } } }, @@ -33868,10 +33868,9 @@ } }, "react-native-onyx": { - "version": "git+https://github.com/Expensify/react-native-onyx.git#1e82e592032c6d0ede8e40f08beb6be790d149e8", - "from": "git+https://github.com/Expensify/react-native-onyx.git#1e82e592032c6d0ede8e40f08beb6be790d149e8", + "version": "git+https://github.com/kidroca/react-native-onyx.git#064748fdc6ceef7c9ffe8c5fa62a30ef234aae2a", + "from": "git+https://github.com/kidroca/react-native-onyx.git#064748fdc6ceef7c9ffe8c5fa62a30ef234aae2a", "requires": { - "@react-native-community/async-storage": "^1.12.1", "expensify-common": "git+https://github.com/Expensify/expensify-common.git#2e5cff552cf132da90a3fb9756e6b4fb6ae7b40c", "lodash": "4.17.21", "react": "^16.13.1", @@ -34721,9 +34720,9 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" } } }, diff --git a/package.json b/package.json index f68cb246d289..856324c33222 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@formatjs/intl-numberformat": "^6.2.5", "@formatjs/intl-pluralrules": "^4.0.13", "@onfido/react-native-sdk": "^1.3.3", - "@react-native-community/async-storage": "^1.11.0", + "@react-native-async-storage/async-storage": "^1.15.5", "@react-native-community/cli": "4.13.1", "@react-native-community/clipboard": "^1.5.1", "@react-native-community/netinfo": "^5.9.10", @@ -80,7 +80,7 @@ "react-native-image-picker": "^4.0.3", "react-native-keyboard-spacer": "^0.4.1", "react-native-modal": "^11.10.0", - "react-native-onyx": "git+https://github.com/Expensify/react-native-onyx.git#1e82e592032c6d0ede8e40f08beb6be790d149e8", + "react-native-onyx": "git+https://github.com/kidroca/react-native-onyx.git#064748fdc6ceef7c9ffe8c5fa62a30ef234aae2a", "react-native-pdf": "^6.2.2", "react-native-permissions": "^3.0.1", "react-native-picker-select": "8.0.4", From a95ad0c8517603a91a3177df1f2ec5004c000207 Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Wed, 7 Jul 2021 10:24:40 +0300 Subject: [PATCH 2/5] chore: update settings.gradle --- android/settings.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/android/settings.gradle b/android/settings.gradle index 6c80854e3c32..817ae16ccccb 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,8 +1,6 @@ rootProject.name = 'ExpensifyCash' include ':react-native-config' project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android') -include ':@react-native-community_async-storage' -project(':@react-native-community_async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/async-storage/android') apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app' include ':react-native-plaid-link-sdk' From dc585e0e3c1a6b88b5f7014e9b075df5e7673c95 Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Wed, 7 Jul 2021 10:25:15 +0300 Subject: [PATCH 3/5] feat: enable AsyncStorage_useNextStorage --- android/build.gradle | 2 ++ android/gradle.properties | 1 + 2 files changed, 3 insertions(+) diff --git a/android/build.gradle b/android/build.gradle index f336c55df1d8..25095cac7187 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -9,6 +9,7 @@ buildscript { androidXCore = "1.0.2" multiDexEnabled = true googlePlayServicesVersion = "17.0.0" + kotlinVersion = '1.4.21' } repositories { google() @@ -20,6 +21,7 @@ buildscript { classpath("com.google.firebase:firebase-crashlytics-gradle:2.3.0") // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" } } diff --git a/android/gradle.properties b/android/gradle.properties index 54aea006a84f..75c02e4558b3 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -26,6 +26,7 @@ android.enableJetifier=true # Increase storage capacity (the default is 6 MB) AsyncStorage_db_size_in_MB=10 +AsyncStorage_useNextStorage=true # Version of flipper SDK to use with React Native FLIPPER_VERSION=0.54.0 From 857f4874b4018a082ce9536c399845ace8eabc4e Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Wed, 7 Jul 2021 14:28:19 +0300 Subject: [PATCH 4/5] test: update @react-native-async-storage references in tests --- __mocks__/@react-native-async-storage/async-storage.js | 1 + __mocks__/@react-native-community/async-storage.js | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 __mocks__/@react-native-async-storage/async-storage.js delete mode 100644 __mocks__/@react-native-community/async-storage.js diff --git a/__mocks__/@react-native-async-storage/async-storage.js b/__mocks__/@react-native-async-storage/async-storage.js new file mode 100644 index 000000000000..1051fa919c94 --- /dev/null +++ b/__mocks__/@react-native-async-storage/async-storage.js @@ -0,0 +1 @@ +export {default} from '@react-native-async-storage/async-storage/jest/async-storage-mock'; diff --git a/__mocks__/@react-native-community/async-storage.js b/__mocks__/@react-native-community/async-storage.js deleted file mode 100644 index dc59da3da357..000000000000 --- a/__mocks__/@react-native-community/async-storage.js +++ /dev/null @@ -1 +0,0 @@ -export {default} from '@react-native-community/async-storage/jest/async-storage-mock'; From 409c23cd8f391f487bb412ebf14eef52612dccbc Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Fri, 9 Jul 2021 17:13:21 +0300 Subject: [PATCH 5/5] chore: update react-native-onyx hash --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5fabfb395cdb..0e4b3578f9d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33868,8 +33868,8 @@ } }, "react-native-onyx": { - "version": "git+https://github.com/kidroca/react-native-onyx.git#064748fdc6ceef7c9ffe8c5fa62a30ef234aae2a", - "from": "git+https://github.com/kidroca/react-native-onyx.git#064748fdc6ceef7c9ffe8c5fa62a30ef234aae2a", + "version": "git+https://github.com/Expensify/react-native-onyx.git#84a27cdd03a39baa167058efc3379d9a477849dd", + "from": "git+https://github.com/Expensify/react-native-onyx.git#84a27cdd03a39baa167058efc3379d9a477849dd", "requires": { "expensify-common": "git+https://github.com/Expensify/expensify-common.git#2e5cff552cf132da90a3fb9756e6b4fb6ae7b40c", "lodash": "4.17.21", diff --git a/package.json b/package.json index 856324c33222..e93581bcca5a 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "react-native-image-picker": "^4.0.3", "react-native-keyboard-spacer": "^0.4.1", "react-native-modal": "^11.10.0", - "react-native-onyx": "git+https://github.com/kidroca/react-native-onyx.git#064748fdc6ceef7c9ffe8c5fa62a30ef234aae2a", + "react-native-onyx": "git+https://github.com/Expensify/react-native-onyx.git#84a27cdd03a39baa167058efc3379d9a477849dd", "react-native-pdf": "^6.2.2", "react-native-permissions": "^3.0.1", "react-native-picker-select": "8.0.4",