@nrwl/react-native 14.7.6-beta.0 → 14.7.6-beta.7

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 (44) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/migrations.json +62 -0
  3. package/package.json +16 -12
  4. package/src/generators/application/application.spec.ts +6 -7
  5. package/src/generators/application/files/app/android/app/build.gradle.template +16 -23
  6. package/src/generators/application/files/app/android/app/src/main/jni/CMakeLists.txt.template +6 -0
  7. package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationModuleProvider.cpp +9 -1
  8. package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationModuleProvider.h +1 -1
  9. package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +4 -4
  10. package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h.template +4 -4
  11. package/src/generators/application/files/app/android/app/src/main/jni/MainComponentsRegistry.cpp +4 -0
  12. package/src/generators/application/files/app/android/build.gradle.template +2 -4
  13. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  14. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  15. package/src/generators/application/files/app/ios/Podfile.template +15 -6
  16. package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +0 -2
  17. package/src/generators/application/files/app/src/app/App.tsx.template +1 -1
  18. package/src/generators/application/lib/nomalize-options.spec.ts +2 -2
  19. package/src/generators/component/component.spec.ts +2 -2
  20. package/src/generators/component-story/component-story.spec.ts +2 -2
  21. package/src/generators/init/init.js +1 -1
  22. package/src/generators/init/init.js.map +1 -1
  23. package/src/generators/init/init.spec.ts +2 -2
  24. package/src/generators/library/library.spec.ts +48 -50
  25. package/src/generators/stories/stories-app.spec.ts +2 -2
  26. package/src/generators/stories/stories-lib.spec.ts +2 -2
  27. package/src/generators/storybook-configuration/configuration.spec.ts +3 -3
  28. package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.spec.ts +2 -2
  29. package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.spec.ts +2 -2
  30. package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.spec.ts +2 -2
  31. package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.spec.ts +2 -2
  32. package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.spec.ts +2 -2
  33. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.spec.ts +2 -2
  34. package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.spec.ts +2 -2
  35. package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.spec.ts +2 -2
  36. package/src/migrations/update-14-2-1/rename-blockList-metro-config.spec.ts +2 -2
  37. package/src/migrations/update-14-5-5/add-exclude-sync-deps.spec.ts +2 -2
  38. package/src/migrations/update-14-5-8/change-searchDir-storybook.spec.ts +2 -2
  39. package/src/utils/add-linting.spec.ts +2 -2
  40. package/src/utils/versions.d.ts +9 -9
  41. package/src/utils/versions.js +9 -9
  42. package/src/utils/versions.js.map +1 -1
  43. package/src/generators/application/files/app/android/app/src/main/jni/Android.mk.template +0 -48
  44. package/src/generators/application/files/app/ios/__className__.xcworkspace/contents.xcworkspacedata.template +0 -10
package/CHANGELOG.md CHANGED
@@ -3,6 +3,6 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [14.7.6-beta.0](https://github.com/nrwl/nx/compare/14.7.5...14.7.6-beta.0) (2022-09-13)
6
+ ## [14.7.6-beta.7](https://github.com/nrwl/nx/compare/14.7.5...14.7.6-beta.7) (2022-09-19)
7
7
 
8
8
  **Note:** Version bump only for package @nrwl/react-native
package/migrations.json CHANGED
@@ -906,6 +906,68 @@
906
906
  "alwaysAddToPackageJson": false
907
907
  }
908
908
  }
909
+ },
910
+ "14.7.4-beta.0": {
911
+ "version": "14.7.4-beta.0",
912
+ "packages": {
913
+ "react-native": {
914
+ "version": "0.70.0",
915
+ "alwaysAddToPackageJson": false
916
+ },
917
+ "@types/react-native": {
918
+ "version": "0.70.0",
919
+ "alwaysAddToPackageJson": false
920
+ },
921
+ "metro": {
922
+ "version": "0.72.2",
923
+ "alwaysAddToPackageJson": false
924
+ },
925
+ "metro-resolver": {
926
+ "version": "0.72.2",
927
+ "alwaysAddToPackageJson": false
928
+ },
929
+ "metro-babel-register": {
930
+ "version": "0.72.2",
931
+ "alwaysAddToPackageJson": false
932
+ },
933
+ "metro-config": {
934
+ "version": "0.72.2",
935
+ "alwaysAddToPackageJson": false
936
+ },
937
+ "metro-react-native-babel-preset": {
938
+ "version": "0.72.2",
939
+ "alwaysAddToPackageJson": false
940
+ },
941
+ "metro-react-native-babel-transformer": {
942
+ "version": "0.72.2",
943
+ "alwaysAddToPackageJson": false,
944
+ "addToPackageJson": "devDependencies"
945
+ },
946
+ "react-native-svg": {
947
+ "version": "13.1.0",
948
+ "alwaysAddToPackageJson": false
949
+ },
950
+ "@babel/runtime": {
951
+ "version": "7.19.0",
952
+ "alwaysAddToPackageJson": false
953
+ },
954
+ "@react-native-community/cli": {
955
+ "version": "9.1.1",
956
+ "alwaysAddToPackageJson": false
957
+ },
958
+ "@react-native-community/cli-platform-android": {
959
+ "version": "9.1.0",
960
+ "alwaysAddToPackageJson": false
961
+ },
962
+ "@react-native-community/cli-platform-ios": {
963
+ "version": "9.1.0",
964
+ "alwaysAddToPackageJson": false
965
+ },
966
+ "@react-native-async-storage/async-storage": {
967
+ "version": "1.17.10",
968
+ "alwaysAddToPackageJson": false
969
+ }
970
+ }
909
971
  }
910
972
  }
911
973
  }
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@nrwl/react-native",
3
- "version": "14.7.6-beta.0",
4
- "description": "React Native brings React's declarative UI framework to iOS and Android. With React Native, you use native UI controls and have full access to the native platform.\n\nThe Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Detox, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.",
3
+ "version": "14.7.6-beta.7",
4
+ "private": false,
5
+ "description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.",
5
6
  "keywords": [
6
7
  "Monorepo",
7
8
  "React",
@@ -24,24 +25,24 @@
24
25
  "main": "index.js",
25
26
  "types": "index.d.ts",
26
27
  "dependencies": {
27
- "@nrwl/detox": "14.7.6-beta.0",
28
- "@nrwl/devkit": "14.7.6-beta.0",
29
- "@nrwl/jest": "14.7.6-beta.0",
30
- "@nrwl/linter": "14.7.6-beta.0",
31
- "@nrwl/react": "14.7.6-beta.0",
32
- "@nrwl/storybook": "14.7.6-beta.0",
33
- "@nrwl/workspace": "14.7.6-beta.0",
28
+ "@nrwl/detox": "14.7.6-beta.7",
29
+ "@nrwl/devkit": "14.7.6-beta.7",
30
+ "@nrwl/jest": "14.7.6-beta.7",
31
+ "@nrwl/linter": "14.7.6-beta.7",
32
+ "@nrwl/react": "14.7.6-beta.7",
33
+ "@nrwl/storybook": "14.7.6-beta.7",
34
+ "@nrwl/workspace": "14.7.6-beta.7",
34
35
  "chalk": "^4.1.0",
35
36
  "enhanced-resolve": "^5.8.3",
36
37
  "fs-extra": "^10.1.0",
37
38
  "ignore": "^5.0.4",
38
- "metro-resolver": "^0.72.1",
39
+ "metro-resolver": "^0.72.2",
39
40
  "minimatch": "3.0.5",
40
41
  "node-fetch": "^2.6.7",
41
42
  "tsconfig-paths": "^3.9.0"
42
43
  },
43
44
  "peerDependencies": {
44
- "react-native": "^0.69.4"
45
+ "react-native": "^0.70.0"
45
46
  },
46
47
  "builders": "./executors.json",
47
48
  "ng-update": {
@@ -49,6 +50,9 @@
49
50
  "migrations": "./migrations.json"
50
51
  },
51
52
  "schematics": "./generators.json",
53
+ "publishConfig": {
54
+ "access": "public"
55
+ },
52
56
  "typings": "./index.d.ts",
53
- "gitHead": "b6426fdb13c2dc5af4f1226de7413b295315c67c"
57
+ "gitHead": "807430d16f21bdb79dff640fe7f106b2d967cfcf"
54
58
  }
