Repository navigation
fix(webrtc)!: make React Native WebRTC an optional peer - #3657
Merged
tabcat merged 4 commits intoOct 10, 2026
Merged
Conversation
BREAKING CHANGE: React Native applications must install react-native-webrtc explicitly alongside @libp2p/webrtc.
The linked Documentation/GettingStarted.md does not exist, point at the README section instead.
The escape is not needed inside a code fence and rendered literally.
It only restated the manifest and would fail on dev-only dependency bumps.
Member
|
Thanks! |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
I moved
react-native-webrtcfrom a runtime dependency to an optional peer, keeping the same version range and a development dependency so the React Native entry point remains available during development. Node.js and browser consumers no longer need to resolve the React Native/Metro subtree.I documented the explicit React Native installation step in the package documentation and regenerated the README. I added a Node-only regression test for the dependency contract, including the optional peer metadata, development version range, and existing React Native entry-point mapping. The transport runtime is unchanged.
Fixes #3609
BREAKING CHANGE: React Native applications must explicitly install
react-native-webrtc@^124.0.6alongside@libp2p/webrtc; it is no longer installed transitively.Notes & open questions
I checked this with Node.js 22.23.1 and npm 10.9.8:
npx eslint src/index.ts test/node.ts— passed.npx mocha test/node.ts --timeout 60000— 1 passing. The same test fails against the upstream package manifest becausereact-native-webrtcis a regular dependency.npm run dep-checkinpackages/transport-webrtc— passed.npx aegir docs --publish false -- --skipErrorChecking— generated the package README; this is documentation generation, not a TypeScript validation result.git diff --check— passed.npm pack --ignore-scripts --jsonand default peer resolution withnpm install --package-lock-only --ignore-scripts --no-audit --no-fund. The upstream manifest produced 328 lockfile entries including React Native/Metro; the patched tarball produced 104 entries, with noreact-native-webrtc,react-native,@react-native/*, Metro, orimage-size. This checks dependency resolution, not native execution.I am leaving the full monorepo build and transport/platform suites to CI. My full build did not complete. The subsequent project-reference TypeScript build and documentation checks were blocked by missing built workspace packages (including
@libp2p/gossipsuband@libp2p/noise), so I am not reporting the completenpm run lintor full test suite as passing. I have not tested a React Native application.Change checklist