Repository navigation
fix: require react-native >= 0.80 in peerDependencies - #178
Merged
Merged
Conversation
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
Contributor
There was a problem hiding this comment.
🟢 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.0in 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
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.
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.tsdeclares events withCodegenTypes.EventEmitter.CodegenTypesis only exported by react-native since 0.80.0 (it's missing from 0.79.6, which Expo 53 ships), so codegen fails with:peerDependencies.react-native:*→>=0.80.0(lockfile updated,yarn install --immutablepasses)react-native-vosk@1.0.0(last pre-TurboModule release) for older appsFixes #166