Skip to content

Commit

Permalink
build(package): bump react-native-reanimated from 1 to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed May 2, 2024
1 parent 1d149eb commit d89ea11
Show file tree
Hide file tree
Showing 8 changed files with 256 additions and 15 deletions.
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin'],
};
2 changes: 1 addition & 1 deletion jest-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jest.mock('react-native-reanimated', () => ({
Clock: jest.fn(),
Value: jest.fn(),
onChange: jest.fn(),
interpolate: jest.fn(),
interpolateNode: jest.fn(),
abs: jest.fn(),
add: jest.fn(),
sub: jest.fn(),
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,20 @@
"react-lifecycles-compat": "^3.0.4",
"react-native": "~0.59.10",
"react-native-gesture-handler": "^1.1.0",
"react-native-reanimated": "^1.2.0",
"react-native-reanimated": "^2.17.0",
"react-native-screens": "^1.0.0-alpha.23",
"react-native-testing-library": "^1.7.0",
"react-navigation": "^4.0.7",
"react-test-renderer": "16.8.6",
"release-it": "^12.3.6",
"typescript": "^3.4.5"
"typescript": "^4.1.6"
},
"dependencies": {},
"peerDependencies": {
"react": "*",
"react-native": "*",
"react-native-gesture-handler": "^1.0.12",
"react-native-reanimated": "^1.0.0",
"react-native-reanimated": "^2.0.0",
"react-native-screens": "^1.0.0 || ^1.0.0-alpha",
"react-navigation": "^4.0.7"
},
Expand Down
5 changes: 3 additions & 2 deletions src/views/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const {
clockRunning,
startClock,
stopClock,
interpolate,
interpolateNode,
spring,
abs,
add,
Expand Down Expand Up @@ -547,8 +547,9 @@ export default class Drawer extends React.PureComponent<Props> {
<Animated.View
style={[
styles.overlay,
// @ts-ignore
{
opacity: interpolate(this.progress, {
opacity: interpolateNode(this.progress, {
inputRange: [PROGRESS_EPSILON, 1],
outputRange: [0, 1],
}),
Expand Down
1 change: 1 addition & 0 deletions src/views/DrawerNavigatorItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default class DrawerNavigatorItems extends React.Component<
};

static contextType = ThemeContext;
// @ts-ignore
context!: React.ContextType<typeof ThemeContext>;

private getActiveTintColor() {
Expand Down
2 changes: 2 additions & 0 deletions src/views/DrawerView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export default class DrawerView extends React.PureComponent<Props, State> {
Dimensions.removeEventListener('change', this.updateWidth);
}

// @ts-ignore
context!: React.ContextType<typeof ThemeContext>;

private drawerGestureRef = React.createRef<PanGestureHandler>();
Expand Down Expand Up @@ -161,6 +162,7 @@ export default class DrawerView extends React.PureComponent<Props, State> {
descriptors={this.props.descriptors}
contentComponent={this.props.navigationConfig.contentComponent}
contentOptions={this.props.navigationConfig.contentOptions}
// @ts-ignore
drawerPosition={this.props.navigationConfig.drawerPosition}
style={this.props.navigationConfig.style}
{...this.props.navigationConfig}
Expand Down
2 changes: 1 addition & 1 deletion src/views/TouchableItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class TouchableItem extends React.Component<Props> {
*/
if (
Platform.OS === 'android' &&
Platform.Version >= ANDROID_VERSION_LOLLIPOP
Number(Platform.Version) >= ANDROID_VERSION_LOLLIPOP
) {
const { style, ...rest } = this.props;
return (
Expand Down
252 changes: 244 additions & 8 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit d89ea11

Please sign in to comment.