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] Prevent crash when EXPO_ROUTER_APP_ROOT is missing #28466

Merged

Conversation

marklawlor
Copy link
Contributor

Why

require-context-ponyfill crashes when EXPO_ROUTER_APP_ROOT is missing. This module is used by the Typed Routes feature

How

Ensure the directory exists before we attempt to read it

Test Plan

Created unit tests that assert against the current filesystem without mocks

Checklist

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Apr 26, 2024
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Apr 26, 2024
Copy link
Contributor

@EvanBacon EvanBacon left a comment

Choose a reason for hiding this comment

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

Add an E2E expo customize test in a project with no routes to ensure this doesn't regress.

@marklawlor marklawlor merged commit 8f6d111 into main Apr 29, 2024
20 checks passed
@marklawlor marklawlor deleted the marklawlor/router/require-context-ponyfill-no-directory branch April 29, 2024 21:37
@brentvatne brentvatne added the published Changes from the PR have been published to npm label May 1, 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