From 14875d1faa45c9b765aa894bb2a2c7c623755895 Mon Sep 17 00:00:00 2001 From: William Candillon Date: Tue, 24 May 2022 22:07:23 +0200 Subject: [PATCH] =?UTF-8?q?feat(=F0=9F=90=8E):=20Update=20higher=20order?= =?UTF-8?q?=20functions=20to=20work=20with=20Reanimated=202.8=20(#491)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/Animations.ts | 140 +++++++++++++---------------------------- src/Transitions.ts | 9 ++- yarn.lock | 153 ++++++++++++++++++++++----------------------- 4 files changed, 125 insertions(+), 179 deletions(-) diff --git a/package.json b/package.json index 11d4490..2807ffd 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "react": "^16.8.6", "react-native": "^0.61.0", "react-native-gesture-handler": "~1.5.0", - "react-native-reanimated": "2.1.0", + "react-native-reanimated": "~2.8.0", "semantic-release": "^15.13.3", "semantic-release-cli": "^4.1.2", "typescript": "4.3.5" diff --git a/src/Animations.ts b/src/Animations.ts index 79127de..2d8944c 100644 --- a/src/Animations.ts +++ b/src/Animations.ts @@ -1,102 +1,22 @@ -import type Animated from "react-native-reanimated"; +/* eslint-disable @typescript-eslint/consistent-type-imports */ +import type { AnimatableValue, Animation } from "react-native-reanimated"; +import Animated, { defineAnimation } from "react-native-reanimated"; -declare let _WORKLET: boolean; - -export interface AnimationState { - current: number; -} - -export interface PhysicsAnimationState extends AnimationState { - velocity: number; -} - -export type Animation< - State extends AnimationState = AnimationState, - PrevState = State -> = { - onFrame: (animation: State, now: number) => boolean; - onStart: ( - animation: State, - value: number, - now: number, - lastAnimation: PrevState - ) => void; - callback?: () => void; -} & State; - -export type AnimationParameter = - | Animation - | (() => Animation) - | number; - -/** - * @summary Access animations passed as parameters safely on both the UI and JS thread with the proper static types. - * Animations can receive other animations as parameter. - */ -export const animationParameter = < - State extends AnimationState = AnimationState ->( - animationParam: AnimationParameter -) => { - "worklet"; - if (typeof animationParam === "number") { - throw new Error("Expected Animation as parameter"); - } - return typeof animationParam === "function" - ? animationParam() - : animationParam; -}; - -/** - * @summary Declare custom animations that can be invoked on both the JS and UI thread. - * @example - * defineAnimation(() => { - "worklet"; - // ...animation code - return { - animation, - start - } - }); - * @worklet - */ -export const defineAnimation = < - S extends AnimationState = AnimationState, - Prev extends AnimationState = AnimationState ->( - factory: () => Omit, keyof S> -) => { - "worklet"; - if (_WORKLET) { - return factory() as unknown as number; - } - return factory as unknown as number; -}; - -interface PausableAnimation extends AnimationState { +interface PausableAnimation extends Animation { lastTimestamp: number; elapsed: number; } -/** - * @summary Make an animation pausable. The state of the animation (paused or not) - * is controlled by a boolean shared value. - * @example - const progress = useSharedValue(0); - const paused = useSharedValue(false); - useEffect(() => { - progress.value = withPause(withLoop(withTiming(1)), paused); - }, []); - * @worklet - */ export const withPause = ( - animationParam: AnimationParameter, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + _nextAnimation: any, paused: Animated.SharedValue ) => { "worklet"; - return defineAnimation(() => { + return defineAnimation(_nextAnimation, () => { "worklet"; - const nextAnimation = animationParameter(animationParam); + const nextAnimation: PausableAnimation = + typeof _nextAnimation === "function" ? _nextAnimation() : _nextAnimation; const onFrame = (state: PausableAnimation, now: number) => { const { lastTimestamp, elapsed } = state; if (paused.value) { @@ -111,22 +31,40 @@ export const withPause = ( }; const onStart = ( state: PausableAnimation, - value: number, + value: AnimatableValue, now: number, - previousState: AnimationState + previousState: PausableAnimation ) => { state.lastTimestamp = now; state.elapsed = 0; + state.current = 0; nextAnimation.onStart(nextAnimation, value, now, previousState); }; + const callback = (finished?: boolean): void => { + if (nextAnimation.callback) { + nextAnimation.callback(finished); + } + }; return { onFrame, onStart, - callback: nextAnimation.callback, + isHigherOrder: true, + current: nextAnimation.current, + callback, + previousAnimation: null, + startTime: 0, + started: false, + lastTimestamp: 0, + elapsed: 0, }; }); }; +export interface PhysicsAnimation extends Animation { + velocity: number; + current: number; +} + /** * @summary Add a bouncing behavior to a physics-based animation. * An animation is defined as being physics-based if it contains a velocity in its state. @@ -136,15 +74,19 @@ export const withPause = ( * @worklet */ export const withBouncing = ( - animationParam: AnimationParameter, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + _nextAnimation: any, lowerBound: number, upperBound: number ): number => { "worklet"; - return defineAnimation(() => { + return defineAnimation(_nextAnimation, () => { "worklet"; - const nextAnimation = animationParameter(animationParam); - const onFrame = (state: PhysicsAnimationState, now: number) => { + + const nextAnimation: PhysicsAnimation = + typeof _nextAnimation === "function" ? _nextAnimation() : _nextAnimation; + + const onFrame = (state: PhysicsAnimation, now: number) => { const finished = nextAnimation.onFrame(nextAnimation, now); const { velocity, current } = nextAnimation; state.current = current; @@ -158,17 +100,19 @@ export const withBouncing = ( return finished; }; const onStart = ( - _state: PhysicsAnimationState, + _state: PhysicsAnimation, value: number, now: number, - previousState: PhysicsAnimationState + previousState: PhysicsAnimation ) => { nextAnimation.onStart(nextAnimation, value, now, previousState); }; return { onFrame, onStart, + current: nextAnimation.current, callback: nextAnimation.callback, + velocity: 0, }; }); }; diff --git a/src/Transitions.ts b/src/Transitions.ts index 10aa80f..f35bed0 100644 --- a/src/Transitions.ts +++ b/src/Transitions.ts @@ -1,5 +1,8 @@ import { useEffect } from "react"; -import type Animated from "react-native-reanimated"; +import type { + WithSpringConfig, + WithTimingConfig, +} from "react-native-reanimated"; import { useSharedValue, useDerivedValue, @@ -11,7 +14,7 @@ import { bin } from "./Math"; export const useSpring = ( state: boolean | number, - config?: Animated.WithSpringConfig + config?: WithSpringConfig ) => { const value = useSharedValue(0); useEffect(() => { @@ -25,7 +28,7 @@ export const useSpring = ( export const useTiming = ( state: boolean | number, - config?: Animated.WithTimingConfig + config?: WithTimingConfig ) => { const value = useSharedValue(0); useEffect(() => { diff --git a/yarn.lock b/yarn.lock index 71c24da..aef0de8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -97,6 +97,19 @@ "@babel/helper-replace-supers" "^7.16.7" "@babel/helper-split-export-declaration" "^7.16.7" +"@babel/helper-create-class-features-plugin@^7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.0.tgz#fac430912606331cb075ea8d82f9a4c145a4da19" + integrity sha512-Kh8zTGR9de3J63e5nS0rQUdRs/kbtwoeQQ0sriS0lItjC96u8XXZN6lKpuyWd2coKSU13py/y+LTmThLuVX0Pg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-function-name" "^7.17.9" + "@babel/helper-member-expression-to-functions" "^7.17.7" + "@babel/helper-optimise-call-expression" "^7.16.7" + "@babel/helper-replace-supers" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/helper-create-regexp-features-plugin@^7.16.7", "@babel/helper-create-regexp-features-plugin@^7.17.0": version "7.17.0" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz#1dcc7d40ba0c6b6b25618997c5dbfd310f186fe1" @@ -188,6 +201,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz#aa3a8ab4c3cceff8e65eb9e73d87dc4ff320b2f5" integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== +"@babel/helper-plugin-utils@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz#86c2347da5acbf5583ba0a10aed4c9bf9da9cf96" + integrity sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA== + "@babel/helper-remap-async-to-generator@^7.16.8": version "7.16.8" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz#29ffaade68a367e2ed09c90901986918d25e57e3" @@ -576,6 +594,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-syntax-typescript@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.12.tgz#b54fc3be6de734a56b87508f99d6428b5b605a7b" + integrity sha512-TYY0SXFiO31YXtNg3HtFwNJHjLsAyIIhAhNWkQ5whPPS7HWUFlg9z0Ta4qAQNjQbP1wsSt/oKkmZ/4/WWdMUpw== + dependencies: + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-transform-arrow-functions@^7.0.0", "@babel/plugin-transform-arrow-functions@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz#44125e653d94b98db76369de9c396dc14bef4154" @@ -747,7 +772,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-object-assign@^7.0.0", "@babel/plugin-transform-object-assign@^7.10.4": +"@babel/plugin-transform-object-assign@^7.0.0", "@babel/plugin-transform-object-assign@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.16.7.tgz#5fe08d63dccfeb6a33aa2638faf98e5c584100f8" integrity sha512-R8mawvm3x0COTJtveuoqZIjNypn2FjfvXZr4pSQ8VhEFBuQGBz4XhHasZtHXjgXU4XptZ4HtGof3NoYc93ZH9Q== @@ -879,6 +904,15 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-typescript" "^7.16.7" +"@babel/plugin-transform-typescript@^7.17.12": + version "7.18.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.1.tgz#5fd8b86130bad95c4a24377b41ab989a9ccad22d" + integrity sha512-F+RJmL479HJmC0KeqqwEGZMg1P7kWArLGbAKfEi9yPthJyMNjF+DjxFF/halfQvq1Q9GFM4TUbYDNV8xe4Ctqg== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.18.0" + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-syntax-typescript" "^7.17.12" + "@babel/plugin-transform-unicode-escapes@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz#da8717de7b3287a2c6d659750c964f302b31ece3" @@ -985,6 +1019,15 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" +"@babel/preset-typescript@^7.16.7": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.17.12.tgz#40269e0a0084d56fc5731b6c40febe1c9a4a3e8c" + integrity sha512-S1ViF8W2QwAKUGJXxP9NAfNaqGDdEBJKpYkxHf5Yy2C4NPPzXGeR3Lhk7G8xJaaLcFTRfNjVbtbVtm8Gb0mqvg== + dependencies: + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-validator-option" "^7.16.7" + "@babel/plugin-transform-typescript" "^7.17.12" + "@babel/register@^7.0.0": version "7.17.7" resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.17.7.tgz#5eef3e0f4afc07e25e847720e7b987ae33f08d0b" @@ -1707,6 +1750,11 @@ resolved "https://registry.yarnpkg.com/@types/hammerjs/-/hammerjs-2.0.41.tgz#f6ecf57d1b12d2befcce00e928a6a097c22980aa" integrity sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA== +"@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/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.4" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" @@ -3883,13 +3931,6 @@ create-react-class@^15.6.3: loose-envify "^1.3.1" object-assign "^4.1.1" -cross-fetch@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== - dependencies: - node-fetch "2.6.7" - cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -4000,7 +4041,7 @@ debug@^3.1.0, debug@^3.2.7: dependencies: ms "^2.1.1" -debuglog@*, debuglog@^1.0.1: +debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= @@ -4943,19 +4984,6 @@ fbjs@^1.0.0: setimmediate "^1.0.5" ua-parser-js "^0.7.18" -fbjs@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.4.tgz#e1871c6bd3083bac71ff2da868ad5067d37716c6" - integrity sha512-ucV0tDODnGV3JCnnkmoszb5lf4bNpzjv80K41wd4k798Etq+UYD0y0TIfalLjZoKgjive6/adkRnszwapiDgBQ== - dependencies: - cross-fetch "^3.1.5" - fbjs-css-vars "^1.0.0" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.30" - figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: version "3.5.2" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" @@ -5475,9 +5503,9 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= -"hammerjs@git+https://github.com/naver/hammer.js.git": +"hammerjs@https://github.com/naver/hammer.js.git": version "2.0.17-snapshot" - resolved "git+https://github.com/naver/hammer.js.git#54bc698b25edd6e1b76ca975ebaced5ce0467d51" + resolved "https://github.com/naver/hammer.js.git#54bc698b25edd6e1b76ca975ebaced5ce0467d51" dependencies: "@types/hammerjs" "^2.0.36" @@ -5805,7 +5833,7 @@ import-local@^2.0.0: pkg-dir "^3.0.0" resolve-cwd "^2.0.0" -imurmurhash@*, imurmurhash@^0.1.4: +imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= @@ -7240,11 +7268,6 @@ lockfile@^1.0.4: dependencies: signal-exit "^3.0.2" -lodash._baseindexof@*: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" - integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw= - lodash._baseuniq@~4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" @@ -7253,33 +7276,11 @@ lodash._baseuniq@~4.6.0: lodash._createset "~4.0.0" lodash._root "~3.0.0" -lodash._bindcallback@*: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" - integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4= - -lodash._cacheindexof@*: - version "3.0.2" - resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" - integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI= - -lodash._createcache@*: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" - integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM= - dependencies: - lodash._getnative "^3.0.0" - lodash._createset@~4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY= -lodash._getnative@*, lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U= - lodash._root@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" @@ -7310,6 +7311,11 @@ lodash.get@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= + lodash.ismatch@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" @@ -7330,11 +7336,6 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash.restparam@*: - version "3.6.1" - resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" - integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU= - lodash.set@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" @@ -8047,11 +8048,6 @@ mkdirp@^0.5.1, mkdirp@^0.5.5, mkdirp@~0.5.0: dependencies: minimist "^1.2.6" -mockdate@^3.0.2: - version "3.0.5" - resolved "https://registry.yarnpkg.com/mockdate/-/mockdate-3.0.5.tgz#789be686deb3149e7df2b663d2bc4392bc3284fb" - integrity sha512-iniQP4rj1FhBdBYS/+eQv7j1tadJ9lJtdzgOpvsOHng/GbcDh2Fhdeq+ZRldrPYdXvCyfFUmFeEwEGXZB5I/AQ== - modify-values@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" @@ -8168,13 +8164,6 @@ node-fetch-npm@^2.0.2: json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" -node-fetch@2.6.7, node-fetch@^2.2.0, node-fetch@^2.5.0, node-fetch@^2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== - dependencies: - whatwg-url "^5.0.0" - node-fetch@^1.0.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" @@ -8183,6 +8172,13 @@ node-fetch@^1.0.1: encoding "^0.1.11" is-stream "^1.0.1" +node-fetch@^2.2.0, node-fetch@^2.5.0, node-fetch@^2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + node-gyp@^5.0.2, node-gyp@^5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e" @@ -9429,14 +9425,17 @@ react-native-gesture-handler@~1.5.0: invariant "^2.2.4" prop-types "^15.7.2" -react-native-reanimated@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.1.0.tgz#b9ad04aee490e1e030d0a6cdaa43a14895d9a54d" - integrity sha512-tlPvvcdf+X7HGQ7g/7npBFhwMznfdk7MHUc9gUB/kp2abSscXNe/kOVKlrNEOO4DS11rNOXc+llFxVFMuNk0zA== +react-native-reanimated@~2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.8.0.tgz#93c06ca84d91fb3865110b0857c49a24e316130e" + integrity sha512-kJvf/UWLBMaGCs9X66MKq5zdFMgwx8D0nHnolbHR7s8ZnbLdb7TlQ/yuzIXqn/9wABfnwtNRI3CyaP1aHWMmZg== dependencies: - "@babel/plugin-transform-object-assign" "^7.10.4" - fbjs "^3.0.0" - mockdate "^3.0.2" + "@babel/plugin-transform-object-assign" "^7.16.7" + "@babel/preset-typescript" "^7.16.7" + "@types/invariant" "^2.2.35" + invariant "^2.2.4" + lodash.isequal "^4.5.0" + setimmediate "^1.0.5" string-hash-64 "^1.0.3" react-native@^0.61.0: @@ -11208,7 +11207,7 @@ typescript@4.3.5: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== -ua-parser-js@^0.7.18, ua-parser-js@^0.7.30: +ua-parser-js@^0.7.18: version "0.7.31" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.31.tgz#649a656b191dffab4f21d5e053e27ca17cbff5c6" integrity sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==