Skip to content

Commit

Permalink
build(deps): bump react-native-reanimated from 2.13 to 3.3.0 (#9079)
Browse files Browse the repository at this point in the history
* build(deps): bump react-native-reanimated from 2.13.0 to 3.3.0

* chore: reanimated migration

* chore: fix tests

* fix: reanimated

* build(deps): add canary palette version with reanimated 3

* build(deps): bump @artsy/palette-mobile from 11.2.11--canary.125.469.0 to 11.2.14
  • Loading branch information
gkartalis authored Aug 2, 2023
1 parent 56620e5 commit 0440ea2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 51 deletions.
6 changes: 4 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -650,11 +650,12 @@ PODS:
- React-Core
- RNReactNativeHapticFeedback (1.13.0):
- React-Core
- RNReanimated (2.13.0):
- RNReanimated (3.3.0):
- DoubleConversion
- FBLazyVector
- FBReactNativeSpec
- glog
- hermes-engine
- RCT-Folly
- RCTRequired
- RCTTypeSafety
Expand All @@ -664,6 +665,7 @@ PODS:
- React-Core/RCTWebSocket
- React-CoreModules
- React-cxxreact
- React-hermes
- React-jsi
- React-jsiexecutor
- React-jsinspector
Expand Down Expand Up @@ -1283,7 +1285,7 @@ SPEC CHECKSUMS:
RNLocalize: 41026b7c14878f1a1b381bc79f668f1fbf841adb
RNPermissions: 124173e975e06dea451f5f6ce18314a404428749
RNReactNativeHapticFeedback: b83bfb4b537bdd78eb4f6ffe63c6884f7b049ead
RNReanimated: f0d66bda3d074c43c72a18f4fd4f4c26687bc1fd
RNReanimated: d814cd5a3abf1d042b11b986ac886ac8485ce420
RNScreens: 218801c16a2782546d30bd2026bb625c0302d70f
RNSentry: 0aa1567f66c20390f3834637fc4f73380dcd0774
RNShare: eaee3dd5a06dad397c7d3b14762007035c5de405
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
"react-native-pager-view": "6.2.0",
"react-native-permissions": "3.8.1",
"react-native-push-notification": "8.1.1",
"react-native-reanimated": "2.13.0",
"react-native-reanimated": "3.3.0",
"react-native-reanimated-zoom": "0.3.3",
"react-native-render-html": "6.3.4",
"react-native-safe-area-context": "3.4.0",
Expand Down
14 changes: 2 additions & 12 deletions src/app/Scenes/ArtQuiz/ArtQuizArtworks.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import {
Touchable,
Flex,
Text,
useScreenDimensions,
useSpace,
ScreenDimensionsProvider,
Screen,
} from "@artsy/palette-mobile"
import { Touchable, Flex, Text, useScreenDimensions, useSpace, Screen } from "@artsy/palette-mobile"
import { ArtQuizArtworksDislikeMutation } from "__generated__/ArtQuizArtworksDislikeMutation.graphql"
import { ArtQuizArtworksQuery } from "__generated__/ArtQuizArtworksQuery.graphql"
import { ArtQuizArtworksSaveMutation } from "__generated__/ArtQuizArtworksSaveMutation.graphql"
Expand Down Expand Up @@ -196,9 +188,7 @@ const ArtQuizArtworksScreen = () => {
export const ArtQuizArtworks = () => {
return (
<Suspense fallback={<ArtQuizLoader />}>
<ScreenDimensionsProvider>
<ArtQuizArtworksScreen />
</ScreenDimensionsProvider>
<ArtQuizArtworksScreen />
</Suspense>
)
}
Expand Down
15 changes: 4 additions & 11 deletions src/app/Scenes/MyCollection/Components/MyCollectionSearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { GridViewIcon } from "app/Components/Icons/GridViewIcon"
import { ListViewIcon } from "app/Components/Icons/ListViewIcon"
import SearchIcon from "app/Components/Icons/SearchIcon"
import { Input } from "app/Components/Input"
import { useAnimatedValue } from "app/Scenes/Artwork/Components/ImageCarousel/useAnimatedValue"
import { ViewOption } from "app/Scenes/Search/UserPrefsModel"
import { GlobalStore } from "app/store/GlobalStore"
import { useFeatureFlag } from "app/utils/hooks/useFeatureFlag"
Expand All @@ -16,8 +17,6 @@ import {
TouchableOpacity,
TouchableWithoutFeedback,
} from "react-native"
import Animated from "react-native-reanimated"

export interface MyCollectionSearchBarProps {
onChangeText: ((text: string) => void) | undefined
onFocus?: (e: NativeSyntheticEvent<TextInputFocusEventData>) => void
Expand Down Expand Up @@ -74,7 +73,7 @@ export const MyCollectionSearchBar: React.FC<MyCollectionSearchBarProps> = ({
onChangeText={setValue}
onFocus={onFocus}
onBlur={() => {
hasRunFocusedAnimation.setValue(new Animated.Value(0))
hasRunFocusedAnimation.setValue(0)
onIsFocused?.(false)
setIsFocused(false)
}}
Expand All @@ -90,7 +89,7 @@ export const MyCollectionSearchBar: React.FC<MyCollectionSearchBarProps> = ({
testID="MyCollectionSearchBarInputCancelButton"
onPress={() => {
setValue("")
hasRunFocusedAnimation.setValue(new Animated.Value(0))
hasRunFocusedAnimation.setValue(0)

LayoutAnimation.configureNext({
...LayoutAnimation.Presets.easeInEaseOut,
Expand All @@ -114,7 +113,7 @@ export const MyCollectionSearchBar: React.FC<MyCollectionSearchBarProps> = ({
<TouchableWithoutFeedback
testID="MyCollectionSearchBarNoInputTouchable"
onPress={() => {
hasRunFocusedAnimation.setValue(new Animated.Value(0))
hasRunFocusedAnimation.setValue(0)
setIsFocused(true)
onIsFocused?.(true)

Expand Down Expand Up @@ -202,9 +201,3 @@ export const ViewAsIcons: React.FC<{
</>
)
}

export function useAnimatedValue(init: number) {
return useMemo(() => {
return new Animated.Value(init)
}, [])
}
3 changes: 2 additions & 1 deletion src/setupJest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import { NativeModules } from "react-native"
import mockSafeAreaContext from "react-native-safe-area-context/jest/mock"
import track, { useTracking } from "react-tracking"
import diff from "snapshot-diff"

// 👇 needed after upgrading to reanimated 3 otherwise tests break
require("setimmediate")
/**
* General Preparation
*/
Expand Down
30 changes: 6 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5142,11 +5142,6 @@
resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812"
integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==

"@types/invariant@^2.2.35":
version "2.2.35"
resolved "https://registry.yarnpkg.com/@types/invariant/-/invariant-2.2.35.tgz#cd3ebf581a6557452735688d8daba6cf0bd5a3be"
integrity sha512-DxX1V9P8zdJPYQat1gHyY0xj3efl8gnMVjiM9iCY6y27lj+PoQWkgjt8jDqmovPqULkKVpKRg8J36iQiA+EtEg==

"@types/is-function@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@types/is-function/-/is-function-1.0.0.tgz#1b0b819b1636c7baf0d6785d030d12edf70c3e83"
Expand Down Expand Up @@ -12119,11 +12114,6 @@ lodash.includes@^4.3.0:
resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f"
integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==

lodash.isequal@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==

lodash.isnumber@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc"
Expand Down Expand Up @@ -14476,7 +14466,7 @@ react-native-collapsible-tab-view@^6.1.4:
[email protected]:
version "0.4.1"
resolved "https://registry.yarnpkg.com/react-native-credit-card-input/-/react-native-credit-card-input-0.4.1.tgz#e62dd1a9beeab6787e5373ba23b93831cbf5f3de"
integrity sha1-5i3Rqb7qtnh+U3O6I7k4Mcv1894=
integrity sha512-4+AZLLD5Z7ZTBnbH2aQFSXE2O8bypJu7Fi9EnKvZvSASRgwIkViueswh/Lp5LRi+i/TlXqWEERo+qnTTVntCjg==
dependencies:
card-validator "^3.0.0"
lodash.compact "^3.0.1"
Expand Down Expand Up @@ -14624,18 +14614,15 @@ [email protected]:
resolved "https://registry.yarnpkg.com/react-native-reanimated-zoom/-/react-native-reanimated-zoom-0.3.3.tgz#99161310c398b2d4220e75ce1d9b76eb075bf3f6"
integrity sha512-naeMV19218OsVOAw7jq45mZGxcSgvcn5xAJlXep27R0IBo/fqpLlLuXKK2nyCXyLzuIPwgqS3O+LUMcTd2L5Gg==

react-native-reanimated@2.13.0:
version "2.13.0"
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.13.0.tgz#d64c1386626822d4dc22094b4efe028ff2c49cc9"
integrity sha512-yUHyYVIegWWIza4+nVyS3CSmI/Mc8kLFVHw2c6gnSHaYhYA4LeEjH/jBkoMzHk9Xd0Ra3cwtjYKAMG8OTp6JVg==
react-native-reanimated@3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-3.3.0.tgz#80f9d58e28fddf62fe4c1bc792337b8ab57936ab"
integrity sha512-LzfpPZ1qXBGy5BcUHqw3pBC0qSd22qXS3t8hWSbozXNrBkzMhhOrcILE/nEg/PHpNNp1xvGOW8NwpAMF006roQ==
dependencies:
"@babel/plugin-transform-object-assign" "^7.16.7"
"@babel/preset-typescript" "^7.16.7"
"@types/invariant" "^2.2.35"
convert-source-map "^2.0.0"
invariant "^2.2.4"
lodash.isequal "^4.5.0"
setimmediate "^1.0.5"
string-hash-64 "^1.0.3"

[email protected]:
version "6.3.4"
Expand Down Expand Up @@ -16136,11 +16123,6 @@ string-argv@^0.3.1:
resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da"
integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==

string-hash-64@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/string-hash-64/-/string-hash-64-1.0.3.tgz#0deb56df58678640db5c479ccbbb597aaa0de322"
integrity sha512-D5OKWKvDhyVWWn2x5Y9b+37NUllks34q1dCDhk/vYcso9fmhs+Tl3KR/gE4v5UNj2UA35cnX4KdVVGkG1deKqw==

string-length@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.1.tgz#4a973bf31ef77c4edbceadd6af2611996985f8a1"
Expand Down

0 comments on commit 0440ea2

Please sign in to comment.