Skip to content

[pull] main from expo:main#874

Merged
pull[bot] merged 1 commit into
code:mainfrom
expo:main
May 18, 2026
Merged

[pull] main from expo:main#874
pull[bot] merged 1 commit into
code:mainfrom
expo:main

Conversation

@pull

@pull pull Bot commented May 18, 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 : )

#45804)

# Why

The dev server resolves deep links for `expo start` interactively via
the terminal (`i`/`a` keystrokes) and the `/_expo/link` disambiguation
page used by QR codes. There is no programmatic surface for external
tooling (preview systems, IDE integrations, distributed dev
environments) to ask the running dev server "what URL should I use to
open this project on iOS/Android/web?" without scraping the
disambiguation HTML.

This adds a documented `/_expo/open` endpoint that returns structured
info about how to open the project, mirroring the CLI's existing
resolution behavior.

# How

- New `OpenMiddleware` registered at `/_expo/open` supporting `GET`
(discovery / per-platform info) and `POST` (action — actually opens the
project).
- New `createOpenMiddlewareOptions` factory that wires the middleware to
the same runtime resolution and platform-launch logic used by the
keyboard shortcuts.
- Per-platform responses include `runtime` (`expo` | `custom` | `web`,
omitted when disambiguation is required), `url`, and `appId` (bundle
identifier / package name) so callers can check install state before
deep linking.
- `runtime` request parameter accepts `default` (mirrors `i`/`a`),
`expo` / `custom` (force a direct link), and `unknown` (force the
disambiguation page).
- Response cache disabled; no host machine info leaked in responses.

# Test Plan

- Unit tests for the middleware and option factory covering discovery,
per-platform GET, POST actions, runtime disambiguation, missing scheme,
missing app ID, and the `unknown` runtime override (~736 lines of new
tests).
- `yarn lint`, `yarn tsc --noEmit`, and `yarn prepare` all clean in
`packages/@expo/cli`.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators May 18, 2026
@pull pull Bot added the ⤵️ pull label May 18, 2026
@pull pull Bot merged commit d5385d2 into code:main May 18, 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.

1 participant