feat: Upgrade Nitro to 0.37 for View improvements - #166
Merged
Conversation
peerDependencies "*" doesn't match prereleases per semver, so bun auto-installed a nested 0.36.5 copy under each workspace package. Metro bundled that 0.36.5 JS while native built against 0.37.0-beta.0, tripping Nitro's "installed twice" version guard in the harness tests.
Nitrogen 0.37.0-beta.1 renames CachedProp<T> to ReactProp<T> in generated view props, so specs were re-generated. CachedProp remains as a deprecated alias upstream and no hand-written code referenced it. Also drops the react-native-nitro-modules override again - now that #170 marks the peer dependency as optional, bun no longer installs a second stable copy alongside the pre-release, so the workaround is redundant.
0.37.0 stable generates identical specs to 0.37.0-beta.1, so there is no codegen delta - only the version pins and lockfiles change.
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.
Updates
react-native-nitro-modulesandnitrogento 0.37.0, regenerates specs and reinstalls Pods.The regenerated view code picks up Nitro 0.37's View improvements:
updateViewProps(view, newState, oldState))ViewComponentDescriptor/ViewPropsHolderStatemoved into NitroModules instead of being emitted per-viewCachedProp<T>in generated view props is renamed toReactProp<T>(CachedPropremains a deprecated alias upstream; no hand-written code referenced it)Same change as margelo/react-native-vision-camera#4164.
Verified green on the betas along the way (
0.37.0-beta.0->beta.1->0.37.0);0.37.0generates specs byte-identical tobeta.1, so the final bump is version pins and lockfiles only.Note on pre-release peer resolution (resolved)
While this PR was on the betas,
peerDependenciesof"*"did not match the pre-release (semver excludes pre-releases from ranges), so bun installed a nested stable 0.36.5 copy under each workspace package. Metro then bundled 0.36.5 JS against 0.37.0-beta native code and Nitro's "installed twice" guard fired in the harness tests.That was worked around with a root
overridespin, then fixed properly in #170 by marking the peer dependency optional - the override has since been removed. Now that 0.37.0 is a stable release the range matches again anyway, but the optional peer keeps future pre-release testing working.