Skip to content

Commit

Permalink
chore: denote react native safe area dep limitation and update quicks…
Browse files Browse the repository at this point in the history
…tart commands (#6241)

* chore: denote rn dep limitation and update quickstart commands

* Update build-system-tests/scripts/mega-app-install.sh

Co-authored-by: Caleb Pollman <[email protected]>

---------

Co-authored-by: Caleb Pollman <[email protected]>
  • Loading branch information
jordanvn and calebpollman authored Dec 9, 2024
1 parent ee7cd89 commit 8218a8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions build-system-tests/scripts/mega-app-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ if [ "$PKG_MANAGER" == 'yarn' ]; then
yarn add $DEPENDENCIES
else
if [[ "$FRAMEWORK" == "react-native" ]]; then
DEPENDENCIES="$TAGGED_UI_FRAMEWORK @aws-amplify/react-native aws-amplify react-native-safe-area-context@^4.14.0 @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values react-native-url-polyfill"
# react-native-safe-area-context v5.0.0+ does not support RN 0.74 and lower
DEPENDENCIES="$TAGGED_UI_FRAMEWORK @aws-amplify/react-native aws-amplify react-native-safe-area-context@^4.2.5 @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values react-native-url-polyfill"
echo "npm install $DEPENDENCIES"
npm install $DEPENDENCIES
if [[ "$BUILD_TOOL" == "expo" ]]; then
Expand All @@ -115,7 +116,7 @@ else
npx expo install react-native@~0.75.0
fi
echo "npx expo install --fix"
npx expo install --fix # fix the dependencies that are incompatible with the installed expo versio
npx expo install --fix # fix the dependencies that are incompatible with the installed expo version
fi
else
install_dependencies_with_retries npm "$DEPENDENCIES"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/ExpoSnack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const defaultOptions: SnackOptions = {
'@aws-amplify/rtn-web-browser',
'@aws-amplify/ui-react-native',
'[email protected]',
'react-native-safe-area-context',
'react-native-safe-area-context@^4.2.5',
'@react-native-community/netinfo',
'@react-native-async-storage/async-storage',
'react-native-get-random-values',
Expand Down
2 changes: 1 addition & 1 deletion docs/src/data/frameworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const AMPLIFY_5_UI_VERSIONS: Record<string, number> = {

// React Native requires direct installation of dependencies with native modules
export const REACT_NATIVE_DEPENDENCIES =
'@aws-amplify/react-native react-native-safe-area-context @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values';
'@aws-amplify/react-native react-native-safe-area-context@^4.2.5 @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values';

export const FRAMEWORK_INSTALL_SCRIPTS = {
react: 'npm i @aws-amplify/ui-react aws-amplify',
Expand Down

0 comments on commit 8218a8c

Please sign in to comment.