-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: react-native-reanimated as peer dependency #4912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v6
Are you sure you want to change the base?
Changes from all commits
08343f3
bef730d
a4cfceb
f912d81
27250d0
3b7b371
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| module.exports = { | ||
| presets: ['module:@react-native/babel-preset'], | ||
| plugins: ['react-native-worklets/plugin'], | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| import { setUpTests } from 'react-native-reanimated'; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets create a |
||
|
|
||
| setUpTests(); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,7 +96,9 @@ | |
| "react-dom": "18.3.1", | ||
| "react-native": "0.82.1", | ||
| "react-native-builder-bob": "^0.21.3", | ||
| "react-native-reanimated": "^4.3.0", | ||
| "react-native-safe-area-context": "5.5.2", | ||
| "react-native-worklets": "^0.8.1", | ||
| "react-test-renderer": "19.1.1", | ||
| "release-it": "^13.4.0", | ||
| "rimraf": "^3.0.2", | ||
|
|
@@ -105,7 +107,9 @@ | |
| "peerDependencies": { | ||
| "react": "*", | ||
| "react-native": "*", | ||
| "react-native-safe-area-context": "*" | ||
| "react-native-reanimated": ">=4.3.0", | ||
| "react-native-safe-area-context": "*", | ||
| "react-native-worklets": ">=0.8.1" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a comment, not necessarily requesting changes as I'm not sure about best practices for
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not quite sure here as well. I think Paper should only states minimums; Reanimated’s own peerDependencies and the app’s lockfile are where compatible worklets / Reanimated pairings are enforced.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm fine having the minimums for peer dependencies, we just need to make sure this is described on documentation for user troubleshooting purposes. |
||
| }, | ||
| "husky": { | ||
| "hooks": { | ||
|
|
@@ -119,6 +123,7 @@ | |
| "<rootDir>/testSetup.js" | ||
| ], | ||
| "setupFilesAfterEnv": [ | ||
| "<rootDir>/jestSetupAfterEnv.js", | ||
| "@testing-library/jest-native/extend-expect" | ||
| ], | ||
| "cacheDirectory": "./cache/jest", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid wall of text, make this bullet points so it's readable. After adding tabs as per previous comment, move relevant part to it's own tab so there is less to read.
We don't need to say we declare peer deps. User will get the warning/error if they don't match it from package manager. "
>=ranges, not pinned versions" is also an unnecessary detail to mention. What we should do is document something as follows: