| 02bb1625 | 21-Jul-2023 |
Mark Lawlor <[email protected]> |
fix: Expo Router type generation for whitespace filenames (#23662)
# Why
Expo Router type generation normalised whitespace when we should
preserve it. This keeps the types inline with edge case
fix: Expo Router type generation for whitespace filenames (#23662)
# Why
Expo Router type generation normalised whitespace when we should
preserve it. This keeps the types inline with edge case usage.
`/(my group, my other group )/my page.tsx` is a valid filename.
It should be typed as
```
/(my group)/my page
/(my other group)/my page
/my page
```
# How
Removed the URL normalisation and changed the group regex's to preserve
white space. Group names are now trimmed
# Test Plan
Updated 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: evanbacon <[email protected]>
show more ...
|
| fb8f235b | 20-Jul-2023 |
Evan Bacon <[email protected]> |
fix(cli): Fix running typed routes without an app directory. (#23661)
# Why
- Using typed routes without an app directory doesn't work.
<!--
Please describe the motivation for this PR, and li
fix(cli): Fix running typed routes without an app directory. (#23661)
# Why
- Using typed routes without an app directory doesn't work.
<!--
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 ...
|
| 8eba27a6 | 19-Jul-2023 |
Cedric van Putten <[email protected]> |
fix(cli): allow multiple `--platform` flags in `expo export` (#23621)
# Why
Part of ENG-9308
When creating an export for EAS updates, we need to be able to select
specific platforms with more
fix(cli): allow multiple `--platform` flags in `expo export` (#23621)
# Why
Part of ENG-9308
When creating an export for EAS updates, we need to be able to select
specific platforms with more flexibility than the current `all`. If
users have configured Metro web, we still need to be able to _only_
build for `android` and `ios` (the only 2 supported platforms for EAS
updates at the moment).
Running multiple separate instances of `expo export` doesn't seem like a
great alternative either. On every `expo export` run, the exported
folder is emptied. That would force EAS CLI to stitch this together,
which requires assumptions that we likely want to keep in `expo export`
only.
Unfortunately, we likely have to backport this to older SDK versions, or
we have to add a check in the EAS CLI to warn users about this
incompatibility.
# How
- Made `expo export --platform` a variadic flag
- Updated platform resolution to only return a combination of unique
`android`, `ios`, or `web` values
# Test Plan
See added tests, and to manually test it:
- `$ yarn create expo ./test-export -t tabs@49` (comes with Metro web
configured)
- `$ cd ./test-export`
- `$ yarn expo export -p android -p=ios`
→ _Should export `android` and `ios`_
- `$ yarn expo export -p android -p all`
→ _Should export `android`, `ios`, and `web`_
- `$ yarn expo export -p web -p ios`
→ _Should export `ios` and `web`_
# 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 ...
|
| 1106f3ac | 15-Jul-2023 |
Mark Lawlor <[email protected]> |
Rework ExpoRouter HrefObject (#23507)
# Why
Reworks how `Href` and `HrefObject` works to fix multiple issues with Expo Router types
Fixes: - Issues where HrefObject required `as const` typing unde
Rework ExpoRouter HrefObject (#23507)
# Why
Reworks how `Href` and `HrefObject` works to fix multiple issues with Expo Router types
Fixes: - Issues where HrefObject required `as const` typing under some conditions (https://github.com/expo/router/issues/769) - HrefObject now auto-completes all dynamic routes (previously only did static routes) - HrefObject `params` is no longer strict and can accept extra arguments - `useLocalSearchParams`/`useSearchParams`/`useGlobalSearchParams` now allow for arbitrary generics - If a route is passed as the genertic for `useLocalSearchParams`/`useSearchParams`/`useGlobalSearchParams` will return an object with keys typed for the known parameters, but still allow for arbitrary search params - Top level catch all routes (e.g `/[...missing]`) no longer cause typing to fail - e.g `<Link href="/(test)/[value]" />` will now correctly error that it should be a HrefObject and not a Href - When setting a `param` it can be a `string` or `number` - however it will always be a string when returned from `useLocalSearchParams`/`useSearchParams`/`useGlobalSearchParams`
PR superseeds https://github.com/expo/expo/pull/23422
# Test Plan
Type tests were updated but some things need to be manually tested (like autocomplete)
The project generated by `npx create-expo-app@latest --template tabs@49` can be used to easily test.
show more ...
|
| da41c699 | 14-Jul-2023 |
Logan Rosen <[email protected]> |
Fix port in use message for unidentified process (#22814)
# Why
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->
T
Fix port in use message for unidentified process (#22814)
# Why
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->
The current message when the port is in use is confusing when the
running process cannot be identified; it just says "Port <#> is." This
happens for example on Windows/PowerShell where the running process
detector does not work. Closes #22774.
# How
<!--
How did you build this feature or fix this bug and why?
-->
Added "being used by another process" to the message in the `else`
block.
# 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.
-->
Had trouble writing a unit test due to the dynamic imports in the
function, which don't seem to play well with Jest. However, I was able
to test it locally:

# 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).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] 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 ...
|
| 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 ...
|