Skip to content

fix: pass the TypeScript compatibility check on React Native 0.86 and 0.87 - #10941

Merged
tjzel merged 1 commit into
mainfrom
@tjzel/fix/ts-compat-rn-0.86-0.87
Oct 21, 2026
Merged

tjzel merged 1 commit into
mainfrom
@tjzel/fix/ts-compat-rn-0.86-0.87

Conversation

@tjzel

@tjzel tjzel commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Note

This pull request was authored by AI on behalf of @tjzel.

Summary

The nightly TypeScript compatibility check failed on React Native 0.86 and 0.87. On 0.87, tsc could not name the inferred type of the SharedTransitionBoundaryNativeComponent export (TS2742), so I cast it to HostComponent<NativeProps>, which the codegen parser accepts. On 0.86, ViewStyle has only experimental_backgroundImage, so I added the same @ts-ignore Available since RN 0.87 to the web props config and a unit test that the native config already has, and I typed the other unit test through both keys. common-app uses backgroundImage in 28 places and cannot compile against 0.86 types, so I skipped the two app checks on 0.86. The library source, plugin and type tests are still checked on 0.86.

Test plan

I ran every step of the compatibility check locally after yarn up react-native@0.87 and yarn up react-native@0.86, and all steps that run pass. The check also runs on this PR.

Changelog

  • I added a changelog fragment with yarn changelog:add for each changed package, or this PR does not change react-native-reanimated or react-native-worklets.

… 0.87

Annotate the codegen component export so its type can be named on 0.87, ignore backgroundImage where 0.86 types lack it, and skip the common-app checks on 0.86, because the app uses backgroundImage.
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 40048294-386b-4058-aa76-a7e6bae76e8b
📥 Commits

Reviewing files that changed from the base of the PR and between 8381986 and b72f567.

📒 Files selected for processing: 7
  • .github/actions/reanimated-typescript-compatibility-check/action.yml
  • .github/workflows/reanimated-typescript-compatibility-test-nightly.yml
  • packages/react-native-reanimated/changelog/fix-ts-compat-rn-0-86-0-87.fix.md
  • packages/react-native-reanimated/src/common/web/style/config.ts
  • packages/react-native-reanimated/src/common/web/style/processors/__tests__/backgroundImage.test.ts
  • packages/react-native-reanimated/src/css/native/normalization/animation/__tests__/keyframes.test.ts
  • packages/react-native-reanimated/src/specs/SharedTransitionBoundaryNativeComponent.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

📝 Walkthrough

The changes add TypeScript compatibility annotations for React Native 0.87 background-image APIs, update a background-image test type, and cast the generated shared transition boundary component to HostComponent<NativeProps>. The standard and legacy API type-check steps now skip React Native 0.86. The nightly workflow path filter now includes changes to the compatibility-check action. A changelog entry documents the compatibility fixes.

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to b72f5

No actionable merge-blocking risk is identified in the supplied review evidence.

Pre-merge checks: Passed 4
Check name Status Explanation
Description check Passed The description clearly explains the TypeScript compatibility fixes for React Native 0.86 and 0.87, including the affected checks and test plan.
Title check Passed The title clearly and concisely summarizes the main change: fixing TypeScript compatibility checks for React Native 0.86 and 0.87.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@BruceBotterson

Copy link
Copy Markdown
Collaborator

Hi, Bruce here.
Thanks for the review, @pawicao.

@tjzel
tjzel merged commit 63aa140 into main Oct 21, 2026
43 checks passed
@tjzel
tjzel deleted the @tjzel/fix/ts-compat-rn-0.86-0.87 branch October 21, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants