diff --git a/packages/benchmarks/perf/mocks/TextAncestorContext.js b/packages/benchmarks/perf/mocks/TextAncestorContext.js deleted file mode 100644 index ef76dc58..00000000 --- a/packages/benchmarks/perf/mocks/TextAncestorContext.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const TextAncestorContext = 'TextAncestorContext'; - -export default TextAncestorContext; diff --git a/packages/benchmarks/perf/mocks/react-native.js b/packages/benchmarks/perf/mocks/react-native.js index da5bd9f1..596969b4 100644 --- a/packages/benchmarks/perf/mocks/react-native.js +++ b/packages/benchmarks/perf/mocks/react-native.js @@ -111,6 +111,8 @@ export const TextInput = 'TextInput'; export const Text = 'Text'; +export const unstable_TextAncestorContext = 'TextAncestorContext'; + export const View = 'View'; export const experimental_LayoutConformance = 'LayoutConformance'; diff --git a/packages/benchmarks/perf/rollup.config.mjs b/packages/benchmarks/perf/rollup.config.mjs index d8b785a4..0b6c82e5 100644 --- a/packages/benchmarks/perf/rollup.config.mjs +++ b/packages/benchmarks/perf/rollup.config.mjs @@ -43,13 +43,6 @@ const config = [ __dirname, './mocks/ViewNativeComponent.js' ) - }, - { - find: 'react-native/Libraries/Text/TextAncestor', - replacement: path.resolve( - __dirname, - './mocks/TextAncestorContext.js' - ) } ] }), diff --git a/packages/react-strict-dom/src/native/react-native/TextAncestorContext.js b/packages/react-strict-dom/src/native/react-native/TextAncestorContext.js index 0ca869b7..0419e846 100644 --- a/packages/react-strict-dom/src/native/react-native/TextAncestorContext.js +++ b/packages/react-strict-dom/src/native/react-native/TextAncestorContext.js @@ -7,5 +7,5 @@ * @flow strict-local */ -import TextAncestorContext from 'react-native/Libraries/Text/TextAncestor'; +import { unstable_TextAncestorContext as TextAncestorContext } from 'react-native'; export { TextAncestorContext }; diff --git a/packages/react-strict-dom/tests/__mocks__/react-native/Libraries/Text/TextAncestor.js b/packages/react-strict-dom/tests/__mocks__/react-native/Libraries/Text/TextAncestor.js deleted file mode 100644 index ef76dc58..00000000 --- a/packages/react-strict-dom/tests/__mocks__/react-native/Libraries/Text/TextAncestor.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const TextAncestorContext = 'TextAncestorContext'; - -export default TextAncestorContext; diff --git a/packages/react-strict-dom/tests/__mocks__/react-native/index.js b/packages/react-strict-dom/tests/__mocks__/react-native/index.js index 65e14ca4..01aadcd7 100644 --- a/packages/react-strict-dom/tests/__mocks__/react-native/index.js +++ b/packages/react-strict-dom/tests/__mocks__/react-native/index.js @@ -120,6 +120,8 @@ export const View = 'View'; export const experimental_LayoutConformance = 'LayoutConformance'; +export const unstable_TextAncestorContext = 'TextAncestorContext'; + export const useColorScheme = jest.fn().mockReturnValue('light'); export const useWindowDimensions = jest