Skip to content

Commit

Permalink
Move Fantom-related specs to src/private/testing/fantom/specs (facebo…
Browse files Browse the repository at this point in the history
…ok#49101)

Summary:
Pull Request resolved: facebook#49101

Changelog: [internal]

We can move this out of the deprecated directory. Also added a `.npmignore` entry so this won't be published to npm with the package.

Reviewed By: lenaic

Differential Revision: D68896208
  • Loading branch information
rubennorte authored and facebook-github-bot committed Feb 3, 2025
1 parent d4eff71 commit 79fd505
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/react-native-fantom/runtime/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type {SnapshotConfig, TestSnapshotResults} from './snapshotContext';
import expect from './expect';
import {createMockFunction} from './mocks';
import {setupSnapshotConfig, snapshotContext} from './snapshotContext';
import NativeFantom from 'react-native/src/private/specs_DEPRECATED/modules/NativeFantom';
import NativeFantom from 'react-native/src/private/testing/fantom/specs/NativeFantom';

export type TestCaseResult = {
ancestorTitles: Array<string>,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-fantom/src/Benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import {getConstants} from './index';
import nullthrows from 'nullthrows';
import NativeCPUTime from 'react-native/src/private/specs_DEPRECATED/modules/NativeCPUTime';
import NativeCPUTime from 'react-native/src/private/testing/fantom/specs/NativeCPUTime';
import {
Bench,
type BenchOptions,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-fantom/src/__tests__/Fantom-itest.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type {Root} from '..';
import Fantom from '..';
import * as React from 'react';
import {ScrollView, Text, TextInput, View} from 'react-native';
import NativeFantom from 'react-native/src/private/specs_DEPRECATED/modules/NativeFantom';
import NativeFantom from 'react-native/src/private/testing/fantom/specs/NativeFantom';
import ensureInstance from 'react-native/src/private/utilities/ensureInstance';
import ReactNativeElement from 'react-native/src/private/webapis/dom/nodes/ReactNativeElement';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// $FlowExpectedError[untyped-import]
import micromatch from 'micromatch';
import * as React from 'react';
import NativeFantom from 'react-native/src/private/specs_DEPRECATED/modules/NativeFantom';
import NativeFantom from 'react-native/src/private/testing/fantom/specs/NativeFantom';

export type RenderOutputConfig = {
...FantomRenderedOutputConfig,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-fantom/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import getFantomRenderedOutput from './getFantomRenderedOutput';
import ReactFabric from 'react-native/Libraries/Renderer/shims/ReactFabric';
import NativeFantom, {
NativeEventCategory,
} from 'react-native/src/private/specs_DEPRECATED/modules/NativeFantom';
} from 'react-native/src/private/testing/fantom/specs/NativeFantom';
import {getNativeNodeReference} from 'react-native/src/private/webapis/dom/nodes/internals/NodeInternals';

let globalSurfaceIdCounter = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @fantom_flags enableAccessToHostTreeInFabric:true
*/

import {NativeEventCategory} from '../../../src/private/specs_DEPRECATED/modules/NativeFantom';
import {NativeEventCategory} from '../../../src/private/testing/fantom/specs/NativeFantom';
import ensureInstance from '../../../src/private/utilities/ensureInstance';
import ReactNativeElement from '../../../src/private/webapis/dom/nodes/ReactNativeElement';
import TextInput from '../../Components/TextInput/TextInput';
Expand Down
1 change: 1 addition & 0 deletions packages/react-native/src/.npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
__tests__
private/testing
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
* @format
*/

import type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';
import type {TurboModule} from '../../../../../Libraries/TurboModule/RCTExport';

import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';
import * as TurboModuleRegistry from '../../../../../Libraries/TurboModule/TurboModuleRegistry';

/**
* This is an internal native module meant to be used for performance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
* @format
*/

import type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';
import type {TurboModule} from '../../../../../Libraries/TurboModule/RCTExport';

import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';
import * as TurboModuleRegistry from '../../../../../Libraries/TurboModule/TurboModuleRegistry';

// match RenderFormatOptions.h
export type RenderFormatOptions = {
Expand Down

0 comments on commit 79fd505

Please sign in to comment.