Skip to content

Commit 7bf7bb8

Browse files
authored
chore: misc monorepo related fixes (#2615)
1 parent 2377cfe commit 7bf7bb8

File tree

8 files changed

+36
-5
lines changed

8 files changed

+36
-5
lines changed

android/app/src/camera/java/com/microsoft/reacttestapp/camera/MainActivityExtensions.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ fun MainActivity.scanForQrCode() {
3333
}
3434
fragment.show(supportFragmentManager, QRCodeScannerFragment.TAG)
3535
}
36+
3637
shouldShowRequestPermissionRationale(Manifest.permission.CAMERA) -> {
3738
Snackbar
3839
.make(
@@ -49,6 +50,7 @@ fun MainActivity.scanForQrCode() {
4950
}
5051
.show()
5152
}
53+
5254
else -> {
5355
ActivityCompat.requestPermissions(
5456
this,

android/app/src/main/java/com/microsoft/reacttestapp/MainActivity.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,21 +201,25 @@ class MainActivity : ReactActivity() {
201201
reload(BundleSource.Disk)
202202
true
203203
}
204+
204205
R.id.load_from_dev_server -> {
205206
PackagerConnectionSettings(this).debugServerHost = ""
206207
reload(BundleSource.Server)
207208
true
208209
}
210+
209211
R.id.remember_last_component -> {
210212
val enable = !menuItem.isChecked
211213
menuItem.isChecked = enable
212214
session.shouldRememberLastComponent = enable
213215
true
214216
}
217+
215218
R.id.scan_qr_code -> {
216219
scanForQrCode()
217220
true
218221
}
222+
219223
R.id.show_dev_options -> {
220224
val devSupportManager = if (BuildConfig.REACTAPP_USE_BRIDGELESS) {
221225
(application as TestApp).reactHost.devSupportManager
@@ -225,6 +229,7 @@ class MainActivity : ReactActivity() {
225229
devSupportManager?.showDevOptionsDialog()
226230
true
227231
}
232+
228233
else -> false
229234
}
230235
}
@@ -254,6 +259,7 @@ class MainActivity : ReactActivity() {
254259
.newInstance(component)
255260
.show(supportFragmentManager, ComponentBottomSheetDialogFragment.TAG)
256261
}
262+
257263
else -> {
258264
findActivityClass(component.name)?.let {
259265
startActivity(Intent(this, it))

android/app/src/reacthost-0.76/java/com/microsoft/reacttetapp/react/MainReactNativeHost.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ class MainReactNativeHost(
108108
BundleSource.Action.RELOAD -> {
109109
reactInstanceManager.devSupportManager.handleReloadJS()
110110
}
111+
111112
BundleSource.Action.RESTART -> {
112113
if (activity !is MainActivity) {
113114
activity.navigateUpTo(Intent(application, MainActivity.Companion::class.java))

example/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,24 @@
3131
"@babel/core": "^7.25.2",
3232
"@babel/preset-env": "^7.25.3",
3333
"@react-native-community/cli": "^18.0.0",
34+
"@react-native-community/cli-platform-android": "^18.0.0",
35+
"@react-native-community/cli-platform-ios": "^18.0.0",
3436
"@react-native/babel-preset": "^0.79.0",
3537
"@react-native/metro-config": "^0.79.0",
3638
"@rnx-kit/cli": "^0.18.11",
3739
"@rnx-kit/metro-config": "^2.1.0",
3840
"@rnx-kit/polyfills": "^0.2.0",
3941
"@rnx-kit/tsconfig": "^2.0.0",
4042
"@types/react": "~19.0.0",
43+
"@wdio/types": "^9.20.0",
4144
"appium": "^3.1.1",
4245
"appium-uiautomator2-driver": "^6.0.0",
4346
"appium-xcuitest-driver": "^10.0.0",
4447
"react-native-test-app": "workspace:*",
4548
"webdriverio": "^9.0.0"
4649
},
4750
"eslintConfig": {
48-
"extends": "../.github/eslint.config.js"
51+
"extends": "../eslint.config.js"
4952
},
5053
"rnx-kit": {
5154
"kitType": "app",

nx.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
{
22
"$schema": "./node_modules/nx/schemas/nx-schema.json",
33
"defaultBase": "trunk",
4+
"targetDefaults": {
5+
"format:js": {
6+
"cache": true
7+
},
8+
"lint": {
9+
"cache": true
10+
}
11+
},
412
"release": {
513
"projects": ["react-native-test-app"],
614
"changelog": {
@@ -24,5 +32,13 @@
2432
"git": {
2533
"commit": false
2634
}
35+
},
36+
"tui": {
37+
"enabled": false
38+
},
39+
"pluginsConfig": {
40+
"@nx/js": {
41+
"analyzeSourceFiles": false
42+
}
2743
}
2844
}

scripts/build/copy-yarnrc.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function main(src, dst) {
2020
yaml.load(yml)
2121
);
2222

23-
rc["nmHoistingLimits"] = undefined;
23+
rc["nodeLinker"] = "node-modules";
2424
rc["plugins"] = [];
2525

2626
if (rc.globalFolder) {

scripts/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ type InferredOptionTypes<O> = { [key in keyof O]: InferredOptionType<O[key]> };
176176

177177
export type Args<O> = InferredOptionTypes<O> & { _: string[] };
178178

179-
/************************
179+
/*******************
180180
* windows/app.mjs *
181-
************************/
181+
*******************/
182182

183183
type Resources = string[] | { windows?: string[] };
184184

yarn.lock

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4720,7 +4720,7 @@ __metadata:
47204720
languageName: node
47214721
linkType: hard
47224722

4723-
"@wdio/types@npm:9.20.0":
4723+
"@wdio/types@npm:9.20.0, @wdio/types@npm:^9.20.0":
47244724
version: 9.20.0
47254725
resolution: "@wdio/types@npm:9.20.0"
47264726
dependencies:
@@ -7807,6 +7807,8 @@ __metadata:
78077807
"@babel/preset-env": "npm:^7.25.3"
78087808
"@callstack/react-native-visionos": "npm:^0.79.0"
78097809
"@react-native-community/cli": "npm:^18.0.0"
7810+
"@react-native-community/cli-platform-android": "npm:^18.0.0"
7811+
"@react-native-community/cli-platform-ios": "npm:^18.0.0"
78107812
"@react-native-webapis/web-storage": "npm:^0.4.1"
78117813
"@react-native/babel-preset": "npm:^0.79.0"
78127814
"@react-native/metro-config": "npm:^0.79.0"
@@ -7815,6 +7817,7 @@ __metadata:
78157817
"@rnx-kit/polyfills": "npm:^0.2.0"
78167818
"@rnx-kit/tsconfig": "npm:^2.0.0"
78177819
"@types/react": "npm:~19.0.0"
7820+
"@wdio/types": "npm:^9.20.0"
78187821
appium: "npm:^3.1.1"
78197822
appium-uiautomator2-driver: "npm:^6.0.0"
78207823
appium-xcuitest-driver: "npm:^10.0.0"

0 commit comments

Comments
 (0)