Skip to content

fix: require react-native >= 0.80 in peerDependencies - #178

Merged
riderodd merged 1 commit into
mainfrom
fix/react-native-min-version
Nov 9, 2026
Merged

riderodd merged 1 commit into
mainfrom
fix/react-native-min-version

Conversation

@riderodd

@riderodd riderodd commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Apps on older React Native versions (such as Expo SDK 53) could install this library but then failed to build, with a confusing error. This change states the real minimum version, so package managers warn up front, and the README tells those users which older version to use instead.

Details

Since v2.1.0 (#150), src/NativeVosk.ts declares events with CodegenTypes.EventEmitter. CodegenTypes is only exported by react-native since 0.80.0 (it's missing from 0.79.6, which Expo 53 ships), so codegen fails with:

UnsupportedModulePropertyParserError: Module NativeVosk: ... Property 'onResult' refers to a 'TSTypeReference'.
  • peerDependencies.react-native: * → >=0.80.0 (lockfile updated, yarn install --immutable passes)
  • README: minimum version, plus a pointer to react-native-vosk@1.0.0 (last pre-TurboModule release) for older apps

Fixes #166

The TurboModule spec uses CodegenTypes.EventEmitter, which react-native
only exports since 0.80. Older versions (e.g. Expo SDK 53) fail codegen.

Refs #166
@riderodd riderodd mentioned this pull request Nov 9, 2026
3 tasks done
@riderodd
riderodd marked this pull request as ready for review November 9, 2026 11:21
Copilot AI balanced review requested due to automatic review settings November 9, 2026 11:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the change declaring React Native 0.80.0 as the minimum supported version.

No open issues 🎉

What changed in this PR

This PR declares the library’s React Native minimum version so incompatible apps receive dependency feedback before encountering the codegen failure reported in #166.

Changes:

  • Requires React Native >=0.80.0 in peer dependencies and synchronizes the lockfile.
  • Documents the minimum supported version and directs older apps to react-native-vosk@1.0.0.
File Description
yarn.lock Synchronizes the workspace’s React Native peer requirement.
README.md Adds compatibility requirements and guidance for older apps.
package.json Sets the React Native peer dependency to >=0.80.0.

Review effort: Balanced

@riderodd
riderodd merged commit cc104c6 into main Nov 9, 2026
6 checks passed
@riderodd
riderodd deleted the fix/react-native-min-version branch November 9, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to run Expo SDK 53

2 participants