Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to SDK 46 #385

Merged
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
be38369
chore: run expo upgrade on all projects
keith-kurak Aug 8, 2022
a71b33d
update with-yarn-workspaces to use latest monorepo doc
keith-kurak Aug 8, 2022
0430edd
update with-gatsby dependencies to fix errors
keith-kurak Aug 9, 2022
6cbfa48
fix 'require not defined' error on with-electron
keith-kurak Aug 9, 2022
d0292b0
with-three updated, now working
keith-kurak Aug 9, 2022
2cfc41d
with-react-three-fiber other deps updated, working
keith-kurak Aug 9, 2022
0fdfad4
update with-splash-screen for clarity
keith-kurak Aug 10, 2022
461cd93
upgrade all examples to react-native 0.69.4
keith-kurak Aug 10, 2022
5dd5e68
clean up with-moti
keith-kurak Aug 10, 2022
5f7bb0e
cleaned up react-navigation examples
keith-kurak Aug 10, 2022
8eae40b
cleaned up refs to potentially missing NPM scripts
keith-kurak Aug 10, 2022
29e3a87
renamed upgrade script for clarity
keith-kurak Aug 10, 2022
09aaea1
fix missed update to react-native 0.69.4
keith-kurak Aug 10, 2022
9236b70
Fix inaccurate script output
keith-kurak Aug 10, 2022
d918ba0
remove inaccurate warning
keith-kurak Aug 10, 2022
4b7d878
remove refs to global CLI/ ejecting
keith-kurak Aug 11, 2022
f6b4d68
Update blank/README.md
keith-kurak Aug 15, 2022
48c6fba
Update blank/README.md
keith-kurak Aug 15, 2022
e63d920
Update with-maps/README.md
keith-kurak Aug 15, 2022
98d4172
Update with-maps/README.md
keith-kurak Aug 15, 2022
6942cfb
Update with-moti/README.md
keith-kurak Aug 15, 2022
014cff5
Update with-yarn-workspaces/README.md
keith-kurak Aug 15, 2022
9c04a4f
Update with-electron/README.md
keith-kurak Aug 15, 2022
c542896
Update with-moti/README.md
keith-kurak Aug 15, 2022
f02c100
consistent directions for starting projects, rm cli refs
keith-kurak Aug 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ with-nextjs/out
*/backend/.env

.DS_Store
report.html
report.html

# Maintenance logs
.sdk-upgrade-logs
9 changes: 4 additions & 5 deletions blank/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,17 @@

- Install packages with `yarn` or `npm install`.
- If you have native iOS code run `npx pod-install`
- Run `yarn start` to start the bundler.
- Run `npx expo start` to start the bundler.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't matter but we inject the start script when the user bootstraps with CRNA.

Copy link
Contributor Author

@keith-kurak keith-kurak Aug 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to know! Some examples were one way, some the other, so was trying to pick one and apply it across the board. Knowing that it's always there, makes sense change it to yarn/ npm, which seems more consistent with other tool's templates.

