@nrwl/react-native 16.0.0-beta.0 → 16.0.0-beta.1

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 (359) hide show
  1. package/executors.json +40 -40
  2. package/generators.json +2 -107
  3. package/index.d.ts +1 -5
  4. package/index.js +2 -11
  5. package/index.js.map +1 -1
  6. package/package.json +7 -25
  7. package/plugins/jest/svg-mock.js.map +1 -1
  8. package/plugins/with-nx-metro.d.ts +1 -8
  9. package/plugins/with-nx-metro.js +2 -29
  10. package/plugins/with-nx-metro.js.map +1 -1
  11. package/.eslintrc.json +0 -19
  12. package/README.md +0 -63
  13. package/migrations.json +0 -1285
  14. package/plugins/metro-resolver.d.ts +0 -1
  15. package/plugins/metro-resolver.js +0 -135
  16. package/plugins/metro-resolver.js.map +0 -1
  17. package/project.json +0 -61
  18. package/src/executors/build-android/build-android.impl.d.ts +0 -6
  19. package/src/executors/build-android/build-android.impl.js +0 -76
  20. package/src/executors/build-android/build-android.impl.js.map +0 -1
  21. package/src/executors/build-android/build-android.impl.ts +0 -108
  22. package/src/executors/build-android/compat.d.ts +0 -2
  23. package/src/executors/build-android/compat.js +0 -6
  24. package/src/executors/build-android/compat.js.map +0 -1
  25. package/src/executors/build-android/schema.d.ts +0 -31
  26. package/src/executors/build-android/schema.json +0 -102
  27. package/src/executors/build-ios/build-ios.impl.d.ts +0 -6
  28. package/src/executors/build-ios/build-ios.impl.js +0 -77
  29. package/src/executors/build-ios/build-ios.impl.js.map +0 -1
  30. package/src/executors/build-ios/build-ios.impl.ts +0 -118
  31. package/src/executors/build-ios/compat.d.ts +0 -2
  32. package/src/executors/build-ios/compat.js +0 -6
  33. package/src/executors/build-ios/compat.js.map +0 -1
  34. package/src/executors/build-ios/schema.d.ts +0 -22
  35. package/src/executors/build-ios/schema.json +0 -106
  36. package/src/executors/bundle/bundle.impl.d.ts +0 -6
  37. package/src/executors/bundle/bundle.impl.js +0 -58
  38. package/src/executors/bundle/bundle.impl.js.map +0 -1
  39. package/src/executors/bundle/bundle.impl.ts +0 -76
  40. package/src/executors/bundle/compat.d.ts +0 -2
  41. package/src/executors/bundle/compat.js +0 -6
  42. package/src/executors/bundle/compat.js.map +0 -1
  43. package/src/executors/bundle/schema.d.ts +0 -16
  44. package/src/executors/bundle/schema.json +0 -92
  45. package/src/executors/ensure-symlink/compat.d.ts +0 -2
  46. package/src/executors/ensure-symlink/compat.js +0 -6
  47. package/src/executors/ensure-symlink/compat.js.map +0 -1
  48. package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts +0 -5
  49. package/src/executors/ensure-symlink/ensure-symlink.impl.js +0 -13
  50. package/src/executors/ensure-symlink/ensure-symlink.impl.js.map +0 -1
  51. package/src/executors/ensure-symlink/ensure-symlink.impl.ts +0 -18
  52. package/src/executors/ensure-symlink/schema.json +0 -11
  53. package/src/executors/pod-install/compat.d.ts +0 -2
  54. package/src/executors/pod-install/compat.js +0 -6
  55. package/src/executors/pod-install/compat.js.map +0 -1
  56. package/src/executors/pod-install/pod-install.impl.d.ts +0 -6
  57. package/src/executors/pod-install/pod-install.impl.js +0 -15
  58. package/src/executors/pod-install/pod-install.impl.js.map +0 -1
  59. package/src/executors/pod-install/pod-install.impl.ts +0 -21
  60. package/src/executors/pod-install/schema.d.ts +0 -3
  61. package/src/executors/pod-install/schema.json +0 -18
  62. package/src/executors/run-android/compat.d.ts +0 -2
  63. package/src/executors/run-android/compat.js +0 -6
  64. package/src/executors/run-android/compat.js.map +0 -1
  65. package/src/executors/run-android/run-android.impl.d.ts +0 -6
  66. package/src/executors/run-android/run-android.impl.js +0 -72
  67. package/src/executors/run-android/run-android.impl.js.map +0 -1
  68. package/src/executors/run-android/run-android.impl.ts +0 -110
  69. package/src/executors/run-android/schema.d.ts +0 -24
  70. package/src/executors/run-android/schema.json +0 -121
  71. package/src/executors/run-ios/compat.d.ts +0 -2
  72. package/src/executors/run-ios/compat.js +0 -6
  73. package/src/executors/run-ios/compat.js.map +0 -1
  74. package/src/executors/run-ios/run-ios.impl.d.ts +0 -6
  75. package/src/executors/run-ios/run-ios.impl.js +0 -78
  76. package/src/executors/run-ios/run-ios.impl.js.map +0 -1
  77. package/src/executors/run-ios/run-ios.impl.ts +0 -120
  78. package/src/executors/run-ios/schema.d.ts +0 -12
  79. package/src/executors/run-ios/schema.json +0 -119
  80. package/src/executors/start/compat.d.ts +0 -2
  81. package/src/executors/start/compat.js +0 -6
  82. package/src/executors/start/compat.js.map +0 -1
  83. package/src/executors/start/lib/is-packager-running.d.ts +0 -1
  84. package/src/executors/start/lib/is-packager-running.js +0 -19
  85. package/src/executors/start/lib/is-packager-running.js.map +0 -1
  86. package/src/executors/start/schema.d.ts +0 -7
  87. package/src/executors/start/schema.json +0 -28
  88. package/src/executors/start/start.impl.d.ts +0 -8
  89. package/src/executors/start/start.impl.js +0 -99
  90. package/src/executors/start/start.impl.js.map +0 -1
  91. package/src/executors/start/start.impl.ts +0 -120
  92. package/src/executors/storybook/compat.d.ts +0 -2
  93. package/src/executors/storybook/compat.js +0 -6
  94. package/src/executors/storybook/compat.js.map +0 -1
  95. package/src/executors/storybook/schema.d.ts +0 -7
  96. package/src/executors/storybook/schema.json +0 -34
  97. package/src/executors/storybook/storybook.impl.d.ts +0 -5
  98. package/src/executors/storybook/storybook.impl.js +0 -76
  99. package/src/executors/storybook/storybook.impl.js.map +0 -1
  100. package/src/executors/storybook/storybook.impl.ts +0 -105
  101. package/src/executors/sync-deps/compat.d.ts +0 -2
  102. package/src/executors/sync-deps/compat.js +0 -6
  103. package/src/executors/sync-deps/compat.js.map +0 -1
  104. package/src/executors/sync-deps/schema.d.ts +0 -4
  105. package/src/executors/sync-deps/schema.json +0 -28
  106. package/src/executors/sync-deps/sync-deps.impl.d.ts +0 -8
  107. package/src/executors/sync-deps/sync-deps.impl.js +0 -62
  108. package/src/executors/sync-deps/sync-deps.impl.js.map +0 -1
  109. package/src/executors/sync-deps/sync-deps.impl.ts +0 -101
  110. package/src/generators/application/application.d.ts +0 -5
  111. package/src/generators/application/application.js +0 -40
  112. package/src/generators/application/application.js.map +0 -1
  113. package/src/generators/application/application.spec.ts +0 -214
  114. package/src/generators/application/files/app/.ruby-version +0 -1
  115. package/src/generators/application/files/app/Gemfile.template +0 -6
  116. package/src/generators/application/files/app/android/app/build.gradle.template +0 -184
  117. package/src/generators/application/files/app/android/app/debug.keystore +0 -0
  118. package/src/generators/application/files/app/android/app/proguard-rules.pro +0 -10
  119. package/src/generators/application/files/app/android/app/src/androidTest/java/com/__lowerCaseName__/DetoxTest.java.template +0 -30
  120. package/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template +0 -14
  121. package/src/generators/application/files/app/android/app/src/debug/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +0 -75
  122. package/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template +0 -26
  123. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.java.template +0 -35
  124. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainApplication.java.template +0 -63
  125. package/src/generators/application/files/app/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  126. package/src/generators/application/files/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  127. package/src/generators/application/files/app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  128. package/src/generators/application/files/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  129. package/src/generators/application/files/app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  130. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  131. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  132. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  133. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  134. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  135. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  136. package/src/generators/application/files/app/android/app/src/main/res/values/strings.xml.template +0 -3
  137. package/src/generators/application/files/app/android/app/src/main/res/values/styles.xml +0 -9
  138. package/src/generators/application/files/app/android/app/src/main/res/xml/network_security_config.xml +0 -7
  139. package/src/generators/application/files/app/android/app/src/release/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +0 -20
  140. package/src/generators/application/files/app/android/build.gradle.template +0 -34
  141. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  142. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  143. package/src/generators/application/files/app/android/gradle.properties +0 -44
  144. package/src/generators/application/files/app/android/gradlew.bat +0 -89
  145. package/src/generators/application/files/app/android/gradlew.template +0 -234
  146. package/src/generators/application/files/app/android/settings.gradle.template +0 -7
  147. package/src/generators/application/files/app/app.json.template +0 -4
  148. package/src/generators/application/files/app/babel.config.json.template +0 -3
  149. package/src/generators/application/files/app/ios/.xcode.env.template +0 -12
  150. package/src/generators/application/files/app/ios/Podfile.template +0 -60
  151. package/src/generators/application/files/app/ios/__className__/AppDelegate.h +0 -6
  152. package/src/generators/application/files/app/ios/__className__/AppDelegate.mm.template +0 -36
  153. package/src/generators/application/files/app/ios/__className__/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  154. package/src/generators/application/files/app/ios/__className__/Images.xcassets/Contents.json +0 -6
  155. package/src/generators/application/files/app/ios/__className__/Info.plist.template +0 -55
  156. package/src/generators/application/files/app/ios/__className__/LaunchScreen.storyboard.template +0 -47
  157. package/src/generators/application/files/app/ios/__className__/main.m +0 -10
  158. package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +0 -702
  159. package/src/generators/application/files/app/ios/__className__.xcodeproj/xcshareddata/xcschemes/__className__.xcscheme.template +0 -88
  160. package/src/generators/application/files/app/ios/__className__.xcworkspace/contents.xcworkspacedata +0 -10
  161. package/src/generators/application/files/app/ios/__className__Tests/Info.plist +0 -24
  162. package/src/generators/application/files/app/ios/__className__Tests/__className__Tests.m +0 -66
  163. package/src/generators/application/files/app/metro.config.js.template +0 -38
  164. package/src/generators/application/files/app/package.json.template +0 -15
  165. package/src/generators/application/files/app/src/app/App.spec.tsx.template +0 -9
  166. package/src/generators/application/files/app/src/app/App.tsx.template +0 -694
  167. package/src/generators/application/files/app/src/main.tsx.template +0 -4
  168. package/src/generators/application/files/app/test-setup.ts.template +0 -1
  169. package/src/generators/application/files/app/tsconfig.app.json.template +0 -9
  170. package/src/generators/application/files/app/tsconfig.json.template +0 -25
  171. package/src/generators/application/lib/add-detox.d.ts +0 -3
  172. package/src/generators/application/lib/add-detox.js +0 -16
  173. package/src/generators/application/lib/add-detox.js.map +0 -1
  174. package/src/generators/application/lib/add-project.d.ts +0 -3
  175. package/src/generators/application/lib/add-project.js +0 -83
  176. package/src/generators/application/lib/add-project.js.map +0 -1
  177. package/src/generators/application/lib/create-application-files.d.ts +0 -3
  178. package/src/generators/application/lib/create-application-files.js +0 -20
  179. package/src/generators/application/lib/create-application-files.js.map +0 -1
  180. package/src/generators/application/lib/nomalize-options.spec.ts +0 -138
  181. package/src/generators/application/lib/normalize-options.d.ts +0 -13
  182. package/src/generators/application/lib/normalize-options.js +0 -36
  183. package/src/generators/application/lib/normalize-options.js.map +0 -1
  184. package/src/generators/application/schema.d.ts +0 -19
  185. package/src/generators/application/schema.json +0 -89
  186. package/src/generators/component/component.d.ts +0 -5
  187. package/src/generators/component/component.js +0 -53
  188. package/src/generators/component/component.js.map +0 -1
  189. package/src/generators/component/component.spec.ts +0 -135
  190. package/src/generators/component/files/__fileName__.spec.tsx__tmpl__ +0 -11
  191. package/src/generators/component/files/__fileName__.tsx__tmpl__ +0 -32
  192. package/src/generators/component/lib/add-import.d.ts +0 -3
  193. package/src/generators/component/lib/add-import.js +0 -34
  194. package/src/generators/component/lib/add-import.js.map +0 -1
  195. package/src/generators/component/lib/normalize-options.d.ts +0 -8
  196. package/src/generators/component/lib/normalize-options.js +0 -58
  197. package/src/generators/component/lib/normalize-options.js.map +0 -1
  198. package/src/generators/component/schema.d.ts +0 -14
  199. package/src/generators/component/schema.json +0 -78
  200. package/src/generators/component-story/component-story.d.ts +0 -8
  201. package/src/generators/component-story/component-story.js +0 -113
  202. package/src/generators/component-story/component-story.js.map +0 -1
  203. package/src/generators/component-story/component-story.spec.ts +0 -433
  204. package/src/generators/component-story/files/__componentFileName__.stories.__fileExt__ +0 -24
  205. package/src/generators/component-story/schema.d.ts +0 -5
  206. package/src/generators/component-story/schema.json +0 -34
  207. package/src/generators/init/init.d.ts +0 -6
  208. package/src/generators/init/init.js +0 -58
  209. package/src/generators/init/init.js.map +0 -1
  210. package/src/generators/init/init.spec.ts +0 -81
  211. package/src/generators/init/lib/add-git-ignore-entry.d.ts +0 -2
  212. package/src/generators/init/lib/add-git-ignore-entry.js +0 -25
  213. package/src/generators/init/lib/add-git-ignore-entry.js.map +0 -1
  214. package/src/generators/init/lib/gitignore-entries.d.ts +0 -1
  215. package/src/generators/init/lib/gitignore-entries.js +0 -75
  216. package/src/generators/init/lib/gitignore-entries.js.map +0 -1
  217. package/src/generators/init/schema.d.ts +0 -7
  218. package/src/generators/init/schema.json +0 -40
  219. package/src/generators/library/files/lib/README.md +0 -7
  220. package/src/generators/library/files/lib/babel.config.json.template +0 -17
  221. package/src/generators/library/files/lib/package.json__tmpl__ +0 -4
  222. package/src/generators/library/files/lib/src/index.ts__tmpl__ +0 -0
  223. package/src/generators/library/files/lib/test-setup.ts.template +0 -1
  224. package/src/generators/library/files/lib/tsconfig.json__tmpl__ +0 -16
  225. package/src/generators/library/files/lib/tsconfig.lib.json__tmpl__ +0 -9
  226. package/src/generators/library/lib/normalize-options.d.ts +0 -13
  227. package/src/generators/library/lib/normalize-options.js +0 -26
  228. package/src/generators/library/lib/normalize-options.js.map +0 -1
  229. package/src/generators/library/library.d.ts +0 -5
  230. package/src/generators/library/library.js +0 -101
  231. package/src/generators/library/library.js.map +0 -1
  232. package/src/generators/library/library.spec.ts +0 -397
  233. package/src/generators/library/schema.d.ts +0 -22
  234. package/src/generators/library/schema.json +0 -102
  235. package/src/generators/stories/schema.d.ts +0 -5
  236. package/src/generators/stories/schema.json +0 -42
  237. package/src/generators/stories/stories-app.spec.ts +0 -145
  238. package/src/generators/stories/stories-lib.spec.ts +0 -113
  239. package/src/generators/stories/stories.d.ts +0 -6
  240. package/src/generators/stories/stories.js +0 -63
  241. package/src/generators/stories/stories.js.map +0 -1
  242. package/src/generators/storybook-configuration/configuration.d.ts +0 -5
  243. package/src/generators/storybook-configuration/configuration.js +0 -60
  244. package/src/generators/storybook-configuration/configuration.js.map +0 -1
  245. package/src/generators/storybook-configuration/configuration.spec.ts +0 -146
  246. package/src/generators/storybook-configuration/files/app/storybook.ts.template +0 -9
  247. package/src/generators/storybook-configuration/files/app/toggle-storybook.tsx.template +0 -114
  248. package/src/generators/storybook-configuration/files/root/story-loader.js.template +0 -13
  249. package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.d.ts +0 -6
  250. package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.js +0 -26
  251. package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.js.map +0 -1
  252. package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.spec.ts +0 -161
  253. package/src/generators/storybook-configuration/lib/create-storybook-files.d.ts +0 -6
  254. package/src/generators/storybook-configuration/lib/create-storybook-files.js +0 -45
  255. package/src/generators/storybook-configuration/lib/create-storybook-files.js.map +0 -1
  256. package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.d.ts +0 -7
  257. package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.js +0 -30
  258. package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.js.map +0 -1
  259. package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.spec.ts +0 -65
  260. package/src/generators/storybook-configuration/schema.d.ts +0 -11
  261. package/src/generators/storybook-configuration/schema.json +0 -66
  262. package/src/generators/upgrade-native/lib/create-native-files.d.ts +0 -3
  263. package/src/generators/upgrade-native/lib/create-native-files.js +0 -15
  264. package/src/generators/upgrade-native/lib/create-native-files.js.map +0 -1
  265. package/src/generators/upgrade-native/lib/normalize-options.d.ts +0 -12
  266. package/src/generators/upgrade-native/lib/normalize-options.js +0 -28
  267. package/src/generators/upgrade-native/lib/normalize-options.js.map +0 -1
  268. package/src/generators/upgrade-native/schema.d.ts +0 -9
  269. package/src/generators/upgrade-native/schema.json +0 -41
  270. package/src/generators/upgrade-native/upgrade-native.d.ts +0 -9
  271. package/src/generators/upgrade-native/upgrade-native.js +0 -33
  272. package/src/generators/upgrade-native/upgrade-native.js.map +0 -1
  273. package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.d.ts +0 -8
  274. package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.js +0 -63
  275. package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.js.map +0 -1
  276. package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.spec.ts +0 -79
  277. package/src/migrations/update-12-5-0/update-jest-for-react-native.d.ts +0 -2
  278. package/src/migrations/update-12-5-0/update-jest-for-react-native.js +0 -62
  279. package/src/migrations/update-12-5-0/update-jest-for-react-native.js.map +0 -1
  280. package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.d.ts +0 -2
  281. package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.js +0 -22
  282. package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.js.map +0 -1
  283. package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.spec.ts +0 -48
  284. package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.d.ts +0 -6
  285. package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.js +0 -41
  286. package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.js.map +0 -1
  287. package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.spec.ts +0 -61
  288. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.d.ts +0 -6
  289. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js +0 -33
  290. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js.map +0 -1
  291. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.spec.ts +0 -192
  292. package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.d.ts +0 -5
  293. package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.js +0 -39
  294. package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.js.map +0 -1
  295. package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.spec.ts +0 -84
  296. package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.d.ts +0 -5
  297. package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.js +0 -42
  298. package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.js.map +0 -1
  299. package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.spec.ts +0 -48
  300. package/src/migrations/update-14-2-1/rename-blockList-metro-config.d.ts +0 -6
  301. package/src/migrations/update-14-2-1/rename-blockList-metro-config.js +0 -33
  302. package/src/migrations/update-14-2-1/rename-blockList-metro-config.js.map +0 -1
  303. package/src/migrations/update-14-2-1/rename-blockList-metro-config.spec.ts +0 -190
  304. package/src/migrations/update-14-5-5/add-exclude-sync-deps.d.ts +0 -5
  305. package/src/migrations/update-14-5-5/add-exclude-sync-deps.js +0 -26
  306. package/src/migrations/update-14-5-5/add-exclude-sync-deps.js.map +0 -1
  307. package/src/migrations/update-14-5-5/add-exclude-sync-deps.spec.ts +0 -39
  308. package/src/migrations/update-14-5-8/change-searchDir-storybook.d.ts +0 -5
  309. package/src/migrations/update-14-5-8/change-searchDir-storybook.js +0 -26
  310. package/src/migrations/update-14-5-8/change-searchDir-storybook.js.map +0 -1
  311. package/src/migrations/update-14-5-8/change-searchDir-storybook.spec.ts +0 -39
  312. package/src/migrations/update-14-6-0/remove-jest-transform.d.ts +0 -5
  313. package/src/migrations/update-14-6-0/remove-jest-transform.js +0 -58
  314. package/src/migrations/update-14-6-0/remove-jest-transform.js.map +0 -1
  315. package/src/migrations/update-14-6-0/remove-jest-transform.spec.ts +0 -109
  316. package/src/migrations/update-15-0-0/add-babel-inputs.d.ts +0 -2
  317. package/src/migrations/update-15-0-0/add-babel-inputs.js +0 -13
  318. package/src/migrations/update-15-0-0/add-babel-inputs.js.map +0 -1
  319. package/src/migrations/update-15-0-0/add-babel-inputs.spec.ts +0 -73
  320. package/src/migrations/update-15-9-1/add-build-ios-target.d.ts +0 -5
  321. package/src/migrations/update-15-9-1/add-build-ios-target.js +0 -34
  322. package/src/migrations/update-15-9-1/add-build-ios-target.js.map +0 -1
  323. package/src/migrations/update-15-9-1/add-build-ios-target.spec.ts +0 -36
  324. package/src/utils/add-jest.d.ts +0 -2
  325. package/src/utils/add-jest.js +0 -38
  326. package/src/utils/add-jest.js.map +0 -1
  327. package/src/utils/add-linting.d.ts +0 -12
  328. package/src/utils/add-linting.js +0 -41
  329. package/src/utils/add-linting.js.map +0 -1
  330. package/src/utils/add-linting.spec.ts +0 -42
  331. package/src/utils/chmod-android-gradle-files.d.ts +0 -3
  332. package/src/utils/chmod-android-gradle-files.js +0 -24
  333. package/src/utils/chmod-android-gradle-files.js.map +0 -1
  334. package/src/utils/ensure-node-modules-symlink.d.ts +0 -9
  335. package/src/utils/ensure-node-modules-symlink.js +0 -29
  336. package/src/utils/ensure-node-modules-symlink.js.map +0 -1
  337. package/src/utils/ensure-node-modules-symlink.spec.ts +0 -108
  338. package/src/utils/find-all-npm-dependencies.d.ts +0 -2
  339. package/src/utils/find-all-npm-dependencies.js +0 -26
  340. package/src/utils/find-all-npm-dependencies.js.map +0 -1
  341. package/src/utils/find-all-npm-dependencies.spec.ts +0 -95
  342. package/src/utils/format-file.d.ts +0 -1
  343. package/src/utils/format-file.js +0 -17
  344. package/src/utils/format-file.js.map +0 -1
  345. package/src/utils/get-cli-options.d.ts +0 -8
  346. package/src/utils/get-cli-options.js +0 -31
  347. package/src/utils/get-cli-options.js.map +0 -1
  348. package/src/utils/pod-install-task.d.ts +0 -8
  349. package/src/utils/pod-install-task.js +0 -62
  350. package/src/utils/pod-install-task.js.map +0 -1
  351. package/src/utils/symlink-task.d.ts +0 -2
  352. package/src/utils/symlink-task.js +0 -19
  353. package/src/utils/symlink-task.js.map +0 -1
  354. package/src/utils/testing-generators.d.ts +0 -3
  355. package/src/utils/testing-generators.js +0 -36
  356. package/src/utils/testing-generators.js.map +0 -1
  357. package/src/utils/versions.d.ts +0 -20
  358. package/src/utils/versions.js +0 -24
  359. package/src/utils/versions.js.map +0 -1
