Skip to content

Commit 83c1fa9

Browse files
author
Nathaniel Dsouza
authored
Merge branch 'master' into deps-remove-wolfy87-eventemitter
2 parents 89e5a01 + 69ceffd commit 83c1fa9

File tree

4 files changed

+47
-20
lines changed

4 files changed

+47
-20
lines changed

package-lock.json

Lines changed: 30 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@
4646
"nyc": "15.1.0",
4747
"prettier": "2.7.1",
4848
"rewiremock": "3.14.3",
49-
"sinon": "12.0.1"
49+
"sinon": "12.0.1",
50+
"@react-native-community/netinfo": "*",
51+
"react": "*"
5052
},
5153
"optionalDependencies": {
52-
"@react-native-community/async-storage": ">=1.12.1"
54+
"@react-native-async-storage/async-storage": ">=1.13.0"
5355
},
5456
"peerDependencies": {
5557
"@react-native-community/netinfo": "*",

src/Meteor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const Meteor = {
7373
return {
7474
AsyncStorage:
7575
Data._options.AsyncStorage ||
76-
require('@react-native-community/async-storage').default,
76+
require('@react-native-async-storage/async-storage').default,
7777
};
7878
},
7979
connect(endpoint, options) {
@@ -91,7 +91,7 @@ const Meteor = {
9191

9292
if (!options.AsyncStorage) {
9393
const AsyncStorage =
94-
require('@react-native-community/async-storage').default;
94+
require('@react-native-async-storage/async-storage').default;
9595

9696
if (AsyncStorage) {
9797
options.AsyncStorage = AsyncStorage;

test/src/Meteor.tests.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { expect } from 'chai';
2+
import Meteor from '../../src/Meteor';
3+
4+
describe('Meteor - integration', function () {
5+
it('uses the default async storage if none is defined', function () {
6+
const fallback =
7+
require('@react-native-async-storage/async-storage').default;
8+
const { AsyncStorage } = Meteor.packageInterface();
9+
expect(AsyncStorage).to.equal(fallback);
10+
});
11+
});

0 commit comments

Comments
 (0)