@nx/react-native 21.4.0-beta.10 → 21.4.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/.eslintrc.json +2 -1
  2. package/generators.json +0 -5
  3. package/migrations.json +85 -0
  4. package/package.json +13 -14
  5. package/plugins/metro-resolver.d.ts.map +1 -1
  6. package/plugins/metro-resolver.js +26 -8
  7. package/plugins/with-nx-metro.d.ts +2 -2
  8. package/plugins/with-nx-metro.d.ts.map +1 -1
  9. package/plugins/with-nx-metro.js +18 -2
  10. package/src/executors/bundle/bundle.impl.d.ts.map +1 -1
  11. package/src/executors/bundle/bundle.impl.js +2 -2
  12. package/src/executors/storybook/storybook.impl.d.ts.map +1 -1
  13. package/src/executors/storybook/storybook.impl.js +3 -4
  14. package/src/generators/application/application.js +1 -1
  15. package/src/generators/application/files/app/android/app/build.gradle.template +2 -2
  16. package/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template +0 -1
  17. package/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template +1 -2
  18. package/src/generators/application/files/app/android/build.gradle.template +3 -3
  19. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  20. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  21. package/src/generators/application/files/app/android/gradlew.template +2 -3
  22. package/src/generators/application/files/app/ios/.xcode.env.template +0 -1
  23. package/src/generators/application/files/app/ios/Podfile.template +0 -5
  24. package/src/generators/application/files/app/ios/__className__/AppDelegate.swift.template +48 -0
  25. package/src/generators/application/files/app/ios/__className__/PrivacyInfo.xcprivacy +31 -32
  26. package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +9 -192
  27. package/src/generators/application/files/app/package.json.template +3 -3
  28. package/src/generators/application/lib/add-project.d.ts.map +1 -1
  29. package/src/generators/application/lib/add-project.js +2 -0
  30. package/src/generators/init/init.d.ts.map +1 -1
  31. package/src/generators/init/init.js +2 -0
  32. package/src/generators/library/library.js +1 -1
  33. package/src/generators/library/schema.json +1 -0
  34. package/src/generators/web-configuration/web-configuration.js +1 -1
  35. package/src/migrations/update-21-4-0/remove-deprecated-deps.d.ts +6 -0
  36. package/src/migrations/update-21-4-0/remove-deprecated-deps.d.ts.map +1 -0
  37. package/src/migrations/update-21-4-0/remove-deprecated-deps.js +27 -0
  38. package/src/migrations/update-21-4-0/upgrade-react-native-projects.d.ts +3 -0
  39. package/src/migrations/update-21-4-0/upgrade-react-native-projects.d.ts.map +1 -0
  40. package/src/migrations/update-21-4-0/upgrade-react-native-projects.js +30 -0
  41. package/src/utils/add-jest.d.ts +1 -1
  42. package/src/utils/add-jest.d.ts.map +1 -1
  43. package/src/utils/add-jest.js +3 -2
  44. package/src/utils/add-linting.d.ts +1 -0
  45. package/src/utils/add-linting.d.ts.map +1 -1
  46. package/src/utils/add-linting.js +26 -0
  47. package/src/utils/ensure-dependencies.d.ts +1 -1
  48. package/src/utils/ensure-dependencies.d.ts.map +1 -1
  49. package/src/utils/ensure-dependencies.js +7 -5
  50. package/src/utils/react-native-project-detection.d.ts +15 -0
  51. package/src/utils/react-native-project-detection.d.ts.map +1 -0
  52. package/src/utils/react-native-project-detection.js +111 -0
  53. package/src/utils/versions.d.ts +18 -19
  54. package/src/utils/versions.d.ts.map +1 -1
  55. package/src/utils/versions.js +19 -20
  56. package/src/generators/application/files/app/android/app/src/androidTest/java/com/__lowerCaseName__/DetoxTest.java.template +0 -30
  57. package/src/generators/application/files/app/android/app/src/main/res/xml/network_security_config.xml +0 -7
  58. package/src/generators/application/files/app/ios/__className__/AppDelegate.h +0 -6
  59. package/src/generators/application/files/app/ios/__className__/AppDelegate.mm.template +0 -31
  60. package/src/generators/application/files/app/ios/__className__/main.m +0 -10
  61. package/src/generators/application/files/app/ios/__className__Tests/Info.plist +0 -24
  62. package/src/generators/application/files/app/ios/__className__Tests/__className__Tests.m +0 -66
  63. package/src/generators/upgrade-native/lib/create-native-files.d.ts +0 -4
  64. package/src/generators/upgrade-native/lib/create-native-files.d.ts.map +0 -1
  65. package/src/generators/upgrade-native/lib/create-native-files.js +0 -13
  66. package/src/generators/upgrade-native/lib/normalize-options.d.ts +0 -13
  67. package/src/generators/upgrade-native/lib/normalize-options.d.ts.map +0 -1
  68. package/src/generators/upgrade-native/lib/normalize-options.js +0 -26
  69. package/src/generators/upgrade-native/schema.d.ts +0 -9
  70. package/src/generators/upgrade-native/schema.json +0 -41
  71. package/src/generators/upgrade-native/upgrade-native.d.ts +0 -11
  72. package/src/generators/upgrade-native/upgrade-native.d.ts.map +0 -1
  73. package/src/generators/upgrade-native/upgrade-native.js +0 -30
