From af6ff3343eabe9c0f5419edc190984e10823334b Mon Sep 17 00:00:00 2001 From: Ashish Nanda Date: Tue, 14 Apr 2020 04:03:30 -0700 Subject: [PATCH 1/2] Upgrading redux-offline and netinfo dependencies for react native --- packages/aws-appsync-react/package.json | 4 ++-- packages/aws-appsync-react/src/rehydrated-rn.tsx | 2 +- packages/aws-appsync/package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/aws-appsync-react/package.json b/packages/aws-appsync-react/package.json index 3b1609a0..75561851 100644 --- a/packages/aws-appsync-react/package.json +++ b/packages/aws-appsync-react/package.json @@ -20,13 +20,13 @@ "prop-types": "^15.6.0" }, "peerDependencies": { - "@react-native-community/netinfo": "4.x.x", + "@react-native-community/netinfo": "^5.0.0", "aws-appsync": "3.x.x", "react": "0.14.x || 15.* || ^15.0.0 || ^16.0.0", "react-apollo": "2.x" }, "devDependencies": { - "@react-native-community/netinfo": "^4.1.3", + "@react-native-community/netinfo": "^5.0.0", "@types/react": "^16.0.25", "aws-appsync": "^3.0.2", "react": "^16.1.1", diff --git a/packages/aws-appsync-react/src/rehydrated-rn.tsx b/packages/aws-appsync-react/src/rehydrated-rn.tsx index 74e0ab38..030fb899 100644 --- a/packages/aws-appsync-react/src/rehydrated-rn.tsx +++ b/packages/aws-appsync-react/src/rehydrated-rn.tsx @@ -58,7 +58,7 @@ export default class Rehydrated extends React.Component Date: Wed, 8 Jul 2020 08:09:13 -0700 Subject: [PATCH 2/2] update peerdependencies & readme --- README.md | 24 ++++++++++++------------ packages/aws-appsync-react/package.json | 3 +-- packages/aws-appsync/package.json | 6 +++++- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 11939bbe..d542cf08 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ ![npm](https://img.shields.io/npm/dm/aws-appsync.svg) -package | version ---- | --- -aws-appsync | ![npm](https://img.shields.io/npm/v/aws-appsync.svg) -aws-appsync-react | ![npm](https://img.shields.io/npm/v/aws-appsync-react.svg) +| package | version | +| ----------------- | ---------------------------------------------------------- | +| aws-appsync | ![npm](https://img.shields.io/npm/v/aws-appsync.svg) | +| aws-appsync-react | ![npm](https://img.shields.io/npm/v/aws-appsync-react.svg) | ## Installation @@ -34,23 +34,23 @@ For version <= 2.x.x, the selection set for the subscription will be the mutatio When using this library with React Native, you need to ensure you are using the correct version of the library based on your version of React Native. Take a look at the table below to determine what version to use. -| `aws-appsync` version | Required React Native Version -| ----------------------------------------- | -------------------------------------------------------------------------------- | -| `2.x.x` | `>= 0.60` -| `1.x.x` | `<= 0.59` +| `aws-appsync` version | Required React Native Version | +| --------------------- | ----------------------------- | +| `2.x.x` | `>= 0.60` | +| `1.x.x` | `<= 0.59` | -If you are using React Native `0.60` and above, you also need to install `@react-native-community/netinfo`: +If you are using React Native `0.60` and above, you also need to install `@react-native-community/netinfo` and `@react-native-community/async-storage`: ``` -npm install --save @react-native-community/netinfo@4.7.0 +npm install --save @react-native-community/netinfo@5.9.4 @react-native-community/async-storage ``` or ``` -yarn add @react-native-community/netinfo@4.7.0 +yarn add @react-native-community/netinfo@5.9.4 @react-native-community/async-storage ``` If you are using React Native `0.60+` for iOS, run the following command as an additional step: ``` -cd ios && pod install && cd .. +npx pod-install ``` ## Usage diff --git a/packages/aws-appsync-react/package.json b/packages/aws-appsync-react/package.json index 75561851..ad0e6d90 100644 --- a/packages/aws-appsync-react/package.json +++ b/packages/aws-appsync-react/package.json @@ -20,7 +20,6 @@ "prop-types": "^15.6.0" }, "peerDependencies": { - "@react-native-community/netinfo": "^5.0.0", "aws-appsync": "3.x.x", "react": "0.14.x || 15.* || ^15.0.0 || ^16.0.0", "react-apollo": "2.x" @@ -37,4 +36,4 @@ "react-native": { "./lib/rehydrated": "./lib/rehydrated-rn" } -} +} \ No newline at end of file diff --git a/packages/aws-appsync/package.json b/packages/aws-appsync/package.json index e9c30476..8b369705 100644 --- a/packages/aws-appsync/package.json +++ b/packages/aws-appsync/package.json @@ -37,5 +37,9 @@ "url": "^0.11.0", "uuid": "3.x" }, - "devDependencies": {} + "devDependencies": {}, + "peerDependencies": { + "@react-native-community/async-storage": "^1.11.0", + "@react-native-community/netinfo": "^5.0.0" + } }