@@ -3,8 +3,9 @@ import {
3
3
  readWorkspaceConfiguration,
4
4
  getProjects,
5
5
  readJson,
6
+ readProjectConfiguration,
6
7
  } from '@nrwl/devkit';
7
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
8
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
8
9
  import { Linter } from '@nrwl/linter';
9
10
  import { reactNativeApplicationGenerator } from './application';
10
11
 
@@ -12,7 +13,7 @@ describe('app', () => {
12
13
  let appTree: Tree;
13
14
 
14
15
  beforeEach(() => {
15
- appTree = createTreeWithEmptyV1Workspace();
16
+ appTree = createTreeWithEmptyWorkspace();
16
17
  appTree.write('.gitignore', '');
17
18
  });
18
19
 
@@ -41,11 +42,9 @@ describe('app', () => {
41
42
  install: false,
42
43
  });
43
44
 
44
- const { projects } = readJson(appTree, '/workspace.json');
45
- expect(projects).toMatchObject({
46
- 'my-app': {
47
- tags: ['one', 'two'],
48
- },
45
+ const projectConfiguration = readProjectConfiguration(appTree, 'my-app');
46
+ expect(projectConfiguration).toMatchObject({
47
+ tags: ['one', 'two'],
49
48
  });
50
49
  });
51
50
 
@@ -2,6 +2,7 @@ apply plugin: "com.android.application"
2
2
  apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
3
3
 
4
4
  import com.android.build.OutputFile
5
+ import org.apache.tools.ant.taskdefs.condition.Os
5
6
 
6
7
  /**
7
8
  * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
@@ -81,7 +82,7 @@ import com.android.build.OutputFile
81
82
  project.ext.react = [
82
83
  // the entry file for bundle generation
83
84
  entryFile: "<%= entryFile %>",
84
- enableHermes: false, // clean and rebuild if changing
85
+ enableHermes: true, // clean and rebuild if changing
85
86
  ]
86
87
 
87
88
  apply from: "../../node_modules/react-native/react.gradle"
@@ -150,22 +151,14 @@ android {
150
151
  <% } %>
151
152
 
152
153
  if (isNewArchitectureEnabled()) {
153
- // We configure the NDK build only if you decide to opt-in for the New Architecture.
154
+ // We configure the CMake build only if you decide to opt-in for the New Architecture.
154
155
  externalNativeBuild {
155
- ndkBuild {
156
- arguments "APP_PLATFORM=android-21",
157
- "APP_STL=c++_shared",
158
- "NDK_TOOLCHAIN_VERSION=clang",
159
- "GENERATED_SRC_DIR=$buildDir/generated/source",
160
- "PROJECT_BUILD_DIR=$buildDir",
161
- "REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
162
- "REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
163
- "NODE_MODULES_DIR=$rootDir/../node_modules"
164
- cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
165
- cppFlags "-std=c++17"
166
- // Make sure this target name is the same you specify inside the
167
- // src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
168
- targets "<%= lowerCaseName %>_appmodules"
156
+ cmake {
157
+ arguments "-DPROJECT_BUILD_DIR=$buildDir",
158
+ "-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
159
+ "-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
160
+ "-DNODE_MODULES_DIR=$rootDir/../node_modules",
161
+ "-DANDROID_STL=c++_shared"
169
162
  }
170
163
  }
171
164
  if (!enableSeparateBuildPerCPUArchitecture) {
@@ -179,8 +172,8 @@ android {
179
172
  if (isNewArchitectureEnabled()) {
180
173
  // We configure the NDK build only if you decide to opt-in for the New Architecture.
181
174
  externalNativeBuild {
182
- ndkBuild {
183
- path "$projectDir/src/main/jni/Android.mk"
175
+ cmake {
176
+ path "$projectDir/src/main/jni/CMakeLists.txt"
184
177
  }
185
178
  }
186
179
  def reactAndroidProjectDir = project(':ReactAndroid').projectDir
@@ -202,15 +195,15 @@ android {
202
195
  preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
203
196
 
204
197
  // Due to a bug inside AGP, we have to explicitly set a dependency
205
- // between configureNdkBuild* tasks and the preBuild tasks.
198
+ // between configureCMakeDebug* tasks and the preBuild tasks.
206
199
  // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
207
- configureNdkBuildRelease.dependsOn(preReleaseBuild)
208
- configureNdkBuildDebug.dependsOn(preDebugBuild)
200
+ configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild)
201
+ configureCMakeDebug.dependsOn(preDebugBuild)
209
202
  reactNativeArchitectures().each { architecture ->
210
- tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
203
+ tasks.findByName("configureCMakeDebug[${architecture}]")?.configure {
211
204
  dependsOn("preDebugBuild")
212
205
  }
213
- tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
206
+ tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure {
214
207
  dependsOn("preReleaseBuild")
215
208
  }
216
209
  }
@@ -0,0 +1,6 @@
1
+
2
+ cmake_minimum_required(VERSION 3.13)
3
+ # Define the library name here.
4
+ project(<%= lowerCaseName %>_appmodules)
5
+ # This file includes all the necessary to let you build your application with the New Architecture.
6
+ include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake)
@@ -1,12 +1,13 @@
1
1
  #include "MainApplicationModuleProvider.h"
2
2
 
3
+ #include <rncli.h>
3
4
  #include <rncore.h>
4
5
 
5
6
  namespace facebook {
6
7
  namespace react {
7
8
 
8
9
  std::shared_ptr<TurboModule> MainApplicationModuleProvider(
9
- const std::string moduleName,
10
+ const std::string &moduleName,
10
11
  const JavaTurboModule::InitParams &params) {
11
12
  // Here you can provide your own module provider for TurboModules coming from
12
13
  // either your application or from external libraries. The approach to follow
@@ -17,6 +18,13 @@ std::shared_ptr<TurboModule> MainApplicationModuleProvider(
17
18
  // return module;
18
19
  // }
19
20
  // return rncore_ModuleProvider(moduleName, params);
21
+
22
+ // Module providers autolinked by RN CLI
23
+ auto rncli_module = rncli_ModuleProvider(moduleName, params);
24
+ if (rncli_module != nullptr) {
25
+ return rncli_module;
26
+ }
27
+
20
28
  return rncore_ModuleProvider(moduleName, params);
21
29
  }
22
30
 
@@ -9,7 +9,7 @@ namespace facebook {
9
9
  namespace react {
10
10
 
11
11
  std::shared_ptr<TurboModule> MainApplicationModuleProvider(
12
- const std::string moduleName,
12
+ const std::string &moduleName,
13
13
  const JavaTurboModule::InitParams &params);
14
14
 
15
15
  } // namespace react
@@ -22,21 +22,21 @@ void MainApplicationTurboModuleManagerDelegate::registerNatives() {
22
22
 
23
23
  std::shared_ptr<TurboModule>
24
24
  MainApplicationTurboModuleManagerDelegate::getTurboModule(
25
- const std::string name,
26
- const std::shared_ptr<CallInvoker> jsInvoker) {
25
+ const std::string &name,
26
+ const std::shared_ptr<CallInvoker> &jsInvoker) {
27
27
  // Not implemented yet: provide pure-C++ NativeModules here.
28
28
  return nullptr;
29
29
  }
30
30
 
31
31
  std::shared_ptr<TurboModule>
32
32
  MainApplicationTurboModuleManagerDelegate::getTurboModule(
33
- const std::string name,
33
+ const std::string &name,
34
34
  const JavaTurboModule::InitParams &params) {
35
35
  return MainApplicationModuleProvider(name, params);
36
36
  }
37
37
 
38
38
  bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule(
39
- std::string name) {
39
+ const std::string &name) {
40
40
  return getTurboModule(name, nullptr) != nullptr ||
41
41
  getTurboModule(name, {.moduleName = name}) != nullptr;
42
42
  }
@@ -21,17 +21,17 @@ class MainApplicationTurboModuleManagerDelegate
21
21
  static void registerNatives();
22
22
 
23
23
  std::shared_ptr<TurboModule> getTurboModule(
24
- const std::string name,
25
- const std::shared_ptr<CallInvoker> jsInvoker) override;
24
+ const std::string &name,
25
+ const std::shared_ptr<CallInvoker> &jsInvoker) override;
26
26
  std::shared_ptr<TurboModule> getTurboModule(
27
- const std::string name,
27
+ const std::string &name,
28
28
  const JavaTurboModule::InitParams &params) override;
29
29
 
30
30
  /**
31
31
  * Test-only method. Allows user to verify whether a TurboModule can be
32
32
  * created by instances of this class.
33
33
  */
34
- bool canCreateTurboModule(std::string name);
34
+ bool canCreateTurboModule(const std::string &name);
35
35
  };
36
36
 
37
37
  } // namespace react
@@ -4,6 +4,7 @@
4
4
  #include <fbjni/fbjni.h>
5
5
  #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
6
6
  #include <react/renderer/components/rncore/ComponentDescriptors.h>
7
+ #include <rncli.h>
7
8
 
8
9
  namespace facebook {
9
10
  namespace react {
@@ -14,6 +15,9 @@ std::shared_ptr<ComponentDescriptorProviderRegistry const>
14
15
  MainComponentsRegistry::sharedProviderRegistry() {
15
16
  auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry();
16
17
 
18
+ // Autolinked providers registered by RN CLI
19
+ rncli_registerProviders(providerRegistry);
20
+
17
21
  // Custom Fabric Components go here. You can register custom
18
22
  // components coming from your App or from 3rd party libraries here.
19
23
  //
@@ -1,5 +1,3 @@
1
- import org.apache.tools.ant.taskdefs.condition.Os
2
-
3
1
  // Top-level build file where you can add configuration options common to all sub-projects/modules.
4
2
 
5
3
  buildscript {
@@ -9,7 +7,7 @@ buildscript {
9
7
  compileSdkVersion = 31
10
8
  targetSdkVersion = 31
11
9
  <% if (e2eTestRunner === 'detox') { %>
12
- kotlinVersion = '1.7.0'
10
+ kotlinVersion = '1.7.10'
13
11
  <% } %>
14
12
 
15
13
  if (System.properties['os.arch'] == "aarch64") {
@@ -25,7 +23,7 @@ buildscript {
25
23
  mavenCentral()
26
24
  }
27
25
  dependencies {
28
- classpath("com.android.tools.build:gradle:7.1.1")
26
+ classpath("com.android.tools.build:gradle:7.2.1")
29
27
  classpath("com.facebook.react:react-native-gradle-plugin")
30
28
  classpath("de.undercouch:gradle-download-task:5.0.1")
31
29
  <% if (e2eTestRunner === 'detox') { %>
@@ -1,5 +1,5 @@
1
1
  distributionBase=GRADLE_USER_HOME
2
2
  distributionPath=wrapper/dists
3
- distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
4
4
  zipStoreBase=GRADLE_USER_HOME
5
5
  zipStorePath=wrapper/dists
@@ -5,8 +5,6 @@ require_relative '<%= offsetFromRoot %>../node_modules/@nrwl/react-native/nx_pos
5
5
  platform :ios, '12.4'
6
6
  install! 'cocoapods', :deterministic_uuids => false
7
7
 
8
- production = ENV["PRODUCTION"] == "1"
9
-
10
8
  target '<%= className %>' do
11
9
  config = use_native_modules!
12
10
 
@@ -15,10 +13,16 @@ target '<%= className %>' do
15
13
 
16
14
  use_react_native!(
17
15
  :path => config[:reactNativePath],
18
- # to enable hermes on iOS, change `false` to `true` and then install pods
19
- :production => production,
20
- :hermes_enabled => flags[:hermes_enabled],
16
+ # Hermes is now enabled by default. Disable by setting this flag to false.
17
+ # Upcoming versions of React Native may rely on get_default_flags(), but
18
+ # we make it explicit here to aid in the React Native upgrade process.
19
+ # disabled hermes due to issue https://github.com/facebook/react-native/issues/34599 https://github.com/facebook/react-native/issues/34608
20
+ :hermes_enabled => false,
21
21
  :fabric_enabled => flags[:fabric_enabled],
22
+ # Enables Flipper.
23
+ #
24
+ # Note that if you have use_frameworks! enabled, Flipper will not work and
25
+ # you should disable the next line.
22
26
  :flipper_configuration => FlipperConfiguration.enabled,
23
27
  # An absolute path to your application root.
24
28
  :app_path => "#{Pod::Config.instance.installation_root}/.."
@@ -30,7 +34,12 @@ target '<%= className %>' do
30
34
  end
31
35
 
32
36
  post_install do |installer|
33
- react_native_post_install(installer)
37
+ react_native_post_install(
38
+ installer,
39
+ # Set `mac_catalyst_enabled` to `true` in order to apply patches
40
+ # necessary for Mac Catalyst builds
41
+ :mac_catalyst_enabled => false
42
+ )
34
43
  __apply_Xcode_12_5_M1_post_install_workaround(installer)
35
44
  nx_post_install(installer)
36
45
  end
@@ -596,7 +596,6 @@
596
596
  "-DFOLLY_MOBILE=1",
597
597
  "-DFOLLY_USE_LIBCPP=1",
598
598
  );
599
- REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
600
599
  SDKROOT = iphoneos;
601
600
  };
602
601
  name = Debug;
@@ -660,7 +659,6 @@
660
659
  "-DFOLLY_MOBILE=1",
661
660
  "-DFOLLY_USE_LIBCPP=1",
662
661
  );
663
- REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
664
662
  SDKROOT = iphoneos;
665
663
  VALIDATE_PRODUCT = YES;
666
664
  };
@@ -418,7 +418,7 @@ const styles = StyleSheet.create({
418
418
  color: '#6b7280',
419
419
  },
420
420
  section: {
421
- marginVertical: 24,
421
+ marginVertical: 12,
422
422
  marginHorizontal: 12,
423
423
  },
424
424
  shadowBox: {
@@ -1,5 +1,5 @@
1
1
  import { Tree } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
3
  import { Linter } from '@nrwl/linter';
4
4
  import { Schema } from '../schema';
5
5
  import { normalizeOptions } from './normalize-options';
@@ -8,7 +8,7 @@ describe('Normalize Options', () => {
8
8
  let appTree: Tree;
9
9
 
10
10
  beforeEach(() => {
11
- appTree = createTreeWithEmptyV1Workspace();
11
+ appTree = createTreeWithEmptyWorkspace();
12
12
  });
13
13
 
14
14
  it('should normalize options with name in kebab case', () => {
@@ -1,5 +1,5 @@
1
1
  import { logger, Tree } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
3
  import { createApp, createLib } from '../../utils/testing-generators';
4
4
  import { reactNativeComponentGenerator } from './component';
5
5
 
@@ -9,7 +9,7 @@ describe('component', () => {
9
9
 
10
10
  beforeEach(async () => {
11
11
  projectName = 'my-lib';
12
- appTree = createTreeWithEmptyV1Workspace();
12
+ appTree = createTreeWithEmptyWorkspace();
13
13
  appTree.write('.gitignore', '');
14
14
  await createApp(appTree, 'my-app');
15
15
  await createLib(appTree, projectName);
@@ -1,5 +1,5 @@
1
1
  import { getProjects, Tree, updateProjectConfiguration } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
3
  import componentStoryGenerator from './component-story';
4
4
  import { Linter } from '@nrwl/linter';
5
5
 
@@ -408,7 +408,7 @@ export async function createTestUILib(
408
408
  libName: string,
409
409
  useEsLint = false
410
410
  ): Promise<Tree> {
411
- let appTree = createTreeWithEmptyV1Workspace();
411
+ let appTree = createTreeWithEmptyWorkspace();
412
412
  appTree.write('.gitignore', '');
413
413
 
414
414
  await libraryGenerator(appTree, {
@@ -35,7 +35,7 @@ function updateDependencies(host) {
35
35
  return (0, devkit_1.addDependenciesToPackageJson)(host, {
36
36
  react: versions_1.reactVersion,
37
37
  'react-native': versions_2.reactNativeVersion,
38
- }, Object.assign({ '@nrwl/react-native': versions_2.nxVersion, '@types/node': versions_2.typesNodeVersion, '@types/react': versions_1.typesReactVersion, '@types/react-native': versions_2.typesReactNativeVersion, '@react-native-community/cli': versions_2.reactNativeCommunityCli, '@react-native-community/cli-platform-android': versions_2.reactNativeCommunityCliAndroid, '@react-native-community/cli-platform-ios': versions_2.reactNativeCommunityCliIos, '@testing-library/react-native': versions_2.testingLibraryReactNativeVersion, '@testing-library/jest-native': versions_2.testingLibraryJestNativeVersion, 'jest-react-native': versions_2.jestReactNativeVersion, metro: versions_2.metroVersion, 'metro-resolver': versions_2.metroVersion, 'metro-babel-register': versions_2.metroVersion, 'metro-react-native-babel-preset': versions_2.metroVersion, 'react-test-renderer': versions_1.reactTestRendererVersion, 'react-native-svg-transformer': versions_2.reactNativeSvgTransformerVersion, 'react-native-svg': versions_2.reactNativeSvgVersion, 'react-native-config': versions_2.reactNativeConfigVersion, '@react-native-async-storage/async-storage': versions_2.reactNativeAsyncStorageAsyncStorageVersion }, (isPnpm
38
+ }, Object.assign({ '@nrwl/react-native': versions_2.nxVersion, '@types/node': versions_2.typesNodeVersion, '@types/react': versions_1.typesReactVersion, '@types/react-native': versions_2.typesReactNativeVersion, '@react-native-community/cli': versions_2.reactNativeCommunityCli, '@react-native-community/cli-platform-android': versions_2.reactNativeCommunityCliAndroid, '@react-native-community/cli-platform-ios': versions_2.reactNativeCommunityCliIos, '@testing-library/react-native': versions_2.testingLibraryReactNativeVersion, '@testing-library/jest-native': versions_2.testingLibraryJestNativeVersion, 'jest-react-native': versions_2.jestReactNativeVersion, metro: versions_2.metroVersion, 'metro-resolver': versions_2.metroVersion, 'metro-babel-register': versions_2.metroVersion, 'metro-react-native-babel-preset': versions_2.metroVersion, 'metro-react-native-babel-transformer': versions_2.metroVersion, 'react-test-renderer': versions_1.reactTestRendererVersion, 'react-native-svg-transformer': versions_2.reactNativeSvgTransformerVersion, 'react-native-svg': versions_2.reactNativeSvgVersion, 'react-native-config': versions_2.reactNativeConfigVersion, '@react-native-async-storage/async-storage': versions_2.reactNativeAsyncStorageAsyncStorageVersion }, (isPnpm
39
39
  ? {
40
40
  'metro-config': versions_2.metroVersion,
41
41
  '@babel/runtime': versions_2.babelRuntimeVersion, // @babel/runtime is used by react-native-svg
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/init/init.ts"],"names":[],"mappings":";;;;AAAA,yCAOsB;AAEtB,2FAAqF;AACrF,qCAA+C;AAC/C,uCAAiD;AACjD,6DAIwC;AAExC,mDAiB8B;AAE9B,qEAA+D;AAC/D,yEAAmE;AAEnE,SAAsB,wBAAwB,CAAC,IAAU,EAAE,MAAc;;QACvE,IAAA,wCAAiB,EAAC,IAAI,CAAC,CAAC;QACxB,IAAA,4CAAmB,EAAC,IAAI,CAAC,CAAC;QAE1B,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;QAE/D,IAAI,CAAC,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,KAAK,MAAM,EAAE;YAC9D,MAAM,QAAQ,GAAG,IAAA,wBAAiB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YACjD,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACtB;QAED,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,aAAa,KAAK,OAAO,EAAE;YAC7D,MAAM,SAAS,GAAG,MAAM,IAAA,0BAAkB,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACrD,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACvB;QAED,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACtB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,IAAA,sCAAgB,EAAC,GAAG,KAAK,CAAC,CAAC;IACpC,CAAC;CAAA;AArBD,4DAqBC;AAED,SAAgB,kBAAkB,CAAC,IAAU;IAC3C,MAAM,MAAM,GAAG,IAAA,6BAAoB,EAAC,IAAI,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC;IAC1D,OAAO,IAAA,qCAA4B,EACjC,IAAI,EACJ;QACE,KAAK,EAAE,uBAAY;QACnB,cAAc,EAAE,6BAAkB;KACnC,kBAEC,oBAAoB,EAAE,oBAAS,EAC/B,aAAa,EAAE,2BAAgB,EAC/B,cAAc,EAAE,4BAAiB,EACjC,qBAAqB,EAAE,kCAAuB,EAC9C,6BAA6B,EAAE,kCAAuB,EACtD,8CAA8C,EAC5C,yCAA8B,EAChC,0CAA0C,EAAE,qCAA0B,EACtE,+BAA+B,EAAE,2CAAgC,EACjE,8BAA8B,EAAE,0CAA+B,EAC/D,mBAAmB,EAAE,iCAAsB,EAC3C,KAAK,EAAE,uBAAY,EACnB,gBAAgB,EAAE,uBAAY,EAC9B,sBAAsB,EAAE,uBAAY,EACpC,iCAAiC,EAAE,uBAAY,EAC/C,qBAAqB,EAAE,mCAAwB,EAC/C,8BAA8B,EAAE,2CAAgC,EAChE,kBAAkB,EAAE,gCAAqB,EACzC,qBAAqB,EAAE,mCAAwB,EAC/C,2CAA2C,EACzC,qDAA0C,IACzC,CAAC,MAAM;QACR,CAAC,CAAC;YACE,cAAc,EAAE,uBAAY;YAC5B,gBAAgB,EAAE,8BAAmB,EAAE,6CAA6C;SACrF;QACH,CAAC,CAAC,EAAE,CAAC,EAEV,CAAC;AACJ,CAAC;AAtCD,gDAsCC;AAED,SAAS,cAAc,CAAC,IAAU;IAChC,OAAO,IAAA,0CAAiC,EAAC,IAAI,EAAE,CAAC,oBAAoB,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7E,CAAC;AAED,kBAAe,wBAAwB,CAAC;AAC3B,QAAA,wBAAwB,GAAG,IAAA,2BAAkB,EACxD,wBAAwB,CACzB,CAAC"}
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/init/init.ts"],"names":[],"mappings":";;;;AAAA,yCAOsB;AAEtB,2FAAqF;AACrF,qCAA+C;AAC/C,uCAAiD;AACjD,6DAIwC;AAExC,mDAiB8B;AAE9B,qEAA+D;AAC/D,yEAAmE;AAEnE,SAAsB,wBAAwB,CAAC,IAAU,EAAE,MAAc;;QACvE,IAAA,wCAAiB,EAAC,IAAI,CAAC,CAAC;QACxB,IAAA,4CAAmB,EAAC,IAAI,CAAC,CAAC;QAE1B,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;QAE/D,IAAI,CAAC,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,KAAK,MAAM,EAAE;YAC9D,MAAM,QAAQ,GAAG,IAAA,wBAAiB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YACjD,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACtB;QAED,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,aAAa,KAAK,OAAO,EAAE;YAC7D,MAAM,SAAS,GAAG,MAAM,IAAA,0BAAkB,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACrD,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACvB;QAED,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACtB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,IAAA,sCAAgB,EAAC,GAAG,KAAK,CAAC,CAAC;IACpC,CAAC;CAAA;AArBD,4DAqBC;AAED,SAAgB,kBAAkB,CAAC,IAAU;IAC3C,MAAM,MAAM,GAAG,IAAA,6BAAoB,EAAC,IAAI,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC;IAC1D,OAAO,IAAA,qCAA4B,EACjC,IAAI,EACJ;QACE,KAAK,EAAE,uBAAY;QACnB,cAAc,EAAE,6BAAkB;KACnC,kBAEC,oBAAoB,EAAE,oBAAS,EAC/B,aAAa,EAAE,2BAAgB,EAC/B,cAAc,EAAE,4BAAiB,EACjC,qBAAqB,EAAE,kCAAuB,EAC9C,6BAA6B,EAAE,kCAAuB,EACtD,8CAA8C,EAC5C,yCAA8B,EAChC,0CAA0C,EAAE,qCAA0B,EACtE,+BAA+B,EAAE,2CAAgC,EACjE,8BAA8B,EAAE,0CAA+B,EAC/D,mBAAmB,EAAE,iCAAsB,EAC3C,KAAK,EAAE,uBAAY,EACnB,gBAAgB,EAAE,uBAAY,EAC9B,sBAAsB,EAAE,uBAAY,EACpC,iCAAiC,EAAE,uBAAY,EAC/C,sCAAsC,EAAE,uBAAY,EACpD,qBAAqB,EAAE,mCAAwB,EAC/C,8BAA8B,EAAE,2CAAgC,EAChE,kBAAkB,EAAE,gCAAqB,EACzC,qBAAqB,EAAE,mCAAwB,EAC/C,2CAA2C,EACzC,qDAA0C,IACzC,CAAC,MAAM;QACR,CAAC,CAAC;YACE,cAAc,EAAE,uBAAY;YAC5B,gBAAgB,EAAE,8BAAmB,EAAE,6CAA6C;SACrF;QACH,CAAC,CAAC,EAAE,CAAC,EAEV,CAAC;AACJ,CAAC;AAvCD,gDAuCC;AAED,SAAS,cAAc,CAAC,IAAU;IAChC,OAAO,IAAA,0CAAiC,EAAC,IAAI,EAAE,CAAC,oBAAoB,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7E,CAAC;AAED,kBAAe,wBAAwB,CAAC;AAC3B,QAAA,wBAAwB,GAAG,IAAA,2BAAkB,EACxD,wBAAwB,CACzB,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import { NxJsonConfiguration } from '@nrwl/devkit';
2
2
  import { Tree, readJson, updateJson } from '@nrwl/devkit';
3
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
3
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
4
4
  import { reactNativeInitGenerator } from './init';
5
5
 
6
6
  describe('init', () => {
7
7
  let tree: Tree;
8
8
 
9
9
  beforeEach(() => {
10
- tree = createTreeWithEmptyV1Workspace();
10
+ tree = createTreeWithEmptyWorkspace();
11
11
  tree.write('.gitignore', '');
12
12
  });
13
13
 
@@ -1,5 +1,10 @@
1
- import { getProjects, readJson, Tree, updateJson } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
1
+ import {
2
+ readJson,
3
+ readProjectConfiguration,
4
+ Tree,
5
+ updateJson,
6
+ } from '@nrwl/devkit';
7
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
8
  import libraryGenerator from './library';
4
9
  import { Linter } from '@nrwl/linter';
5
10
  import { Schema } from './schema';
@@ -17,24 +22,24 @@ describe('lib', () => {
17
22
  };
18
23
 
19
24
  beforeEach(() => {
20
- appTree = createTreeWithEmptyV1Workspace();
25
+ appTree = createTreeWithEmptyWorkspace();
21
26
  appTree.write('.gitignore', '');
22
27
  });
23
28
 
24
29
  describe('not nested', () => {
25
- it('should update workspace.json', async () => {
30
+ it('should update project.json', async () => {
26
31
  await libraryGenerator(appTree, { ...defaultSchema, tags: 'one,two' });
27
- const workspaceJson = readJson(appTree, '/workspace.json');
28
- expect(workspaceJson.projects['my-lib'].root).toEqual('libs/my-lib');
29
- expect(workspaceJson.projects['my-lib'].architect.build).toBeUndefined();
30
- expect(workspaceJson.projects['my-lib'].architect.lint).toEqual({
31
- builder: '@nrwl/linter:eslint',
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',
32
37
  outputs: ['{options.outputFile}'],
33
38
  options: {
34
39
  lintFilePatterns: ['libs/my-lib/**/*.{ts,tsx,js,jsx}'],
35
40
  },
36
41
  });
37
- expect(workspaceJson.projects['my-lib'].tags).toEqual(['one', 'two']);
42
+ expect(projectConfiguration.tags).toEqual(['one', 'two']);
38
43
  });
39
44
 
40
45
  it('should update root tsconfig.base.json', async () => {
@@ -121,11 +126,12 @@ describe('lib', () => {
121
126
  directory: 'myDir',
122
127
  tags: 'one',
123
128
  });
124
- const workspaceJson = readJson(appTree, '/workspace.json');
125
- expect(workspaceJson.projects).toMatchObject({
126
- 'my-dir-my-lib': {
127
- tags: ['one'],
128
- },
129
+ const projectConfiguration = readProjectConfiguration(
130
+ appTree,
131
+ 'my-dir-my-lib'
132
+ );
133
+ expect(projectConfiguration).toMatchObject({
134
+ tags: ['one'],
129
135
  });
130
136
 
131
137
  await libraryGenerator(appTree, {
@@ -135,26 +141,25 @@ describe('lib', () => {
135
141
  tags: 'one,two',
136
142
  });
137
143
 
138
- const workspaceJson2 = readJson(appTree, '/workspace.json');
139
- expect(workspaceJson2.projects).toMatchObject({
140
- 'my-dir-my-lib': {
141
- tags: ['one'],
142
- },
143
- 'my-dir-my-lib2': {
144
- tags: ['one', 'two'],
145
- },
144
+ const lib2ProjectConfiguration = readProjectConfiguration(
145
+ appTree,
146
+ 'my-dir-my-lib2'
147
+ );
148
+ expect(lib2ProjectConfiguration).toMatchObject({
149
+ tags: ['one', 'two'],
146
150
  });
147
151
  });
148
152
 
149
- it('should update workspace.json', async () => {
153
+ it('should update project.json', async () => {
150
154
  await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
151
- const workspaceJson = readJson(appTree, '/workspace.json');
152
-
153
- expect(workspaceJson.projects['my-dir-my-lib'].root).toEqual(
154
- 'libs/my-dir/my-lib'
155
+ const projectConfiguration = readProjectConfiguration(
156
+ appTree,
157
+ 'my-dir-my-lib'
155
158
  );
156
- expect(workspaceJson.projects['my-dir-my-lib'].architect.lint).toEqual({
157
- builder: '@nrwl/linter:eslint',
159
+
160
+ expect(projectConfiguration.root).toEqual('libs/my-dir/my-lib');
161
+ expect(projectConfiguration.targets.lint).toEqual({
162
+ executor: '@nrwl/linter:eslint',
158
163
  outputs: ['{options.outputFile}'],
159
164
  options: {
160
165
  lintFilePatterns: ['libs/my-dir/my-lib/**/*.{ts,tsx,js,jsx}'],
@@ -227,22 +232,15 @@ describe('lib', () => {
227
232
 
228
233
  expect(appTree.exists('libs/my-lib/tsconfig.spec.json')).toBeFalsy();
229
234
  expect(appTree.exists('libs/my-lib/jest.config.ts')).toBeFalsy();
230
- const workspaceJson = readJson(appTree, 'workspace.json');
231
- expect(workspaceJson.projects['my-lib'].architect.test).toBeUndefined();
232
- expect(workspaceJson.projects['my-lib'].architect.lint)
233
- .toMatchInlineSnapshot(`
234
- Object {
235
- "builder": "@nrwl/linter:eslint",
236
- "options": Object {
237
- "lintFilePatterns": Array [
238
- "libs/my-lib/**/*.{ts,tsx,js,jsx}",
239
- ],
240
- },
241
- "outputs": Array [
242
- "{options.outputFile}",
243
- ],
244
- }
245
- `);
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
+ });
246
244
  });
247
245
  });
248
246
 
@@ -253,9 +251,9 @@ describe('lib', () => {
253
251
  buildable: true,
254
252
  });
255
253
 
256
- const workspaceJson = getProjects(appTree);
254
+ const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
257
255
 
258
- expect(workspaceJson.get('my-lib').targets.build).toBeDefined();
256
+ expect(projectConfiguration.targets.build).toBeDefined();
259
257
  });
260
258
  });
261
259
 
@@ -267,9 +265,9 @@ describe('lib', () => {
267
265
  importPath: '@proj/my-lib',
268
266
  });
269
267
 
270
- const workspaceJson = getProjects(appTree);
268
+ const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
271
269
 
272
- expect(workspaceJson.get('my-lib').targets.build).toMatchObject({
270
+ expect(projectConfiguration.targets.build).toMatchObject({
273
271
  executor: '@nrwl/web:rollup',
274
272
  outputs: ['{options.outputPath}'],
275
273
  options: {
@@ -1,6 +1,6 @@
1
1
  import { Tree } from '@nrwl/devkit';
2
2
  import storiesGenerator from './stories';
3
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
3
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
4
4
  import applicationGenerator from '../application/application';
5
5
  import { Linter } from '@nrwl/linter';
6
6
  import { reactNativeComponentGenerator } from '../component/component';
@@ -130,7 +130,7 @@ describe('react:stories for applications', () => {
130
130
  });
131
131
 
132
132
  export async function createTestUIApp(libName: string): Promise<Tree> {
133
- let appTree = createTreeWithEmptyV1Workspace();
133
+ let appTree = createTreeWithEmptyWorkspace();
134
134
  appTree.write('.gitignore', '');
135
135
 
136
136
  await applicationGenerator(appTree, {
@@ -1,6 +1,6 @@
1
1
  import { Tree } from '@nrwl/devkit';
2
2
  import storiesGenerator from './stories';
3
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
3
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
4
4
  import applicationGenerator from '../application/application';
5
5
  import { Linter } from '@nrwl/linter';
6
6
  import libraryGenerator from '../library/library';
@@ -90,7 +90,7 @@ describe('react-native:stories for libraries', () => {
90
90
  });
91
91
 
92
92
  export async function createTestUILib(libName: string): Promise<Tree> {
93
- let appTree = createTreeWithEmptyV1Workspace();
93
+ let appTree = createTreeWithEmptyWorkspace();
94
94
  appTree.write('.gitignore', '');
95
95
 
96
96
  await libraryGenerator(appTree, {
@@ -1,5 +1,5 @@
1
1
  import { Tree } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
3
  import { Linter } from '@nrwl/linter';
4
4
  import { logger } from '@nrwl/devkit';
5
5
 
@@ -103,7 +103,7 @@ describe('react-native:storybook-configuration', () => {
103
103
  });
104
104
 
105
105
  export async function createTestUILib(libName: string): Promise<Tree> {
106
- let appTree = createTreeWithEmptyV1Workspace();
106
+ let appTree = createTreeWithEmptyWorkspace();
107
107
 
108
108
  await libraryGenerator(appTree, {
109
109
  linter: Linter.EsLint,
@@ -119,7 +119,7 @@ export async function createTestAppLib(
119
119
  libName: string,
120
120
  plainJS = false
121
121
  ): Promise<Tree> {
122
- let appTree = createTreeWithEmptyV1Workspace();
122
+ let appTree = createTreeWithEmptyWorkspace();
123
123
 
124
124
  await applicationGenerator(appTree, {
125
125
  e2eTestRunner: 'none',
@@ -1,5 +1,5 @@
1
1
  import { addProjectConfiguration, Tree } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
3
 
4
4
  import { formatFile } from '../../../utils/format-file';
5
5
 
@@ -9,7 +9,7 @@ describe('addResolverMainFieldsToMetroConfig', () => {
9
9
  let tree: Tree;
10
10
 
11
11
  beforeEach(() => {
12
- tree = createTreeWithEmptyV1Workspace();
12
+ tree = createTreeWithEmptyWorkspace();
13
13
 
14
14
  addProjectConfiguration(tree, 'products', {
15
15
  root: 'apps/products',
@@ -1,5 +1,5 @@
1
1
  import { addProjectConfiguration, Tree } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
3
 
4
4
  import { formatFile } from '../../../utils/format-file';
5
5
 
@@ -9,7 +9,7 @@ describe('replaceAppImportWithStorybookToggle', () => {
9
9
  let tree: Tree;
10
10
 
11
11
  beforeEach(() => {
12
- tree = createTreeWithEmptyV1Workspace();
12
+ tree = createTreeWithEmptyWorkspace();
13
13
 
14
14
  addProjectConfiguration(tree, 'products', {
15
15
  root: 'apps/products',
@@ -1,5 +1,5 @@
1
1
  import { addProjectConfiguration, readJson, Tree } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
3
  import {
4
4
  reactNativeSvgTransformerVersion,
5
5
  reactNativeSvgVersion,
@@ -10,7 +10,7 @@ describe('Add react-native-svg to dev dependencies', () => {
10
10
  let tree: Tree;
11
11
 
12
12
  beforeEach(async () => {
13
- tree = createTreeWithEmptyV1Workspace();
13
+ tree = createTreeWithEmptyWorkspace();
14
14
  addProjectConfiguration(tree, 'products', {
15
15
  root: 'apps/products',
16
16
  sourceRoot: 'apps/products/src',
@@ -1,12 +1,12 @@
1
1
  import { addProjectConfiguration, readJson, Tree } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
3
  import update from './add-babel-config-root-13-5-0';
4
4
 
5
5
  describe('Add react-native-svg to dev dependencies', () => {
6
6
  let tree: Tree;
7
7
 
8
8
  beforeEach(async () => {
9
- tree = createTreeWithEmptyV1Workspace();
9
+ tree = createTreeWithEmptyWorkspace();
10
10
  addProjectConfiguration(tree, 'products', {
11
11
  root: 'apps/products',
12
12
  sourceRoot: 'apps/products/src',
@@ -1,12 +1,12 @@
1
1
  import { addProjectConfiguration, readJson, Tree } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
3
  import update from './update-react-native-typing-svg-13-5-0';
4
4
 
5
5
  describe('Update svg typings in tsconfig for react native app', () => {
6
6
  let tree: Tree;
7
7
 
8
8
  beforeEach(async () => {
9
- tree = createTreeWithEmptyV1Workspace();
9
+ tree = createTreeWithEmptyWorkspace();
10
10
  addProjectConfiguration(tree, 'products', {
11
11
  root: 'apps/products',
12
12
  sourceRoot: 'apps/products/src',
@@ -1,5 +1,5 @@
1
1
  import { addProjectConfiguration, Tree } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
3
 
4
4
  import update from './add-project-root-metro-config-14-0-0';
5
5
 
@@ -7,7 +7,7 @@ describe('Add projectRoot option in metro.config.js', () => {
7
7
  let tree: Tree;
8
8
 
9
9
  beforeEach(async () => {
10
- tree = createTreeWithEmptyV1Workspace();
10
+ tree = createTreeWithEmptyWorkspace();
11
11
  addProjectConfiguration(tree, 'products', {
12
12
  root: 'apps/products',
13
13
  sourceRoot: 'apps/products/src',
@@ -1,5 +1,5 @@
1
1
  import { addProjectConfiguration, Tree, getProjects } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
3
 
4
4
  import update from './update-entry-file-bundle-14-0-0';
5
5
 
@@ -7,7 +7,7 @@ describe('Update entryFile for bundle target for react native apps', () => {
7
7
  let tree: Tree;
8
8
 
9
9
  beforeEach(async () => {
10
- tree = createTreeWithEmptyV1Workspace();
10
+ tree = createTreeWithEmptyWorkspace();
11
11
  addProjectConfiguration(tree, 'products', {
12
12
  root: 'apps/products',
13
13
  sourceRoot: 'apps/products/src',
@@ -1,5 +1,5 @@
1
1
  import { addProjectConfiguration, Tree } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
3
 
4
4
  import update from './change-main-to-class-name-14-0-2';
5
5
 
@@ -7,7 +7,7 @@ describe('Change from main tag to className tag', () => {
7
7
  let tree: Tree;
8
8
 
9
9
  beforeEach(async () => {
10
- tree = createTreeWithEmptyV1Workspace();
10
+ tree = createTreeWithEmptyWorkspace();
11
11
  addProjectConfiguration(tree, 'products', {
12
12
  root: 'apps/products',
13
13
  sourceRoot: 'apps/products/src',
@@ -1,5 +1,5 @@
1
1
  import { addProjectConfiguration, Tree, getProjects } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
3
 
4
4
  import update from './rename-blockList-metro-config';
5
5
 
@@ -7,7 +7,7 @@ describe('Rename blacklistRE to blockList in metro.config.js for react native ap
7
7
  let tree: Tree;
8
8
 
9
9
  beforeEach(async () => {
10
- tree = createTreeWithEmptyV1Workspace();
10
+ tree = createTreeWithEmptyWorkspace();
11
11
  addProjectConfiguration(tree, 'products', {
12
12
  root: 'apps/products',
13
13
  sourceRoot: 'apps/products/src',
@@ -3,14 +3,14 @@ import {
3
3
  readProjectConfiguration,
4
4
  Tree,
5
5
  } from '@nrwl/devkit';
6
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
6
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
7
7
  import update from './add-exclude-sync-deps';
8
8
 
9
9
  describe('add-exclude-sync-deps', () => {
10
10
  let tree: Tree;
11
11
 
12
12
  beforeEach(async () => {
13
- tree = createTreeWithEmptyV1Workspace();
13
+ tree = createTreeWithEmptyWorkspace();
14
14
  addProjectConfiguration(tree, 'products', {
15
15
  root: 'apps/products',
16
16
  sourceRoot: 'apps/products/src',
@@ -3,14 +3,14 @@ import {
3
3
  readProjectConfiguration,
4
4
  Tree,
5
5
  } from '@nrwl/devkit';
6
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
6
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
7
7
  import update from './change-searchDir-storybook';
8
8
 
9
9
  describe('change-searchDir-storybook', () => {
10
10
  let tree: Tree;
11
11
 
12
12
  beforeEach(async () => {
13
- tree = createTreeWithEmptyV1Workspace();
13
+ tree = createTreeWithEmptyWorkspace();
14
14
  addProjectConfiguration(tree, 'products', {
15
15
  root: 'apps/products',
16
16
  sourceRoot: 'apps/products/src',
@@ -1,5 +1,5 @@
1
1
  import { readProjectConfiguration, Tree } from '@nrwl/devkit';
2
- import { createTreeWithEmptyV1Workspace } from '@nrwl/devkit/testing';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
3
  import { Linter } from '@nrwl/linter';
4
4
  import { libraryGenerator } from '@nrwl/workspace/src/generators/library/library';
5
5
  import { addLinting } from './add-linting';
@@ -8,7 +8,7 @@ describe('Add Linting', () => {
8
8
  let tree: Tree;
9
9
 
10
10
  beforeEach(async () => {
11
- tree = createTreeWithEmptyV1Workspace();
11
+ tree = createTreeWithEmptyWorkspace();
12
12
  await libraryGenerator(tree, {
13
13
  name: 'my-lib',
14
14
  linter: Linter.None,
@@ -1,16 +1,16 @@
1
1
  export declare const nxVersion: any;
2
- export declare const reactNativeVersion = "0.69.4";
3
- export declare const typesReactNativeVersion = "0.69.5";
2
+ export declare const reactNativeVersion = "0.70.0";
3
+ export declare const typesReactNativeVersion = "0.70.0";
4
4
  export declare const typesNodeVersion = "16.11.7";
5
- export declare const metroVersion = "0.72.1";
6
- export declare const reactNativeCommunityCli = "9.0.0";
7
- export declare const reactNativeCommunityCliIos = "9.0.0";
8
- export declare const reactNativeCommunityCliAndroid = "9.0.0";
5
+ export declare const metroVersion = "0.72.2";
6
+ export declare const reactNativeCommunityCli = "9.1.1";
7
+ export declare const reactNativeCommunityCliIos = "9.1.0";
8
+ export declare const reactNativeCommunityCliAndroid = "9.1.0";
9
9
  export declare const reactNativeConfigVersion = "1.4.6";
10
- export declare const reactNativeAsyncStorageAsyncStorageVersion = "1.17.7";
10
+ export declare const reactNativeAsyncStorageAsyncStorageVersion = "1.17.10";
11
11
  export declare const testingLibraryReactNativeVersion = "11.0.0";
12
12
  export declare const testingLibraryJestNativeVersion = "4.0.11";
13
13
  export declare const jestReactNativeVersion = "18.0.0";
14
14
  export declare const reactNativeSvgTransformerVersion = "1.0.0";
15
- export declare const reactNativeSvgVersion = "13.0.0";
16
- export declare const babelRuntimeVersion = "7.18.9";
15
+ export declare const reactNativeSvgVersion = "13.1.0";
16
+ export declare const babelRuntimeVersion = "7.19.0";
@@ -2,19 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.babelRuntimeVersion = exports.reactNativeSvgVersion = exports.reactNativeSvgTransformerVersion = exports.jestReactNativeVersion = exports.testingLibraryJestNativeVersion = exports.testingLibraryReactNativeVersion = exports.reactNativeAsyncStorageAsyncStorageVersion = exports.reactNativeConfigVersion = exports.reactNativeCommunityCliAndroid = exports.reactNativeCommunityCliIos = exports.reactNativeCommunityCli = exports.metroVersion = exports.typesNodeVersion = exports.typesReactNativeVersion = exports.reactNativeVersion = exports.nxVersion = void 0;
4
4
  exports.nxVersion = require('../../package.json').version;
5
- exports.reactNativeVersion = '0.69.4';
6
- exports.typesReactNativeVersion = '0.69.5';
5
+ exports.reactNativeVersion = '0.70.0';
6
+ exports.typesReactNativeVersion = '0.70.0';
7
7
  exports.typesNodeVersion = '16.11.7';
8
- exports.metroVersion = '0.72.1';
9
- exports.reactNativeCommunityCli = '9.0.0';
10
- exports.reactNativeCommunityCliIos = '9.0.0';
11
- exports.reactNativeCommunityCliAndroid = '9.0.0';
8
+ exports.metroVersion = '0.72.2';
9
+ exports.reactNativeCommunityCli = '9.1.1';
10
+ exports.reactNativeCommunityCliIos = '9.1.0';
11
+ exports.reactNativeCommunityCliAndroid = '9.1.0';
12
12
  exports.reactNativeConfigVersion = '1.4.6';
13
- exports.reactNativeAsyncStorageAsyncStorageVersion = '1.17.7';
13
+ exports.reactNativeAsyncStorageAsyncStorageVersion = '1.17.10';
14
14
  exports.testingLibraryReactNativeVersion = '11.0.0';
15
15
  exports.testingLibraryJestNativeVersion = '4.0.11';
16
16
  exports.jestReactNativeVersion = '18.0.0';
17
17
  exports.reactNativeSvgTransformerVersion = '1.0.0';
18
- exports.reactNativeSvgVersion = '13.0.0';
19
- exports.babelRuntimeVersion = '7.18.9';
18
+ exports.reactNativeSvgVersion = '13.1.0';
19
+ exports.babelRuntimeVersion = '7.19.0';
20
20
  //# sourceMappingURL=versions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/versions.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;AAElD,QAAA,kBAAkB,GAAG,QAAQ,CAAC;AAC9B,QAAA,uBAAuB,GAAG,QAAQ,CAAC;AAEnC,QAAA,gBAAgB,GAAG,SAAS,CAAC;AAE7B,QAAA,YAAY,GAAG,QAAQ,CAAC;AAExB,QAAA,uBAAuB,GAAG,OAAO,CAAC;AAClC,QAAA,0BAA0B,GAAG,OAAO,CAAC;AACrC,QAAA,8BAA8B,GAAG,OAAO,CAAC;AAEzC,QAAA,wBAAwB,GAAG,OAAO,CAAC;AACnC,QAAA,0CAA0C,GAAG,QAAQ,CAAC;AAEtD,QAAA,gCAAgC,GAAG,QAAQ,CAAC;AAC5C,QAAA,+BAA+B,GAAG,QAAQ,CAAC;AAE3C,QAAA,sBAAsB,GAAG,QAAQ,CAAC;AAElC,QAAA,gCAAgC,GAAG,OAAO,CAAC;AAC3C,QAAA,qBAAqB,GAAG,QAAQ,CAAC;AAEjC,QAAA,mBAAmB,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/versions.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;AAElD,QAAA,kBAAkB,GAAG,QAAQ,CAAC;AAC9B,QAAA,uBAAuB,GAAG,QAAQ,CAAC;AAEnC,QAAA,gBAAgB,GAAG,SAAS,CAAC;AAE7B,QAAA,YAAY,GAAG,QAAQ,CAAC;AAExB,QAAA,uBAAuB,GAAG,OAAO,CAAC;AAClC,QAAA,0BAA0B,GAAG,OAAO,CAAC;AACrC,QAAA,8BAA8B,GAAG,OAAO,CAAC;AAEzC,QAAA,wBAAwB,GAAG,OAAO,CAAC;AACnC,QAAA,0CAA0C,GAAG,SAAS,CAAC;AAEvD,QAAA,gCAAgC,GAAG,QAAQ,CAAC;AAC5C,QAAA,+BAA+B,GAAG,QAAQ,CAAC;AAE3C,QAAA,sBAAsB,GAAG,QAAQ,CAAC;AAElC,QAAA,gCAAgC,GAAG,OAAO,CAAC;AAC3C,QAAA,qBAAqB,GAAG,QAAQ,CAAC;AAEjC,QAAA,mBAAmB,GAAG,QAAQ,CAAC"}
@@ -1,48 +0,0 @@
1
- THIS_DIR := $(call my-dir)
2
-
3
- include $(REACT_ANDROID_DIR)/Android-prebuilt.mk
4
-
5
- # If you wish to add a custom TurboModule or Fabric component in your app you
6
- # will have to include the following autogenerated makefile.
7
- # include $(GENERATED_SRC_DIR)/codegen/jni/Android.mk
8
- include $(CLEAR_VARS)
9
-
10
- LOCAL_PATH := $(THIS_DIR)
11
-
12
- # You can customize the name of your application .so file here.
13
- LOCAL_MODULE := <%= lowerCaseName %>_appmodules
14
-
15
- LOCAL_C_INCLUDES := $(LOCAL_PATH)
16
- LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
17
- LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
18
-
19
- # If you wish to add a custom TurboModule or Fabric component in your app you
20
- # will have to uncomment those lines to include the generated source
21
- # files from the codegen (placed in $(GENERATED_SRC_DIR)/codegen/jni)
22
- #
23
- # LOCAL_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
24
- # LOCAL_SRC_FILES += $(wildcard $(GENERATED_SRC_DIR)/codegen/jni/*.cpp)
25
- # LOCAL_EXPORT_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
26
-
27
- # Here you should add any native library you wish to depend on.
28
- LOCAL_SHARED_LIBRARIES := \
29
- libfabricjni \
30
- libfbjni \
31
- libfolly_runtime \
32
- libglog \
33
- libjsi \
34
- libreact_codegen_rncore \
35
- libreact_debug \
36
- libreact_nativemodule_core \
37
- libreact_render_componentregistry \
38
- libreact_render_core \
39
- libreact_render_debug \
40
- libreact_render_graphics \
41
- librrc_view \
42
- libruntimeexecutor \
43
- libturbomodulejsijni \
44
- libyoga
45
-
46
- LOCAL_CFLAGS := -DLOG_TAG=\"ReactNative\" -fexceptions -frtti -std=c++17 -Wall
47
-
48
- include $(BUILD_SHARED_LIBRARY)
@@ -1,10 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- <FileRef
5
- location = "group:<%= className %>.xcodeproj">
6
- </FileRef>
7
- <FileRef
8
- location = "group:Pods/Pods.xcodeproj">
9
- </FileRef>
10
- </Workspace>