-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[templates] Move project templates from the universe repo #4335
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
Conversation
* [templates] Update expo-template-tabs to SDK32 (tests failing) * [expo-template-tabs] Upgrade dependencies * [expo-template-tabs] Upgrade jest-expo * [expo-template-tabs] Upgrade jest-expo * [expo-template-blank] Update dependencies to published SDK32 * [expo-template-tabs] Update dependencies to published SDK32 * [templates] Publish templates for SDK32
* [templates] Update expo-template-tabs to SDK32 (tests failing) * [expo-template-tabs] Upgrade dependencies * [expo-template-tabs] Upgrade jest-expo * [expo-template-tabs] Upgrade jest-expo * [expo-template-blank] Update dependencies to published SDK32 * [expo-template-tabs] Update dependencies to published SDK32 * [templates] Publish templates for SDK32
The blank template is intended to be minimal -- removing the class extension slims this down further.
Optimized the PNG images further for performance and to use less bandwidth.
This updates the tabs template to work with SDK 33 (dependency versions are not yet final) and uses modular imports. It uses React hooks as well. I also made the unit tests render a shallow tree so that the unit under test is smaller. Test Plan: - Run Jest tests with `yarn jest` - Open project on iOS after setting sdkVersion to 33.0.0 and verify that all screens and links work
Use the precise version, since sometime patch versions of React have broken the interface between React and RN.
…tes-from-universe
This TS template also needs to be moved over sometime: https://github.com/expo/universe/commit/32f60c7d145e05bae903d35d2c4844a897dd95ba |
Basically just copied the directory for the blank template then followed the instructions for adding TypeScript to an Expo project and then made a few tweaks based on discussions with @ide
4ad89e1
to
89c379a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment and please squash commits ❤️
"expo-asset": "^5.0.0-rc.0", | ||
"expo-constants": "^5.0.0-rc.0", | ||
"expo-font": "^5.0.0-rc.0", | ||
"expo-web-browser": "^5.0.0-rc.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^5.0.0
?
Moving `expo-template-blank` and `expo-template-tabs` from the universe repo, so all project templates will be at the same place. Unfortunately there are some duplicated commits because I wanted to keep the history and was unable to move these two folders at once. Also added `publish-project-templates` script to `expotools`. Demo: 
- despite the upgrade to Babel 7 being mentioned in the blog post, it wasn't mentioned in the upgrade walkthrough or the CHANGELOG - if one were using the default, auto-generated .babelrc before SDK31, it would cause errors after upgrading to SDK31+, and there are no details about how to fix this when upgrading - the default babel config changed with SDK31 to a babel.config.js and no transform-react-jsx-source I'm not sure if the PR I referenced in the added changelog entry is the correct one to use. While c75b43b of #2373 does change to `babel.config.js`, it seems to be internal changes only. The changes to the default, auto-generated `.babelrc` to `babel.config.js` in the template seemed to have changed in the old `universe` repo, which no longer exists. #4335 moved the templates over and is the only record I could find of these templates. Closes #6155 I recently upgraded [a project](https://github.com/agilgur5/react-native-manga-reader-app) from SDK29 to SDK33, and while there were [a handful of issues](agilgur5/react-native-manga-reader-app#12 (comment)), the one that was most confusing was why I was getting Babel errors. The `.babelrc` config I was using before was the default, auto-generated one by Expo, not anything custom, but apparently it broke during the SDK31 upgrade. It broke, but nothing about changing the Babel config was mentioned in the upgrade walkthrough docs or in the CHANGELOG (there is a mention of upgrading to Babel 7 in the blog post, but it seemed mostly internal and SDK29 already used Babel 7 RC1). The default Babel config was changed though (no more `transform-react-jsx-source`) and was changed to a `babel.config.js`. I only found out about this issue and its fix by searching online, and there seemed to have been a great many people similarly confused by this: - #2574 (comment) - #2576 (comment) - https://stackoverflow.com/a/54258361/3431180 (SO Q&A on this topic) - https://medium.com/@wcandillon/congratulations-expo-and-react-native-and-incredible-tools-c83dfb143599 (comment on SDK 31 blog post on this topic) - https://forums.expo.io/t/upgrade-to-expo-31-babel-7/17044 This is definitely a breaking change, and on top of that, based on the issues and upvotes, it affected a lot of people (and may still affect more who are lagging on upgrades too), so I think it should definitely be mentioned in the upgrade guides and changelog for SDK31 Added an entry to the changelog and upgrade docs so that it is clearly addressed for those seeking to upgrade N/A, just docs Co-authored-by: Joel Califa <4970083+agilgur5@users.noreply.github.com>
Moving
expo-template-blank
andexpo-template-tabs
from the universe repo, so all project templates will be at the same place.Unfortunately there are some duplicated commits because I wanted to keep the history and was unable to move these two folders at once.
Also added

publish-project-templates
script toexpotools
. Demo: