This repository was archived by the owner on Feb 15, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
feat(core): adding rn 83 support #94
Open
zackarychapple
wants to merge
3
commits into
main
Choose a base branch
from
rn-83-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| /** | ||
| * Metro Compatibility Layer | ||
| * | ||
| * Provides backwards-compatible imports for Metro 0.82 and 0.83+ | ||
| * | ||
| * Metro 0.83 introduced a restrictive `exports` field that only allows | ||
| * `metro/private/*` paths instead of direct `metro/src/*` imports. | ||
| * | ||
| * This module dynamically resolves the correct import path based on the | ||
| * installed Metro version, ensuring compatibility with both versions. | ||
| */ | ||
|
|
||
| /** | ||
| * Attempts to import from Metro 0.83 format first, falls back to 0.82 format | ||
| */ | ||
| function tryImport(metro83Path: string, metro82Path: string) { | ||
| try { | ||
| return require(metro83Path); | ||
| } catch { | ||
| return require(metro82Path); | ||
| } | ||
| } | ||
|
|
||
| // Server class | ||
| export const Server = tryImport( | ||
| 'metro/private/Server', | ||
| 'metro/src/Server' | ||
| ).default; | ||
|
|
||
| // DeltaBundler Serializers | ||
| export const baseJSBundle = tryImport( | ||
| 'metro/private/DeltaBundler/Serializers/baseJSBundle', | ||
| 'metro/src/DeltaBundler/Serializers/baseJSBundle' | ||
| ).default; | ||
|
|
||
| // Utility classes | ||
| export const CountingSet = tryImport( | ||
| 'metro/private/lib/CountingSet', | ||
| 'metro/src/lib/CountingSet' | ||
| ).default; | ||
|
|
||
| // Bundle utilities | ||
| export const bundleToString = tryImport( | ||
| 'metro/private/lib/bundleToString', | ||
| 'metro/src/lib/bundleToString' | ||
| ).default; | ||
|
|
||
| export const relativizeSourceMapInline = tryImport( | ||
| 'metro/private/lib/relativizeSourceMap', | ||
| 'metro/src/lib/relativizeSourceMap' | ||
| ).relativizeSourceMapInline; | ||
|
|
||
| // Re-export types - these come from metro/src/shared/types in both versions | ||
| // The types themselves are available through the main 'metro' package export | ||
| export type { RequestOptions, OutputOptions } from 'metro/src/shared/types'; |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should not be necessary since the existing
^0.82.1matches0.83.0or higher already