Skip to content

Commit

Permalink
[router]: refactor matchArrayGroupName to be similar to matchGroupName (
Browse files Browse the repository at this point in the history
#27459)

# Why

`matchArrayGroupName` is similar to `matchGroupName` but its regex was
implemented differently and it returned all groups, not just the first
one

This PR keeps the functionality & regex of `matchArrayGroupName` to be
similar to `matchGroupName`.

This addresses some bugs with `matchArrayGroupName` where it incorrectly
handled `((foo),(bar))`

# 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 <34669131+expo-bot@users.noreply.github.com>
  • Loading branch information
marklawlor and expo-bot committed Mar 6, 2024
1 parent 9f1e02c commit 18c0fb3
Show file tree
Hide file tree
Showing 11 changed files with 240 additions and 63 deletions.
3 changes: 2 additions & 1 deletion packages/expo-router/CHANGELOG.md
Expand Up @@ -21,6 +21,7 @@
- Fix using parenthesis in urls ([#27120](https://github.com/expo/expo/pull/27120) by [@marklawlor](https://github.com/marklawlor))
- Fix `push` navigation not pushing the same route multiple times ([#27307](https://github.com/expo/expo/pull/27307) by [@marklawlor](https://github.com/marklawlor))
- Fix router.navigate will only push when path parameters change ([#27285](https://github.com/expo/expo/pull/27285) by [@marklawlor](https://github.com/marklawlor))
- Fix incorrect route generation of array shared groups with brackets ([#27459](https://github.com/expo/expo/pull/27459) by [@marklawlor](https://github.com/marklawlor))

### 💡 Others

Expand Down Expand Up @@ -63,7 +64,7 @@ _This version does not introduce any user-facing changes._

- Deprecate `useRootNavigation` in favor of `useNavigationContainerRef`. ([#26529](https://github.com/expo/expo/pull/26529) by [@EvanBacon](https://github.com/EvanBacon))
- Remove duplicate context mocking functions ([#26651](https://github.com/expo/expo/pull/26651) by [@marklawlor](https://github.com/marklawlor))
- Update to remove `ExpoRequest/`ExpoResponse` imports from `@expo/server`. ([#27261](https://github.com/expo/expo/pull/27261) by [@kitten](https://github.com/kitten))
- Update to remove `ExpoRequest`/`ExpoResponse` imports from `@expo/server`. ([#27261](https://github.com/expo/expo/pull/27261) by [@kitten](https://github.com/kitten))

## 3.4.3 - 2024-01-18

Expand Down
2 changes: 1 addition & 1 deletion packages/expo-router/build/getRoutes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/expo-router/build/getRoutes.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/expo-router/build/matchers.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/expo-router/build/matchers.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/expo-router/build/matchers.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/expo-router/build/matchers.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 18c0fb3

Please sign in to comment.