diff --git a/.flowconfig b/.flowconfig index 64c1809a062..3b6981f17ac 100644 --- a/.flowconfig +++ b/.flowconfig @@ -53,7 +53,7 @@ node_modules/react-native/flow/ ; their autogenerated versions in flow-typed/npm. (Contrast commit 6219e5a23, ; where the opposite behavior is exhibited!) flow-typed/@sentry/react-native_v1.x.x.js -flow-typed/@react-native-community/async-storage_v1.x.x.js +flow-typed/@react-native-async-storage/async-storage_v1.x.x.js flow-typed/react-native-url-polyfill_vx.x.x.js flow-typed/expo-screen-orientation_vx.x.x.js diff --git a/flow-typed/@react-native-community/async-storage_v1.x.x.js b/flow-typed/@react-native-async-storage/async-storage_v1.x.x.js similarity index 83% rename from flow-typed/@react-native-community/async-storage_v1.x.x.js rename to flow-typed/@react-native-async-storage/async-storage_v1.x.x.js index dad446879b2..01bec5d028a 100644 --- a/flow-typed/@react-native-community/async-storage_v1.x.x.js +++ b/flow-typed/@react-native-async-storage/async-storage_v1.x.x.js @@ -1,7 +1,7 @@ // All definitions taken directly from: -// @react-native-community/async-storage/lib/AsyncStorage.js +// @react-native-async-storage/async-storage/lib/AsyncStorage.js -declare module '@react-native-community/async-storage' { +declare module '@react-native-async-storage/async-storage' { declare type ReadOnlyArrayString = $ReadOnlyArray; declare export default { diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 3d7f29edd85..7a1b5bac5e3 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -336,7 +336,7 @@ PODS: - React-jsi (= 0.63.4) - rn-fetch-blob (0.11.2): - React-Core - - RNCAsyncStorage (1.12.1): + - RNCAsyncStorage (1.13.0): - React-Core - RNCMaskedView (0.1.11): - React @@ -447,7 +447,7 @@ DEPENDENCIES: - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - rn-fetch-blob (from `../node_modules/rn-fetch-blob`) - - "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)" + - "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)" - "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)" - "RNCPushNotificationIOS (from `../node_modules/@react-native-community/push-notification-ios`)" - RNDeviceInfo (from `../node_modules/react-native-device-info`) @@ -574,7 +574,7 @@ EXTERNAL SOURCES: rn-fetch-blob: :path: "../node_modules/rn-fetch-blob" RNCAsyncStorage: - :path: "../node_modules/@react-native-community/async-storage" + :path: "../node_modules/@react-native-async-storage/async-storage" RNCMaskedView: :path: "../node_modules/@react-native-community/masked-view" RNCPushNotificationIOS: @@ -674,7 +674,7 @@ SPEC CHECKSUMS: React-RCTVibration: ae4f914cfe8de7d4de95ae1ea6cc8f6315d73d9d ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b rn-fetch-blob: f525a73a78df9ed5d35e67ea65e79d53c15255bc - RNCAsyncStorage: b03032fdbdb725bea0bd9e5ec5a7272865ae7398 + RNCAsyncStorage: a52e45079e7df6cee380be6af676a8441d38c42a RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489 RNCPushNotificationIOS: 61a7c72bd1ebad3568025957d001e0f0e7b32191 RNDeviceInfo: 9b6aba9ffaed69ecb72bd13c7bcb0debf277bc9f diff --git a/jest.config.js b/jest.config.js index 2d871c11a69..3081c4a9456 100644 --- a/jest.config.js +++ b/jest.config.js @@ -8,7 +8,7 @@ const transformModulesWhitelist = [ 'expo-web-browser', 'react-native', // @rnc/async-storage itself is precompiled, but its mock-helper is not - '@react-native-community/async-storage', + '@react-native-async-storage/async-storage', '@react-native-community/cameraroll', '@react-native-community/push-notification-ios', '@expo/react-native-action-sheet', diff --git a/jest/jestSetup.js b/jest/jestSetup.js index c0621217aad..f1e0e361a27 100644 --- a/jest/jestSetup.js +++ b/jest/jestSetup.js @@ -4,7 +4,7 @@ import * as ReactNative from 'react-native'; import { polyfillGlobal } from 'react-native/Libraries/Utilities/PolyfillFunctions'; import { URL, URLSearchParams } from 'react-native-url-polyfill'; // $FlowIgnore[untyped-import] - this is not anywhere near critical -import mockAsyncStorage from '@react-native-community/async-storage/jest/async-storage-mock'; +import mockAsyncStorage from '@react-native-async-storage/async-storage/jest/async-storage-mock'; // Use the same `URL` polyfill we do in the app. // @@ -91,7 +91,7 @@ jest.mock('react-native-reanimated', () => { return Reanimated; }); -jest.mock('@react-native-community/async-storage', () => mockAsyncStorage); +jest.mock('@react-native-async-storage/async-storage', () => mockAsyncStorage); // Without this, we get lots of these errors on importing the module: // `Invariant Violation: Native module cannot be null.` diff --git a/package.json b/package.json index ed99d130cfd..5f75801ffc0 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "dependencies": { "@expo/react-native-action-sheet": "^3.8.0", - "@react-native-community/async-storage": "^1.6.3", + "@react-native-async-storage/async-storage": "1.13.0", "@react-native-community/cameraroll": "^4.0.4", "@react-native-community/masked-view": "^0.1.10", "@react-native-community/netinfo": "^5.9.5", diff --git a/src/boot/ZulipAsyncStorage.js b/src/boot/ZulipAsyncStorage.js index fb92672eac1..30d7b2c9d52 100644 --- a/src/boot/ZulipAsyncStorage.js +++ b/src/boot/ZulipAsyncStorage.js @@ -1,5 +1,5 @@ /* @flow strict-local */ -import AsyncStorage from '@react-native-community/async-storage'; +import AsyncStorage from '@react-native-async-storage/async-storage'; import { NativeModules } from 'react-native'; import * as logging from '../utils/logging'; diff --git a/src/boot/__tests__/ZulipAsyncStorage-test.js b/src/boot/__tests__/ZulipAsyncStorage-test.js index 3b8684474a6..d66139d6271 100644 --- a/src/boot/__tests__/ZulipAsyncStorage-test.js +++ b/src/boot/__tests__/ZulipAsyncStorage-test.js @@ -1,6 +1,6 @@ /* @flow strict-local */ import { Platform, NativeModules } from 'react-native'; -import AsyncStorage from '@react-native-community/async-storage'; +import AsyncStorage from '@react-native-async-storage/async-storage'; import ZulipAsyncStorage from '../ZulipAsyncStorage'; import * as logging from '../../utils/logging'; import * as eg from '../../__tests__/lib/exampleData'; diff --git a/yarn.lock b/yarn.lock index 04443ec816b..2688ff26312 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2133,10 +2133,10 @@ dependencies: "@octokit/openapi-types" "^8.2.0" -"@react-native-community/async-storage@^1.6.3": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@react-native-community/async-storage/-/async-storage-1.12.1.tgz#25f821b4f6b13abe005ad67e47c6f1cee9f27b24" - integrity sha512-70WGaH3PKYASi4BThuEEKMkyAgE9k7VytBqmgPRx3MzJx9/MkspwqJGmn3QLCgHLIFUgF1pit2mWICbRJ3T3lg== +"@react-native-async-storage/async-storage@1.13.0": + version "1.13.0" + resolved "https://registry.yarnpkg.com/@react-native-async-storage/async-storage/-/async-storage-1.13.0.tgz#7b26b04fd2acf95353e7697927939817e46d3166" + integrity sha512-c+pKuUe54sysxnqsfG17kaAcd9xJQyTNYDQhZhYf3Ej5khAQPPM85eN2nc1sj1qEnxDde4mcfi3slrOd/KtoSw== dependencies: deep-assign "^3.0.0"