Skip to content

[pull] main from expo:main#847

Merged
pull[bot] merged 16 commits into
code:mainfrom
expo:main
May 8, 2026
Merged

[pull] main from expo:main#847
pull[bot] merged 16 commits into
code:mainfrom
expo:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 8, 2026

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 : )

amandeepmittal and others added 16 commits May 8, 2026 21:26
…side source-map support (#45507)

# Why

This replaces `source-map-support` with Node's native source-map
support, which reduces overhead that our current implementation adds,
the non-wasm version of `source-map` adds, and the retention of larger
source maps. This also drops `sourcesContent` from the server-side
source-maps, which had a large impact on memory usage too and is
basically pure overhead.

Anecdotally, in `apps/router-e2e`'s `static-rendering` start-up, a
single render ends up at a steady 365MB heap size rather than 522MB. The
reduction compounds as more server-side code is evaluated.

# How

- Add `excludeSource` serializer option and thread it through to
source-map creation
- Default to `excludeSource: true` for server-side (`node` &
`react-server`) environments
- Add source-map support to `@expo/require-utils`' `evalModule`
- Drop and replace `source-map-support` and other manual symbolication
code from `serverLogLikeMetro` in the CLI

# Test Plan

- Manually ran `pnpm start:server-rendering` in `apps/router-e2e`, then
edited `__e2e__/static-rendering/app/index.tsx` to add `throw new
Error('test')` to the component, and validated that the terminal output
remains identical
- Also, throw an error in the `start:headers` API route test and check
that the stack trace is symbolicated and formatted
- Manually evaluated that the `@expo/require-utils` approach works in
Node 20 and Node 22
- We'll need to double-check Windows support manually separately

# 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)
…OS tmpdir (#45553)

# Why

Clearing the Metro caches for any sizable project is painfully slow
right now and hangs on startup. The problem is that a cache can be quite
large and a recursive `rmSync` can be very slow.

# How

If the cache directory is in the OS `tmpdir` (and will be cleaned up
automatically presumably), we can be less careful and rename
synchronously, then try deleting asynchronously. This gets rid of the
startup performance penalty with `--clear`

# Test Plan

- Manually tested on `apps/bare-expo` by running `--clear` after a full
`expo start` + bundle before

# 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)
…ap` (#45552)

# Why

#45463 has demonstrated that `resolver.blockList` can easily become a
footgun since it's not well documented what happens to these regular
expressions. Also patterns such as `.*` explicitly become un-anchored,
defeating some of Irregexp's optimizations.

# How

We can do slightly bettern by stripping out anti-patterns that don't
alter the match e.g. leading and trailing `.*` and the likes, and
pre-sorting the regular expression.

**Note:** This is largely LLM-generated with slight instructions on how
Irregexp functions and what we'd like to strip out.

# Test Plan

- Captures snapshots of patterns of what RegExp patterns can be
optimized

# 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)
…tack and drawer imports (#45546)

# Why

When `@react-navigation/native-stack` or `@react-navigation/drawer` is
directly imported in the code users see general error message:

<img width="817" height="215" alt="image"
src="https://github.com/user-attachments/assets/b5c1025d-4ac5-40b6-bbd3-9ae14ae280de"
/>

In this case, we can provide more context by pointing out that they
should migrate to the `Stack` or `Drawer` navigators from Router.

# How

1. Add a check to metro plugin for `moduleName ===
'@react-navigation/native-stack' || moduleName ===
'@react-navigation/drawer'`. In such case throw a more descriptive error
2. Add a check to codemod to notify users they should manually change
these imports

# Test Plan

1. CI
2. Local project

**codemod**
<img width="803" height="361" alt="Screenshot 2026-05-08 at 15 13 03"
src="https://github.com/user-attachments/assets/103ead7b-5110-49bd-822f-90ac005dcb08"
/>


**metro**
<img width="803" height="302" alt="Screenshot 2026-05-08 at 15 26 42"
src="https://github.com/user-attachments/assets/5368a8fb-97a9-4df4-b1f3-90c7bb3df68d"
/>



# 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)
# Why

I think this hook is also useful as part of public API.

# How

Reexport it from react-navigation

# 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)
# Why

The main session id is needed on the JS side in order to add metrics to
main session.

# How

Add `getMainSession` (android only for now). Once the router integration
is finished on android, we can add all missing APIs on iOS as well

# Test Plan

Observe tester

# 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)
…nt server bundles from being retained indefinitely (#45509)

# Why

Stacked on #45507

Preventing the `require.cache` additions stops us from retaining the
server modules indefinitely. This also keeps the source-maps around now,
and disconnecting the module means that when we load a new one, the old
one leaves memory and gets garbage collected entirely, including the
source-maps.

# How

- Add `cache` option to `evalModule` to skip `require.cache` alterations
- Pass `cache: false` in CLI's `evalModule` call

# Test Plan

- Manually tested by opening `apps/router-e2e` making changes repeatedly
and comparing heap snapshots before and after (heap size shouldn't
change)

# 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)
…ntime-aware (#45419)

# Why

Sync functions installed in the worklet UI runtime were converting
native return values using `appContext.runtime` (main runtime) which
resulted in `undefined` values for composite types like dictionary,
array etc. Only primitives were working. This PR makes dictionary, array
work for such functions. A bigger PR is needed to support all the types
(Encodable, TypedArray etc) and we can do some cleanup and make most of
the methods accept `runtime` argument. I will look into it in a separate
PR.

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

# How

- Added runtime variant `castToJS`, `toJS`, `anyToJavaScriptValue,` etc
methods.
- `SyncFunctionDefinition.call` now uses the runtime-aware `toJS(_:_:in:
runtime)`.

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

# Test Plan

- Added `RuntimeTargetedConversionTests`
- Logging `phoneSelection.value.start` value in `TextFieldScreen.ios`
should log actual value instead of `undefined`.
<!--
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)
# Why

Running `et generate-docs-api-data --packageName expo-router` was
failing with the following error message:

```
error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
```

# How

Bumped `typescript` to `^6.0.3` and `typedoc` to `^0.28.19` in
`tools/package.json`.

# Test Plan

- CI
- Run `et generate-docs-api-data --packageName expo-router`

# 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

Add the `expo-api-docs` skill to the repo so all contributors get TSDoc
writing guidelines when working on Expo SDK packages.
It is especially useful when adding new public APIs to SDK packages -
Claude is no longer misusing `@platform` annotations and making-up
conventions.

# How

Used Claude skill-creator to:

- Read [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- Browse existing patterns in `packages/*/src`

Then made some manual hand-made adjustments.

# Test Plan

- Verify the skill appears in Claude Code's available skills list when
working in the repo.
- Tested it on file-system - see #45530
expo-updates@56.0.6
@expo/ui@56.0.4
expo-processing@56.0.5
expo-router@56.1.1
expo-observe@56.0.5
expo-modules-jsi@56.0.2
expo-modules-autolinking@56.0.3
expo-modules-core@56.0.5
expo-module-template@56.0.3
expo-linking@56.0.4
expo-file-system@56.0.4
expo-dev-menu@56.0.5
expo-dev-launcher@56.0.5
expo-dev-client@56.0.5
expo-codemod@56.0.2
expo-auth-session@56.0.4
expo-app-metrics@56.0.5
expo@56.0.0-preview.7
babel-preset-expo@56.0.5
@expo/require-utils@56.1.0
@expo/router-server@56.0.5
@expo/prebuild-config@56.0.4
@expo/metro-runtime@56.0.5
@expo/metro-file-map@56.0.0
@expo/metro-config@56.0.5
@expo/log-box@56.0.6
@expo/config-types@56.0.2
@expo/cli@56.1.0
expo-template-tabs@56.0.7
expo-template-default@56.0.7
expo-template-blank@56.0.7
expo-template-bare-minimum@56.0.7
expo-template-blank-typescript@56.0.7
@expo/image-utils@0.9.2
expo-constants@56.0.6
@expo/config@56.0.3
@expo/config-plugins@56.0.3
@expo/fingerprint@0.17.4
expo-asset@56.0.6
expo-splash-screen@56.0.4
expo-task-manager@56.0.5
expo-build-properties@56.0.5
patch-project@56.0.7
expo-background-task@56.0.5
expo-background-fetch@56.0.5
expo-sharing@56.0.5
expo-notifications@56.0.5
expo-location@56.0.5
expo-insights@56.0.5
expo-image-picker@56.0.5
expo-image-manipulator@56.0.5
expo-brownfield@56.0.5
expo-widgets@56.0.5
@pull pull Bot locked and limited conversation to collaborators May 8, 2026
@pull pull Bot added the ⤵️ pull label May 8, 2026
@pull pull Bot merged commit a30353e into code:main May 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants