Conversation
…CFrameworks (#45381) # Why When building Expo apps with `EXPO_USE_PRECOMPILED_MODULES` set to 1, we don't check if React Native is built from source or not. Using Expo precompiled frameworks requires the React.XCFramework, so this will fail if not being synced. # How Added check for `RCT_USE_PREBUILT_RNCORE` when checking if Expo XCFrameworks can be enabled - emits a clear warning at the end of pod install if RN is built from source while `EXPO_USE_PRECOMPILED_MODULES` is set to 1. # Test-plan Run pod install in apps/minimal-tester with `EXPO_USE_PRECOMPILED_MODULES=1` - verify that the warning is displayed. # 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) --------- Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
…to be unexported (#45357) # Why ENG-20969 `com.canhub.cropper.CropImageActivity` is always exported, which may lead to security issues. # How Add an entry in `AndroidManifest` of the image-picker to override the exported status of CropImageActivity. We don't need it to be exported. # Test Plan Cleaned the app/build folder and checked the merged manifest - the activity is no longer exported. Also checked in BareExpo on a Pixel 8 - The image picker still works without issues
) # Why If a 3rd party framework is enabled (EXPO_USE_PRECOMPILED_MODULES=1 and EXPO_PRECOMPILED_MODULES_BASE_URL is set), a 404 from a missing package caused the pod install to fail with an error saying something like "nil cannot be used as String". # How The error was that we didn't handle 404 correctly when trying to download - not falling back to source builds corrcetly. This is fixed by handling 404 correctly. Also added better logging for this case. # Test-plan ✅ Builds correctly with 3rd party xcframeworks in test projects created with `npx create-expo-app` - also tested in sdk-55 branch with latest sdk
…45371) # Why The streaming SSR metadata APIs (`generateMetadata`, `useServerDocumentContext`) are now ready for the SDK 56 beta, but require documentation. Additionally, the `expo-router/html` entrypoint's exports were invisible to the API documentation generator. # How - Updated documentation in `/pages/router/web/server-rendering.mdx` to show how to use `generateMetadata()`. - Created `packages/expo-router/src/html.ts` as the "canonical" source file so the API doc generator can pick it up. Updated `html.js` and `html.d.ts` entry points to re-export from this file. - Converted `<ScrollViewStyleReset>` and `<Sitemap>` from function declarations to `React.FC` const exports so they appear under "Components" in the API reference. - Regenerated API data for `expo-router` and `expo-server`. # Test Plan - CI # Checklist - [ ] 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) - [x] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [x] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) --------- Co-authored-by: Phil Pluckthun <phil@kitten.sh> Co-authored-by: Aman Mittal <amandeepmittal@live.com>
# Why Development mode previously rendered pages as static HTML even when `unstable_useServerRendering` was enabled. This PR brings the development experience in line with production by using the newly-introduced `getStreamingContent()` function from `@expo/router-server`. This PR does not affect existing RSC behavior. # How In `@expo/cli`, the dev server now calls `getStreamingContent()` to produce a `ReadableStream<Uint8Array>` when `unstable_useServerRendering: true`. In `@expo/router-server`, `GetStreamingContentOptions.assets` now has an `inlineCss` property which is populated by the CLI so it can inject CSS as inline `<style>` tags. # Test Plan - CI - Manually run E2E fixtures: - `pnpm --filter @expo/router-e2e run start:server-loader` - `pnpm --filter @expo/router-e2e run start:server-rendering` # Checklist - [ ] 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) - [x] 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 Documents the new Suspense fallbacks feature added in #43885 # How Updated `async-routes.mdx` and `error-handling.mdx` with information on how to use layout-level Suspense fallbacks. # Test Plan None required # Checklist - [ ] 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) - [x] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [x] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why Removes a workaround for a problem fixed in this pr #41054 # How Removes override functions as they are no longer needed # Test Plan ✅ BareExpo
# Why - An exception was thrown when entering the screen because getMediaSubtypes is an iOS-only function. - The video source was not available, replaced it with the one from expo-test-media-com # How - Move getMediaSubtypes into an iOS if statement - Changed the video url # Test Plan ✅ BareExpo
# Why All the get/set tests shared the same contact which led to a problem where setting given and family name to null removed the contact on some devices and the rest of tests failed # How Changed before/afterAll to beforeAfterEach # Test Plan BareExpo ✅
…deoView` is unmounted before `finish()` (#45199) Fixes #45192. ## Problem `FullscreenPlayerActivity.finish()` calls `VideoManager.getVideoView(id)` unconditionally. If the React component hosting the `VideoView` has been unmounted while the fullscreen activity is still alive (e.g. the user backgrounds the app, the OS recycles the component, and then the user navigates back), `VideoManager` no longer holds a reference to that view and throws `VideoViewNotFoundException`. This propagates as a fatal `RuntimeException` crash. The race is intermittent but reliably reproducible with constrained emulator resources. ## Fix Wrap the `getVideoView` call in `finish()` in a try-catch. If the view is already gone, log a warning and skip `attachPlayer()` — there is nothing to attach to, and the activity is closing anyway. --------- Co-authored-by: Dor Alagem <doralagem@MacBook-Pro-sl-Dor.local>
# Why fixes the calendar@next errors from the QA: ``` [FAIL] Calendar@next Global functions listEvents() returns an array of events Error: The 1st argument cannot be cast to type CalendarRecordNext → Caused by: Cannot cast '4283143818.0' for field 'color' of type Optional<UIColor> → Caused by: Cannot convert 'Optional(Optional(4283143818.0))' to UIColor ``` # How Adds a conversion from double to UIColor to `Convertibles+Color.swift` # Test Plan Added a native test
# Why `useCalendarPermissions` and `useRemindersPermissions` were re-exported from the legacy module and were marked as deprecated. # How Added `useCalendarPermissions` and `useRemindersPermissions` to the `Calendar.ts`, Replaced the imports in the `CalendarNextScreen` # Test Plan BareExpo ✅
# Why The doc comments need an update after the Android toolbar was added # How <!-- How did you build this feature or fix this bug and why? --> # Test Plan <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [ ] 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) --------- Co-authored-by: Aman Mittal <amandeepmittal@live.com>
…45227) # Summary Resolves #42854 Resolves DVT-76 This implements a new TypeScript resolver, replacing the old logic for it entirely. This improves performance, fixes a few edge cases, and readies us for TypeScript 6 support in SDK 56. #### Fixed - `paths` is now correctly respected without `baseUrl` and uses the config path (where `paths` are defined) as the base path for the path mappings - `jsconfig.json` now have identical `extends` semantics and are treated identically to `tsconfig.json` when they're used - TypeScript resolver support is now independently implemented from the `typescript` package, which makes this a more durable re-implementation for TypeScript 7 #### Changed - `paths` may now potentially be ignored when prefixes overlap, which in practice should happen rarely - Metro's file map is used for `tsconfig.json` resolution, with Node-like resolution semantics, which avoids extra file system lookups - The watcher directly receives parsed paths, so it's more precise - The first resolution loads the `tsconfig.json` lazily #### Edge cases There's a few edge cases I've intentionally ignored. - The prefixes are regex-based, which is fast, but doesn't handle fallback lookups of wildcard paths. In practice, this should rarely be used, and doesn't affect empty prefixes, since they're handled separately - Some tools seem to support `package.json:exports` and `package.json:tsconfig` for `extends` lookups, but in practice, I couldn't find any example of this being used on GitHub - `baseUrl` is still supported (since it's still possible to use it with TypeScript 6), and we rely on TypeScript to enforce its removal (users may opt TS back into `baseUrl` until TS 7) - We don't validate the `tsconfig.json` files and rely on the users to check TS for this #### Performance The TypeScript resolver itself is likely 5-8x times faster in typical use and shouldn't be a bottleneck anymore in any project. The TypeScript config is pre-processed into a set of exact matches, prefix matches (via a regex; mirroring the other resolvers), and a lookup map of suffixes & mappings. The mappings are pre-resolved. Not loading `typescript` itself saves up to ~100ms on startup, and potentially more time when parsing and looking up `tsconfig.json` files. # Test Plan - Unit tests added to cover the new logic (excluding resolver, which should be covered by E2E) - `withMetroMultiResolver.test.ts` was touched up - Manually tested against `apps/router-e2e`'s `link-preview` test (`pnpm start:link-preview`) # 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)
#45254) # Why The way in which we added config files conflicts definitively with Babel's `configFile: true` default and also happens to disable the `babelrcRoots`/`babelrc` overrides. This means that nested `babelrc` searching in other monorepo workspaces and `node_modules` was already disabled. It's also undesirable behaviour we don't want to activate in any case. Further, `babelrc` is often redundant, and only really applies to sub-folders in the `projectRoot`, which is a very narrow case. The changes in this PR basically disable Babel's `babelrc` and `configFile` discovery entirely by default. They still happened but were mostly then not used or overridden/ignored # How This changes the `enableBabelRCLookup` to a new distinct `undefined` option. This still activates our Babel transformer's loading of the root Babel config. However, it disables all redundant config file lookups _and_ disables nested `.babelrc` lookups. The old behaviour can still be restored with `enableBabelRCLookup`. However, `babelrc` support in `node_modules` (which already shouldn't work) is now explicitly disabled. The `false` behaviour is unchanged. This changeset also adds support for more Babel config paths. If we're not adding this, `enableBabelRCLookup: true` with `configFile: true` on Babel can create a conflict, which causes errors and/or `babelrcRoots` to be overridden. This was already broken and is safe to avoid. > [!NOTE] > A future improvement would be to assess this `getCacheKey` update for our Babel transformer fork: facebook/metro#1638 > However, we may also want to pre-resolve the Babel config path and pass it via a new `customTransformOptions` to avoid redundant config file discovery in the transform workers, and to make it explicitly part of the cache key too, independent of the `getCacheKey` modification above (which does the other half of taking config options into account too) # Test Plan - Tests were added to validate the behaviour # 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)
…tranformer and add granular Babel config file cache key (#45260) # Why Adopts the upstream change at facebook/metro#1638 to use `loadPartialConfigSync` from Babel to create a more granular cache key for the Babel transformer. This now exposes `getCacheKey` from `babel-transformer`. This also adds a Babel config name hint to the `transformer` config in CLI via `instantiateMetro`. This was added to "hint" at the transformers where to find the config, so they don't have to repeat discovery. This is to complement #45254, and reuses an existing config key that's gone unused prior. # How - Add `extendsBabelConfigPath` in `instantiateMetro` to `config.transformer` - Pass `extendsBabelConfigPath` on to Babel transformer and `getCacheKey` - Use as a hint to load the Babel config path # Test Plan - Unit tests added for `getCacheKey` - Existing tests should pass unchanged # 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)
… from RN preset (#45337) # Why This is a major refactor of `babel-preset-expo` that aims to regroup the config into separate parts that differentiate between responsibilities and merges `@react-native/babel-preset` into our own config. This is a prerequisite to having multiple configs for different environments that are more cleanly separated and maintainable. (Namely: `src/config/webview` for DOM components, and `src/config/hermes-v0` for the legacy config) # How When applied: - all plugins move to `src/plugins` - this splits our config into a few parts: - `src/config/flow.ts` (strip flow types, convert flow enums) - `src/config/typescript.ts` (transform typescript) - `src/config/{hermes-v0,hermes-v1,webview,web}` (per-platform/engine configs) - `src/config/module-transforms` (shared module syntax/runtime transforms) - `src/config/expo` (shared expo config) - `src/syntax` (parser/syntax plugins) The deprecated `disableFlowStripTypesTransform` option has been deleted. Disabling it was unsupported and would lead to issues, hence it's been flagged as deprecated, and should now be removed. The deprecated `useTransformReactJSXExperimental` option has been deleted. We only apply the `react-jsx` (modern JSX) transform in a single way, and don't support altering this anymore. The old option has been deprecated for a while. The `babel-plugin-codegen` and `warn-on-deep-imports` plugin references are in `src/config/expo`, since they're global. # Test Plan Before applying any changes, a "preset test" was added that evaluates which plugins are loaded, and in what order they're in, via a snapshot test. The changes that this PR makes can be observed by stepping through commits and looking at the changes in its snapshots: 1ae406d Some fixture tests have changed since `@babel/plugin-transform-runtime` isn't quite correctly configured for tests, and some tests look at the whole evaluated config (which we can maybe now avoid in the future due to the sub-presets) # 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)
…nsforms (#45345) # Why Stacked on #45337 We're dropping several Babel plugins and transforms that are obsolete in Hermes v1. Some of these have concessions but all of these are captured in the added JS tests in `test-suite` in #45284. # How See: https://exponent-internal.slack.com/archives/C5ERY0TAR/p1777650287978739 - Drops several Babel plugins - Adds dropped plugins that had overlap with webview config back to webview # Test Plan - Run `test-suite` with `expo start --clear` against `bare-expo` and run all JS compliance tests from #45284 # 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)
…ip deprecated transforms (display-name, _source/_self) (#45351) # Why Stacked on #45337 With `react-jsx` / modern JSX, we can skip a few steps. Specifically, with React 19, the `_source`/`_self` transform is obsolete and its outputs aren't used in the React element tree anymore. Running these transforms is expensive and we can skip them, since they'll instead be sourced at runtime and the values generated by Babel will be ignored. We also don't actually need the development/production split anymore, since React already checks on `NODE_ENV` and the transform shouldn't be different between the two. We can still apply it for the `classic` runtime however. The `react-display-name` transform is obsolete since it only really helps with `React.createClass`. With the class transform being gone, it's unlikely that class components won't have a name. The `pure` annotation was being applied in development. That's really expensive and won't actually be necessary. # How - Detach from `@babel/preset-react` / drop dependency - Apply `@babel/plugin-transform-react-jsx` manually - Switch to `@babel/plugin-transform-react-jsx-development` for classic runtime (preserving `_source` and `_self` too) - Apply `@babel/plugin-transform-react-pure-annotations` only outside of development - Drop `react-display-name` # Test Plan - This can be validated against the JS React JSX test in `test-suite`: no changes can be observed # 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 The e2e test uses the published module template, instead of the local one. Due to limitations if the package was published less than 24 hours ago the `Install dependencies` step fails. # How Use the local `expo-module-template` # Test Plan Tested by running the tests locally
# Why Stacked on #45337 The traversal the decorators plugin applies is relatively quite expensive, and can be avoided, since we know that we won't have to run it if we don't find `@\w` in the source code. I'm thinking this was meant to be deprecated entirely, but the plugin isn't yet officially marked as deprecated. This can misdetect on TSDoc/JSDoc comments, but worst case, we just run this unnecessarily, as before. # How - Add wrapper plugin that only loads `@babel/plugin-proposal-decorators` if source contains decorator-like pattern # Test Plan - CI should pass unchanged # 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)
…gin (#45354) # Why Stacked on #45337 The plugin is more expensive than it should be and a refactor that both preserves its functionality 1:1 but is cheaper is trivial. # How Rather than being the most expensive "custom" plugin, it's now somewhere in the middle, and not above all other expo plugins. # Test Plan - CI should pass unchanged / tested manually against `test-suite` # 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)
…ort/export support is enabled (#45349) # Why The `generateImportNames` call is expensive because it traverses, instantiates a new scope, then checks the entire scope for a matching name. We can skip it entirely since we're not expecting any conflicts usually. # How - Skip `generateImportNames` conditionally **Future TODO:** We should still replace this with a simple `includes` check with a name fallback. # Test Plan - CI should pass unchanged # 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)
…po-module test (#45380) # Why This currently fails "Create Expo Module" tests quite often. # How - Override env arg for minimum release age We can also choose not to pass `...process.env` and either only forward `PATH` or provide the absolute path to the `node` binary, but for now, overriding this one env var should be good enough. # Test Plan <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [ ] 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 : )