| #
8a424beb |
| 11-Aug-2023 |
James Ide <[email protected]> |
[lint] Upgrade to Prettier v3, typescript-eslint to v6 (#23544)
Why
---
Prettier 3 is out. Add support for it with this linter config.
**Note for reviewer:** the first commit is the one with th
[lint] Upgrade to Prettier v3, typescript-eslint to v6 (#23544)
Why
---
Prettier 3 is out. Add support for it with this linter config.
**Note for reviewer:** the first commit is the one with the actual
changes. The rest of this PR are changes to get the linter passing
(mostly autofix).
How
---
Update eslint-config-prettier and eslint-plugin-prettier. To address
deprecation warnings, also update typescript-eslint/parser and
typescript-eslint/eslint-plugin.
Because of an update to typescript-eslint/parser, we need to suppress
deprecation warnings (documented in a comment).
Regenerated test snapshots. Due to the upgraded dependencies, typecasts
and optional chaining are now auto-fixable by lint. This converts
warnings into autofixes.
Test Plan
---
`yarn test` in the linter config. Run `expotools check --all --fix-lint
--no-build --no-test --no-uniformity-check` to try this config on the
whole repo.
---------
Co-authored-by: Expo Bot <[email protected]>
show more ...
|
| #
4e5f28ee |
| 29-Jul-2023 |
Evan Bacon <[email protected]> |
feat(metro): support mjs extensions in Expo (#23528)
# Why
- A number of libraries are using this file, unclear how we should use
it though.
- This PR doesn't enable `unstable_packageExports` b
feat(metro): support mjs extensions in Expo (#23528)
# Why
- A number of libraries are using this file, unclear how we should use
it though.
- This PR doesn't enable `unstable_packageExports` but it does pull in
the default `unstable_conditionNames` from the recommended react-native
metro config.
- mjs is resolved after js/ts files when bundling for Node.js
environments.
# Test Plan
- Expo Camera works in Expo Router on web.
- Added tests for continuous functionality.
<!--
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 `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
---------
Co-authored-by: Expo Bot <[email protected]>
show more ...
|
| #
2fbedb18 |
| 28-Jul-2023 |
Evan Bacon <[email protected]> |
feat(cli, metro): add inverse import error stack (#23551)
# Why
Many users encounter issues where a library reaches into react-native
internals on web and the error isn't helpful. This PR create
feat(cli, metro): add inverse import error stack (#23551)
# Why
Many users encounter issues where a library reaches into react-native
internals on web and the error isn't helpful. This PR creates a graph of
resolutions to print the full stack of imports that lead to an invalid
resolution. This helps show which application code can be modified to
fix a bug.
Unclear if we want to add an experimental version of this in Expo CLI or
in Metro. For now, I'm opening the draft so some power-users can pull
the branch and use it to debug their projects.
I'll be splitting parts of this PR out and merging them into upstream
(expo/expo) in the meantime.
### Before
<img width="1140" alt="Screenshot 2023-07-15 at 4 24 21 PM"
src="https://github.com/expo/expo/assets/9664363/d75291e8-7ba0-45ae-b236-e688be8eee16">
### After
<img width="1148" alt="Screenshot 2023-07-15 at 4 17 21 PM"
src="https://github.com/expo/expo/assets/9664363/4da8cbb7-c55e-4697-a09b-fb2e4752d5ec">
## Usage in dev
- Pull this branch
- [Setup local CLI in
dev](https://github.com/expo/expo/blob/main/packages/%40expo/cli/README.md#contributing).
- Start your project with local CLI in dev.
# Test Plan
- TBD
---------
Co-authored-by: Expo Bot <[email protected]>
show more ...
|
| #
6fb512fa |
| 14-Jul-2023 |
Evan Bacon <[email protected]> |
fix(cli): Set `preferNativePlatform` to `false` for all web requests. (#23527)
# Why
- Currently we fallback on the default or user-defined resolver if the
expo resolver fails. Now we'll skip th
fix(cli): Set `preferNativePlatform` to `false` for all web requests. (#23527)
# Why
- Currently we fallback on the default or user-defined resolver if the
expo resolver fails. Now we'll skip the default if the expo resolver
asserts.
- If the user-defined resolver is called, it will now have
`preferNativePlatform` disabled. This ensures we never attempt to
resolve a web file with `.native` extensions.
# Test Plan
- Unit tests
---------
Co-authored-by: Expo Bot <[email protected]>
show more ...
|
| #
837127ed |
| 04-Jan-2023 |
Evan Bacon <[email protected]> |
fix(cli): allow chained Metro resolvers to resolve when the predecessor resolvers throw a Metro resolution error. (#20704)
# Why
Reimplements #19874 but with tests and proper checking.
<!--
P
fix(cli): allow chained Metro resolvers to resolve when the predecessor resolvers throw a Metro resolution error. (#20704)
# Why
Reimplements #19874 but with tests and proper checking.
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->
# How
- When a metro resolver throws a metro resolution error, we should
attempt to resolve using the next resolver in the chain.
- Added debug logs so users can examine the progress.
- Added tests for all known cases.
Co-authored-by: Expo Bot <[email protected]>
show more ...
|