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

fix(metro-config): patch missing request parameters for react native default code loading #25686

Merged
merged 4 commits into from
Dec 1, 2023

Conversation

EvanBacon
Copy link
Contributor

Why

Ensure the correct expo router entry and JS engine is used when bundling.

How

  • Infer the props based on a loose copy of what we do in the manifest middleware :[
  • Add a memoized warning log for future debugging.

Test Plan

  • Added unit tests for new mutations.
  • Copied patch to Brent's project and ensured it worked.

EvanBacon and others added 2 commits November 30, 2023 19:10
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 Dec 1, 2023
@EvanBacon EvanBacon merged commit 8f8e463 into main Dec 1, 2023
9 of 10 checks passed
@EvanBacon EvanBacon deleted the @evanbacon/metro-config/patch-requests branch December 1, 2023 01:22
Comment on lines +20 to +34
function isEnableHermesManaged(
expoConfig: Partial<Pick<ExpoConfig, 'ios' | 'android' | 'jsEngine'>>,
platform: string
): boolean {
switch (platform) {
case 'android': {
return (expoConfig.android?.jsEngine ?? expoConfig.jsEngine) !== 'jsc';
}
case 'ios': {
return (expoConfig.ios?.jsEngine ?? expoConfig.jsEngine) !== 'jsc';
}
default:
return false;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

this could potentially be a problem for projects that use expo-router but not CNG/dev-client

onizam95 pushed a commit to onizam95/expo-av-drm that referenced this pull request Jan 15, 2024
…default code loading (expo#25686)

# Why

Ensure the correct expo router entry and JS engine is used when
bundling.

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

- Infer the props based on a loose copy of what we do in the manifest
middleware :[
- Add a memoized warning log for future debugging.

<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

- Added unit tests for new mutations.
- Copied patch to Brent's project and ensured it worked.

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants