Skip to content

Commit 47d1b0a

Browse files
kkafarkligarski
authored andcommitted
chore: bump deps in lib & examples (part 1 of fixing CI) (#2618)
Motivation: working on #2466 right now & need these changes + this is also required to fix the failing CI Bumped versions of reanimated, gesture handler and safe-area-context in both lib and the examples :fingers_crossed: CI? Okay, seems that Android part of the CI is fixed. iOS has some other, yet undetermined problems. I do not see a regression on iOS part, however. - [x] (kinda ☝🏻) Ensured that CI passes (cherry picked from commit 3555d23)
1 parent faa7b6b commit 47d1b0a

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

src/gesture-handler/ScreenGestureDetector.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,13 @@ const ScreenGestureDetector = ({
159159
return;
160160
}
161161
transitionConfig.screenDimensions = screenSize;
162-
startScreenTransition(transitionConfig);
162+
// Gesture Handler added `pointerType` to event payload back in 2.16.0,
163+
// see: https://github.com/software-mansion/react-native-gesture-handler/pull/2760
164+
// and this causes type errors here. Proper solution would be to patch parameter types
165+
// of this function in reanimated. This should not cause runtime errors as the payload
166+
// has correct shape, only the types are incorrect.
167+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
168+
startScreenTransition(transitionConfig as any);
163169
canPerformUpdates.value = true;
164170
}
165171

@@ -201,7 +207,13 @@ const ScreenGestureDetector = ({
201207
RNScreensTurboModule.finishTransition(stackTag, isTransitionCanceled);
202208
};
203209
screenTransitionConfig.value.isTransitionCanceled = isTransitionCanceled;
204-
finishScreenTransition(screenTransitionConfig.value);
210+
// Gesture Handler added `pointerType` to event payload back in 2.16.0,
211+
// see: https://github.com/software-mansion/react-native-gesture-handler/pull/2760
212+
// and this causes type errors here. Proper solution would be to patch parameter types
213+
// of this function in reanimated. This should not cause runtime errors as the payload
214+
// has correct shape, only the types are incorrect.
215+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
216+
finishScreenTransition(screenTransitionConfig.value as any);
205217
}
206218

207219
let panGesture = Gesture.Pan()

src/gesture-handler/defaults.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
GestureUpdateEvent,
33
PanGestureHandlerEventPayload,
4+
PointerType,
45
} from 'react-native-gesture-handler';
56
import { ScreenTransition } from 'react-native-reanimated';
67

@@ -16,6 +17,12 @@ export const DefaultEvent: GestureUpdateEvent<PanGestureHandlerEventPayload> = {
1617
velocityY: 0,
1718
x: 0,
1819
y: 0,
20+
21+
// These two were added in recent versions of gesture handler
22+
// and they are required to specify. This should be backward
23+
// compatible unless they strictly parse the objects, which seems
24+
// not likely. PointerType is present since 2.16.0, StylusData since 2.20.0
25+
pointerType: PointerType.TOUCH,
1926
};
2027

2128
export const DefaultScreenDimensions = {

0 commit comments

Comments
 (0)