Skip to content

Commit d16b508

Browse files
author
Adam Gleitman
committed
Fixes to get RNTester working
1 parent 828b941 commit d16b508

File tree

9 files changed

+132
-231
lines changed

9 files changed

+132
-231
lines changed

.flowconfig.macos

+8-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.*/*[.]android.js
55

66
; Ignore templates for 'react-native init'
7-
<PROJECT_ROOT>/template/.*
7+
<PROJECT_ROOT>/packages/react-native/template/.*
88

99
; Ignore the Dangerfile
1010
<PROJECT_ROOT>/packages/react-native-bots/dangerfile.js
@@ -16,7 +16,7 @@
1616
<PROJECT_ROOT>/metro.config.js
1717

1818
; Flow doesn't support platforms
19-
.*/Libraries/Utilities/LoadingView.js
19+
.*/packages/react-native/Libraries/Utilities/LoadingView.js
2020

2121
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
2222

@@ -29,8 +29,9 @@
2929
.*/node_modules/.*
3030

3131
[libs]
32-
interface.js
33-
flow/
32+
packages/react-native/interface.js
33+
packages/react-native/flow/
34+
packages/react-native/flow-typed/
3435

3536
[options]
3637
enums=true
@@ -48,9 +49,9 @@ module.file_ext=.macos.js
4849

4950
munge_underscores=true
5051

51-
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/index.js'
52-
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/\1'
53-
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/Libraries/Image/RelativeImageStub'
52+
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/packages/react-native/index.js'
53+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/packages/react-native/\1'
54+
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
5455

5556
suppress_type=$FlowIssue
5657
suppress_type=$FlowFixMe

package.json

