From 80ba01fa3cb54385a712fb6986fe57474279099a Mon Sep 17 00:00:00 2001 From: Krzysztof Piaskowy Date: Wed, 4 Dec 2024 11:09:40 +0100 Subject: [PATCH 1/2] cherry-pick: Refactor findNodeHandler (#6736) --- .../createAnimatedComponent/JSPropsUpdater.ts | 9 +- .../NativeEventsManager.ts | 57 +++++++-- .../createAnimatedComponent/commonTypes.ts | 12 +- .../createAnimatedComponent.tsx | 111 +++++++++--------- .../src/fabricUtils.ts | 24 ++-- .../src/platform-specific/RNRenderer.ts | 4 - .../src/platform-specific/RNRenderer.web.ts | 4 - .../src/platform-specific/findHostInstance.ts | 77 ++++++++++++ .../platform-specific/findHostInstance.web.ts | 3 + 9 files changed, 198 insertions(+), 103 deletions(-) delete mode 100644 packages/react-native-reanimated/src/platform-specific/RNRenderer.ts delete mode 100644 packages/react-native-reanimated/src/platform-specific/RNRenderer.web.ts create mode 100644 packages/react-native-reanimated/src/platform-specific/findHostInstance.ts create mode 100644 packages/react-native-reanimated/src/platform-specific/findHostInstance.web.ts diff --git a/packages/react-native-reanimated/src/createAnimatedComponent/JSPropsUpdater.ts b/packages/react-native-reanimated/src/createAnimatedComponent/JSPropsUpdater.ts index 59bc5a75a87a..70e345b73df1 100644 --- a/packages/react-native-reanimated/src/createAnimatedComponent/JSPropsUpdater.ts +++ b/packages/react-native-reanimated/src/createAnimatedComponent/JSPropsUpdater.ts @@ -1,6 +1,5 @@ 'use strict'; import { NativeEventEmitter, Platform } from 'react-native'; -import { findNodeHandle } from '../platformFunctions/findNodeHandle'; import type { NativeModule } from 'react-native'; import { shouldBeUseWeb } from '../PlatformChecker'; import type { StyleProps } from '../commonTypes'; @@ -39,7 +38,7 @@ class JSPropsUpdaterPaper implements IJSPropsUpdater { > & IAnimatedComponentInternal ) { - const viewTag = findNodeHandle(animatedComponent); + const viewTag = animatedComponent.getComponentViewTag(); JSPropsUpdaterPaper._tagToComponentMapping.set(viewTag, animatedComponent); if (JSPropsUpdaterPaper._tagToComponentMapping.size === 1) { const listener = (data: ListenerData) => { @@ -61,7 +60,7 @@ class JSPropsUpdaterPaper implements IJSPropsUpdater { > & IAnimatedComponentInternal ) { - const viewTag = findNodeHandle(animatedComponent); + const viewTag = animatedComponent.getComponentViewTag(); JSPropsUpdaterPaper._tagToComponentMapping.delete(viewTag); if (JSPropsUpdaterPaper._tagToComponentMapping.size === 0) { this._reanimatedEventEmitter.removeAllListeners( @@ -101,7 +100,7 @@ class JSPropsUpdaterFabric implements IJSPropsUpdater { if (!JSPropsUpdaterFabric.isInitialized) { return; } - const viewTag = findNodeHandle(animatedComponent); + const viewTag = animatedComponent.getComponentViewTag(); JSPropsUpdaterFabric._tagToComponentMapping.set(viewTag, animatedComponent); } @@ -114,7 +113,7 @@ class JSPropsUpdaterFabric implements IJSPropsUpdater { if (!JSPropsUpdaterFabric.isInitialized) { return; } - const viewTag = findNodeHandle(animatedComponent); + const viewTag = animatedComponent.getComponentViewTag(); JSPropsUpdaterFabric._tagToComponentMapping.delete(viewTag); } } diff --git a/packages/react-native-reanimated/src/createAnimatedComponent/NativeEventsManager.ts b/packages/react-native-reanimated/src/createAnimatedComponent/NativeEventsManager.ts index da0bbb03b239..e912ae2eca89 100644 --- a/packages/react-native-reanimated/src/createAnimatedComponent/NativeEventsManager.ts +++ b/packages/react-native-reanimated/src/createAnimatedComponent/NativeEventsManager.ts @@ -39,7 +39,7 @@ export class NativeEventsManager implements INativeEventsManager { public updateEvents( prevProps: AnimatedComponentProps ) { - const computedEventTag = this.getEventViewTag(); + const computedEventTag = this.getEventViewTag(true); // If the event view tag changes, we need to completely re-mount all events if (this.#eventViewTag !== computedEventTag) { // Remove all bindings from previous props that ran on the old viewTag @@ -77,23 +77,54 @@ export class NativeEventsManager implements INativeEventsManager { }); } - private getEventViewTag() { + private getEventViewTag(componentUpdate: boolean = false) { // Get the tag for registering events - since the event emitting view can be nested inside the main component const componentAnimatedRef = this.#managedComponent - ._component as AnimatedComponentRef; - let newTag: number; + ._componentRef as AnimatedComponentRef & { + // Fabric + __nativeTag?: number; + // Paper + _nativeTag?: number; + }; if (componentAnimatedRef.getScrollableNode) { + /* + In most cases, getScrollableNode() returns a view tag, and findNodeHandle is not required. + However, to cover more exotic list cases, we will continue to use findNodeHandle + for consistency. For numerical values, findNodeHandle should return the value immediately, + as documented here: https://github.com/facebook/react/blob/91061073d57783c061889ac6720ef1ab7f0c2149/packages/react-native-renderer/src/ReactNativePublicCompat.js#L113 + */ const scrollableNode = componentAnimatedRef.getScrollableNode(); - newTag = findNodeHandle(scrollableNode) ?? -1; - } else { - newTag = - findNodeHandle( - this.#componentOptions?.setNativeProps - ? this.#managedComponent - : componentAnimatedRef - ) ?? -1; + if (typeof scrollableNode === 'number') { + return scrollableNode; + } + return findNodeHandle(scrollableNode) ?? -1; + } + if (this.#componentOptions?.setNativeProps) { + // This case ensures backward compatibility with components that + // have their own setNativeProps method passed as an option. + return findNodeHandle(this.#managedComponent) ?? -1; + } + if (!componentUpdate) { + // On the first render of a component, we may already receive a resolved view tag. + return this.#managedComponent.getComponentViewTag(); + } + if (componentAnimatedRef.__nativeTag || componentAnimatedRef._nativeTag) { + /* + Fast path for native refs, + _nativeTag is used by Paper components, + __nativeTag is used by Fabric components. + */ + return ( + componentAnimatedRef.__nativeTag ?? + componentAnimatedRef._nativeTag ?? + -1 + ); } - return newTag; + /* + When a component is updated, a child could potentially change and have a different + view tag. This can occur with a GestureDetector component. + */ + return findNodeHandle(componentAnimatedRef) ?? -1; } } diff --git a/packages/react-native-reanimated/src/createAnimatedComponent/commonTypes.ts b/packages/react-native-reanimated/src/createAnimatedComponent/commonTypes.ts index d03c29b1e608..bb8b4f123cfa 100644 --- a/packages/react-native-reanimated/src/createAnimatedComponent/commonTypes.ts +++ b/packages/react-native-reanimated/src/createAnimatedComponent/commonTypes.ts @@ -100,15 +100,10 @@ export interface AnimatedComponentRef extends Component { export interface IAnimatedComponentInternal { _styles: StyleProps[] | null; _animatedProps?: Partial>; - /** - * Used for Shared Element Transitions, Layout Animations and Animated Styles. - * It is not related to event handling. - */ - _componentViewTag: number; _isFirstRender: boolean; jestInlineStyle: NestedArray | undefined; jestAnimatedStyle: { value: StyleProps }; - _component: AnimatedComponentRef | HTMLElement | null; + _componentRef: AnimatedComponentRef | HTMLElement | null; _sharedElementTransition: SharedTransition | null; _jsPropsUpdater: IJSPropsUpdater; _InlinePropManager: IInlinePropManager; @@ -117,6 +112,11 @@ export interface IAnimatedComponentInternal { _NativeEventsManager?: INativeEventsManager; _viewInfo?: ViewInfo; context: React.ContextType; + /** + * Used for Shared Element Transitions, Layout Animations and Animated Styles. + * It is not related to event handling. + */ + getComponentViewTag: () => number; } export type NestedArray = T | NestedArray[]; diff --git a/packages/react-native-reanimated/src/createAnimatedComponent/createAnimatedComponent.tsx b/packages/react-native-reanimated/src/createAnimatedComponent/createAnimatedComponent.tsx index b713f42538db..e101e03897f7 100644 --- a/packages/react-native-reanimated/src/createAnimatedComponent/createAnimatedComponent.tsx +++ b/packages/react-native-reanimated/src/createAnimatedComponent/createAnimatedComponent.tsx @@ -8,11 +8,10 @@ import type { } from 'react'; import React from 'react'; import { Platform } from 'react-native'; -import { findNodeHandle } from '../platformFunctions/findNodeHandle'; import '../layoutReanimation/animationsManager'; import invariant from 'invariant'; import { adaptViewConfig } from '../ConfigHelper'; -import { RNRenderer } from '../platform-specific/RNRenderer'; +import { findHostInstance } from '../platform-specific/findHostInstance'; import { enableLayoutAnimations } from '../core'; import { SharedTransition, LayoutAnimationType } from '../layoutReanimation'; import type { StyleProps, ShadowNodeWrapper } from '../commonTypes'; @@ -124,11 +123,10 @@ export function createAnimatedComponent( { _styles: StyleProps[] | null = null; _animatedProps?: Partial>; - _componentViewTag = -1; _isFirstRender = true; jestInlineStyle: NestedArray | undefined; jestAnimatedStyle: { value: StyleProps } = { value: {} }; - _component: AnimatedComponentRef | HTMLElement | null = null; + _componentRef: AnimatedComponentRef | HTMLElement | null = null; _sharedElementTransition: SharedTransition | null = null; _jsPropsUpdater = new JSPropsUpdater(); _InlinePropManager = new InlinePropManager(); @@ -156,7 +154,6 @@ export function createAnimatedComponent( } componentDidMount() { - this._componentViewTag = this._getComponentViewTag(); if (!IS_WEB) { // It exists only on native platforms. We initialize it here because the ref to the animated component is available only post-mount this._NativeEventsManager = new NativeEventsManager(this, options); @@ -173,7 +170,7 @@ export function createAnimatedComponent( if (IS_WEB) { if (this.props.exiting) { - saveSnapshot(this._component as HTMLElement); + saveSnapshot(this._componentRef as HTMLElement); } if ( @@ -189,11 +186,11 @@ export function createAnimatedComponent( if (!skipEntering) { startWebLayoutAnimation( this.props, - this._component as ReanimatedHTMLElement, + this._componentRef as ReanimatedHTMLElement, LayoutAnimationType.ENTERING ); } else { - (this._component as HTMLElement).style.visibility = 'initial'; + (this._componentRef as HTMLElement).style.visibility = 'initial'; } } @@ -209,7 +206,7 @@ export function createAnimatedComponent( this._configureSharedTransition(true); } this._sharedElementTransition?.unregisterTransition( - this._componentViewTag, + this.getComponentViewTag(), true ); @@ -217,7 +214,7 @@ export function createAnimatedComponent( if ( IS_WEB && - this._component && + this._componentRef && exiting && !getReducedMotionFromConfig(exiting as CustomConfig) ) { @@ -225,7 +222,7 @@ export function createAnimatedComponent( startWebLayoutAnimation( this.props, - this._component as ReanimatedHTMLElement, + this._componentRef as ReanimatedHTMLElement, LayoutAnimationType.EXITING ); } else if (exiting && !IS_WEB && !isFabric()) { @@ -236,7 +233,7 @@ export function createAnimatedComponent( : getReduceMotionFromConfig(); if (!reduceMotionInExiting) { updateLayoutAnimations( - this._componentViewTag, + this.getComponentViewTag(), LayoutAnimationType.EXITING, maybeBuild( exiting, @@ -248,31 +245,33 @@ export function createAnimatedComponent( } } - _getComponentViewTag() { + getComponentViewTag() { return this._getViewInfo().viewTag as number; } _detachStyles() { - if (this._componentViewTag !== -1 && this._styles !== null) { + const viewTag = this.getComponentViewTag(); + if (viewTag !== -1 && this._styles !== null) { for (const style of this._styles) { - style.viewDescriptors.remove(this._componentViewTag); + style.viewDescriptors.remove(viewTag); } if (this.props.animatedProps?.viewDescriptors) { - this.props.animatedProps.viewDescriptors.remove( - this._componentViewTag - ); + this.props.animatedProps.viewDescriptors.remove(viewTag); } if (isFabric()) { - removeFromPropsRegistry(this._componentViewTag); + removeFromPropsRegistry(viewTag); } } } _updateFromNative(props: StyleProps) { if (options?.setNativeProps) { - options.setNativeProps(this._component as AnimatedComponentRef, props); + options.setNativeProps( + this._componentRef as AnimatedComponentRef, + props + ); } else { - (this._component as AnimatedComponentRef)?.setNativeProps?.(props); + (this._componentRef as AnimatedComponentRef)?.setNativeProps?.(props); } } @@ -285,24 +284,22 @@ export function createAnimatedComponent( let viewName: string | null; let shadowNodeWrapper: ShadowNodeWrapper | null = null; let viewConfig; - // Component can specify ref which should be animated when animated version of the component is created. - // Otherwise, we animate the component itself. - const component = (this._component as AnimatedComponentRef) - ?.getAnimatableRef - ? (this._component as AnimatedComponentRef).getAnimatableRef?.() - : this; if (SHOULD_BE_USE_WEB) { // At this point I assume that `_setComponentRef` was already called and `_component` is set. // `this._component` on web represents HTMLElement of our component, that's why we use casting - viewTag = this._component as HTMLElement; + viewTag = this._componentRef as HTMLElement; viewName = null; shadowNodeWrapper = null; viewConfig = null; } else { - // hostInstance can be null for a component that doesn't render anything (render function returns null). Example: svg Stop: https://github.com/react-native-svg/react-native-svg/blob/develop/src/elements/Stop.tsx - const hostInstance = RNRenderer.findHostInstance_DEPRECATED(component); + const hostInstance = findHostInstance(this); if (!hostInstance) { + /* + findHostInstance can return null for a component that doesn't render anything + (render function returns null). Example: + svg Stop: https://github.com/react-native-svg/react-native-svg/blob/develop/src/elements/Stop.tsx + */ throw new ReanimatedError( 'Cannot find host instance for this component. Maybe it renders nothing?' ); @@ -313,7 +310,7 @@ export function createAnimatedComponent( viewName = viewInfo.viewName; viewConfig = viewInfo.viewConfig; shadowNodeWrapper = isFabric() - ? getShadowNodeWrapperFromRef(this) + ? getShadowNodeWrapperFromRef(this, hostInstance) : null; } this._viewInfo = { viewTag, viewName, shadowNodeWrapper, viewConfig }; @@ -340,8 +337,6 @@ export function createAnimatedComponent( adaptViewConfig(viewConfig); } - this._componentViewTag = viewTag as number; - // remove old styles if (prevStyles) { // in most of the cases, views have only a single animated style and it remains unchanged @@ -421,7 +416,7 @@ export function createAnimatedComponent( this._InlinePropManager.attachInlineProps(this, this._getViewInfo()); if (IS_WEB && this.props.exiting) { - saveSnapshot(this._component as HTMLElement); + saveSnapshot(this._componentRef as HTMLElement); } // Snapshot won't be undefined because it comes from getSnapshotBeforeUpdate method @@ -433,7 +428,7 @@ export function createAnimatedComponent( ) { tryActivateLayoutTransition( this.props, - this._component as ReanimatedHTMLElement, + this._componentRef as ReanimatedHTMLElement, snapshot ); } @@ -452,7 +447,7 @@ export function createAnimatedComponent( ) : undefined; updateLayoutAnimations( - this._componentViewTag, + this.getComponentViewTag(), LayoutAnimationType.LAYOUT, layout ); @@ -466,7 +461,7 @@ export function createAnimatedComponent( const { sharedTransitionTag } = this.props; if (!sharedTransitionTag) { this._sharedElementTransition?.unregisterTransition( - this._componentViewTag, + this.getComponentViewTag(), isUnmounting ); this._sharedElementTransition = null; @@ -477,34 +472,42 @@ export function createAnimatedComponent( this._sharedElementTransition ?? new SharedTransition(); sharedElementTransition.registerTransition( - this._componentViewTag, + this.getComponentViewTag(), sharedTransitionTag, isUnmounting ); this._sharedElementTransition = sharedElementTransition; } + _resolveComponentRef = (ref: Component | HTMLElement | null) => { + const componentRef = ref as AnimatedComponentRef; + // Component can specify ref which should be animated when animated version of the component is created. + // Otherwise, we animate the component itself. + if (componentRef && componentRef.getAnimatableRef) { + return componentRef.getAnimatableRef(); + } + return componentRef; + }; + _setComponentRef = setAndForwardRef({ getForwardedRef: () => this.props.forwardedRef as MutableRefObject< Component, Record, unknown> >, setLocalRef: (ref) => { - // TODO update config - - const tag = findNodeHandle(ref as Component); - - // callback refs are executed twice - when the component mounts with ref, - // and with null when it unmounts - if (tag !== null) { - this._componentViewTag = tag; + if (!ref) { + // component has been unmounted + return; + } + if (ref !== this._componentRef) { + this._componentRef = this._resolveComponentRef(ref); + // if ref is changed, reset viewInfo + this._viewInfo = undefined; } + const tag = this.getComponentViewTag(); const { layout, entering, exiting, sharedTransitionTag } = this.props; - if ( - (layout || entering || exiting || sharedTransitionTag) && - tag != null - ) { + if (layout || entering || exiting || sharedTransitionTag) { if (!SHOULD_BE_USE_WEB) { enableLayoutAnimations(true, false); } @@ -544,10 +547,6 @@ export function createAnimatedComponent( ); } } - - if (ref !== this._component) { - this._component = ref; - } }, }); @@ -557,9 +556,9 @@ export function createAnimatedComponent( getSnapshotBeforeUpdate() { if ( IS_WEB && - (this._component as HTMLElement)?.getBoundingClientRect !== undefined + (this._componentRef as HTMLElement)?.getBoundingClientRect !== undefined ) { - return (this._component as HTMLElement).getBoundingClientRect(); + return (this._componentRef as HTMLElement).getBoundingClientRect(); } return null; diff --git a/packages/react-native-reanimated/src/fabricUtils.ts b/packages/react-native-reanimated/src/fabricUtils.ts index adb2ffcc2d5a..e09dbaf13602 100644 --- a/packages/react-native-reanimated/src/fabricUtils.ts +++ b/packages/react-native-reanimated/src/fabricUtils.ts @@ -2,25 +2,19 @@ /* eslint-disable */ import type { ShadowNodeWrapper } from './commonTypes'; +import { + findHostInstance, + HostInstance, +} from './platform-specific/findHostInstance'; -let findHostInstance_DEPRECATED: (ref: unknown) => void; let getInternalInstanceHandleFromPublicInstance: (ref: unknown) => { stateNode: { node: unknown }; }; export function getShadowNodeWrapperFromRef( - ref: React.Component + ref: React.Component, + hostInstance?: HostInstance ): ShadowNodeWrapper { - // load findHostInstance_DEPRECATED lazily because it may not be available before render - if (findHostInstance_DEPRECATED === undefined) { - try { - findHostInstance_DEPRECATED = - require('react-native/Libraries/Renderer/shims/ReactFabric').findHostInstance_DEPRECATED; - } catch (e) { - findHostInstance_DEPRECATED = (_ref: unknown) => null; - } - } - if (getInternalInstanceHandleFromPublicInstance === undefined) { try { getInternalInstanceHandleFromPublicInstance = @@ -49,9 +43,9 @@ export function getShadowNodeWrapperFromRef( } else if (textInputRef) { resolvedRef = textInputRef; } else { - resolvedRef = getInternalInstanceHandleFromPublicInstance( - findHostInstance_DEPRECATED(ref) - ).stateNode.node; + const instance = hostInstance ?? findHostInstance(ref); + resolvedRef = + getInternalInstanceHandleFromPublicInstance(instance).stateNode.node; } return resolvedRef; diff --git a/packages/react-native-reanimated/src/platform-specific/RNRenderer.ts b/packages/react-native-reanimated/src/platform-specific/RNRenderer.ts deleted file mode 100644 index cc5c78a5005a..000000000000 --- a/packages/react-native-reanimated/src/platform-specific/RNRenderer.ts +++ /dev/null @@ -1,4 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-nocheck -'use strict'; -export { default as RNRenderer } from 'react-native/Libraries/Renderer/shims/ReactNative'; diff --git a/packages/react-native-reanimated/src/platform-specific/RNRenderer.web.ts b/packages/react-native-reanimated/src/platform-specific/RNRenderer.web.ts deleted file mode 100644 index f95b74d43221..000000000000 --- a/packages/react-native-reanimated/src/platform-specific/RNRenderer.web.ts +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -// RNRender is not used for web. An export is still defined to eliminate warnings from bundlers such as esbuild. -const RNRenderer = {}; -export { RNRenderer }; diff --git a/packages/react-native-reanimated/src/platform-specific/findHostInstance.ts b/packages/react-native-reanimated/src/platform-specific/findHostInstance.ts new file mode 100644 index 000000000000..00d56154e409 --- /dev/null +++ b/packages/react-native-reanimated/src/platform-specific/findHostInstance.ts @@ -0,0 +1,77 @@ +/* eslint-disable camelcase */ +'use strict'; + +import type { IAnimatedComponentInternal } from '../createAnimatedComponent/commonTypes'; +import { ReanimatedError } from '../errors'; +import { isFabric } from '../PlatformChecker'; + +type HostInstanceFabric = { + __internalInstanceHandle?: Record; + __nativeTag?: number; + _viewConfig?: Record; +}; + +type HostInstancePaper = { + _nativeTag?: number; + viewConfig?: Record; +}; + +export type HostInstance = HostInstanceFabric & HostInstancePaper; + +function findHostInstanceFastPath(maybeNativeRef: HostInstance) { + if ( + maybeNativeRef.__internalInstanceHandle && + maybeNativeRef.__nativeTag && + maybeNativeRef._viewConfig + ) { + // This is a native ref to a Fabric component + return maybeNativeRef; + } + if (maybeNativeRef._nativeTag && maybeNativeRef.viewConfig) { + // This is a native ref to a Paper component + return maybeNativeRef; + } + // That means it’s a ref to a non-native component, and it’s necessary + // to call `findHostInstance_DEPRECATED` on them. + return undefined; +} + +function resolveFindHostInstance_DEPRECATED() { + if (findHostInstance_DEPRECATED !== undefined) { + return; + } + if (isFabric()) { + try { + findHostInstance_DEPRECATED = + require('react-native/Libraries/Renderer/shims/ReactFabric').findHostInstance_DEPRECATED; + } catch (e) { + throw new ReanimatedError( + 'Failed to resolve findHostInstance_DEPRECATED' + ); + } + } else { + findHostInstance_DEPRECATED = + require('react-native/Libraries/Renderer/shims/ReactNative').findHostInstance_DEPRECATED; + } +} + +let findHostInstance_DEPRECATED: (ref: unknown) => HostInstance; +export function findHostInstance( + component: IAnimatedComponentInternal | React.Component +): HostInstance { + // Fast path for native refs + const hostInstance = findHostInstanceFastPath( + (component as IAnimatedComponentInternal)._componentRef as HostInstance + ); + if (hostInstance !== undefined) { + return hostInstance; + } + + resolveFindHostInstance_DEPRECATED(); + // Fabric implementation of findHostInstance_DEPRECATED doesn't accept a ref as an argument + return findHostInstance_DEPRECATED( + isFabric() + ? component + : (component as IAnimatedComponentInternal)._componentRef + ); +} diff --git a/packages/react-native-reanimated/src/platform-specific/findHostInstance.web.ts b/packages/react-native-reanimated/src/platform-specific/findHostInstance.web.ts new file mode 100644 index 000000000000..ca342dfd2d4c --- /dev/null +++ b/packages/react-native-reanimated/src/platform-specific/findHostInstance.web.ts @@ -0,0 +1,3 @@ +'use strict'; + +export function findHostInstance(_component: any): void {} From ec7f6683e60db824b8ab3774bbac3648b567c3fa Mon Sep 17 00:00:00 2001 From: Krzysztof Piaskowy Date: Tue, 10 Dec 2024 13:23:46 +0100 Subject: [PATCH 2/2] Update version --- apps/fabric-example/ios/Podfile.lock | 16 ++++++++-------- apps/macos-example/macos/Podfile.lock | 16 ++++++++-------- apps/paper-example/ios/Podfile.lock | 16 ++++++++-------- apps/tvos-example/ios/Podfile.lock | 16 ++++++++-------- packages/react-native-reanimated/package.json | 2 +- .../src/platform-specific/jsVersion.ts | 2 +- 6 files changed, 34 insertions(+), 34 deletions(-) diff --git a/apps/fabric-example/ios/Podfile.lock b/apps/fabric-example/ios/Podfile.lock index 1a8d02adb49e..777a9cacfa0c 100644 --- a/apps/fabric-example/ios/Podfile.lock +++ b/apps/fabric-example/ios/Podfile.lock @@ -1747,7 +1747,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - RNReanimated (3.16.4): + - RNReanimated (3.16.5): - DoubleConversion - glog - hermes-engine @@ -1767,10 +1767,10 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNReanimated/reanimated (= 3.16.4) - - RNReanimated/worklets (= 3.16.4) + - RNReanimated/reanimated (= 3.16.5) + - RNReanimated/worklets (= 3.16.5) - Yoga - - RNReanimated/reanimated (3.16.4): + - RNReanimated/reanimated (3.16.5): - DoubleConversion - glog - hermes-engine @@ -1790,9 +1790,9 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNReanimated/reanimated/apple (= 3.16.4) + - RNReanimated/reanimated/apple (= 3.16.5) - Yoga - - RNReanimated/reanimated/apple (3.16.4): + - RNReanimated/reanimated/apple (3.16.5): - DoubleConversion - glog - hermes-engine @@ -1813,7 +1813,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - RNReanimated/worklets (3.16.4): + - RNReanimated/worklets (3.16.5): - DoubleConversion - glog - hermes-engine @@ -2229,7 +2229,7 @@ SPEC CHECKSUMS: RNCPicker: d051e0647af8b2ad01a3d39a6b5dd9b7c0ccc166 RNFlashList: 6f169ad83e52579b7754cbbcec1b004c27d82c93 RNGestureHandler: c374c750a0a9bacd95f5c740d146ab9428549d6b - RNReanimated: b6a4bd4c15d97f9fe83034de369dcf7491fd0bde + RNReanimated: 3b2f758f9c4e3ef573d2cef3bb1a633153c9028c RNScreens: de6e57426ba0e6cbc3fb5b4f496e7f08cb2773c2 RNSVG: 08750404f92a36162a92522cc77dee437be1d257 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 diff --git a/apps/macos-example/macos/Podfile.lock b/apps/macos-example/macos/Podfile.lock index 1bd10965e8bb..1fd8ffc05cf7 100644 --- a/apps/macos-example/macos/Podfile.lock +++ b/apps/macos-example/macos/Podfile.lock @@ -1023,25 +1023,25 @@ PODS: - glog - RCT-Folly (= 2022.05.16.00) - React-Core - - RNReanimated (3.16.4): + - RNReanimated (3.16.5): - glog - RCT-Folly (= 2022.05.16.00) - React-Core - ReactCommon/turbomodule/core - - RNReanimated/reanimated (= 3.16.4) - - RNReanimated/worklets (= 3.16.4) - - RNReanimated/reanimated (3.16.4): + - RNReanimated/reanimated (= 3.16.5) + - RNReanimated/worklets (= 3.16.5) + - RNReanimated/reanimated (3.16.5): - glog - RCT-Folly (= 2022.05.16.00) - React-Core - ReactCommon/turbomodule/core - - RNReanimated/reanimated/apple (= 3.16.4) - - RNReanimated/reanimated/apple (3.16.4): + - RNReanimated/reanimated/apple (= 3.16.5) + - RNReanimated/reanimated/apple (3.16.5): - glog - RCT-Folly (= 2022.05.16.00) - React-Core - ReactCommon/turbomodule/core - - RNReanimated/worklets (3.16.4): + - RNReanimated/worklets (3.16.5): - glog - RCT-Folly (= 2022.05.16.00) - React-Core @@ -1270,7 +1270,7 @@ SPEC CHECKSUMS: RNCAsyncStorage: ec53e44dc3e75b44aa2a9f37618a49c3bc080a7a RNCPicker: 0173dedc74776227ec6dcc61bb85cd9f07bbb2ac RNGestureHandler: bb81850add626ddd265294323310fec6e861c96b - RNReanimated: 372250f6264fdb16d23e4d3b0ce2aebe39152e35 + RNReanimated: 49cdcf66acb8b750c72b0172bd804eb7d2e6b385 RNSVG: 01eb8d8a0e2289ec3ecc9626ce920e00d2174992 SocketRocket: f6c6249082c011e6de2de60ed641ef8bbe0cfac9 Yoga: 329461de6a23b9e0c108d197fd0f6e87c8c8ecf2 diff --git a/apps/paper-example/ios/Podfile.lock b/apps/paper-example/ios/Podfile.lock index 2befdc5176f1..d581ccdff72d 100644 --- a/apps/paper-example/ios/Podfile.lock +++ b/apps/paper-example/ios/Podfile.lock @@ -1601,7 +1601,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - RNReanimated (3.16.4): + - RNReanimated (3.16.5): - DoubleConversion - glog - hermes-engine @@ -1621,10 +1621,10 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNReanimated/reanimated (= 3.16.4) - - RNReanimated/worklets (= 3.16.4) + - RNReanimated/reanimated (= 3.16.5) + - RNReanimated/worklets (= 3.16.5) - Yoga - - RNReanimated/reanimated (3.16.4): + - RNReanimated/reanimated (3.16.5): - DoubleConversion - glog - hermes-engine @@ -1644,9 +1644,9 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNReanimated/reanimated/apple (= 3.16.4) + - RNReanimated/reanimated/apple (= 3.16.5) - Yoga - - RNReanimated/reanimated/apple (3.16.4): + - RNReanimated/reanimated/apple (3.16.5): - DoubleConversion - glog - hermes-engine @@ -1667,7 +1667,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - RNReanimated/worklets (3.16.4): + - RNReanimated/worklets (3.16.5): - DoubleConversion - glog - hermes-engine @@ -2019,7 +2019,7 @@ SPEC CHECKSUMS: RNCPicker: 0173dedc74776227ec6dcc61bb85cd9f07bbb2ac RNFlashList: 115dd44377580761bff386a0caebf165424cf16f RNGestureHandler: 6dfe7692a191ee224748964127114edf057a1475 - RNReanimated: d0dd0abbaf6588d52772b2ddafe045744cbbfbe2 + RNReanimated: 19ba9608c1284fa084e20995150974f2d0ee279c RNScreens: 19719a9c326e925498ac3b2d35c4e50fe87afc06 RNSVG: 01eb8d8a0e2289ec3ecc9626ce920e00d2174992 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 diff --git a/apps/tvos-example/ios/Podfile.lock b/apps/tvos-example/ios/Podfile.lock index 8f95287d3dfa..38908d2b7d00 100644 --- a/apps/tvos-example/ios/Podfile.lock +++ b/apps/tvos-example/ios/Podfile.lock @@ -1031,25 +1031,25 @@ PODS: - React-jsi (= 0.73.4-0) - React-logger (= 0.73.4-0) - React-perflogger (= 0.73.4-0) - - RNReanimated (3.16.4): + - RNReanimated (3.16.5): - glog - RCT-Folly (= 2022.05.16.00) - React-Core - ReactCommon/turbomodule/core - - RNReanimated/reanimated (= 3.16.4) - - RNReanimated/worklets (= 3.16.4) - - RNReanimated/reanimated (3.16.4): + - RNReanimated/reanimated (= 3.16.5) + - RNReanimated/worklets (= 3.16.5) + - RNReanimated/reanimated (3.16.5): - glog - RCT-Folly (= 2022.05.16.00) - React-Core - ReactCommon/turbomodule/core - - RNReanimated/reanimated/apple (= 3.16.4) - - RNReanimated/reanimated/apple (3.16.4): + - RNReanimated/reanimated/apple (= 3.16.5) + - RNReanimated/reanimated/apple (3.16.5): - glog - RCT-Folly (= 2022.05.16.00) - React-Core - ReactCommon/turbomodule/core - - RNReanimated/worklets (3.16.4): + - RNReanimated/worklets (3.16.5): - glog - RCT-Folly (= 2022.05.16.00) - React-Core @@ -1267,7 +1267,7 @@ SPEC CHECKSUMS: React-runtimescheduler: 20b2202e3396589a71069d12ae9f328949c7c7b8 React-utils: 0307d396f233e47a167b5aaf045b0e4e1dc19d74 ReactCommon: 17891ca337bfa5a7263649b09f27a8c664537bf2 - RNReanimated: cfd0d2000a1fbe15236382a499efa6d0d4648352 + RNReanimated: 6cdbb482adb78b9a6efe045e09e454349b637dda SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: e7f2a2256464d4ef7b3825d216bd22aac3b449c1 diff --git a/packages/react-native-reanimated/package.json b/packages/react-native-reanimated/package.json index 249af1a7e752..a4edffbd75d3 100644 --- a/packages/react-native-reanimated/package.json +++ b/packages/react-native-reanimated/package.json @@ -1,6 +1,6 @@ { "name": "react-native-reanimated", - "version": "3.16.4", + "version": "3.16.5", "description": "More powerful alternative to Animated library for React Native.", "scripts": { "test": "jest", diff --git a/packages/react-native-reanimated/src/platform-specific/jsVersion.ts b/packages/react-native-reanimated/src/platform-specific/jsVersion.ts index f32f29b23172..0e130cddc887 100644 --- a/packages/react-native-reanimated/src/platform-specific/jsVersion.ts +++ b/packages/react-native-reanimated/src/platform-specific/jsVersion.ts @@ -4,4 +4,4 @@ * version used to build the native part of the library in runtime. Remember to * keep this in sync with the version declared in `package.json` */ -export const jsVersion = '3.16.4'; +export const jsVersion = '3.16.5';