@@ -1,397 +0,0 @@
1
- import {
2
- readJson,
3
- readProjectConfiguration,
4
- Tree,
5
- updateJson,
6
- } from '@nrwl/devkit';
7
- import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
8
- import libraryGenerator from './library';
9
- import { Linter } from '@nrwl/linter';
10
- import { Schema } from './schema';
11
-
12
- describe('lib', () => {
13
- let appTree: Tree;
14
-
15
- const defaultSchema: Schema = {
16
- name: 'myLib',
17
- linter: Linter.EsLint,
18
- skipFormat: false,
19
- skipTsConfig: false,
20
- unitTestRunner: 'jest',
21
- strict: true,
22
- };
23
-
24
- beforeEach(() => {
25
- appTree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
26
- appTree.write('.gitignore', '');
27
- });
28
-
29
- describe('not nested', () => {
30
- it('should update project.json', async () => {
31
- await libraryGenerator(appTree, { ...defaultSchema, tags: 'one,two' });
32
- const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
33
- expect(projectConfiguration.root).toEqual('libs/my-lib');
34
- expect(projectConfiguration.targets.build).toBeUndefined();
35
- expect(projectConfiguration.targets.lint).toEqual({
36
- executor: '@nrwl/linter:eslint',
37
- outputs: ['{options.outputFile}'],
38
- options: {
39
- lintFilePatterns: ['libs/my-lib/**/*.{ts,tsx,js,jsx}'],
40
- },
41
- });
42
- expect(projectConfiguration.tags).toEqual(['one', 'two']);
43
- });
44
-
45
- it('should update root tsconfig.base.json', async () => {
46
- await libraryGenerator(appTree, defaultSchema);
47
- const tsconfigJson = readJson(appTree, '/tsconfig.base.json');
48
- expect(tsconfigJson.compilerOptions.paths['@proj/my-lib']).toEqual([
49
- 'libs/my-lib/src/index.ts',
50
- ]);
51
- });
52
-
53
- it('should update root tsconfig.json when no tsconfig.base.json', async () => {
54
- appTree.rename('tsconfig.base.json', 'tsconfig.json');
55
-
56
- await libraryGenerator(appTree, defaultSchema);
57
-
58
- const tsconfigJson = readJson(appTree, '/tsconfig.json');
59
- expect(tsconfigJson.compilerOptions.paths['@proj/my-lib']).toEqual([
60
- 'libs/my-lib/src/index.ts',
61
- ]);
62
- });
63
-
64
- it('should update root tsconfig.base.json (no existing path mappings)', async () => {
65
- updateJson(appTree, 'tsconfig.base.json', (json) => {
66
- json.compilerOptions.paths = undefined;
67
- return json;
68
- });
69
-
70
- await libraryGenerator(appTree, defaultSchema);
71
- const tsconfigJson = readJson(appTree, '/tsconfig.base.json');
72
- expect(tsconfigJson.compilerOptions.paths['@proj/my-lib']).toEqual([
73
- 'libs/my-lib/src/index.ts',
74
- ]);
75
- });
76
-
77
- it('should create a local tsconfig.json', async () => {
78
- await libraryGenerator(appTree, defaultSchema);
79
-
80
- const tsconfigJson = readJson(appTree, 'libs/my-lib/tsconfig.json');
81
- expect(tsconfigJson.extends).toBe('../../tsconfig.base.json');
82
- expect(tsconfigJson.references).toEqual([
83
- {
84
- path: './tsconfig.lib.json',
85
- },
86
- {
87
- path: './tsconfig.spec.json',
88
- },
89
- ]);
90
- expect(
91
- tsconfigJson.compilerOptions.forceConsistentCasingInFileNames
92
- ).toEqual(true);
93
- expect(tsconfigJson.compilerOptions.strict).toEqual(true);
94
- expect(tsconfigJson.compilerOptions.noImplicitReturns).toEqual(true);
95
- expect(tsconfigJson.compilerOptions.noFallthroughCasesInSwitch).toEqual(
96
- true
97
- );
98
- });
99
-
100
- it('should extend from root tsconfig.json when no tsconfig.base.json', async () => {
101
- appTree.rename('tsconfig.base.json', 'tsconfig.json');
102
-
103
- await libraryGenerator(appTree, defaultSchema);
104
-
105
- const tsconfigJson = readJson(appTree, 'libs/my-lib/tsconfig.json');
106
- expect(tsconfigJson.extends).toBe('../../tsconfig.json');
107
- });
108
-
109
- it('should extend the local tsconfig.json with tsconfig.spec.json', async () => {
110
- await libraryGenerator(appTree, defaultSchema);
111
- const tsconfigJson = readJson(appTree, 'libs/my-lib/tsconfig.spec.json');
112
- expect(tsconfigJson.extends).toEqual('./tsconfig.json');
113
- });
114
-
115
- it('should extend the local tsconfig.json with tsconfig.lib.json', async () => {
116
- await libraryGenerator(appTree, defaultSchema);
117
- const tsconfigJson = readJson(appTree, 'libs/my-lib/tsconfig.lib.json');
118
- expect(tsconfigJson.extends).toEqual('./tsconfig.json');
119
- });
120
- });
121
-
122
- describe('nested', () => {
123
- it('should update nx.json', async () => {
124
- await libraryGenerator(appTree, {
125
- ...defaultSchema,
126
- directory: 'myDir',
127
- tags: 'one',
128
- });
129
- const projectConfiguration = readProjectConfiguration(
130
- appTree,
131
- 'my-dir-my-lib'
132
- );
133
- expect(projectConfiguration).toMatchObject({
134
- tags: ['one'],
135
- });
136
-
137
- await libraryGenerator(appTree, {
138
- ...defaultSchema,
139
- name: 'myLib2',
140
- directory: 'myDir',
141
- tags: 'one,two',
142
- });
143
-
144
- const lib2ProjectConfiguration = readProjectConfiguration(
145
- appTree,
146
- 'my-dir-my-lib2'
147
- );
148
- expect(lib2ProjectConfiguration).toMatchObject({
149
- tags: ['one', 'two'],
150
- });
151
- });
152
-
153
- it('should update project.json', async () => {
154
- await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
155
- const projectConfiguration = readProjectConfiguration(
156
- appTree,
157
- 'my-dir-my-lib'
158
- );
159
-
160
- expect(projectConfiguration.root).toEqual('libs/my-dir/my-lib');
161
- expect(projectConfiguration.targets.lint).toEqual({
162
- executor: '@nrwl/linter:eslint',
163
- outputs: ['{options.outputFile}'],
164
- options: {
165
- lintFilePatterns: ['libs/my-dir/my-lib/**/*.{ts,tsx,js,jsx}'],
166
- },
167
- });
168
- });
169
-
170
- it('should update root tsconfig.base.json', async () => {
171
- await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
172
- const tsconfigJson = readJson(appTree, '/tsconfig.base.json');
173
- expect(tsconfigJson.compilerOptions.paths['@proj/my-dir/my-lib']).toEqual(
174
- ['libs/my-dir/my-lib/src/index.ts']
175
- );
176
- expect(
177
- tsconfigJson.compilerOptions.paths['my-dir-my-lib/*']
178
- ).toBeUndefined();
179
- });
180
-
181
- it('should update root tsconfig.json when no tsconfig.base.json', async () => {
182
- appTree.rename('tsconfig.base.json', 'tsconfig.json');
183
-
184
- await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
185
-
186
- const tsconfigJson = readJson(appTree, '/tsconfig.json');
187
- expect(tsconfigJson.compilerOptions.paths['@proj/my-dir/my-lib']).toEqual(
188
- ['libs/my-dir/my-lib/src/index.ts']
189
- );
190
- expect(
191
- tsconfigJson.compilerOptions.paths['my-dir-my-lib/*']
192
- ).toBeUndefined();
193
- });
194
-
195
- it('should create a local tsconfig.json', async () => {
196
- await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
197
-
198
- const tsconfigJson = readJson(
199
- appTree,
200
- 'libs/my-dir/my-lib/tsconfig.json'
201
- );
202
- expect(tsconfigJson.extends).toBe('../../../tsconfig.base.json');
203
- expect(tsconfigJson.references).toEqual([
204
- {
205
- path: './tsconfig.lib.json',
206
- },
207
- {
208
- path: './tsconfig.spec.json',
209
- },
210
- ]);
211
- });
212
-
213
- it('should extend from root tsconfig.json when no tsconfig.base.json', async () => {
214
- appTree.rename('tsconfig.base.json', 'tsconfig.json');
215
-
216
- await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
217
-
218
- const tsconfigJson = readJson(
219
- appTree,
220
- 'libs/my-dir/my-lib/tsconfig.json'
221
- );
222
- expect(tsconfigJson.extends).toBe('../../../tsconfig.json');
223
- });
224
- });
225
-
226
- describe('--unit-test-runner none', () => {
227
- it('should not generate test configuration', async () => {
228
- await libraryGenerator(appTree, {
229
- ...defaultSchema,
230
- unitTestRunner: 'none',
231
- });
232
-
233
- expect(appTree.exists('libs/my-lib/tsconfig.spec.json')).toBeFalsy();
234
- expect(appTree.exists('libs/my-lib/jest.config.ts')).toBeFalsy();
235
- const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
236
- expect(projectConfiguration.targets.test).toBeUndefined();
237
- expect(projectConfiguration.targets.lint).toMatchObject({
238
- executor: '@nrwl/linter:eslint',
239
- options: {
240
- lintFilePatterns: ['libs/my-lib/**/*.{ts,tsx,js,jsx}'],
241
- },
242
- outputs: ['{options.outputFile}'],
243
- });
244
- });
245
- });
246
-
247
- describe('--buildable', () => {
248
- it('should have a builder defined', async () => {
249
- await libraryGenerator(appTree, {
250
- ...defaultSchema,
251
- buildable: true,
252
- });
253
-
254
- const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
255
-
256
- expect(projectConfiguration.targets.build).toBeDefined();
257
- });
258
- });
259
-
260
- describe('--publishable', () => {
261
- it('should add build architect', async () => {
262
- await libraryGenerator(appTree, {
263
- ...defaultSchema,
264
- publishable: true,
265
- importPath: '@proj/my-lib',
266
- });
267
-
268
- const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
269
-
270
- expect(projectConfiguration.targets.build).toMatchObject({
271
- executor: '@nrwl/web:rollup',
272
- outputs: ['{options.outputPath}'],
273
- options: {
274
- external: ['react/jsx-runtime', 'react-native'],
275
- entryFile: 'libs/my-lib/src/index.ts',
276
- outputPath: 'dist/libs/my-lib',
277
- project: 'libs/my-lib/package.json',
278
- tsConfig: 'libs/my-lib/tsconfig.lib.json',
279
- rollupConfig: '@nrwl/react/plugins/bundle-rollup',
280
- },
281
- });
282
- });
283
-
284
- it('should fail if no importPath is provided with publishable', async () => {
285
- expect.assertions(1);
286
-
287
- try {
288
- await libraryGenerator(appTree, {
289
- ...defaultSchema,
290
- directory: 'myDir',
291
- publishable: true,
292
- });
293
- } catch (e) {
294
- expect(e.message).toContain(
295
- 'For publishable libs you have to provide a proper "--importPath" which needs to be a valid npm package name (e.g. my-awesome-lib or @myorg/my-lib)'
296
- );
297
- }
298
- });
299
-
300
- it('should add package.json and .babelrc', async () => {
301
- await libraryGenerator(appTree, {
302
- ...defaultSchema,
303
- publishable: true,
304
- importPath: '@proj/my-lib',
305
- });
306
-
307
- const packageJson = readJson(appTree, '/libs/my-lib/package.json');
308
- expect(packageJson.name).toEqual('@proj/my-lib');
309
- expect(appTree.exists('/libs/my-lib/.babelrc'));
310
- });
311
- });
312
-
313
- describe('--js', () => {
314
- it('should generate JS files', async () => {
315
- await libraryGenerator(appTree, {
316
- ...defaultSchema,
317
- js: true,
318
- });
319
-
320
- expect(appTree.exists('/libs/my-lib/src/index.js')).toBe(true);
321
- });
322
- });
323
-
324
- describe('--importPath', () => {
325
- it('should update the package.json & tsconfig with the given import path', async () => {
326
- await libraryGenerator(appTree, {
327
- ...defaultSchema,
328
- publishable: true,
329
- directory: 'myDir',
330
- importPath: '@myorg/lib',
331
- });
332
- const packageJson = readJson(appTree, 'libs/my-dir/my-lib/package.json');
333
- const tsconfigJson = readJson(appTree, '/tsconfig.base.json');
334
-
335
- expect(packageJson.name).toBe('@myorg/lib');
336
- expect(
337
- tsconfigJson.compilerOptions.paths[packageJson.name]
338
- ).toBeDefined();
339
- });
340
-
341
- it('should fail if the same importPath has already been used', async () => {
342
- await libraryGenerator(appTree, {
343
- ...defaultSchema,
344
- name: 'myLib1',
345
- publishable: true,
346
- importPath: '@myorg/lib',
347
- });
348
-
349
- try {
350
- await libraryGenerator(appTree, {
351
- ...defaultSchema,
352
- name: 'myLib2',
353
- publishable: true,
354
- importPath: '@myorg/lib',
355
- });
356
- } catch (e) {
357
- expect(e.message).toContain(
358
- 'You already have a library using the import path'
359
- );
360
- }
361
-
362
- expect.assertions(1);
363
- });
364
- });
365
-
366
- describe('--no-strict', () => {
367
- it('should not add options for strict mode', async () => {
368
- await libraryGenerator(appTree, {
369
- ...defaultSchema,
370
- strict: false,
371
- });
372
- const tsconfigJson = readJson(appTree, '/libs/my-lib/tsconfig.json');
373
-
374
- expect(
375
- tsconfigJson.compilerOptions.forceConsistentCasingInFileNames
376
- ).not.toBeDefined();
377
- expect(tsconfigJson.compilerOptions.strict).not.toBeDefined();
378
- expect(tsconfigJson.compilerOptions.noImplicitReturns).not.toBeDefined();
379
- expect(
380
- tsconfigJson.compilerOptions.noFallthroughCasesInSwitch
381
- ).not.toBeDefined();
382
- });
383
- });
384
-
385
- describe('--skipPackageJson', () => {
386
- it('should not add or update dependencies when true', async () => {
387
- const packageJsonBefore = readJson(appTree, 'package.json');
388
-
389
- await libraryGenerator(appTree, {
390
- ...defaultSchema,
391
- skipPackageJson: true,
392
- });
393
-
394
- expect(readJson(appTree, 'package.json')).toEqual(packageJsonBefore);
395
- });
396
- });
397
- });
@@ -1,22 +0,0 @@
1
- import { Linter } from '@nrwl/linter';
2
-
3
- /**
4
- * Same as the @nrwl/react library schema, except it removes keys: style, component, routing, appProject
5
- */
6
- export interface Schema {
7
- name: string;
8
- directory?: string;
9
- skipTsConfig: boolean;
10
- skipFormat: boolean;
11
- tags?: string;
12
- pascalCaseFiles?: boolean;
13
- unitTestRunner: 'jest' | 'none';
14
- linter: Linter;
15
- publishable?: boolean;
16
- buildable?: boolean;
17
- importPath?: string;
18
- js?: boolean;
19
- strict?: boolean;
20
- setParserOptionsProject?: boolean;
21
- skipPackageJson?: boolean; //default is false
22
- }
@@ -1,102 +0,0 @@
1
- {
2
- "cli": "nx",
3
- "$id": "NxReactNativeLibrary",
4
- "$schema": "http://json-schema.org/schema",
5
- "title": "Create a React Native Library for Nx",
6
- "description": "Create a React Native Library for Nx.",
7
- "type": "object",
8
- "examples": [
9
- {
10
- "command": "nx g @nrwl/react-native:lib mylib --directory=myapp",
11
- "description": "Generate `libs/myapp/mylib`"
12
- }
13
- ],
14
- "properties": {
15
- "name": {
16
- "type": "string",
17
- "description": "Library name.",
18
- "$default": {
19
- "$source": "argv",
20
- "index": 0
21
- },
22
- "x-prompt": "What name would you like to use for the library?",
23
- "pattern": "^[a-zA-Z].*$"
24
- },
25
- "directory": {
26
- "type": "string",
27
- "description": "A directory where the lib is placed.",
28
- "alias": "dir",
29
- "x-priority": "important"
30
- },
31
- "linter": {
32
- "description": "The tool to use for running lint checks.",
33
- "type": "string",
34
- "enum": ["eslint"],
35
- "default": "eslint"
36
- },
37
- "unitTestRunner": {
38
- "type": "string",
39
- "enum": ["jest", "none"],
40
- "description": "Test runner to use for unit tests.",
41
- "default": "jest"
42
- },
43
- "tags": {
44
- "type": "string",
45
- "description": "Add tags to the library (used for linting).",
46
- "alias": "t"
47
- },
48
- "skipFormat": {
49
- "description": "Skip formatting files.",
50
- "type": "boolean",
51
- "default": false,
52
- "x-priority": "internal"
53
- },
54
- "skipTsConfig": {
55
- "type": "boolean",
56
- "default": false,
57
- "description": "Do not update `tsconfig.json` for development experience.",
58
- "x-priority": "internal"
59
- },
60
- "pascalCaseFiles": {
61
- "type": "boolean",
62
- "description": "Use pascal case component file name (e.g. `App.tsx`).",
63
- "alias": "P",
64
- "default": false
65
- },
66
- "publishable": {
67
- "type": "boolean",
68
- "description": "Create a publishable library."
69
- },
70
- "buildable": {
71
- "type": "boolean",
72
- "default": false,
73
- "description": "Generate a buildable library."
74
- },
75
- "importPath": {
76
- "type": "string",
77
- "description": "The library name used to import it, like `@myorg/my-awesome-lib`."
78
- },
79
- "js": {
80
- "type": "boolean",
81
- "description": "Generate JavaScript files rather than TypeScript files.",
82
- "default": false
83
- },
84
- "strict": {
85
- "type": "boolean",
86
- "description": "Whether to enable tsconfig strict mode or not.",
87
- "default": true
88
- },
89
- "setParserOptionsProject": {
90
- "type": "boolean",
91
- "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
92
- "default": false
93
- },
94
- "skipPackageJson": {
95
- "description": "Do not add dependencies to `package.json`.",
96
- "type": "boolean",
97
- "default": false,
98
- "x-priority": "internal"
99
- }
100
- },
101
- "required": ["name"]
102
- }
@@ -1,5 +0,0 @@
1
- export interface StorybookStoriesSchema {
2
- project: string;
3
- ignorePaths?: string[];
4
- skipFormat?: boolean;
5
- }
@@ -1,42 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "NxReactNativeStorybookStories",
5
- "title": "Generate React Native Storybook stories",
6
- "description": "Generate stories/specs for all components declared in a React Native project.",
7
- "type": "object",
8
- "properties": {
9
- "project": {
10
- "type": "string",
11
- "aliases": ["name", "projectName"],
12
- "description": "Project for which to generate stories.",
13
- "$default": {
14
- "$source": "projectName",
15
- "index": 0
16
- },
17
- "x-prompt": "For which project do you want to generate stories?"
18
- },
19
- "ignorePaths": {
20
- "type": "array",
21
- "description": "Paths to ignore when looking for components.",
22
- "items": {
23
- "type": "string",
24
- "description": "Path to ignore."
25
- },
26
- "examples": [
27
- "apps/my-app/src/not-stories/**",
28
- "**/**/src/**/not-stories/**",
29
- "libs/my-lib/**/*.something.ts",
30
- "**/**/src/**/*.other.*",
31
- "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts"
32
- ]
33
- },
34
- "skipFormat": {
35
- "description": "Skip formatting files.",
36
- "type": "boolean",
37
- "default": false,
38
- "x-priority": "internal"
39
- }
40
- },
41
- "required": ["project"]
42
- }