+43-126
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,15 @@
11
{
2-
"name": "react-native-macos",
2+
"name": "@react-native-mac/monorepo",
33
"private": true,
44
"version": "1000.0.0",
5-
"bin": "./cli.js",
65
"description": "React Native for macOS",
76
"license": "MIT",
87
"repository": "[email protected]:microsoft/react-native-macos.git",
9-
"engines": {
10-
"node": ">=16"
11-
},
128
"types": "types",
139
"jest-junit": {
1410
"outputDirectory": "reports/junit",
1511
"outputName": "js-test-results.xml"
1612
},
17-
"files": [
18-
"android",
19-
"build.gradle.kts",
20-
"cli.js",
21-
"flow",
22-
"flow-typed",
23-
"gradle.properties",
24-
"index.js",
25-
"interface.js",
26-
"jest-preset.js",
27-
"jest",
28-
"!jest/private",
29-
"Libraries",
30-
"LICENSE",
31-
"local-cli",
32-
"React-Core.podspec",
33-
"react-native.config.js",
34-
"React.podspec",
35-
"React",
36-
"ReactAndroid",
37-
"ReactCommon",
38-
"README.md",
39-
"rn-get-polyfills.js",
40-
"scripts/compose-source-maps.js",
41-
"scripts/find-node-for-xcode.sh",
42-
"scripts/generate-codegen-artifacts.js",
43-
"scripts/generate-provider-cli.js",
44-
"scripts/generate-specs-cli.js",
45-
"scripts/codegen",
46-
"!scripts/codegen/__tests__",
47-
"!scripts/codegen/__test_fixtures__",
48-
"scripts/hermes/hermes-utils.js",
49-
"scripts/hermes/prepare-hermes-for-build.js",
50-
"scripts/ios-configure-glog.sh",
51-
"scripts/xcode/with-environment.sh",
52-
"scripts/launchPackager.bat",
53-
"scripts/launchPackager.command",
54-
"scripts/native_modules.rb",
55-
"scripts/node-binary.sh",
56-
"scripts/packager.sh",
57-
"scripts/packager-reporter.js",
58-
"scripts/react_native_pods_utils/script_phases.rb",
59-
"scripts/react_native_pods_utils/script_phases.sh",
60-
"scripts/react_native_pods.rb",
61-
"scripts/cocoapods",
62-
"!scripts/cocoapods/__tests__",
63-
"scripts/react-native-xcode.sh",
64-
"scripts/update-ruby.sh",
65-
"sdks/.hermesversion",
66-
"sdks/hermes-engine",
67-
"sdks/hermesc",
68-
"settings.gradle.kts",
69-
"template.config.js",
70-
"template",
71-
"!template/node_modules",
72-
"!template/package-lock.json",
73-
"!template/yarn.lock",
74-
"third-party-podspecs",
75-
"types"
76-
],
7713
"scripts": {
7814
"start": "react-native start",
7915
"test": "jest",
@@ -103,62 +39,61 @@
10339
"test-e2e-local": "node ./scripts/test-e2e-local.js",
10440
"test-e2e-local-clean": "node ./scripts/test-e2e-local-clean.js",
10541
"test-ios": "./scripts/objc-test.sh test",
106-
"test-typescript": "dtslint types",
107-
"test-typescript-offline": "dtslint --localTs node_modules/typescript/lib types",
42+
"test-typescript": "dtslint packages/react-native/types",
43+
"test-typescript-offline": "dtslint --localTs node_modules/typescript/lib packages/react-native/types",
10844
"bump-all-updated-packages": "node ./scripts/monorepo/bump-all-updated-packages",
10945
"align-package-versions": "node ./scripts/monorepo/align-package-versions.js"
11046
},
11147
"workspaces": [
112-
"packages/*",
113-
"repo-config"
48+
"packages/*"
11449
],
11550
"peerDependencies": {
11651
"react": "18.2.0"
11752
},
118-
"dependencies": {
119-
"@jest/create-cache-key-function": "^29.2.1",
120-
"@react-native-community/cli": "11.0.0-alpha.2",
121-
"@react-native-community/cli-platform-android": "11.0.0-alpha.2",
122-
"@react-native-community/cli-platform-ios": "11.0.0-alpha.2",
123-
"@react-native/assets-registry": "^0.72.0",
124-
"@react-native/gradle-plugin": "^0.72.5",
125-
"@react-native/js-polyfills": "^0.72.1",
126-
"@react-native/normalize-colors": "^0.72.0",
127-
"@react-native-mac/virtualized-lists": "^0.0.1",
128-
"abort-controller": "^3.0.0",
129-
"anser": "^1.4.9",
130-
"base64-js": "^1.1.2",
131-
"deprecated-react-native-prop-types": "^4.0.0",
132-
"event-target-shim": "^5.0.1",
133-
"flow-enums-runtime": "^0.0.5",
134-
"invariant": "^2.2.4",
135-
"jest-environment-node": "^29.2.1",
136-
"jsc-android": "^250231.0.0",
137-
"memoize-one": "^5.0.0",
138-
"metro-react-native-babel-transformer": "0.75.1",
139-
"metro-runtime": "0.75.1",
140-
"metro-source-map": "0.75.1",
141-
"mkdirp": "^0.5.1",
142-
"nullthrows": "^1.1.1",
143-
"pretty-format": "^26.5.2",
144-
"promise": "^8.3.0",
145-
"react-devtools-core": "^4.27.2",
146-
"react-refresh": "^0.4.0",
147-
"react-shallow-renderer": "^16.15.0",
148-
"regenerator-runtime": "^0.13.2",
149-
"scheduler": "^0.23.0",
150-
"stacktrace-parser": "^0.1.3",
151-
"use-sync-external-store": "^1.0.0",
152-
"whatwg-fetch": "^3.0.0",
153-
"ws": "^6.2.2",
154-
"yargs": "^17.6.2"
155-
},
15653
"devDependencies": {
54+
"@babel/core": "^7.20.0",
55+
"@babel/eslint-parser": "^7.19.0",
56+
"@babel/generator": "^7.20.0",
57+
"@babel/plugin-transform-regenerator": "^7.0.0",
58+
"@definitelytyped/dtslint": "^0.0.127",
59+
"@reactions/component": "^2.0.2",
60+
"@types/react": "^18.0.18",
61+
"@typescript-eslint/parser": "^5.30.5",
62+
"async": "^3.2.2",
63+
"clang-format": "^1.8.0",
64+
"connect": "^3.6.5",
65+
"coveralls": "^3.1.1",
66+
"eslint": "^8.19.0",
67+
"eslint-config-prettier": "^8.5.0",
68+
"eslint-plugin-babel": "^5.3.1",
69+
"eslint-plugin-eslint-comments": "^3.2.0",
70+
"eslint-plugin-ft-flow": "^2.0.1",
71+
"eslint-plugin-jest": "^26.5.3",
72+
"eslint-plugin-jsx-a11y": "^6.6.0",
73+
"eslint-plugin-lint": "^1.0.0",
74+
"eslint-plugin-prettier": "^4.2.1",
75+
"eslint-plugin-react": "^7.30.1",
76+
"eslint-plugin-react-hooks": "^4.6.0",
77+
"eslint-plugin-react-native": "^4.0.0",
78+
"eslint-plugin-redundant-undefined": "^0.4.0",
79+
"eslint-plugin-relay": "^1.8.3",
15780
"flow-bin": "^0.201.0",
15881
"hermes-eslint": "0.8.0",
82+
"inquirer": "^7.1.0",
83+
"jest": "^29.2.1",
84+
"jest-junit": "^10.0.0",
85+
"jscodeshift": "^0.14.0",
86+
"metro-babel-register": "0.75.1",
87+
"metro-memory-fs": "0.75.1",
15988
"mock-fs": "^5.1.4",
89+
"mkdirp": "^0.5.1",
90+
"prettier": "^2.4.1",
16091
"react": "18.2.0",
161-
"react-test-renderer": "^18.2.0"
92+
"react-test-renderer": "^18.2.0",
93+
"shelljs": "^0.8.5",
94+
"signedsource": "^1.0.0",
95+
"typescript": "4.1.3",
96+
"ws": "^6.2.2"
16297
},
16398
"beachball": {
16499
"shouldPublish": false
@@ -182,23 +117,5 @@
182117
"readable-stream": "Eliminates dependency on outdated string_decoder component",
183118
"shell-quote": "Versions prior to 1.7.3 have an RCE vulnerability. Should be removable once we upgrade CLI tools to ^8.0.0 with RN 0.69.",
184119
"tough-cookie": "@definitelytyped/dtslint indirectly depends on this through an out-of-date library, and our particular use case doesn't need cookies"
185-
},
186-
"codegenConfig": {
187-
"libraries": [
188-
{
189-
"name": "FBReactNativeSpec",
190-
"type": "modules",
191-
"ios": {},
192-
"android": {},
193-
"jsSrcsDir": "Libraries"
194-
},
195-
{
196-
"name": "rncore",
197-
"type": "components",
198-
"ios": {},
199-
"android": {},
200-
"jsSrcsDir": "Libraries"
201-
}
202-
]
203120
}
204121
}

0 commit comments

Comments
 (0)