- Open the project in a React runtime to try it:
- iOS: [Client iOS](https://itunes.apple.com/app/apple-store/id982107779)
- Android: [Client Android](https://play.google.com/store/apps/details?id=host.exp.exponent&referrer=blankexample)
- Web: Any web browser

## Adding Native Code
## Running/ Modifying Native Code
keith-kurak marked this conversation as resolved.
Show resolved Hide resolved

This project can be run from a web browser or the Expo client app. You may find that you want to add more native code later on. You can do this by ejecting the project and rebuilding it yourself.
You can generate native iOS and android projects from your Expo config file (**app.json**/ **app.config.js**) by runnning `npx expo prebuild`. These native projects can then be compiled and run via XCode and Android Studio.
keith-kurak marked this conversation as resolved.
Show resolved Hide resolved

- Run `yarn eject` to create the native projects.
- You can still run your project in the web browser or Expo client, you just won't be able to access any new native modules you add.
> πŸ’‘ Learn more about [native code in Expo](https://docs.expo.dev/workflow/customizing/)

## Publishing

Expand Down
12 changes: 12 additions & 0 deletions blank/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"expo": {
"name": "blank",
"slug": "blank",
"version": "1.0.0",
"platforms": [
"ios",
"android",
"web"
]
}
}
12 changes: 6 additions & 6 deletions blank/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"dependencies": {
"expo": "^45.0.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-native-web": "0.17.7"
"expo": "^46.0.0",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.4",
"react-native-web": "~0.18.7"
},
"devDependencies": {
"@babel/core": "^7.12.9"
"@babel/core": "^7.18.6"
}
}
2 changes: 1 addition & 1 deletion navigation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
## πŸš€ How to use

- Install packages with `yarn` or `npm install`.
- Run `yarn start` to start the bundler.
- Run `npx expo start` to start the bundler.
- Open the project in a React runtime to try it:
- iOS: [Client iOS](https://itunes.apple.com/app/apple-store/id982107779)
- Android: [Client Android](https://play.google.com/store/apps/details?id=host.exp.exponent&referrer=blankexample)
Expand Down
34 changes: 17 additions & 17 deletions navigation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
"@react-navigation/bottom-tabs": "~6.0.9",
"@react-navigation/native": "~6.0.6",
"@react-navigation/stack": "~6.0.11",
"expo": "^45.0.0",
"expo-asset": "~8.5.0",
"expo-constants": "~13.1.1",
"expo-font": "~10.1.0",
"expo-linking": "~3.1.0",
"expo-splash-screen": "~0.15.1",
"expo-status-bar": "~1.3.0",
"expo-web-browser": "~10.2.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-native-gesture-handler": "~2.2.1",
"react-native-reanimated": "~2.8.0",
"react-native-safe-area-context": "4.2.4",
"react-native-screens": "~3.11.1",
"react-native-web": "0.17.7"
"expo": "^46.0.0",
"expo-asset": "~8.6.1",
"expo-constants": "~13.2.3",
"expo-font": "~10.2.0",
"expo-linking": "~3.2.2",
"expo-splash-screen": "~0.16.1",
"expo-status-bar": "~1.4.0",
"expo-web-browser": "~11.0.0",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.4",
"react-native-gesture-handler": "~2.5.0",
"react-native-reanimated": "~2.9.1",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-web": "~0.18.7"
},
"devDependencies": {
"@babel/core": "^7.12.9"
"@babel/core": "^7.18.6"
}
}
57 changes: 57 additions & 0 deletions upgrade-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env bash

if [ "$1" == "" ] || [ "$1" == "--help" ]; then
echo "Available flags:"
echo "--help"
echo "--run-expo-upgrade - run yarn and expo-cli upgrade to update to latest SDK on all examples"
echo "--run-fix-dependencies - run npx expo install --fix on all repos"
exit 0
fi

if [ "$1" == "--run-expo-upgrade" ]; then
echo "Upgrading all projects to the latest SDK..."
echo "For each example, this will run `yarn` and then run `expo-cli upgrade`, accepting all defaults."
echo "Upgrade logs will be written to .sdk-upgrade-logs."

mkdir ./.sdk-upgrade-logs
for d in */ ; do
DIRNAME=${d%/}
echo "Upgrading $DIRNAME..."
echo "β€’ Run yarn"
(cd $DIRNAME && yarn --silent) # If yarn fails spectacularly, we'll see evidence in the logs for expo upgrade
echo "β€’ Run expo upgrade"
(cd $DIRNAME && echo y | expo-cli upgrade > ../.sdk-upgrade-logs/$DIRNAME.txt)
done

# yarn workspaces has example(s) inside of app folder
echo "β€’ Run expo upgrade on apps inside with-yarn-workspaces"
mkdir ./.sdk-upgrade-logs/with-yarn-workspaces
for d in with-yarn-workspaces/apps/*/ ; do
(cd $DIRNAME && echo y | expo-cli upgrade > ../.sdk-upgrade-logs/$DIRNAME.txt)
done

echo "Upgrades complete! Check .sdk-upgrade-logs for results. Be sure to correct any errors or warnings."
exit 0
fi

if [ "$1" == "--run-fix-dependencies" ]; then
echo "Fixing dependencies on all examples..."

mkdir ./.sdk-upgrade-logs
for d in */ ; do
DIRNAME=${d%/}
echo "Fixing dependencies on $DIRNAME..."
(cd $DIRNAME && npx expo install --fix)
done

echo "Fixing dependencies on apps inside with-yarn-workspaces..."
mkdir ./.sdk-upgrade-logs/with-yarn-workspaces
for d in with-yarn-workspaces/apps/*/ ; do
(cd $DIRNAME && npx expo install --fix)
done

echo "Dependency fixes complete!"
exit 0
fi

echo "Error: flag not recognized"
2 changes: 1 addition & 1 deletion with-apollo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
## πŸš€ How to use

- Install with `yarn` or `npm install`.
- Run `expo start` to try it out.
- Run `npx expo start` to try it out.

## πŸ“ Notes

Expand Down
14 changes: 7 additions & 7 deletions with-apollo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"dependencies": {
"@apollo/client": "^3.4.16",
"@apollo/link-context": "^2.0.0-beta.3",
"@react-native-picker/picker": "2.4.0",
"expo": "^45.0.0",
"@react-native-picker/picker": "2.4.2",
"expo": "^46.0.0",
"graphql": "^15.0.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-native-web": "0.17.7"
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.4",
"react-native-web": "~0.18.7"
},
"devDependencies": {
"@babel/core": "^7.12.9"
"@babel/core": "^7.18.6"
}
}
2 changes: 1 addition & 1 deletion with-auth0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- Create your own app on [Auth0](https://auth0.com).
- Add the `AuthSession` auth URL to `Allowed Callback URLs` on Auth0.
- Open `App.js` and replace `auth0ClientId` and `auth0Domain` with your app settings.
- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out.
- Run [`npx expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out.

#### AuthSession callback URL

Expand Down
16 changes: 8 additions & 8 deletions with-auth0/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"dependencies": {
"expo": "^45.0.0",
"expo-auth-session": "~3.6.0",
"expo-random": "~12.2.0",
"expo": "^46.0.0",
"expo-auth-session": "~3.7.1",
"expo-random": "~12.3.0",
"jwt-decode": "2.2.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-native-web": "0.17.7"
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.4",
"react-native-web": "~0.18.7"
},
"devDependencies": {
"@babel/core": "^7.12.9"
"@babel/core": "^7.18.6"
}
}
2 changes: 1 addition & 1 deletion with-aws-storage-upload/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Try it at https://exp.host/@ykbryan/aws-storage-upload
### Running the app

- Run `yarn` or `npm install`
- Run [`expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out.
- Run [`npx expo start`](https://docs.expo.dev/versions/latest/workflow/expo-cli/), try it out.
20 changes: 10 additions & 10 deletions with-aws-storage-upload/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
"@aws-amplify/core": "^4.3.3",
"@aws-amplify/storage": "^4.4.4",
"@react-native-async-storage/async-storage": "~1.17.3",
"@react-native-community/netinfo": "8.2.0",
"@react-native-community/netinfo": "9.3.0",
"aws-amplify": "^4.3.3",
"expo": "^45.0.0",
"expo-clipboard": "~3.0.1",
"expo-constants": "~13.1.1",
"expo-image-picker": "~13.1.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-native-web": "0.17.7"
"expo": "^46.0.0",
"expo-clipboard": "~3.1.0",
"expo-constants": "~13.2.3",
"expo-image-picker": "~13.3.1",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.4",
"react-native-web": "~0.18.7"
},
"devDependencies": {
"@babel/core": "^7.12.9"
"@babel/core": "^7.18.6"
}
}
2 changes: 1 addition & 1 deletion with-camera/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This example shows how to take a picture and display it.

- Install packages with `yarn` or `npm install`.
- If you have native iOS code run `npx pod-install`
- Run `yarn start` to start the bundler.
- Run `npx expo start` to start the bundler.
- Open the project in a React runtime to try it:
- iOS: [Client iOS](https://itunes.apple.com/app/apple-store/id982107779)
- Android: [Client Android](https://play.google.com/store/apps/details?id=host.exp.exponent&referrer=blankexample)
Expand Down
14 changes: 7 additions & 7 deletions with-camera/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"dependencies": {
"expo": "^45.0.0",
"expo-camera": "~12.2.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-native-web": "0.17.7"
"expo": "^46.0.0",
"expo-camera": "~12.3.0",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.4",
"react-native-web": "~0.18.7"
},
"devDependencies": {
"@babel/core": "^7.12.9"
"@babel/core": "^7.18.6"
}
}
16 changes: 8 additions & 8 deletions with-custom-font/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"dependencies": {
"expo": "^45.0.0",
"expo-font": "~10.1.0",
"expo-splash-screen": "~0.15.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-native-web": "0.17.7"
"expo": "^46.0.0",
"expo-font": "~10.2.0",
"expo-splash-screen": "~0.16.1",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.4",
"react-native-web": "~0.18.7"
},
"devDependencies": {
"@babel/core": "^7.12.9"
"@babel/core": "^7.18.6"
}
}
20 changes: 10 additions & 10 deletions with-dev-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
"web": "expo start --web"
},
"dependencies": {
"expo": "^45.0.0",
"expo-dev-client": "~0.9.5",
"expo-splash-screen": "~0.15.1",
"expo-status-bar": "~1.3.0",
"expo-updates": "~0.13.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-native-web": "0.17.7"
"expo": "^46.0.0",
"expo-dev-client": "~1.1.1",
"expo-splash-screen": "~0.16.1",
"expo-status-bar": "~1.4.0",
"expo-updates": "~0.14.3",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.4",
"react-native-web": "~0.18.7"
},
"devDependencies": {
"@babel/core": "^7.12.9"
"@babel/core": "^7.18.6"
},
"name": "with-dev-client",
"version": "1.0.0"
Expand Down
3 changes: 2 additions & 1 deletion with-drawer-navigation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
## πŸš€ How to use

- Install with `yarn` or `npm install`.
- Run `expo start` to try it out.
- Run `npx expo start` to try it out.

## πŸ“ Notes

- This is a very basic example from the [react navigation](https://reactnavigation.org/) docs.
- [Drawer navigation documentation](https://reactnavigation.org/docs/drawer-based-navigation).
- [Reanimated Babel plugin may be required](https://github.com/software-mansion/react-native-reanimated/issues/3410)
1 change: 1 addition & 0 deletions with-drawer-navigation/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: ['react-native-reanimated/plugin']
};
};
Loading