react-native-community / react-native-community/directory
Feature Request: Add "New Arch Introduced In" Field for Bettter Compatibility Tracking
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 900
- Avg merge
- 4h 20m
- Merged PRs (30d)
- 69
Description
Currently, tools like expo-doctor use React Native Directory to check for New Architecture (Fabric) compatibility. However, the existing flags ("newArch": true/false) are binary and don't capture the nuance of which version of a library introduced New Architecture support.
This leads to a situation where a developer can be using a version of a library that does not support the New Architecture, while a newer version does. expo-doctor may not flag this, because the directory simply marks the library as compatible ("newArch": true), without any version context.
For example, our project is using @intercom/intercom-react-native: ^8.1.0 with the New Architecture enabled. This version is not compatible, but because a later version (9.0.0-beta.2) is compatible, the directory doesn't catch the issue. This results in potential runtime errors that are difficult to diagnose.
Describe the solution you'd like
I propose adding a new, optional field to the react-native-libraries.json schema: newArchIntroducedIn.
This field would be a string representing the semantic version number where New Architecture support was first introduced.
Example of the proposed JSON structure change:
{
"githubUrl": "https://github.com/intercom/intercom-react-native",
"ios": true,
"android": true,
"expoGo": false,
"web": false,
"windows": false,
"macos": false,
"newArch": true,
"newArchIntroducedIn": "9.0.0-beta.2", // <-- Proposed new field
"npmPkg": "@intercom/intercom-react-native",
"unmaintained": false
// ... rest of the fields
}
Describe alternatives you've considered
The alternative is to manually track this information, which is what we are currently doing. We've used package.json's resolutions field to enforce a minimum version, but this is a project-specific workaround and doesn't solve the problem for the wider community.
Additional context
By adding this field, tooling like expo-doctor could be updated to perform more intelligent checks. For example, it could compare the version specified in a project's package.json against the newArchIntroducedIn value. If the project's version is lower, it could provide a specific, actionable warning:
"Warning:
@intercom/intercom-react-nativesupports the New Architecture starting from version9.0.0-beta.2, but your project is using8.1.0."
This would be a massive improvement to the developer experience and would make the transition to the New Architecture much smoother for the entire community.
Thank you for considering this proposal!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the react-native-libraries.json schema and checking how its fields are validated and consumed; the issue identifies the proposed newArchIntroducedIn field and its semantic-version value. Done means the optional field is accepted without breaking existing library records and is covered by the repository's relevant validation tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100