refactor: finish package split cleanup — remove ios renderer shims and deduplicate createVoltraComponent#156
Merged
V3RON merged 2 commits intoMay 25, 2026
Conversation
The ios package had 7 one-liner re-export shims (context-registry, dispatcher, element-registry, flatten-styles, render-cache, stylesheet-registry, types) left over from the package split. These made the package look like it had its own renderer implementation. Delete the shims and clean up the barrel index — all three internal consumers already import from renderer/index.js or renderer/renderer.js, which remain unchanged.
The createVoltraComponent implementation was duplicated verbatim in @use-voltra/ios and @use-voltra/android. Core already owns and exports it — replace both copies with re-exports. Internal consumers within each platform package continue to import from the local path, transparently resolving through the re-export.
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
Follow-up to #149. The package split was done mostly automatically, leaving behind a few cases of code duplication. This PR finishes the cleanup.
packages/ios/src/renderer/shims — 7 one-liner re-export files (context-registry,dispatcher,element-registry,flatten-styles,render-cache,stylesheet-registry,types) were left over from the split, making@use-voltra/ioslook like it had its own renderer. Removed them and cleaned up the barrelindex.ts.createVoltraComponentfrom core — the implementation was duplicated verbatim in@use-voltra/iosand@use-voltra/android. Core already owns and exports it — both platform packages now re-export from there. Internal consumers within each package continue to import from the local path, transparently resolving through the re-export.What was considered but left alone
chart-types.ts(ChartDataPoint,SectorDataPoint) — identical 2-line type file in both platform packages. Moving to core would give a platform-agnostic renderer package chart-domain knowledge. Duplication is acceptable at this size.useUpdateOnHMR.ts— identical 20-line RN hook in both client packages. Uses__DEV__and Metro'sglobal.__accept, so it can't go to core. No appropriate shared home without a new package for 20 lines.widgets/server-credentials.ts— near-identical in@use-voltra/ios-clientand@use-voltra/android-client, differing only in the native module import, error message platform label, and caller. The differences are genuine platform facts; there is no valid shared home (clients cannot depend on each other, and both are restricted from importing@use-voltra/coredirectly).VoltraRNNativeComponent.ts— present in both clientnative/dirs, differing only in the registered native view name ('VoltraView'vs'AndroidVoltraView'). Intentional — different native components for each platform.fonts.tsacross expo-plugins — not actually duplicated.packages/expo-plugin/src/utils/fonts.tsis a shared utility; the platform-specific plugin files (ios-client/expo-pluginandandroid-client/expo-plugin) importresolveFontPathsfrom it. Structure is correct.@use-voltra/iosand@use-voltra/android— already in place in refactor: migrate native module from Expo Modules API to React Native Turbo Modules #149.peerDependencies.Test plan
tsc --noEmitpasses on@use-voltra/iosand@use-voltra/android@use-voltra/iostest suite passes (5/5)@use-voltra/androidtest suite passes (6/6)oxlintpasses on all changed packages