Conversation
…g `Module._nodeModulePaths` (#44599) # Why Related to / triggered by #44109 When a non-realpath is passed to `evalModule` / `compileModule` the `node_modules` resolution wouldn't succeed since the `Module._nodeModulePaths` are built against an incorrect/unresolved path. # How - Resolve realpath of target files before using dirname for `Module._nodeModulePaths` - Resolve realpath of dirname when target file doesn't exist (mock filenames) # Test Plan - CI should pass unchanged - Can be reproduced by applying a pnpm patch to `expo` itself **Reproduction steps of the original issue:** - Create a temporary folder e.g. at `mktemp` - Run `pnpm init && pnpm add expo @expo/require-utils` - In a Node REPL, load `const { evalModule } = require('@expo/require-utils')` - Declare: `const configPath = path.join(process.cwd(), 'node_modules/expo/react-native.config.js');` - Then: `evalModule('module.exports = require("expo-modules-autolinking/exports")', configPath)` will fail, since it points at incorrect/unresolved `node_modules` paths - But: `evalModule('module.exports = require("expo-modules-autolinking/exports")', fs.realpathSync(configPath))` will succeed # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why On the new architecture (bridgeless), `EXDevLauncherController.isAppRunning` always returned `false` because it relied on the removed `RCTBridge` (`_appBridge` was always nil). This caused the dev launcher to swallow deep link URLs instead of letting them through to `RCTLinkingManager`, so warm deep links never reached JS. # How - Removed the `appBridge` (`RCTBridge`) property and all its usages from `EXDevLauncherController`. - `isAppRunning` now delegates to `self.delegate.isReactInstanceValid()`. - `EXDevLauncherUncaughtExceptionHandler.getWebSocketUrl` now uses `controller.sourceUrl()` instead of `appBridge.bundleURL` # Test Plan 1. Build bare-expo with dev client on iOS. 2. With the app running, execute `xcrun simctl openurl booted "bareexpo://components/video/fullscreen"`. 3. Verify the app navigates to the Video Fullscreen screen. 4. Verify cold-start deep links still work: kill the app, then run the same `openurl` command. # Checklist - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )