| #
92ddc08b |
| 14-Sep-2023 |
Evan Bacon <[email protected]> |
Support mocking Node.js externals for client-side bundles. (#24453)
# Why
- Fix regression in https://github.com/expo/expo/pull/24199 which breaks
all Metro web tests.
---------
Co-authore
Support mocking Node.js externals for client-side bundles. (#24453)
# Why
- Fix regression in https://github.com/expo/expo/pull/24199 which breaks
all Metro web tests.
---------
Co-authored-by: Expo Bot <[email protected]>
show more ...
|
| #
7179edea |
| 16-Aug-2023 |
Evan Bacon <[email protected]> |
feat(cli): pull in metro improvements from #23963 (#23987)
# Why
- Add server tag to logging.
- Reduce server invocations.
# Test Plan
- Unit tests
# Checklist
<!--
Please check the
feat(cli): pull in metro improvements from #23963 (#23987)
# Why
- Add server tag to logging.
- Reduce server invocations.
# Test Plan
- Unit tests
# 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 ...
|
| #
30986256 |
| 14-Aug-2023 |
Evan Bacon <[email protected]> |
fix(cli): Improve file formatting when `EXPO_USE_METRO_WORKSPACE_ROOT` is used. (#23910)
# Why
- Ensure the file path is formatted correctly when it reaches up past
the project root.
--------
fix(cli): Improve file formatting when `EXPO_USE_METRO_WORKSPACE_ROOT` is used. (#23910)
# Why
- Ensure the file path is formatted correctly when it reaches up past
the project root.
---------
Co-authored-by: Expo Bot <[email protected]>
show more ...
|
| #
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 ...
|
| #
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 ...
|
| #
57eba0f9 |
| 29-Mar-2023 |
Evan Bacon <[email protected]> |
feat(cli): add node target and externals to Metro (#21886)
# Why
In order to bundle for Node.js targets using Metro (required for React
Server Components and other features), we need to add supp
feat(cli): add node target and externals to Metro (#21886)
# Why
In order to bundle for Node.js targets using Metro (required for React
Server Components and other features), we need to add support for
leaving the Node.js imports in-tact (no first-class support), and the
ability to indicate that we're targeting Node.js without changing the
platform from web.
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->
# How
- Use `resolver.environment` and `transform.environment` to partially
invalidate the Metro cache and pass custom options to the transformer
(usage currently unimplemented) and resolver.
- Tap Node.js files in the user project under
`.expo/metro/externals/[module]/index.js` and redirect requests to these
modules when bundling for Node.js environments.
- Tap a polyfill which exposes `$$require_external` on the global.
`$$require_external` can be used to access the environment require from
anywhere in the bundle.
- `$$require_external` asserts when used in the browser or native (where
it shouldn't be available).
<!--
How did you build this feature or fix this bug and why?
-->
# Test Plan
- Added unit tests.
- Tested against an Expo Router project.
<!--
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]>
show more ...
|
| #
29975bfd |
| 28-Mar-2022 |
Evan Bacon <[email protected]> |
fix(cli): fix type errors (#16724)
* fix(cli): fix type errors
* Update CHANGELOG.md
* Update packages/@expo/cli/CHANGELOG.md
Co-authored-by: Expo Bot <[email protected]
fix(cli): fix type errors (#16724)
* fix(cli): fix type errors
* Update CHANGELOG.md
* Update packages/@expo/cli/CHANGELOG.md
Co-authored-by: Expo Bot <[email protected]>
* fix typecheck
* Update yarn.lock
* Update package.json
* Update MetroTerminalReporter.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 ...
|