Skip to content

Commit

Permalink
deps: Follow @react-native-{community -> async-storage}/async-storage…
Browse files Browse the repository at this point in the history
… move.

This seems to be a move / rename, not something more disruptive like
a rewrite. In fact, I don't expect this to be any more disruptive
than taking the next patch version in the library's natural
progression. If I add the new-location package at its first
available version, 1.13.0, and I keep the old one at its latest
available (and the one we're on currently), 1.12.1, I see very few
differences between them:

git diff --no-index \
  node_modules/@react-native-{community,async-storage}/async-storage

The package in its new location keeps the changelog entries from
when it was maintained at the old location. That changelog confirms
that 1.13.0 comes right after 1.12.1, and the 1.13.0 entry looks
like a match for what we saw in the `git diff --no-index` output.

So this shouldn't be disruptive at all, unless 1.13.0 has
unannounced breaking changes.

[1] For the output, see <insert link here>
  • Loading branch information
chrisbobbe committed Jul 12, 2021
1 parent d5fce7f commit 4018b19
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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<string>;

declare export default {
Expand Down
8 changes: 4 additions & 4 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions jest/jestSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down Expand Up @@ -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.`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/boot/ZulipAsyncStorage.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/boot/__tests__/ZulipAsyncStorage-test.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 4018b19

Please sign in to comment.