| 573b0ea7 | 01-Sep-2023 |
Evan Bacon <[email protected]> |
feat(metro, cli, router): production static web source maps support (#24213)
# Why
- Add support for exporting (or skipping) optimally formatted source
maps on web with static rendering enabled.
feat(metro, cli, router): production static web source maps support (#24213)
# Why
- Add support for exporting (or skipping) optimally formatted source
maps on web with static rendering enabled.
- Improved version of https://github.com/expo/expo/pull/22334
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->
# How
- Pass a new setting to the custom serializer when exporting for usage
outside of the dev server. This setting will ensure a source map is
created with paths relative to the server root.
- The resources will be adjusted after exporting to reflect the hashed
js filename location.
- When no sourcemap exporting is enabled, the references will be
stripped to prevent getting a chrome warning.
<!--
How did you build this feature or fix this bug and why?
-->
# Test Plan
- I added an e2e bundling test for both exporting with and without
sourcemaps.
<!--
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 ...
|
| 429dc7fc | 26-Aug-2023 |
Evan Bacon <[email protected]> |
fix(expo, asset, cli)!: unify asset hashing (#24090)
# Why
Convert the `../` segments of the server URL to `_` to support
monorepos. This same transformation takes place in
`AssetSourceResolver
fix(expo, asset, cli)!: unify asset hashing (#24090)
# Why
Convert the `../` segments of the server URL to `_` to support
monorepos. This same transformation takes place in
`AssetSourceResolver.web` (expo-assets, expo-image) and
`persistMetroAssets` of Expo CLI, this originally came from the [Metro
opinion](https://github.com/react-native-community/cli/blob/2204d357379e2067cebe2791e90388f7e97fc5f5/packages/cli-plugin-metro/src/commands/bundle/getAssetDestPathIOS.ts#L19C5-L19C10).
The purpose is to ensure no URL like `/foo/../bar.png` is requested, as
the result would be `/bar.png` which wouldn't work. The of how to handle
this didn't come from us, but we do need to ensure it's unified. At a
high-level, this does prevent the usage of certain files, as
`/foo/../bar.png` will be `/foo/_bar.png`, meaning a file named
`/foo/_bar.png` cannot also exist. This logic, while applied at runtime,
is actually only valid for production exports as we don't move or alias
files in development. The only way to have valid development files is to
ensure `../` never appears in the URL, i.e. by using
`unstable_serverRoot`.
- Drop legacy `expo/tools/hashAssetFiles.js` in favor of `expo-asset`
version.
- Unify runtime logic of asset file loading for monorepos.
- Split out of https://github.com/expo/expo/pull/23911
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->
# How
<!--
How did you build this feature or fix this bug and why?
-->
# Test Plan
<!--
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).
show more ...
|
| 847c099d | 15-Aug-2023 |
Cedric van Putten <[email protected]> |
fix(cli): avoid creating dev client urls containing `_` in protocol (#23519)
# Why
Fixes #23440
Unfortunately, due to Node's limitation in URL, we can't use `_` in
protocols. Even when we do
fix(cli): avoid creating dev client urls containing `_` in protocol (#23519)
# Why
Fixes #23440
Unfortunately, due to Node's limitation in URL, we can't use `_` in
protocols. Even when we do fix it, we run into URL parsing issues in
Expo Router (that's also using Node's URL). Instead, this change makes
protocols containing `_` fully invalid as any dev client URL.
# How
- Prohibited dev client URLs with `_` characters in the protocol
- This will trigger the
[`_resolveAlternativeLaunchUrl`](https://github.com/expo/expo/blob/main/packages/%40expo/cli/src/start/platforms/android/AndroidPlatformManager.ts#L48-L53)
on Android and create `com.example.some_package/.MainActivity` instead
# Test Plan
- `$ yarn create expo ./fix-23440 --template tabs@49`
- `$ cd ./fix-23440`
- Update `app.json` with `expo.android.package =
"com.example.protocol_underscore"`
- `$ yarn expo run:android`
- Should fall back to `com.example.protocol_underscore/.MainActivity`
URL and open the app properly
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [x] 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).
show more ...
|
| 8e209b4c | 15-Aug-2023 |
Evan Bacon <[email protected]> |
fix lint (#23960)
# Why
-
https://github.com/expo/expo/commit/73eead7f400d5a868fb42092a22feb54b10b9795
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, for
fix lint (#23960)
# Why
-
https://github.com/expo/expo/commit/73eead7f400d5a868fb42092a22feb54b10b9795
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->
# How
<!--
How did you build this feature or fix this bug and why?
-->
# Test Plan
<!--
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 ...
|