chore: upgrade example app and library deps to RN 0.87 - #760
chore: upgrade example app and library deps to RN 0.87#760kacperzolkiewski wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the library and the included example apps to React Native 0.87, updating associated tooling/dependencies and adjusting codegen/native typings and platform build configuration to align with the new RN release.
Changes:
- Bump React Native + CLI/Jest/Metro-related dependencies (and update lockfiles) to 0.87-compatible versions.
- Update codegen component typings to use
CodegenTypesand adjust exported public types/imperative handles for RN 0.87 type surfaces. - Refresh iOS/Android example project configuration (Pods/Gradle wrapper + build settings) for the upgraded RN baseline.
Reviewed changes
Copilot reviewed 23 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updates resolved dependency graph for RN 0.87 and related toolchain packages. |
| package.json | Bumps devDependencies (RN 0.87, CLI 20.2.0, @react-native/jest-preset, TypeScript, etc.) and updates Jest preset configuration. |
| src/web/styleConversion/enrichedBaseStyleToCSSProperties.ts | Simplifies types around toPx conversion to match updated RN types. |
| src/web/adaptWebToNativeEvent.ts | Adds dispatchConfig on adapted web events to better resemble RN synthetic events. |
| src/types.ts | Updates exported public types (e.g., flexBasis typing) and replaces NativeMethods inheritance with explicit imperative-handle method signatures. |
| src/spec/EnrichedTextNativeComponent.ts | Migrates codegen type imports to CodegenTypes.* under RN 0.87 patterns. |
| src/spec/EnrichedTextInputNativeComponent.ts | Migrates codegen type imports to CodegenTypes.* and updates event/command type surfaces accordingly. |
| src/native/EnrichedText.tsx | Updates event handler types to CodegenTypes.DirectEventHandler. |
| src/css.d.ts | Adds a TS module declaration for importing *.css. |
| ios/utils/ZeroWidthSpaceUtils.mm | Removes now-unneeded UIView+React.h include. |
| ios/utils/TextInsertionUtils.mm | Switches UIView+React.h import to <React/UIView+React.h> for RN 0.87 header layout. |
| ios/styles/MentionStyle.mm | Switches UIView+React.h import to <React/UIView+React.h>. |
| ios/styles/LinkStyle.mm | Switches UIView+React.h import to <React/UIView+React.h>. |
| ios/EnrichedTextInputView.mm | Switches UIView+React.h import to <React/UIView+React.h>. |
| apps/example/tsconfig.json | Adds paths pinning for @types/react to avoid mixed React type copies during example typechecking. |
| apps/example/package.json | Bumps the example app’s RN/tooling devDependencies to 0.87-compatible versions. |
| apps/example/ios/Podfile.lock | Updates CocoaPods lockfile for RN 0.87 pods and dependency facades. |
| apps/example/ios/EnrichedTextInputExample/PrivacyInfo.xcprivacy | Updates/renumbers accessed API categories/reasons. |
| apps/example/ios/EnrichedTextInputExample.xcodeproj/project.pbxproj | Updates Pods integration file references and CocoaPods script build phases for the upgraded iOS project. |
| apps/example/android/gradlew | Updates Gradle wrapper script header reference (generated template revision link). |
| apps/example/android/gradle/wrapper/gradle-wrapper.properties | Updates Gradle distribution URL to a newer Gradle version. |
| apps/example/android/gradle.properties | Enables edge-to-edge and adds AGP 9 opt-out flags. |
| apps/example/android/build.gradle | Updates Android SDK/build tools + Kotlin version constants for the example app. |
| apps/example/android/app/build.gradle | Updates Proguard default file to proguard-android-optimize.txt. |
| apps/example-web/tsconfig.app.json | Updates TS config; removes baseUrl (currently causes a TS config issue alongside paths). |
| apps/example-web/tsconfig.json | Keeps TS project references in sync with the example-web app config. |
| android/gradle.properties | Bumps library Android build constants (Kotlin + compile/target SDK). |
Suppressed comments (1)
apps/example-web/tsconfig.app.json:9
compilerOptions.pathsis specified without abaseUrl. TypeScript requiresbaseUrlwhen usingpaths, otherwise the config can fail to parse with a TS5090-style diagnostic. Since this file only extendstsconfig.base.json(which doesn’t setbaseUrl), removingbaseUrlhere likely breaks the example-web typecheck/build.
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"types": ["vite/client"],
"paths": {
"react-native-enriched-html": ["../../src/index.tsx"]
}
},
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| }, | ||
| "peerDependencies": { | ||
| "react": "*", | ||
| "react-native": "*" |
There was a problem hiding this comment.
In our docs we have marked that with the 1.2.0 will drop RN 0.81 support. If that's true, we should probably put there >=0.82 or 0.82-0.87?
e401eea to
33ab6b4
Compare
szydlovsky
left a comment
There was a problem hiding this comment.
All the apps run properly. I'd just address the comment @hejsztynx made about version compat.
a28b956 to
1f39f36
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 28 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
apps/example-web/tsconfig.app.json:7
compilerOptions.pathsis set, but neither this file nor the extendedtsconfig.base.jsondefinescompilerOptions.baseUrl. TypeScript requiresbaseUrlforpathsto take effect (and typically errors out otherwise), so this config will fail or ignore the path mapping.
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"types": ["vite/client"],
"paths": {
"react-native-enriched-html": ["../../src/index.tsx"]
| "typecheck:example": "tsc -p apps/example/tsconfig.json", | ||
| "typecheck:example-web": "tsc -p apps/example-web/tsconfig.app.json", | ||
| "typecheck:docs": "tsc -p docs/tsconfig.json", | ||
| "typecheck:docs": "cd docs && yarn typecheck", |
There was a problem hiding this comment.
We used wrong typescript in that script. The previously used root's typescript got bumped which caused the CI docs builds to fail
Summary
Upgrade example app and library deps to RN 0.87
Test Plan
Screenshots / Videos
n/a
Compatibility
Checklist