Repository navigation
fix(react-native): keep metadata.android when writing nativescript.react-native.json - #85
Merged
ammarahm-ed merged 1 commit intoOct 25, 2026
Conversation
…act-native.json The config plugin and nativescript-rn configure replaced the whole reactNative.metadata block, so every prebuild or configure run deleted a hand-written metadata.android.include. That list is what keeps classes, including autolinked module packages, in filtered Android release metadata. Merge into the existing metadata instead, accept metadata.android.include in the plugin options, and write the file on Android-only prebuilds too.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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.
Split out of #77.
Summary
ensureMetadataConfigreplaced the wholereactNative.metadatablock innativescript.react-native.json, so every prebuild orconfigurerun deleted a hand-writtenmetadata.android.include. That list is the only way to keep a class in filtered Android release metadata when the bundle analysis can't see it. It is also the only way to keep autolinked module packages, because the release blacklist beatswhitelist.mdg.reactNative: { ...existingReactNative, - metadata: metadataOptions, + metadata: { ...existingMetadata, ...metadataOptions }, }metadata.android.includein its options. If it's omitted, a hand-writtenandroidblock is kept.Evidence
node test/config-plugin.test.jsruns the real plugin against temp project directories.androidblock is gone.metadata.androidsurvives a run, and plugin options can set it.Merge Danger
Door: two-way
Blast Radius:
nativescript.react-native.jsonKeys under
metadatathat the plugin doesn't set are now preserved instead of dropped.