Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[router]: refactor matchArrayGroupName to be similar to matchGroupName #27459

Merged
merged 6 commits into from Mar 6, 2024

Conversation

marklawlor
Copy link
Contributor

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

Test Plan

Checklist

@expo-bot expo-bot added bot: suggestions ExpoBot has some suggestions bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Mar 6, 2024
@marklawlor marklawlor force-pushed the marklawlor/router/matchArrayGroupName branch from 51d2561 to aa9ad5e Compare March 6, 2024 00:31
@marklawlor marklawlor force-pushed the marklawlor/router/matchArrayGroupName branch from aa9ad5e to 1049db4 Compare March 6, 2024 01:04
@@ -68,3 +70,41 @@ describe(getNameFromFilePath, () => {
);
});
});

describe(matchArrayGroupName, () => {
it(`matches`, () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split this test up

@marklawlor marklawlor merged commit 18c0fb3 into main Mar 6, 2024
9 checks passed
@marklawlor marklawlor deleted the marklawlor/router/matchArrayGroupName branch March 6, 2024 05:01
@brentvatne brentvatne added the published Changes from the PR have been published to npm label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint compatible bot: passed checks ExpoBot has nothing to complain about published Changes from the PR have been published to npm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants