@nx/react-native 16.6.0-beta.3 → 16.6.0-beta.4

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 (65) hide show
  1. package/migrations.json +78 -0
  2. package/package.json +13 -12
  3. package/plugins/with-nx-metro.d.ts +5 -1
  4. package/plugins/with-nx-metro.js +27 -22
  5. package/src/executors/build-android/build-android.impl.js +18 -32
  6. package/src/executors/build-android/build-android.impl.ts +21 -50
  7. package/src/executors/build-android/schema.d.ts +5 -3
  8. package/src/executors/build-android/schema.json +14 -8
  9. package/src/executors/build-ios/build-ios.impl.d.ts +1 -1
  10. package/src/executors/build-ios/build-ios.impl.js +23 -42
  11. package/src/executors/build-ios/build-ios.impl.ts +26 -64
  12. package/src/executors/build-ios/schema.d.ts +3 -0
  13. package/src/executors/build-ios/schema.json +8 -6
  14. package/src/executors/bundle/bundle.impl.js +19 -17
  15. package/src/executors/bundle/bundle.impl.ts +24 -23
  16. package/src/executors/pod-install/pod-install.impl.js +1 -1
  17. package/src/executors/pod-install/pod-install.impl.ts +1 -1
  18. package/src/executors/pod-install/schema.d.ts +3 -1
  19. package/src/executors/pod-install/schema.json +11 -1
  20. package/src/executors/run-android/run-android.impl.js +47 -26
  21. package/src/executors/run-android/run-android.impl.ts +40 -45
  22. package/src/executors/run-android/schema.d.ts +2 -2
  23. package/src/executors/run-android/schema.json +9 -5
  24. package/src/executors/run-ios/run-ios.impl.js +47 -31
  25. package/src/executors/run-ios/run-ios.impl.ts +42 -56
  26. package/src/executors/run-ios/schema.d.ts +1 -1
  27. package/src/executors/run-ios/schema.json +7 -6
  28. package/src/executors/start/start.impl.d.ts +4 -2
  29. package/src/executors/start/start.impl.js +35 -24
  30. package/src/executors/start/start.impl.ts +42 -35
  31. package/src/executors/storybook/schema.d.ts +1 -1
  32. package/src/generators/application/application.js +1 -3
  33. package/src/generators/application/files/app/Gemfile.template +2 -2
  34. package/src/generators/application/files/app/android/app/build.gradle.template +2 -49
  35. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.java.template +1 -4
  36. package/src/generators/application/files/app/android/app/src/main/res/drawable/rn_edit_text_material.xml +1 -1
  37. package/src/generators/application/files/app/android/build.gradle.template +1 -1
  38. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  39. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +2 -1
  40. package/src/generators/application/files/app/android/gradle.properties +1 -1
  41. package/src/generators/application/files/app/android/gradlew.bat +9 -6
  42. package/src/generators/application/files/app/android/gradlew.template +14 -4
  43. package/src/generators/application/files/app/android/settings.gradle.template +1 -2
  44. package/src/generators/application/files/app/ios/Podfile.template +8 -6
  45. package/src/generators/application/files/app/ios/__className__/AppDelegate.mm.template +0 -10
  46. package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +6 -2
  47. package/src/generators/application/files/app/metro.config.js.template +32 -35
  48. package/src/generators/application/files/app/package.json.template +1 -0
  49. package/src/generators/application/lib/add-project.js +7 -0
  50. package/src/generators/init/init.js +1 -2
  51. package/src/generators/library/library.js +1 -1
  52. package/src/migrations/update-16-6-0/add-depends-on.d.ts +6 -0
  53. package/src/migrations/update-16-6-0/add-depends-on.js +43 -0
  54. package/src/migrations/update-16-6-0/update-metro-config.d.ts +6 -0
  55. package/src/migrations/update-16-6-0/update-metro-config.js +71 -0
  56. package/src/utils/get-cli-options.js +4 -1
  57. package/src/utils/pod-install-task.d.ts +10 -2
  58. package/src/utils/pod-install-task.js +12 -4
  59. package/src/utils/versions.d.ts +10 -9
  60. package/src/utils/versions.js +11 -10
  61. package/src/generators/application/files/app/.ruby-version +0 -1
  62. /package/src/generators/library/files/lib/{package.json__tmpl__ → package.json.template} +0 -0
  63. /package/src/generators/library/files/lib/src/{index.ts__tmpl__ → index.ts.template} +0 -0
  64. /package/src/generators/library/files/lib/{tsconfig.json__tmpl__ → tsconfig.json.template} +0 -0
  65. /package/src/generators/library/files/lib/{tsconfig.lib.json__tmpl__ → tsconfig.lib.json.template} +0 -0
@@ -16,7 +16,10 @@ function getCliOptions(options, optionKeysToIgnore = [], optionKeysInCamelName =
16
16
  const cliKey = optionKeysInCamelName.includes(optionKey)
17
17
  ? (0, devkit_1.names)(optionKey).propertyName
18
18
  : (0, devkit_1.names)(optionKey).fileName; // cli uses kebab case as default
19
- if (typeof optionValue === 'boolean' && optionValue) {
19
+ if (Array.isArray(optionValue)) {
20
+ acc.push(`--${cliKey}`, optionValue.join(','));
21
+ }
22
+ else if (typeof optionValue === 'boolean' && optionValue) {
20
23
  // no need to pass in the value when it is true, just the flag name
21
24
  acc.push(`--${cliKey}`);
22
25
  }
@@ -4,5 +4,13 @@ import { GeneratorCallback } from '@nx/devkit';
4
4
  * @param iosDirectory ios directory that contains Podfile
5
5
  * @returns resolve with 0 if not error, reject with error otherwise
6
6
  */
7
- export declare function runPodInstall(iosDirectory: string, install?: boolean, buildFolder?: string): GeneratorCallback;
8
- export declare function podInstall(iosDirectory: string, buildFolder?: string): void;
7
+ export declare function runPodInstall(iosDirectory: string, install?: boolean, options?: {
8
+ buildFolder?: string;
9
+ repoUpdate?: boolean;
10
+ deployment?: boolean;
11
+ }): GeneratorCallback;
12
+ export declare function podInstall(iosDirectory: string, options?: {
13
+ buildFolder?: string;
14
+ repoUpdate?: boolean;
15
+ deployment?: boolean;
16
+ }): void;
@@ -22,7 +22,11 @@ ${chalk.bold('sudo xcode-select --switch /Applications/Xcode.app')}
22
22
  * @param iosDirectory ios directory that contains Podfile
23
23
  * @returns resolve with 0 if not error, reject with error otherwise
24
24
  */
25
- function runPodInstall(iosDirectory, install = true, buildFolder) {
25
+ function runPodInstall(iosDirectory, install = true, options = {
26
+ buildFolder: './build',
27
+ repoUpdate: false,
28
+ deployment: false,
29
+ }) {
26
30
  return () => {
27
31
  if ((0, os_1.platform)() !== 'darwin') {
28
32
  devkit_1.logger.info('Skipping `pod install` on non-darwin platform');
@@ -33,13 +37,17 @@ function runPodInstall(iosDirectory, install = true, buildFolder) {
33
37
  return;
34
38
  }
35
39
  devkit_1.logger.info(`Running \`pod install\` from "${iosDirectory}"`);
36
- return podInstall(iosDirectory, buildFolder);
40
+ return podInstall(iosDirectory, options);
37
41
  };
38
42
  }
39
43
  exports.runPodInstall = runPodInstall;
40
- function podInstall(iosDirectory, buildFolder) {
44
+ function podInstall(iosDirectory, options = {
45
+ buildFolder: './build',
46
+ repoUpdate: false,
47
+ deployment: false,
48
+ }) {
41
49
  try {
42
- (0, child_process_1.execSync)('pod install', {
50
+ (0, child_process_1.execSync)(`pod install ${options.repoUpdate ? '--repo-update' : ''} ${options.deployment ? '--deployment' : ''}`, {
43
51
  cwd: iosDirectory,
44
52
  stdio: 'inherit',
45
53
  });
@@ -1,11 +1,12 @@
1
1
  export declare const nxVersion: any;
2
- export declare const reactNativeVersion = "0.71.10";
3
- export declare const typesReactNativeVersion = "0.71.7";
2
+ export declare const reactNativeVersion = "0.72.3";
3
+ export declare const typesReactNativeVersion = "0.72.2";
4
4
  export declare const typesNodeVersion = "18.14.4";
5
- export declare const metroVersion = "0.74.1";
6
- export declare const reactNativeCommunityCli = "10.2.2";
7
- export declare const reactNativeCommunityCliIos = "10.2.1";
8
- export declare const reactNativeCommunityCliAndroid = "10.2.0";
5
+ export declare const metroVersion = "0.76.7";
6
+ export declare const reactNativeMetroConfigVersion = "^0.72.9";
7
+ export declare const reactNativeCommunityCli = "11.3.5";
8
+ export declare const reactNativeCommunityCliIos = "11.3.5";
9
+ export declare const reactNativeCommunityCliAndroid = "11.3.5";
9
10
  export declare const reactVersion = "18.2.0";
10
11
  export declare const reactDomVersion = "18.2.0";
11
12
  export declare const reactTestRendererVersion = "18.2.0";
@@ -15,6 +16,6 @@ export declare const testingLibraryJestNativeVersion = "5.4.2";
15
16
  export declare const jestReactNativeVersion = "18.0.0";
16
17
  export declare const reactNativeSvgTransformerVersion = "1.0.0";
17
18
  export declare const reactNativeSvgVersion = "13.9.0";
18
- export declare const babelRuntimeVersion = "7.21.0";
19
- export declare const reactNativeAsyncStorageVersion = "1.18.2";
20
- export declare const reactNativeSafeAreaContextVersion = "4.5.3";
19
+ export declare const babelRuntimeVersion = "7.22.6";
20
+ export declare const reactNativeAsyncStorageVersion = "1.19.0";
21
+ export declare const reactNativeSafeAreaContextVersion = "4.7.1";
@@ -1,14 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reactNativeSafeAreaContextVersion = exports.reactNativeAsyncStorageVersion = exports.babelRuntimeVersion = exports.reactNativeSvgVersion = exports.reactNativeSvgTransformerVersion = exports.jestReactNativeVersion = exports.testingLibraryJestNativeVersion = exports.testingLibraryReactNativeVersion = exports.typesReactVersion = exports.reactTestRendererVersion = exports.reactDomVersion = exports.reactVersion = exports.reactNativeCommunityCliAndroid = exports.reactNativeCommunityCliIos = exports.reactNativeCommunityCli = exports.metroVersion = exports.typesNodeVersion = exports.typesReactNativeVersion = exports.reactNativeVersion = exports.nxVersion = void 0;
3
+ exports.reactNativeSafeAreaContextVersion = exports.reactNativeAsyncStorageVersion = exports.babelRuntimeVersion = exports.reactNativeSvgVersion = exports.reactNativeSvgTransformerVersion = exports.jestReactNativeVersion = exports.testingLibraryJestNativeVersion = exports.testingLibraryReactNativeVersion = exports.typesReactVersion = exports.reactTestRendererVersion = exports.reactDomVersion = exports.reactVersion = exports.reactNativeCommunityCliAndroid = exports.reactNativeCommunityCliIos = exports.reactNativeCommunityCli = exports.reactNativeMetroConfigVersion = exports.metroVersion = exports.typesNodeVersion = exports.typesReactNativeVersion = exports.reactNativeVersion = exports.nxVersion = void 0;
4
4
  exports.nxVersion = require('../../package.json').version;
5
- exports.reactNativeVersion = '0.71.10';
6
- exports.typesReactNativeVersion = '0.71.7';
5
+ exports.reactNativeVersion = '0.72.3';
6
+ exports.typesReactNativeVersion = '0.72.2';
7
7
  exports.typesNodeVersion = '18.14.4';
8
- exports.metroVersion = '0.74.1';
9
- exports.reactNativeCommunityCli = '10.2.2';
10
- exports.reactNativeCommunityCliIos = '10.2.1';
11
- exports.reactNativeCommunityCliAndroid = '10.2.0';
8
+ exports.metroVersion = '0.76.7';
9
+ exports.reactNativeMetroConfigVersion = '^0.72.9';
10
+ exports.reactNativeCommunityCli = '11.3.5';
11
+ exports.reactNativeCommunityCliIos = '11.3.5';
12
+ exports.reactNativeCommunityCliAndroid = '11.3.5';
12
13
  exports.reactVersion = '18.2.0';
13
14
  exports.reactDomVersion = '18.2.0';
14
15
  exports.reactTestRendererVersion = '18.2.0';
@@ -18,6 +19,6 @@ exports.testingLibraryJestNativeVersion = '5.4.2';
18
19
  exports.jestReactNativeVersion = '18.0.0';
19
20
  exports.reactNativeSvgTransformerVersion = '1.0.0';
20
21
  exports.reactNativeSvgVersion = '13.9.0';
21
- exports.babelRuntimeVersion = '7.21.0';
22
- exports.reactNativeAsyncStorageVersion = '1.18.2';
23
- exports.reactNativeSafeAreaContextVersion = '4.5.3';
22
+ exports.babelRuntimeVersion = '7.22.6';
23
+ exports.reactNativeAsyncStorageVersion = '1.19.0';
24
+ exports.reactNativeSafeAreaContextVersion = '4.7.1';