Skip to content

Commit 1b08515

Browse files
yungstersfacebook-github-bot
authored andcommitted
RN: Move {packages => private}/react-native-codegen-typescript-test (#51936)
Summary: Pull Request resolved: #51936 Moves `packages/react-native-codegen-typescript-test` to `private/react-native-codegen-typescript-test`. Changelog: [Internal] Reviewed By: huntie Differential Revision: D76357099 fbshipit-source-id: c00d19d1393aa9bc8059e30f837a045169776b50
1 parent f0f71ea commit 1b08515

7 files changed

Lines changed: 18 additions & 24 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ vendor/
144144
/**/RCTThirdPartyFabricComponentsProvider.*
145145

146146
# @react-native/codegen-typescript-test
147-
/packages/react-native-codegen-typescript-test/lib
147+
/private/react-native-codegen-typescript-test/lib
148148

149149
# Additional SDKs
150150
/packages/react-native/sdks/download

packages/react-native-codegen-typescript-test/__generated__/.gitignore renamed to private/react-native-codegen-typescript-test/__generated__/.gitignore

File renamed without changes.

packages/react-native-codegen-typescript-test/package.json renamed to private/react-native-codegen-typescript-test/package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
{
22
"name": "@react-native/codegen-typescript-test",
3-
"version": "0.80.0-main",
3+
"version": "0.0.0",
44
"private": true,
55
"description": "TypeScript related unit test for @react-native/codegen",
66
"license": "MIT",
7-
"repository": {
8-
"type": "git",
9-
"url": "git+https://github.com/facebook/react-native.git",
10-
"directory": "packages/react-native-codegen-typescript-test"
11-
},
12-
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-typescript-test",
137
"engines": {
148
"node": ">= 22.14.0"
159
},

packages/react-native-codegen-typescript-test/scripts/build.js renamed to private/react-native-codegen-typescript-test/scripts/build.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@
1212
const fs = require('fs');
1313
const path = require('path');
1414

15-
const tsComponentFixturePath = path.join(
16-
__dirname,
17-
'../../react-native-codegen/src/parsers/typescript/components/__test_fixtures__/fixtures.js',
15+
function repositoryPath(relativePath) {
16+
return path.join(__dirname, '..', '..', '..', relativePath);
17+
}
18+
19+
const tsComponentFixturePath = repositoryPath(
20+
'packages/react-native-codegen/src/parsers/typescript/components/__test_fixtures__/fixtures.js',
1821
);
19-
const tsComponentSnapshotPath = path.join(
20-
__dirname,
21-
'../../react-native-codegen/src/parsers/typescript/components/__tests__/__snapshots__/typescript-component-parser-test.js.snap',
22+
const tsComponentSnapshotPath = repositoryPath(
23+
'packages/react-native-codegen/src/parsers/typescript/components/__tests__/__snapshots__/typescript-component-parser-test.js.snap',
2224
);
23-
const tsModuleFixturePath = path.join(
24-
__dirname,
25-
'../../react-native-codegen/src/parsers/typescript/modules/__test_fixtures__/fixtures.js',
25+
const tsModuleFixturePath = repositoryPath(
26+
'packages/react-native-codegen/src/parsers/typescript/modules/__test_fixtures__/fixtures.js',
2627
);
27-
const tsModuleSnapshotPath = path.join(
28-
__dirname,
29-
'../../react-native-codegen/src/parsers/typescript/modules/__tests__/__snapshots__/typescript-module-parser-snapshot-test.js.snap',
28+
const tsModuleSnapshotPath = repositoryPath(
29+
'packages/react-native-codegen/src/parsers/typescript/modules/__tests__/__snapshots__/typescript-module-parser-snapshot-test.js.snap',
3030
);
3131
const snapshotOutputPath = path.join(__dirname, '../__generated__');
3232

33-
function genereateSnapshotTestCases(
33+
function generateSnapshotTestCases(
3434
name,
3535
fixturePath,
3636
snapshotPath,
@@ -61,13 +61,13 @@ export default snapshot;
6161
}
6262
}
6363

64-
genereateSnapshotTestCases(
64+
generateSnapshotTestCases(
6565
'component',
6666
tsComponentFixturePath,
6767
tsComponentSnapshotPath,
6868
snapshotOutputPath,
6969
);
70-
genereateSnapshotTestCases(
70+
generateSnapshotTestCases(
7171
'module',
7272
tsModuleFixturePath,
7373
tsModuleSnapshotPath,

packages/react-native-codegen-typescript-test/src/__tests__/simple-scenario-frontend-test.ts renamed to private/react-native-codegen-typescript-test/src/__tests__/simple-scenario-frontend-test.ts

File renamed without changes.

packages/react-native-codegen-typescript-test/tsconfig.json renamed to private/react-native-codegen-typescript-test/tsconfig.json

File renamed without changes.

scripts/run-ci-javascript-tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ try {
8686
describe('Test: Build @react-native/codegen-typescript-test');
8787
if (
8888
exec(
89-
`${YARN_BINARY} --cwd ./packages/react-native-codegen-typescript-test run build`,
89+
`${YARN_BINARY} --cwd ./private/react-native-codegen-typescript-test run build`,
9090
).code
9191
) {
9292
echo('Failed to build @react-native/codegen-typescript-test.');

0 commit comments

Comments
 (0)