fix: use GitHub URLs for plugin includes instead of relative paths#10
Merged
fix: use GitHub URLs for plugin includes instead of relative paths#10
Conversation
- Change react-native plugin to include android/ios via GitHub URLs - Fixes issue where relative paths break when using GitHub URL includes - Enables proper usage via github:segment-integrations/mobile-devtools?dir=plugins/react-native Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
abueide
added a commit
to segmentio/analytics-react-native
that referenced
this pull request
Apr 15, 2026
- Remove explicit android/ios plugin includes - Use mobile-devtools branch with GitHub URL includes fix - React-native plugin now properly includes android/ios via GitHub URLs - Depends on segment-integrations/mobile-devtools#10 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change from local path to GitHub URL with PR branch ref - Fixes test failures where local plugin has GitHub URL includes - Tests the production scenario of including via GitHub URL - After merge, will update to use main branch This fixes the react-native E2E test failures where mixing local path includes with GitHub URL includes caused conflicts. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change back to path:../../plugins/react-native/plugin.json - Example should test local plugin during development - Plugin internally uses GitHub URLs for android/ios dependencies - External consumers use GitHub URLs to include the plugin Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.
Summary
Update react-native plugin to use GitHub URLs for including android and ios plugins instead of relative file paths.
Changes
path:../android/plugin.jsontogithub:segment-integrations/mobile-devtools?dir=plugins/androidpath:../ios/plugin.jsontogithub:segment-integrations/mobile-devtools?dir=plugins/iosWhy
Relative paths break when plugins are included via GitHub URL (e.g.,
github:segment-integrations/mobile-devtools?dir=plugins/react-native). The path resolver can't resolve../androidrelative to a GitHub URL directory parameter.This fix allows consumers to cleanly include just the react-native plugin via GitHub URL, and it will automatically pull in android and ios dependencies using GitHub URLs as well.
Final State
path:../../plugins/react-native/plugin.jsonfor testinggithub:segment-integrations/mobile-devtools?dir=plugins/react-nativeTesting Strategy
Tests will fail on this PR because the plugin tries to fetch android/ios from GitHub (main branch) before this change is merged. Force merge this PR, then tests will pass on subsequent runs since main will have the proper GitHub URL structure.
Usage
External repos can now use:
{ "include": [ "github:segment-integrations/mobile-devtools?dir=plugins/react-native" ] }🤖 Generated with Claude Code