@@ -7,12 +7,9 @@
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
- 00E356F31AD99517003FC87E /* <%= className %>Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* <%= className %>Tests.m */; };
11
10
  0C80B921A6F3F58F76C31292 /* libPods-<%= className %>.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-<%= className %>.a */; };
12
- 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13
11
  13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
14
- 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
15
- 7699B88040F8A987B510C191 /* libPods-<%= className %>-<%= className %>Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-<%= className %>-<%= className %>Tests.a */; };
12
+ 761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };
16
13
  81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
17
14
  /* End PBXBuildFile section */
18
15
 
@@ -27,35 +24,20 @@
27
24
  /* End PBXContainerItemProxy section */
28
25
 
29
26
  /* Begin PBXFileReference section */
30
- 00E356EE1AD99517003FC87E /* <%= className %>Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = <%= className %>Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
31
27
  00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
32
- 00E356F21AD99517003FC87E /* <%= className %>Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = <%= className %>Tests.m; sourceTree = "<group>"; };
33
28
  13B07F961A680F5B00A75B9A /* <%= className %>.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = <%= className %>.app; sourceTree = BUILT_PRODUCTS_DIR; };
34
- 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = <%= className %>/AppDelegate.h; sourceTree = "<group>"; };
35
- 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = <%= className %>/AppDelegate.mm; sourceTree = "<group>"; };
36
29
  13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = <%= className %>/Images.xcassets; sourceTree = "<group>"; };
37
30
  13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = <%= className %>/Info.plist; sourceTree = "<group>"; };
38
- 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = <%= className %>/main.m; sourceTree = "<group>"; };
39
- 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = <%= className %>/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
40
- 19F6CBCC0A4E27FBF8BF4A61 /* libPods-<%= className %>-<%= className %>Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-<%= className %>-<%= className %>Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
31
+ 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = <%= className %>/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
41
32
  3B4392A12AC88292D35C810B /* Pods-<%= className %>.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-<%= className %>.debug.xcconfig"; path = "Target Support Files/Pods-<%= className %>/Pods-<%= className %>.debug.xcconfig"; sourceTree = "<group>"; };
42
33
  5709B34CF0A7D63546082F79 /* Pods-<%= className %>.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-<%= className %>.release.xcconfig"; path = "Target Support Files/Pods-<%= className %>/Pods-<%= className %>.release.xcconfig"; sourceTree = "<group>"; };
43
- 5B7EB9410499542E8C5724F5 /* Pods-<%= className %>-<%= className %>Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-<%= className %>-<%= className %>Tests.debug.xcconfig"; path = "Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests.debug.xcconfig"; sourceTree = "<group>"; };
44
34
  5DCACB8F33CDC322A6C60F78 /* libPods-<%= className %>.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-<%= className %>.a"; sourceTree = BUILT_PRODUCTS_DIR; };
35
+ 761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = <%= className %>/AppDelegate.swift; sourceTree = "<group>"; };
45
36
  81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = <%= className %>/LaunchScreen.storyboard; sourceTree = "<group>"; };
46
- 89C6BE57DB24E9ADA2F236DE /* Pods-<%= className %>-<%= className %>Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-<%= className %>-<%= className %>Tests.release.xcconfig"; path = "Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests.release.xcconfig"; sourceTree = "<group>"; };
47
37
  ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
48
38
  /* End PBXFileReference section */
49
39
 
50
40
  /* Begin PBXFrameworksBuildPhase section */
51
- 00E356EB1AD99517003FC87E /* Frameworks */ = {
52
- isa = PBXFrameworksBuildPhase;
53
- buildActionMask = 2147483647;
54
- files = (
55
- 7699B88040F8A987B510C191 /* libPods-<%= className %>-<%= className %>Tests.a in Frameworks */,
56
- );
57
- runOnlyForDeploymentPostprocessing = 0;
58
- };
59
41
  13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
