Repository navigation
Conversation
Nothing declared `expo`, so bun installed expo@56 to satisfy the peer of the expo-constants and expo-status-bar devDependencies, an SDK outside the supported range. Declaring expo@58.0.20 makes the package root an Expo project, so asset tests that assumed a bare React Native root now check Metro's descriptor in an explicit bare fixture root and Expo's descriptor for imports from this root.
…are root The Android suite resolved the .android asset variant from the package root, which declaring expo made an Expo project. It now asserts Expo's descriptor for the required variant and resolves Metro's own descriptor, from a bare fixture root, as an Android drawable.
`reactNative({ expo: { runtime: 'development-build' } })` makes the native
engine answer Expo's runtime checks as a development build does: no ExpoGo
module in any registry, EXDevLauncher when expo-dev-launcher is installed,
and expo-constants' bare-workflow values. Both module registries now share
one presence check, so the option cannot be undone by a fallback lookup.
Contributor
|
Thanks for the quick turn, and for taking it further than my list of names — the Tried the branch build with vitest-expo setting the option instead of the wrapper: our conformance suite and a production SDK 58 app are both green, nothing reacts to |
… preset The expo preset's expo-constants stand-in models Expo Go, so combining it with a development build reported two runtimes at once; the plugin now fails with EXPO_RUNTIME_CONFLICTS_WITH_EXPO_PRESET. The packed SDK 57 consumer also runs the Expo runtime facts gate, expo.modules consults the shared presence check before the Expo resolver exists, and expo-dev-launcher detection reuses packageDirOf.
…elopment-build # Conflicts: # packages/vitest-native/package.json # packages/vitest-native/src/native/boundary.mjs # packages/vitest-native/src/native/expo-native-modules.mjs # packages/vitest-native/src/native/native-modules.d.mts # packages/vitest-native/tests/errors.test.ts
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
reactNative({ expo: { runtime: 'development-build' } })runs native-engine tests as an Expo development build instead of Expo Go. Requested in #418.Why
Expo tells its runtimes apart by asking native modules, and the engine always answered as Expo Go, so
isRunningInExpoGo()wastrueand code for development builds could not be tested. RemovingExpoGofromexpo.modulesalone is not enough: expo-modules-core falls back toTurboModuleRegistry, which answers every name undernativeModules: 'permissive'.Changes
ExpoGois absent fromexpo.modules,NativeModulesandTurboModuleRegistry, andgetEnforcing('ExpoGo')throws React Native's own error.EXDevLauncheris present only when expo-dev-launcher is installed, with no manifest. expo-constants reportsexecutionEnvironment: 'bare'andappOwnership: null.expo.modulesbefore the Expo resolver exists in a hot worker. Precedence:mockNativeModule(), then the runtime, then a module's own seed, then the scans, then permissive mode. React Native core modules are never made absent.tests/expo-runtime-facts.test.tsreads each encoded fact from Expo's source: the workspace's SDK 58, and SDK 57 from the packed consumer install.test:native:expo-runtimeruns the installed packages under the stock and hot runtimes.EXPO_RUNTIME_REQUIRES_NATIVE_ENGINE. With the expo preset, whose expo-constants stand-in models Expo Go,'development-build'fails withEXPO_RUNTIME_CONFLICTS_WITH_EXPO_PRESET. The default, also accepted as'expo-go', is unchanged.Notes
CIis set and the package is missing (marked intests/expo-runtime-facts.test.ts).