| #
33643b60 |
| 04-Mar-2023 |
Evan Bacon <[email protected]> |
feat(cli): auto setup typescript during start (#21475)
# Why
- Some users are confused about how to use the fully automated
TypeScript setup. It currently runs when you run `npx expo start` in a
feat(cli): auto setup typescript during start (#21475)
# Why
- Some users are confused about how to use the fully automated
TypeScript setup. It currently runs when you run `npx expo start` in a
project with `tsconfig.json` or any TypeScript file in the project.
- This change will run the TypeScript check continuously until
TypeScript is setup. This only applies to projects using Metro, and
currently is only run in `npx expo start`, and the run commands (when
the server is started in the current window, e.g. not headless mode).
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->
# How
- Fork the `runServer` function from Metro into the CLI so we can access
the Metro bundler instance directly.
- Use Metro's native file watching to observe new TypeScript files being
added to the project (within the observable files). This is fast and
ensures we don't accidentally block a thread that otherwise could've
been used for bundling.
- The TypeScript continuous check only runs once, if you remove
TypeScript and add it back in the same process, then nothing happens.
This is a performance optimization.
- If TypeScript is enabled while the process is running, the user will
not be prompted to install, the packages will just install in the
project. Failures will be displayed in the running process, and no more
attempts will be made.
- If TypeScript is detected on start then the existing system will be
used and the continuous check will be skipped, this means projects
already using TypeScript won't have any technical performance hit.
<!--
How did you build this feature or fix this bug and why?
-->
# Test Plan
- In a project without TypeScript:
- `npx expo`
- `touch tsconfig.json` or `mv index.js index.tsx` or `touch foo.tsx`
- TypeScript is automatically installed for the project.
- `EXPO_NO_TYPESCRIPT_SETUP` voids this behavior
- Added unit tests.
<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Expo Bot <[email protected]>
Co-authored-by: Cedric van Putten <[email protected]>
show more ...
|
| #
c4ef02ae |
| 03-May-2022 |
Evan Bacon <[email protected]> |
feat(cli): add `run:ios` command (#16662)
* [wip] Added expo run:ios command
* Clean up run:ios
* feat(cli): add headless server mode
* fix(cli): fix run:ios logic issues
* Update CHANGE
feat(cli): add `run:ios` command (#16662)
* [wip] Added expo run:ios command
* Clean up run:ios
* feat(cli): add headless server mode
* fix(cli): fix run:ios logic issues
* Update CHANGELOG.md
* Update packages/expo/CHANGELOG.md
Co-authored-by: Expo Bot <[email protected]>
* clean up
* refine fixture
* refactor and test code signing
* Update resolveOptionsAsync.ts
* fix merge
* added new impl
* Update AppleDevice.ts
* Added more tests
* fixed e2e tests
* lint fix
* Update index-test.ts
Co-authored-by: Expo Bot <[email protected]>
show more ...
|
| #
8d307f52 |
| 23-Mar-2022 |
Evan Bacon <[email protected]> |
chore: refactor `expo/cli` to `@expo/cli` package (#16717)
* chore: refactor `expo/cli` to `@expo/cli` package
* Update CODEOWNERS
* fix linking
* fix lint script
* fix build file
* f
chore: refactor `expo/cli` to `@expo/cli` package (#16717)
* chore: refactor `expo/cli` to `@expo/cli` package
* Update CODEOWNERS
* fix linking
* fix lint script
* fix build file
* fix e2e tests
* lint before build
* use mock version
show more ...
|