Skip to content

Conversation

@emily8rown
Copy link
Contributor

Summary:
Changelog: [GENERAL] [CHANGED] - createDevMiddleware now accepts string | URL for serverBaseUrl

Replaces the serverBaseUrl string type with a native URL object across the Metro CLI and Gateway packages.

This change improves type safety and makes URL manipulation more robust by leveraging the built-in URL API instead of string concatenation.

The public createDevMiddleware API has been updated to accept either a string or URL for the serverBaseUrl option.
Internally within the dev-middleware package, the internal APIs (InspectorProxy, openDebuggerMiddleware, getDevToolsFrontendUrl) use URL objects instead of strings.
https://www.npmjs.com/package/react-native/dev-middleware

Reviewed By: vzaidman

Differential Revision: D90987090

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 23, 2026
@meta-codesync
Copy link

meta-codesync bot commented Jan 23, 2026

@emily8rown has exported this pull request. If you are a Meta employee, you can view the originating Diff in D90987090.

Summary:
Pull Request resolved: facebook#55285

Changelog: [GENERAL] [CHANGED] - `createDevMiddleware` now accepts `string | URL` for `serverBaseUrl`

Replaces the serverBaseUrl string type with a native URL object across the Metro CLI and Gateway packages.

This change improves type safety and makes URL manipulation more robust by leveraging the built-in URL API instead of string concatenation.

The public createDevMiddleware API has been updated to accept either a string or URL for the serverBaseUrl option.
Internally within the dev-middleware package, the internal APIs (InspectorProxy, openDebuggerMiddleware, getDevToolsFrontendUrl) use URL objects instead of strings.
https://www.npmjs.com/package/react-native/dev-middleware

Reviewed By: vzaidman

Differential Revision: D90987090
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants