Skip to content

Commit 4266782

Browse files
hoxyqpull[bot]
authored andcommitted
RN: add @react-native/tester as a workspace to xplat/js/public (facebook#36531)
Summary: Pull Request resolved: facebook#36531 Changelog: [Internal] In order to make `react-native/tester` imports work, adding this package to `xplat/js/public` Also moving devDependecies from `react-native/tester/package.json` to root package json to avoid checking in dev dependencies in `xplat/js/public/node_modules` Reviewed By: cortinico Differential Revision: D44030539 fbshipit-source-id: b06e49869cdad6e511b1675d1063a1ceac56e3e6
1 parent 0be319e commit 4266782

File tree

3 files changed

+33
-5
lines changed

3 files changed

+33
-5
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"@types/react": "^18.0.18",
6161
"@typescript-eslint/parser": "^5.30.5",
6262
"async": "^3.2.2",
63+
"babel-plugin-transform-flow-enums":"^0.0.2",
6364
"clang-format": "^1.8.0",
6465
"connect": "^3.6.5",
6566
"coveralls": "^3.1.1",

packages/rn-tester/package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@
2828
"react": "18.2.0",
2929
"react-native": "*"
3030
},
31-
"devDependencies": {
32-
"babel-plugin-transform-flow-enums":"^0.0.2",
33-
"connect": "^3.6.5",
34-
"ws": "^6.2.2"
35-
},
3631
"codegenConfig": {
3732
"name": "AppSpecs",
3833
"type": "all",
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @format
8+
* @flow
9+
*/
10+
11+
import path from 'path';
12+
import fs from 'fs';
13+
14+
const CURRENT_DIR = __dirname;
15+
const PATH_TO_TESTER_PACKAGE_MANIFEST = path.join(
16+
CURRENT_DIR,
17+
'..',
18+
'..',
19+
'packages',
20+
'rn-tester',
21+
'package.json',
22+
);
23+
24+
const manifest = JSON.parse(
25+
fs.readFileSync(PATH_TO_TESTER_PACKAGE_MANIFEST).toString(),
26+
);
27+
28+
describe('@react-native/tester package', () => {
29+
it('expected not to list any devDependencies', () => {
30+
expect(manifest).not.toHaveProperty('devDependencies');
31+
});
32+
});

0 commit comments

Comments
 (0)