60
42
  isa = PBXFrameworksBuildPhase;
61
43
  buildActionMask = 2147483647;
@@ -67,15 +49,6 @@
67
49
  /* End PBXFrameworksBuildPhase section */
68
50
 
69
51
  /* Begin PBXGroup section */
70
- 00E356EF1AD99517003FC87E /* <%= className %>Tests */ = {
71
- isa = PBXGroup;
72
- children = (
73
- 00E356F21AD99517003FC87E /* <%= className %>Tests.m */,
74
- 00E356F01AD99517003FC87E /* Supporting Files */,
75
- );
76
- path = <%= className %>Tests;
77
- sourceTree = "<group>";
78
- };
79
52
  00E356F01AD99517003FC87E /* Supporting Files */ = {
80
53
  isa = PBXGroup;
81
54
  children = (
@@ -87,12 +60,10 @@
87
60
  13B07FAE1A68108700A75B9A /* <%= className %> */ = {
88
61
  isa = PBXGroup;
89
62
  children = (
90
- 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
91
- 13B07FB01A68108700A75B9A /* AppDelegate.mm */,
92
63
  13B07FB51A68108700A75B9A /* Images.xcassets */,
64
+ 761780EC2CA45674006654EE /* AppDelegate.swift */,
93
65
  13B07FB61A68108700A75B9A /* Info.plist */,
94
66
  81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
95
- 13B07FB71A68108700A75B9A /* main.m */,
96
67
  13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */,
97
68
  );
98
69
  name = <%= className %>;
@@ -103,7 +74,6 @@
103
74
  children = (
104
75
  ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
105
76
  5DCACB8F33CDC322A6C60F78 /* libPods-<%= className %>.a */,
106
- 19F6CBCC0A4E27FBF8BF4A61 /* libPods-<%= className %>-<%= className %>Tests.a */,
107
77
  );
108
78
  name = Frameworks;
109
79
  sourceTree = "<group>";
@@ -120,7 +90,6 @@
120
90
  children = (
121
91
  13B07FAE1A68108700A75B9A /* <%= className %> */,
122
92
  832341AE1AAA6A7D00B99B32 /* Libraries */,
123
- 00E356EF1AD99517003FC87E /* <%= className %>Tests */,
124
93
  83CBBA001A601CBA00E9B192 /* Products */,
125
94
  2D16E6871FA4F8E400B85C8A /* Frameworks */,
126
95
  BBD78D7AC51CEA395F1C20DB /* Pods */,
@@ -134,7 +103,6 @@
134
103
  isa = PBXGroup;
135
104
  children = (
136
105
  13B07F961A680F5B00A75B9A /* <%= className %>.app */,
137
- 00E356EE1AD99517003FC87E /* <%= className %>Tests.xctest */,
138
106
  );
139
107
  name = Products;
140
108
  sourceTree = "<group>";
@@ -144,8 +112,6 @@
144
112
  children = (
145
113
  3B4392A12AC88292D35C810B /* Pods-<%= className %>.debug.xcconfig */,
146
114
  5709B34CF0A7D63546082F79 /* Pods-<%= className %>.release.xcconfig */,
147
- 5B7EB9410499542E8C5724F5 /* Pods-<%= className %>-<%= className %>Tests.debug.xcconfig */,
148
- 89C6BE57DB24E9ADA2F236DE /* Pods-<%= className %>-<%= className %>Tests.release.xcconfig */,
149
115
  );
150
116
  path = Pods;
151
117
  sourceTree = "<group>";
@@ -153,27 +119,6 @@
153
119
  /* End PBXGroup section */
154
120
 
155
121
  /* Begin PBXNativeTarget section */
156
- 00E356ED1AD99517003FC87E /* <%= className %>Tests */ = {
157
- isa = PBXNativeTarget;
158
- buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "<%= className %>Tests" */;
159
- buildPhases = (
160
- A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */,
161
- 00E356EA1AD99517003FC87E /* Sources */,
162
- 00E356EB1AD99517003FC87E /* Frameworks */,
163
- 00E356EC1AD99517003FC87E /* Resources */,
164
- C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */,
165
- F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */,
166
- );
167
- buildRules = (
168
- );
169
- dependencies = (
170
- 00E356F51AD99517003FC87E /* PBXTargetDependency */,
171
- );
172
- name = <%= className %>Tests;
173
- productName = <%= className %>Tests;
174
- productReference = 00E356EE1AD99517003FC87E /* <%= className %>Tests.xctest */;
175
- productType = "com.apple.product-type.bundle.unit-test";
176
- };
177
122
  13B07F861A680F5B00A75B9A /* <%= className %> */ = {
178
123
  isa = PBXNativeTarget;
179
124
  buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "<%= className %>" */;
@@ -203,10 +148,6 @@
203
148
  attributes = {
204
149
  LastUpgradeCheck = 1210;
205
150
  TargetAttributes = {
206
- 00E356ED1AD99517003FC87E = {
207
- CreatedOnToolsVersion = 6.2;
208
- TestTargetID = 13B07F861A680F5B00A75B9A;
209
- };
210
151
  13B07F861A680F5B00A75B9A = {
211
152
  LastSwiftMigration = 1120;
212
153
  };
@@ -226,7 +167,6 @@
226
167
  projectRoot = "";
227
168
  targets = (
228
169
  13B07F861A680F5B00A75B9A /* <%= className %> */,
229
- 00E356ED1AD99517003FC87E /* <%= className %>Tests */,
230
170
  );
231
171
  };
232
172
  /* End PBXProject section */
@@ -284,28 +224,6 @@
284
224
  shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-frameworks.sh\"\n";
285
225
  showEnvVarsInLog = 0;
286
226
  };
287
- A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = {
288
- isa = PBXShellScriptBuildPhase;
289
- buildActionMask = 2147483647;
290
- files = (
291
- );
292
- inputFileListPaths = (
293
- );
294
- inputPaths = (
295
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
296
- "${PODS_ROOT}/Manifest.lock",
297
- );
298
- name = "[CP] Check Pods Manifest.lock";
299
- outputFileListPaths = (
300
- );
301
- outputPaths = (
302
- "$(DERIVED_FILE_DIR)/Pods-<%= className %>-<%= className %>Tests-checkManifestLockResult.txt",
303
- );
304
- runOnlyForDeploymentPostprocessing = 0;
305
- shellPath = /bin/sh;
306
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
307
- showEnvVarsInLog = 0;
308
- };
309
227
  C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
310
228
  isa = PBXShellScriptBuildPhase;
311
229
  buildActionMask = 2147483647;
@@ -328,23 +246,6 @@
328
246
  shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
329
247
  showEnvVarsInLog = 0;
330
248
  };
331
- C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = {
332
- isa = PBXShellScriptBuildPhase;
333
- buildActionMask = 2147483647;
334
- files = (
335
- );
336
- inputFileListPaths = (
337
- "${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
338
- );
339
- name = "[CP] Embed Pods Frameworks";
340
- outputFileListPaths = (
341
- "${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
342
- );
343
- runOnlyForDeploymentPostprocessing = 0;
344
- shellPath = /bin/sh;
345
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-frameworks.sh\"\n";
346
- showEnvVarsInLog = 0;
347
- };
348
249
  E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {
349
250
  isa = PBXShellScriptBuildPhase;
350
251
  buildActionMask = 2147483647;
@@ -362,40 +263,14 @@
362
263
  shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-resources.sh\"\n";
363
264
  showEnvVarsInLog = 0;
364
265
  };
365
- F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = {
366
- isa = PBXShellScriptBuildPhase;
367
- buildActionMask = 2147483647;
368
- files = (
369
- );
370
- inputFileListPaths = (
371
- "${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-resources-${CONFIGURATION}-input-files.xcfilelist",
372
- );
373
- name = "[CP] Copy Pods Resources";
374
- outputFileListPaths = (
375
- "${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-resources-${CONFIGURATION}-output-files.xcfilelist",
376
- );
377
- runOnlyForDeploymentPostprocessing = 0;
378
- shellPath = /bin/sh;
379
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>-<%= className %>Tests/Pods-<%= className %>-<%= className %>Tests-resources.sh\"\n";
380
- showEnvVarsInLog = 0;
381
- };
382
266
  /* End PBXShellScriptBuildPhase section */
383
267
 
384
268
  /* Begin PBXSourcesBuildPhase section */
385
- 00E356EA1AD99517003FC87E /* Sources */ = {
386
- isa = PBXSourcesBuildPhase;
387
- buildActionMask = 2147483647;
388
- files = (
389
- 00E356F31AD99517003FC87E /* <%= className %>Tests.m in Sources */,
390
- );
391
- runOnlyForDeploymentPostprocessing = 0;
392
- };
393
269
  13B07F871A680F5B00A75B9A /* Sources */ = {
394
270
  isa = PBXSourcesBuildPhase;
395
271
  buildActionMask = 2147483647;
396
272
  files = (
397
- 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
398
- 13B07FC11A68108700A75B9A /* main.m in Sources */,
273
+ 761780ED2CA45674006654EE /* AppDelegate.swift in Sources */,
399
274
  );
400
275
  runOnlyForDeploymentPostprocessing = 0;
401
276
  };
@@ -410,57 +285,6 @@
410
285
  /* End PBXTargetDependency section */
411
286
 
412
287
  /* Begin XCBuildConfiguration section */
413
- 00E356F61AD99517003FC87E /* Debug */ = {
414
- isa = XCBuildConfiguration;
415
- baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-<%= className %>-<%= className %>Tests.debug.xcconfig */;
416
- buildSettings = {
417
- BUNDLE_LOADER = "$(TEST_HOST)";
418
- GCC_PREPROCESSOR_DEFINITIONS = (
419
- "DEBUG=1",
420
- "$(inherited)",
421
- );
422
- INFOPLIST_FILE = <%= className %>Tests/Info.plist;
423
- IPHONEOS_DEPLOYMENT_TARGET = 13.4;
424
- LD_RUNPATH_SEARCH_PATHS = (
425
- "$(inherited)",
426
- "@executable_path/Frameworks",
427
- "@loader_path/Frameworks",
428
- );
429
- OTHER_LDFLAGS = (
430
- "-ObjC",
431
- "-lc++",
432
- "$(inherited)",
433
- );
434
- PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
435
- PRODUCT_NAME = "$(TARGET_NAME)";
436
- TEST_HOST = "$(BUILT_PRODUCTS_DIR)/<%= className %>.app/<%= className %>";
437
- };
438
- name = Debug;
439
- };
440
- 00E356F71AD99517003FC87E /* Release */ = {
441
- isa = XCBuildConfiguration;
442
- baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-<%= className %>-<%= className %>Tests.release.xcconfig */;
443
- buildSettings = {
444
- BUNDLE_LOADER = "$(TEST_HOST)";
445
- COPY_PHASE_STRIP = NO;
446
- INFOPLIST_FILE = <%= className %>Tests/Info.plist;
447
- IPHONEOS_DEPLOYMENT_TARGET = 13.4;
448
- LD_RUNPATH_SEARCH_PATHS = (
449
- "$(inherited)",
450
- "@executable_path/Frameworks",
451
- "@loader_path/Frameworks",
452
- );
453
- OTHER_LDFLAGS = (
454
- "-ObjC",
455
- "-lc++",
456
- "$(inherited)",
457
- );
458
- PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
459
- PRODUCT_NAME = "$(TARGET_NAME)";
460
- TEST_HOST = "$(BUILT_PRODUCTS_DIR)/<%= className %>.app/<%= className %>";
461
- };
462
- name = Release;
463
- };
464
288
  13B07F941A680F5B00A75B9A /* Debug */ = {
465
289
  isa = XCBuildConfiguration;
466
290
  baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-<%= className %>.debug.xcconfig */;
@@ -470,6 +294,7 @@
470
294
  CURRENT_PROJECT_VERSION = 1;
471
295
  ENABLE_BITCODE = NO;
472
296
  INFOPLIST_FILE = <%= className %>/Info.plist;
297
+ IPHONEOS_DEPLOYMENT_TARGET = 15.1;
473
298
  LD_RUNPATH_SEARCH_PATHS = (
474
299
  "$(inherited)",
475
300
  "@executable_path/Frameworks",
@@ -496,6 +321,7 @@
496
321
  CLANG_ENABLE_MODULES = YES;
497
322
  CURRENT_PROJECT_VERSION = 1;
498
323
  INFOPLIST_FILE = <%= className %>/Info.plist;
324
+ IPHONEOS_DEPLOYMENT_TARGET = 15.1;
499
325
  LD_RUNPATH_SEARCH_PATHS = (
500
326
  "$(inherited)",
501
327
  "@executable_path/Frameworks",
@@ -562,7 +388,7 @@
562
388
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
563
389
  GCC_WARN_UNUSED_FUNCTION = YES;
564
390
  GCC_WARN_UNUSED_VARIABLE = YES;
565
- IPHONEOS_DEPLOYMENT_TARGET = 13.4;
391
+ IPHONEOS_DEPLOYMENT_TARGET = 15.1;
566
392
  LD_RUNPATH_SEARCH_PATHS = (
567
393
  /usr/lib/swift,
568
394
  "$(inherited)",
@@ -628,7 +454,7 @@
628
454
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
629
455
  GCC_WARN_UNUSED_FUNCTION = YES;
630
456
  GCC_WARN_UNUSED_VARIABLE = YES;
631
- IPHONEOS_DEPLOYMENT_TARGET = 13.4;
457
+ IPHONEOS_DEPLOYMENT_TARGET = 15.1;
632
458
  LD_RUNPATH_SEARCH_PATHS = (
633
459
  /usr/lib/swift,
634
460
  "$(inherited)",
@@ -655,15 +481,6 @@
655
481
  /* End XCBuildConfiguration section */
656
482
 
657
483
  /* Begin XCConfigurationList section */
658
- 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "<%= className %>Tests" */ = {
659
- isa = XCConfigurationList;
660
- buildConfigurations = (
661
- 00E356F61AD99517003FC87E /* Debug */,
662
- 00E356F71AD99517003FC87E /* Release */,
663
- );
664
- defaultConfigurationIsVisible = 0;
665
- defaultConfigurationName = Release;
666
- };
667
484
  13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "<%= className %>" */ = {
668
485
  isa = XCConfigurationList;
669
486
  buildConfigurations = (
@@ -4,11 +4,11 @@
4
4
  "private": true,
5
5
  "dependencies": {
6
6
  "@react-native/metro-config": "*",
7
- "@testing-library/jest-native": "*",
8
- "@testing-library/react-native": "*",
9
7
  "react": "*",
10
8
  "react-native": "*",
11
- "react-native-svg": "*",
9
+ "react-native-svg": "*",<% if (unitTestRunner === 'jest') { %>
10
+ "@testing-library/react-native": "*",
11
+ "react-test-renderer": "*",<% } %>
12
12
  "metro-config": "*"
13
13
  }
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"add-project.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/application/lib/add-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EAEL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QA+C/D"}
1
+ {"version":3,"file":"add-project.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/application/lib/add-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,IAAI,EAEL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAqD/D"}
@@ -14,7 +14,9 @@ function addProject(host, options) {
14
14
  targets: hasPlugin ? {} : getTargets(options),
15
15
  tags: options.parsedTags,
16
16
  };
17
+ const templatedPackageJson = (0, devkit_1.readJson)(host, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'package.json'));
17
18
  const packageJson = {
19
+ ...templatedPackageJson,
18
20
  name: options.importPath,
19
21
  version: '0.0.1',
20
22
  private: true,
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/init/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAIjB,IAAI,EACL,MAAM,YAAY,CAAC;AAUpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAKlE;AAED,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,8BA2Ef;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qBAc5D;AAMD,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/init/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAIjB,IAAI,EACL,MAAM,YAAY,CAAC;AAWpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAKlE;AAED,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,8BA2Ef;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qBAgB5D;AAMD,eAAe,wBAAwB,CAAC"}
@@ -82,6 +82,8 @@ function updateDependencies(host, schema) {
82
82
  'react-native': versions_1.reactNativeVersion,
83
83
  }, {
84
84
  '@nx/react-native': versions_1.nxVersion,
85
+ 'metro-config': versions_1.metroVersion,
86
+ 'metro-resolver': versions_1.metroVersion,
85
87
  }, undefined, schema.keepExistingVersions);
86
88
  }
87
89
  function moveDependency(host) {
@@ -42,7 +42,7 @@ async function reactNativeLibraryGeneratorInternal(host, schema) {
42
42
  const initTask = await (0, init_1.default)(host, { ...options, skipFormat: true });
43
43
  tasks.push(initTask);
44
44
  if (!options.skipPackageJson) {
45
- tasks.push((0, ensure_dependencies_1.ensureDependencies)(host));
45
+ tasks.push((0, ensure_dependencies_1.ensureDependencies)(host, options.unitTestRunner));
46
46
  }
47
47
  createFiles(host, options);
48
48
  if (options.isUsingTsSolutionConfig) {
@@ -40,6 +40,7 @@
40
40
  "type": "string",
41
41
  "enum": ["jest", "none"],
42
42
  "description": "Test runner to use for unit tests.",
43
+ "x-prompt": "Which unit test runner would you like to use?",
43
44
  "default": "none",
44
45
  "x-priority": "important"
45
46
  },
@@ -21,7 +21,7 @@ async function webConfigurationGenerator(tree, options) {
21
21
  if (!options.skipPackageJson) {
22
22
  const installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
23
23
  'react-native-web': versions_1.reactNativeWebVersion,
24
- 'react-native-svg-web': versions_1.reacttNativeSvgWebVersion,
24
+ 'react-native-svg-web': versions_1.reactNativeSvgWebVersion,
25
25
  });
26
26
  tasks.push(installTask);
27
27
  }
@@ -0,0 +1,6 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /**
3
+ * Remove deprecated dependencies from the root and app package.json.
4
+ */
5
+ export default function update(tree: Tree): void;
6
+ //# sourceMappingURL=remove-deprecated-deps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-deprecated-deps.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-native/src/migrations/update-21-4-0/remove-deprecated-deps.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAIL,MAAM,YAAY,CAAC;AAGpB;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,IAAI,EAAE,IAAI,QAyBxC"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const path_1 = require("path");
6
+ /**
7
+ * Remove deprecated dependencies from the root and app package.json.
8
+ */
9
+ function update(tree) {
10
+ const projects = (0, devkit_1.getProjects)(tree);
11
+ for (const [_, config] of projects.entries()) {
12
+ const appPackageJsonPath = (0, path_1.join)(config.root, 'package.json');
13
+ if (!tree.exists(appPackageJsonPath)) {
14
+ continue;
15
+ }
16
+ (0, devkit_1.removeDependenciesFromPackageJson)(tree, ['@testing-library/jest-native', 'jest-react-native'], ['@testing-library/jest-native', 'jest-react-native']);
17
+ (0, devkit_1.updateJson)(tree, appPackageJsonPath, (packageJson) => {
18
+ if (packageJson.dependencies?.['@testing-library/jest-native']) {
19
+ delete packageJson.dependencies['@testing-library/jest-native'];
20
+ }
21
+ if (packageJson.dependencies?.['jest-react-native']) {
22
+ delete packageJson.dependencies['jest-react-native'];
23
+ }
24
+ return packageJson;
25
+ });
26
+ }
27
+ }
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export default function update(tree: Tree): Promise<void>;
3
+ //# sourceMappingURL=upgrade-react-native-projects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgrade-react-native-projects.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-native/src/migrations/update-21-4-0/upgrade-react-native-projects.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAML,MAAM,YAAY,CAAC;AAIpB,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,iBA4B9C"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const child_process_1 = require("child_process");
6
+ const react_native_project_detection_1 = require("../../utils/react-native-project-detection");
7
+ async function update(tree) {
8
+ const projects = (0, devkit_1.getProjects)(tree);
9
+ const reactNativeProjects = await (0, react_native_project_detection_1.getAllReactNativeProjects)(tree, projects);
10
+ if (reactNativeProjects.length === 0) {
11
+ return;
12
+ }
13
+ const pm = (0, devkit_1.detectPackageManager)(tree.root);
14
+ const { exec } = (0, devkit_1.getPackageManagerCommand)(pm);
15
+ // Run nx upgrade for each React Native project
16
+ for (const projectName of reactNativeProjects) {
17
+ const command = `${exec} nx upgrade ${projectName}`;
18
+ try {
19
+ (0, child_process_1.execSync)(command, {
20
+ stdio: 'inherit',
21
+ cwd: process.cwd(),
22
+ });
23
+ }
24
+ catch (error) {
25
+ devkit_1.logger.warn(`Failed to upgrade ${projectName}: ${error.message}. Please run '${command}'.`);
26
+ // Continue with other projects even if one fails
27
+ }
28
+ }
29
+ await (0, devkit_1.formatFiles)(tree);
30
+ }
@@ -1,3 +1,3 @@
1
1
  import { Tree } from '@nx/devkit';
2
- export declare function addJest(host: Tree, unitTestRunner: 'jest' | 'none', projectName: string, appProjectRoot: string, js: boolean, skipPackageJson: boolean, addPlugin: boolean, runtimeTsconfigFileName: string): Promise<import("@nx/devkit").GeneratorCallback>;
2
+ export declare function addJest(host: Tree, unitTestRunner: 'jest' | 'none', projectName: string, appProjectRoot: string, js: boolean, skipPackageJson: boolean, addPlugin: boolean, runtimeTsconfigFileName: string): Promise<() => void>;
3
3
  //# sourceMappingURL=add-jest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"add-jest.d.ts","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/add-jest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,YAAY,CAAC;AAGlD,wBAAsB,OAAO,CAC3B,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,MAAM,GAAG,MAAM,EAC/B,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,EAAE,EAAE,OAAO,EACX,eAAe,EAAE,OAAO,EACxB,SAAS,EAAE,OAAO,EAClB,uBAAuB,EAAE,MAAM,mDAgDhC"}
1
+ {"version":3,"file":"add-jest.d.ts","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/add-jest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiC,MAAM,YAAY,CAAC;AAGjE,wBAAsB,OAAO,CAC3B,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,MAAM,GAAG,MAAM,EAC/B,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,EAAE,EAAE,OAAO,EACX,eAAe,EAAE,OAAO,EACxB,SAAS,EAAE,OAAO,EAClB,uBAAuB,EAAE,MAAM,uBAqDhC"}
@@ -2,12 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addJest = addJest;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const jest_1 = require("@nx/jest");
5
+ const versions_1 = require("./versions");
6
6
  async function addJest(host, unitTestRunner, projectName, appProjectRoot, js, skipPackageJson, addPlugin, runtimeTsconfigFileName) {
7
7
  if (unitTestRunner !== 'jest') {
8
8
  return () => { };
9
9
  }
10
- const jestTask = await (0, jest_1.configurationGenerator)(host, {
10
+ const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/jest', versions_1.nxVersion);
11
+ const jestTask = await configurationGenerator(host, {
11
12
  js,
12
13
  project: projectName,
13
14
  supportTsx: true,
@@ -8,6 +8,7 @@ interface NormalizedSchema {
8
8
  tsConfigPaths: string[];
9
9
  skipPackageJson?: boolean;
10
10
  addPlugin?: boolean;
11
+ buildable?: boolean;
11
12
  }
12
13
  export declare function addLinting(host: Tree, options: NormalizedSchema): Promise<GeneratorCallback>;
13
14
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAwB,MAAM,YAAY,CAAC;AACtE,OAAO,EAEL,iBAAiB,EAEjB,IAAI,EACL,MAAM,YAAY,CAAC;AAWpB,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,8BAsDrE"}
1
+ {"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAwB,MAAM,YAAY,CAAC;AACtE,OAAO,EAEL,iBAAiB,EAEjB,IAAI,EACL,MAAM,YAAY,CAAC;AAYpB,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,8BAuFrE"}
@@ -19,8 +19,34 @@ async function addLinting(host, options) {
19
19
  skipPackageJson: options.skipPackageJson,
20
20
  setParserOptionsProject: options.setParserOptionsProject,
21
21
  addPlugin: options.addPlugin,
22
+ addPackageJsonDependencyChecks: options.buildable,
22
23
  });
23
24
  tasks.push(lintTask);
25
+ // Add ignored dependencies and files to dependency-checks rule
26
+ if ((0, eslint_file_1.isEslintConfigSupported)(host)) {
27
+ (0, eslint_file_1.updateOverrideInLintConfig)(host, options.projectRoot, (override) => Boolean(override.rules?.['@nx/dependency-checks']), (override) => {
28
+ const rule = override.rules['@nx/dependency-checks'];
29
+ if (Array.isArray(rule) && rule.length > 1) {
30
+ // Ensure ignoredDependencies array exists
31
+ if (!rule[1].ignoredDependencies) {
32
+ rule[1].ignoredDependencies = [];
33
+ }
34
+ // Add ignored dependencies if they don't already exist
35
+ const ignoredDeps = [
36
+ '@nx/jest',
37
+ '@nx/rollup',
38
+ '@rollup/plugin-url',
39
+ '@svgr/rollup',
40
+ ];
41
+ for (const dep of ignoredDeps) {
42
+ if (!rule[1].ignoredDependencies.includes(dep)) {
43
+ rule[1].ignoredDependencies.push(dep);
44
+ }
45
+ }
46
+ }
47
+ return override;
48
+ });
49
+ }
24
50
  if ((0, eslint_file_1.isEslintConfigSupported)(host)) {
25
51
  if ((0, flat_config_1.useFlatConfig)(host)) {
26
52
  (0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(host, options.projectRoot, 'flat/react');
@@ -1,3 +1,3 @@
1
1
  import { GeneratorCallback, Tree } from '@nx/devkit';
2
- export declare function ensureDependencies(tree: Tree): GeneratorCallback;
2
+ export declare function ensureDependencies(tree: Tree, unitTestRunner?: 'jest' | 'none'): GeneratorCallback;
3
3
  //# sourceMappingURL=ensure-dependencies.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ensure-dependencies.d.ts","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/ensure-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EACjB,IAAI,EACL,MAAM,YAAY,CAAC;AAsBpB,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,iBAAiB,CA+BhE"}
1
+ {"version":3,"file":"ensure-dependencies.d.ts","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/ensure-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EACjB,IAAI,EACL,MAAM,YAAY,CAAC;AAoBpB,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAC/B,iBAAiB,CAiCnB"}