Skip to content

[pull] main from expo:main#974

Merged
pull[bot] merged 9 commits into
code:mainfrom
expo:main
Jun 17, 2026
Merged

[pull] main from expo:main#974
pull[bot] merged 9 commits into
code:mainfrom
expo:main

Conversation

@pull

@pull pull Bot commented Jun 17, 2026

Copy link
Copy Markdown

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

Ubax and others added 9 commits June 17, 2026 17:51
# Why

We need to add docs for how to create navigators in expo-router. When
working on docs, I encountered a TypeScript issue, which I solved in
this PR as well.

Another change to docs will come as part of this ticket -
https://linear.app/expo/issue/ENG-21484/deprecate-withlayoutcontext-in-favor-of-standard-navigator-integration

# How

- Add a **Custom navigators** advanced guide
(`router/advanced/custom-navigators.mdx`) covering both entry points:
building a navigator in your app and integrating an existing navigator
as a library author. It documents what `NavigatorContent` receives
(`state`, `descriptors`, `actions`, `emitter`), typed events, the
`useOnlyUserDefinedScreens`/`createProps` options, and the per-framework
entry-point layout. Registered the page in
`docs/constants/navigation.js`.
- Fix the inference gap by adding a public `NavigatorContentProps` type
that wraps `StandardNavigatorContentProps` with a phantom
`NavigatorContentInferenceCarrier`. The carrier exposes `EventMap` and
`NavigatorProps` in positions TypeScript can read back out of (they only
otherwise appear as an `emit` argument and inside an `Omit<…>`), so
`emitter.emit` is typed against the component's declared events. The
properties never exist at runtime.
- Switch `unstable_createStandardRouterNavigator` to the new
`NavigatorContentProps`, and export `NavigatorContentProps` and
`StandardNavigatorEventMapBase` from `expo-router`.

# 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

To simplify the API of marking the app interactive, we can use a
component. User can add it in the part of the component, where they know
that the screen is interactive. This will help users make the code more
unified - only a single conditional structure for the component code,
rather then separate one for `markInteractive`.

# How

Add `ObserveInteractiveMarker` component and update the docs

# Test Plan

1. CI
2. Manual tests in 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)

---------

Co-authored-by: Aman Mittal <amandeepmittal@live.com>
# Why

A follow-up to #46657.

Removes now redundant `addCustomMetricToSession` method

# How

1. Remove the method from API
2. Update code to use `mainSession.addMetric`

# Test Plan

CI

# 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)
…cross renderRouter (#46978)

# Why

Fixes #46864

`renderRouter` calls `jest.useFakeTimers()` to control navigator
animations. That resets the clock to the real current time, so any time
set with `jest.setSystemTime()` in a test gets wiped out.

# How

- Read `Date.now()` before `jest.useFakeTimers()`, then set it back with
`jest.setSystemTime()`. `Date.now()` gives the mocked time if fake
timers are on, or the real time if not, so this keeps whatever the user
set either way.

# 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: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Resolves [ENG-20741](https://linear.app/expo/issue/ENG-20741)

## Summary

This PR implements four groups of refactor tasks:
- Cross-repo JS build tasks with Turbobuild
- `**/build/**` output folders removed from tracked files
- JS build scripts switched to an `expo-build` script (SWC-based)
- `package.json:exports` added with `source` conditions for `src` TS
files

This, as a consequence means:
- `turbo build` is necessary to build source files for many tasks; to
make this easier it's been added as a repo `prepare` task (on `pnpm i`)
for now
- TypeScript `tsc` is not used as a pre-publish build tool anymore, and
we're free to use it for type-checking only
- The `expo-build` script loosely encompasses all of our usual build
configurations and skips type-checking during `turbo build` (manual
`pnpm build` invocations will still type check)
- Many changes for type checks reflect immediately due to
`customConditions: ["source"]` in the `tsconfig.base.json`
- "Sub-task" builds are now gone, `expo-module build plugin` et al are
replaced with focused `package.json:scripts` in the root package
- Many packages that published raw TypeScript source files either have
already been switched over to use `build` outputs, or should be switched
over

As a secondary consequence for future refactors:
- We can update `tsconfig.json` files to include test files
- We can update Jest's handling of TypeScript files to not type check
(and update it to Jest 30, and do other various refactors)
- We can automate secondary task tooling, like updating lint runs,
replacing `check-packages`, publishing, etc more easily
- We can potentially cut `main`'s git history to speed up the repo again
(needs to be coordinated with GitHub Support most likely in ~3 SDK
cycles)

### Usage Guide

`pnpm i` will (for now) run `turbo build` automatically and will build
all sources. The resulting repository structure should be vaguely the
same as before the PR (except build outputs won't be tracked by Git)

You can also run focused builds with `turbo build --filter [pkg]` or
with `pnpm turbo build` from an individual package, which not only
builds that individual package but all its transitive dependencies too.

If you have direnv set up and activated, the read-only remote build
cache for Turborepo is already activated, and most packages won't build
on your machine. Turborepo will instead pull cached build outputs that
CI has produced from the remote build cache on Cloudflare. (Check `.env`
for the public env vars that activate the remote build cache)

## Set of changes

- Add Turbo repo
- Add `expo-build` script
- Update various `package.json` scripts, exports, entrypoints
- Add `source` condition to various `exports` on packages that are used
as dependencies
- `shellEmulator: true` in `pnpm-workspace.yaml` to allow sh syntax in
pnpm scripts for Windows

---------

Co-authored-by: Hassan Khan <hassan@expo.dev>
Co-authored-by: kitten-agent <phil+agent@kitten.sh>
@pull pull Bot locked and limited conversation to collaborators Jun 17, 2026
@pull pull Bot added the ⤵️ pull label Jun 17, 2026
@pull pull Bot merged commit e86ae94 into code:main Jun 17, 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.

4 participants