From a23dfd419dceaf070948903ae70ab2170dd18769 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Thu, 9 Jan 2020 02:27:33 +0100 Subject: [PATCH] chore: remove nohoist from example --- .github/workflows/main.yml | 2 - README.md | 5 +- example/App.tsx | 5 +- example/android/app/build.gradle | 10 +- example/android/build.gradle | 4 +- example/android/settings.gradle | 6 +- example/app.json | 10 +- example/e2e/.eslintrc.json | 10 + example/e2e/config.json | 8 +- example/e2e/init.js | 5 +- example/index.js | 4 +- example/ios/Podfile | 62 ++--- example/ios/Podfile.lock | 220 +++++++++--------- .../project.pbxproj | 2 +- example/metro.config.js | 11 +- example/package.json | 36 +-- example/webpack.config.js | 2 +- package.json | 23 ++ 18 files changed, 214 insertions(+), 211 deletions(-) create mode 100644 example/e2e/.eslintrc.json diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8500adc9..915e6bdb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,10 +61,8 @@ jobs: - name: Build Detox if: steps.detox-cache.outputs.cache-hit != 'true' run: | - cd example detox build --configuration ios.sim.release - name: Run Detox tests run: | - cd example detox test --configuration ios.sim.release --cleanup --debug-synchronization 200 diff --git a/README.md b/README.md index 26adfb8c..c2922fdc 100644 --- a/README.md +++ b/README.md @@ -41,12 +41,12 @@ Remember to add tests for your change if possible. Run the unit tests by: yarn test ``` -Running Detox (on iOS) requires the following: +Running the e2e tests with Detox (on iOS) requires the following: - Mac with macOS (at least macOS High Sierra 10.13.6) - Xcode 10.1+ with Xcode command line tools -To run the integration tests, first you need to install `applesimutils` and `detox-cli`: +First you need to install `applesimutils` and `detox-cli`: ```sh brew tap wix/brew @@ -57,7 +57,6 @@ yarn global add detox-cli Then you can build and run the tests: ```sh -cd example detox build -c ios.sim.debug detox test -c ios.sim.debug ``` diff --git a/example/App.tsx b/example/App.tsx index b72d96b0..32dc5363 100644 --- a/example/App.tsx +++ b/example/App.tsx @@ -1,3 +1,6 @@ import 'react-native-gesture-handler'; +import { registerRootComponent } from 'expo'; -export { default } from './src/index'; +import App from './src/index'; + +registerRootComponent(App); diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index a02b627c..2d20b0a8 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -80,8 +80,8 @@ project.ext.react = [ enableHermes: false, // clean and rebuild if changing ] -apply from: '../../node_modules/react-native-unimodules/gradle.groovy' -apply from: "../../node_modules/react-native/react.gradle" +apply from: '../../../node_modules/react-native-unimodules/gradle.groovy' +apply from: "../../../node_modules/react-native/react.gradle" /** * Set this to true to create two separate APKs instead of one: @@ -179,10 +179,10 @@ android { dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "com.facebook.react:react-native:+" // From node_modules - addUnimodulesDependencies() + addUnimodulesDependencies([ modulesPaths : ['../../../node_modules'] ]) if (enableHermes) { - def hermesPath = "../../node_modules/hermes-engine/android/"; + def hermesPath = "../../../node_modules/hermes-engine/android/"; debugImplementation files(hermesPath + "hermes-debug.aar") releaseImplementation files(hermesPath + "hermes-release.aar") } else { @@ -197,4 +197,4 @@ task copyDownloadableDepsToLibs(type: Copy) { into 'libs' } -apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) +apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) diff --git a/example/android/build.gradle b/example/android/build.gradle index ac0aa818..cb82ed1d 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -24,11 +24,11 @@ allprojects { mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm - url("$rootDir/../node_modules/react-native/android") + url("$rootDir/../../node_modules/react-native/android") } maven { // Android JSC is installed from npm - url("$rootDir/../node_modules/jsc-android/dist") + url("$rootDir/../../node_modules/jsc-android/dist") } google() diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 882534d6..ae6dc976 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -1,7 +1,7 @@ -apply from: '../node_modules/react-native-unimodules/gradle.groovy' -includeUnimodulesProjects() +apply from: '../../node_modules/react-native-unimodules/gradle.groovy' +includeUnimodulesProjects([ modulesPaths : ['../../../node_modules'] ]) rootProject.name = 'ReactNavigationExample' -apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) +apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app' diff --git a/example/app.json b/example/app.json index a838e4e7..482ce348 100644 --- a/example/app.json +++ b/example/app.json @@ -1,7 +1,10 @@ { + "name": "ReactNavigationExample", + "displayName": "React Navigation Example", "expo": { "name": "@react-navigation/example", "slug": "react-navigation-example", + "description": "Demo app to showcase various functionality of React Navigation", "privacy": "public", "sdkVersion": "36.0.0", "platforms": [ @@ -25,9 +28,6 @@ "ios": { "supportsTablet": true }, - "entryPoint": "node_modules/expo/AppEntry.js", - "description": "Demo app to showcase various functionality of React Navigation" - }, - "displayName": "React Navigation Example", - "name": "ReactNavigationExample" + "entryPoint": "App.tsx" + } } diff --git a/example/e2e/.eslintrc.json b/example/e2e/.eslintrc.json new file mode 100644 index 00000000..7501f5d1 --- /dev/null +++ b/example/e2e/.eslintrc.json @@ -0,0 +1,10 @@ +{ + "settings": { + "import/core-modules": [ + "detox", + "detox/runners/jest/adapter", + "detox/runners/jest/specReporter" + ] + }, + "env": { "jest": true, "jasmine": true } +} diff --git a/example/e2e/config.json b/example/e2e/config.json index 3ff37ef8..523800e2 100644 --- a/example/e2e/config.json +++ b/example/e2e/config.json @@ -1,6 +1,6 @@ { - "setupFilesAfterEnv": ["./init.js"], - "testEnvironment": "node", - "reporters": ["detox/runners/jest/streamlineReporter"], - "verbose": true + "setupFilesAfterEnv": ["./init.js"], + "testEnvironment": "node", + "reporters": ["detox/runners/jest/streamlineReporter"], + "verbose": true } diff --git a/example/e2e/init.js b/example/e2e/init.js index 16b38790..30f02238 100644 --- a/example/e2e/init.js +++ b/example/e2e/init.js @@ -1,8 +1,7 @@ -/* eslint-disable import/no-commonjs, jest/no-jasmine-globals */ -/* eslint-env jest, jasmine */ +/* eslint-disable jest/no-jasmine-globals, import/no-commonjs */ const detox = require('detox'); -const config = require('../package.json').detox; +const config = require('../../package.json').detox; const adapter = require('detox/runners/jest/adapter'); const specReporter = require('detox/runners/jest/specReporter'); diff --git a/example/index.js b/example/index.js index 8d8ba34d..fd31cd16 100644 --- a/example/index.js +++ b/example/index.js @@ -1,6 +1,4 @@ import { AppRegistry } from 'react-native'; - -// Need to add extension or eslint confuses it with app.json -import App from './App.tsx'; +import App from './src/index.tsx'; AppRegistry.registerComponent('ReactNavigationExample', () => App); diff --git a/example/ios/Podfile b/example/ios/Podfile index aaea4cee..0287a023 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -1,40 +1,40 @@ platform :ios, '10.0' -require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' -require_relative '../node_modules/react-native-unimodules/cocoapods.rb' +require_relative '../../node_modules/@react-native-community/cli-platform-ios/native_modules' +require_relative '../../node_modules/react-native-unimodules/cocoapods.rb' target 'ReactNavigationExample' do # Pods for ReactNavigationExample - pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" - pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" - pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" - pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" - pod 'React', :path => '../node_modules/react-native/' - pod 'React-Core', :path => '../node_modules/react-native/' - pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' - pod 'React-Core/DevSupport', :path => '../node_modules/react-native/' - pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' - pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' - pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' - pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' - pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' - pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' - pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' - pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' - pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' - pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/' + pod 'FBLazyVector', :path => '../../node_modules/react-native/Libraries/FBLazyVector' + pod 'FBReactNativeSpec', :path => '../../node_modules/react-native/Libraries/FBReactNativeSpec' + pod 'RCTRequired', :path => '../../node_modules/react-native/Libraries/RCTRequired' + pod 'RCTTypeSafety', :path => '../../node_modules/react-native/Libraries/TypeSafety' + pod 'React', :path => '../../node_modules/react-native/' + pod 'React-Core', :path => '../../node_modules/react-native/' + pod 'React-CoreModules', :path => '../../node_modules/react-native/React/CoreModules' + pod 'React-Core/DevSupport', :path => '../../node_modules/react-native/' + pod 'React-RCTActionSheet', :path => '../../node_modules/react-native/Libraries/ActionSheetIOS' + pod 'React-RCTAnimation', :path => '../../node_modules/react-native/Libraries/NativeAnimation' + pod 'React-RCTBlob', :path => '../../node_modules/react-native/Libraries/Blob' + pod 'React-RCTImage', :path => '../../node_modules/react-native/Libraries/Image' + pod 'React-RCTLinking', :path => '../../node_modules/react-native/Libraries/LinkingIOS' + pod 'React-RCTNetwork', :path => '../../node_modules/react-native/Libraries/Network' + pod 'React-RCTSettings', :path => '../../node_modules/react-native/Libraries/Settings' + pod 'React-RCTText', :path => '../../node_modules/react-native/Libraries/Text' + pod 'React-RCTVibration', :path => '../../node_modules/react-native/Libraries/Vibration' + pod 'React-Core/RCTWebSocket', :path => '../../node_modules/react-native/' - pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' - pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' - pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' - pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' - pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon" - pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" - pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga' + pod 'React-cxxreact', :path => '../../node_modules/react-native/ReactCommon/cxxreact' + pod 'React-jsi', :path => '../../node_modules/react-native/ReactCommon/jsi' + pod 'React-jsiexecutor', :path => '../../node_modules/react-native/ReactCommon/jsiexecutor' + pod 'React-jsinspector', :path => '../../node_modules/react-native/ReactCommon/jsinspector' + pod 'ReactCommon/jscallinvoker', :path => '../../node_modules/react-native/ReactCommon' + pod 'ReactCommon/turbomodule/core', :path => '../../node_modules/react-native/ReactCommon' + pod 'Yoga', :path => '../../node_modules/react-native/ReactCommon/yoga' - pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' - pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' - pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' + pod 'DoubleConversion', :podspec => '../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' + pod 'glog', :podspec => '../../node_modules/react-native/third-party-podspecs/glog.podspec' + pod 'Folly', :podspec => '../../node_modules/react-native/third-party-podspecs/Folly.podspec' use_native_modules! - use_unimodules! + use_unimodules!({ modules_paths: ['../../node_modules'] }) end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 7995634c..fe378151 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -273,62 +273,62 @@ PODS: - Yoga (1.14.0) DEPENDENCIES: - - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - - EXAppLoaderProvider (from `../node_modules/expo-app-loader-provider/ios`) - - EXConstants (from `../node_modules/expo-constants/ios`) - - EXErrorRecovery (from `../node_modules/expo-error-recovery/ios`) - - EXFileSystem (from `../node_modules/expo-file-system/ios`) - - EXFont (from `../node_modules/expo-font/ios`) - - EXKeepAwake (from `../node_modules/expo-keep-awake/ios`) - - EXLinearGradient (from `../node_modules/expo-linear-gradient/ios`) - - EXLocation (from `../node_modules/expo-location/ios`) - - EXPermissions (from `../node_modules/expo-permissions/ios`) - - EXSQLite (from `../node_modules/expo-sqlite/ios`) - - EXWebBrowser (from `../node_modules/expo-web-browser/ios`) - - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) - - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) - - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) - - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) - - React (from `../node_modules/react-native/`) - - React-Core (from `../node_modules/react-native/`) - - React-Core/DevSupport (from `../node_modules/react-native/`) - - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) - - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) - - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) - - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) - - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) - - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) - - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) - - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) - - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) - - React-RCTText (from `../node_modules/react-native/Libraries/Text`) - - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - - ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`) - - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - - "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)" - - RNGestureHandler (from `../node_modules/react-native-gesture-handler`) - - RNReanimated (from `../node_modules/react-native-reanimated`) - - RNScreens (from `../node_modules/react-native-screens`) - - UMBarCodeScannerInterface (from `../node_modules/unimodules-barcode-scanner-interface/ios`) - - UMCameraInterface (from `../node_modules/unimodules-camera-interface/ios`) - - UMConstantsInterface (from `../node_modules/unimodules-constants-interface/ios`) - - "UMCore (from `../node_modules/@unimodules/core/ios`)" - - UMFaceDetectorInterface (from `../node_modules/unimodules-face-detector-interface/ios`) - - UMFileSystemInterface (from `../node_modules/unimodules-file-system-interface/ios`) - - UMFontInterface (from `../node_modules/unimodules-font-interface/ios`) - - UMImageLoaderInterface (from `../node_modules/unimodules-image-loader-interface/ios`) - - UMPermissionsInterface (from `../node_modules/unimodules-permissions-interface/ios`) - - "UMReactNativeAdapter (from `../node_modules/@unimodules/react-native-adapter/ios`)" - - UMSensorsInterface (from `../node_modules/unimodules-sensors-interface/ios`) - - UMTaskManagerInterface (from `../node_modules/unimodules-task-manager-interface/ios`) - - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) + - DoubleConversion (from `../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) + - EXAppLoaderProvider (from `../../node_modules/expo-app-loader-provider/ios`) + - EXConstants (from `../../node_modules/expo-constants/ios`) + - EXErrorRecovery (from `../../node_modules/expo-error-recovery/ios`) + - EXFileSystem (from `../../node_modules/expo-file-system/ios`) + - EXFont (from `../../node_modules/expo-font/ios`) + - EXKeepAwake (from `../../node_modules/expo-keep-awake/ios`) + - EXLinearGradient (from `../../node_modules/expo-linear-gradient/ios`) + - EXLocation (from `../../node_modules/expo-location/ios`) + - EXPermissions (from `../../node_modules/expo-permissions/ios`) + - EXSQLite (from `../../node_modules/expo-sqlite/ios`) + - EXWebBrowser (from `../../node_modules/expo-web-browser/ios`) + - FBLazyVector (from `../../node_modules/react-native/Libraries/FBLazyVector`) + - FBReactNativeSpec (from `../../node_modules/react-native/Libraries/FBReactNativeSpec`) + - Folly (from `../../node_modules/react-native/third-party-podspecs/Folly.podspec`) + - glog (from `../../node_modules/react-native/third-party-podspecs/glog.podspec`) + - RCTRequired (from `../../node_modules/react-native/Libraries/RCTRequired`) + - RCTTypeSafety (from `../../node_modules/react-native/Libraries/TypeSafety`) + - React (from `../../node_modules/react-native/`) + - React-Core (from `../../node_modules/react-native/`) + - React-Core/DevSupport (from `../../node_modules/react-native/`) + - React-Core/RCTWebSocket (from `../../node_modules/react-native/`) + - React-CoreModules (from `../../node_modules/react-native/React/CoreModules`) + - React-cxxreact (from `../../node_modules/react-native/ReactCommon/cxxreact`) + - React-jsi (from `../../node_modules/react-native/ReactCommon/jsi`) + - React-jsiexecutor (from `../../node_modules/react-native/ReactCommon/jsiexecutor`) + - React-jsinspector (from `../../node_modules/react-native/ReactCommon/jsinspector`) + - react-native-safe-area-context (from `../../node_modules/react-native-safe-area-context`) + - React-RCTActionSheet (from `../../node_modules/react-native/Libraries/ActionSheetIOS`) + - React-RCTAnimation (from `../../node_modules/react-native/Libraries/NativeAnimation`) + - React-RCTBlob (from `../../node_modules/react-native/Libraries/Blob`) + - React-RCTImage (from `../../node_modules/react-native/Libraries/Image`) + - React-RCTLinking (from `../../node_modules/react-native/Libraries/LinkingIOS`) + - React-RCTNetwork (from `../../node_modules/react-native/Libraries/Network`) + - React-RCTSettings (from `../../node_modules/react-native/Libraries/Settings`) + - React-RCTText (from `../../node_modules/react-native/Libraries/Text`) + - React-RCTVibration (from `../../node_modules/react-native/Libraries/Vibration`) + - ReactCommon/jscallinvoker (from `../../node_modules/react-native/ReactCommon`) + - ReactCommon/turbomodule/core (from `../../node_modules/react-native/ReactCommon`) + - "RNCMaskedView (from `../../node_modules/@react-native-community/masked-view`)" + - RNGestureHandler (from `../../node_modules/react-native-gesture-handler`) + - RNReanimated (from `../../node_modules/react-native-reanimated`) + - RNScreens (from `../../node_modules/react-native-screens`) + - UMBarCodeScannerInterface (from `../../node_modules/unimodules-barcode-scanner-interface/ios`) + - UMCameraInterface (from `../../node_modules/unimodules-camera-interface/ios`) + - UMConstantsInterface (from `../../node_modules/unimodules-constants-interface/ios`) + - "UMCore (from `../../node_modules/@unimodules/core/ios`)" + - UMFaceDetectorInterface (from `../../node_modules/unimodules-face-detector-interface/ios`) + - UMFileSystemInterface (from `../../node_modules/unimodules-file-system-interface/ios`) + - UMFontInterface (from `../../node_modules/unimodules-font-interface/ios`) + - UMImageLoaderInterface (from `../../node_modules/unimodules-image-loader-interface/ios`) + - UMPermissionsInterface (from `../../node_modules/unimodules-permissions-interface/ios`) + - "UMReactNativeAdapter (from `../../node_modules/@unimodules/react-native-adapter/ios`)" + - UMSensorsInterface (from `../../node_modules/unimodules-sensors-interface/ios`) + - UMTaskManagerInterface (from `../../node_modules/unimodules-task-manager-interface/ios`) + - Yoga (from `../../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: trunk: @@ -336,134 +336,134 @@ SPEC REPOS: EXTERNAL SOURCES: DoubleConversion: - :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" + :podspec: "../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" EXAppLoaderProvider: :path: !ruby/object:Pathname - path: "../node_modules/expo-app-loader-provider/ios" + path: "../../node_modules/expo-app-loader-provider/ios" EXConstants: :path: !ruby/object:Pathname - path: "../node_modules/expo-constants/ios" + path: "../../node_modules/expo-constants/ios" EXErrorRecovery: :path: !ruby/object:Pathname - path: "../node_modules/expo-error-recovery/ios" + path: "../../node_modules/expo-error-recovery/ios" EXFileSystem: :path: !ruby/object:Pathname - path: "../node_modules/expo-file-system/ios" + path: "../../node_modules/expo-file-system/ios" EXFont: :path: !ruby/object:Pathname - path: "../node_modules/expo-font/ios" + path: "../../node_modules/expo-font/ios" EXKeepAwake: :path: !ruby/object:Pathname - path: "../node_modules/expo-keep-awake/ios" + path: "../../node_modules/expo-keep-awake/ios" EXLinearGradient: :path: !ruby/object:Pathname - path: "../node_modules/expo-linear-gradient/ios" + path: "../../node_modules/expo-linear-gradient/ios" EXLocation: :path: !ruby/object:Pathname - path: "../node_modules/expo-location/ios" + path: "../../node_modules/expo-location/ios" EXPermissions: :path: !ruby/object:Pathname - path: "../node_modules/expo-permissions/ios" + path: "../../node_modules/expo-permissions/ios" EXSQLite: :path: !ruby/object:Pathname - path: "../node_modules/expo-sqlite/ios" + path: "../../node_modules/expo-sqlite/ios" EXWebBrowser: :path: !ruby/object:Pathname - path: "../node_modules/expo-web-browser/ios" + path: "../../node_modules/expo-web-browser/ios" FBLazyVector: - :path: "../node_modules/react-native/Libraries/FBLazyVector" + :path: "../../node_modules/react-native/Libraries/FBLazyVector" FBReactNativeSpec: - :path: "../node_modules/react-native/Libraries/FBReactNativeSpec" + :path: "../../node_modules/react-native/Libraries/FBReactNativeSpec" Folly: - :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec" + :podspec: "../../node_modules/react-native/third-party-podspecs/Folly.podspec" glog: - :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" + :podspec: "../../node_modules/react-native/third-party-podspecs/glog.podspec" RCTRequired: - :path: "../node_modules/react-native/Libraries/RCTRequired" + :path: "../../node_modules/react-native/Libraries/RCTRequired" RCTTypeSafety: - :path: "../node_modules/react-native/Libraries/TypeSafety" + :path: "../../node_modules/react-native/Libraries/TypeSafety" React: - :path: "../node_modules/react-native/" + :path: "../../node_modules/react-native/" React-Core: - :path: "../node_modules/react-native/" + :path: "../../node_modules/react-native/" React-CoreModules: - :path: "../node_modules/react-native/React/CoreModules" + :path: "../../node_modules/react-native/React/CoreModules" React-cxxreact: - :path: "../node_modules/react-native/ReactCommon/cxxreact" + :path: "../../node_modules/react-native/ReactCommon/cxxreact" React-jsi: - :path: "../node_modules/react-native/ReactCommon/jsi" + :path: "../../node_modules/react-native/ReactCommon/jsi" React-jsiexecutor: - :path: "../node_modules/react-native/ReactCommon/jsiexecutor" + :path: "../../node_modules/react-native/ReactCommon/jsiexecutor" React-jsinspector: - :path: "../node_modules/react-native/ReactCommon/jsinspector" + :path: "../../node_modules/react-native/ReactCommon/jsinspector" react-native-safe-area-context: - :path: "../node_modules/react-native-safe-area-context" + :path: "../../node_modules/react-native-safe-area-context" React-RCTActionSheet: - :path: "../node_modules/react-native/Libraries/ActionSheetIOS" + :path: "../../node_modules/react-native/Libraries/ActionSheetIOS" React-RCTAnimation: - :path: "../node_modules/react-native/Libraries/NativeAnimation" + :path: "../../node_modules/react-native/Libraries/NativeAnimation" React-RCTBlob: - :path: "../node_modules/react-native/Libraries/Blob" + :path: "../../node_modules/react-native/Libraries/Blob" React-RCTImage: - :path: "../node_modules/react-native/Libraries/Image" + :path: "../../node_modules/react-native/Libraries/Image" React-RCTLinking: - :path: "../node_modules/react-native/Libraries/LinkingIOS" + :path: "../../node_modules/react-native/Libraries/LinkingIOS" React-RCTNetwork: - :path: "../node_modules/react-native/Libraries/Network" + :path: "../../node_modules/react-native/Libraries/Network" React-RCTSettings: - :path: "../node_modules/react-native/Libraries/Settings" + :path: "../../node_modules/react-native/Libraries/Settings" React-RCTText: - :path: "../node_modules/react-native/Libraries/Text" + :path: "../../node_modules/react-native/Libraries/Text" React-RCTVibration: - :path: "../node_modules/react-native/Libraries/Vibration" + :path: "../../node_modules/react-native/Libraries/Vibration" ReactCommon: - :path: "../node_modules/react-native/ReactCommon" + :path: "../../node_modules/react-native/ReactCommon" RNCMaskedView: - :path: "../node_modules/@react-native-community/masked-view" + :path: "../../node_modules/@react-native-community/masked-view" RNGestureHandler: - :path: "../node_modules/react-native-gesture-handler" + :path: "../../node_modules/react-native-gesture-handler" RNReanimated: - :path: "../node_modules/react-native-reanimated" + :path: "../../node_modules/react-native-reanimated" RNScreens: - :path: "../node_modules/react-native-screens" + :path: "../../node_modules/react-native-screens" UMBarCodeScannerInterface: :path: !ruby/object:Pathname - path: "../node_modules/unimodules-barcode-scanner-interface/ios" + path: "../../node_modules/unimodules-barcode-scanner-interface/ios" UMCameraInterface: :path: !ruby/object:Pathname - path: "../node_modules/unimodules-camera-interface/ios" + path: "../../node_modules/unimodules-camera-interface/ios" UMConstantsInterface: :path: !ruby/object:Pathname - path: "../node_modules/unimodules-constants-interface/ios" + path: "../../node_modules/unimodules-constants-interface/ios" UMCore: :path: !ruby/object:Pathname - path: "../node_modules/@unimodules/core/ios" + path: "../../node_modules/@unimodules/core/ios" UMFaceDetectorInterface: :path: !ruby/object:Pathname - path: "../node_modules/unimodules-face-detector-interface/ios" + path: "../../node_modules/unimodules-face-detector-interface/ios" UMFileSystemInterface: :path: !ruby/object:Pathname - path: "../node_modules/unimodules-file-system-interface/ios" + path: "../../node_modules/unimodules-file-system-interface/ios" UMFontInterface: :path: !ruby/object:Pathname - path: "../node_modules/unimodules-font-interface/ios" + path: "../../node_modules/unimodules-font-interface/ios" UMImageLoaderInterface: :path: !ruby/object:Pathname - path: "../node_modules/unimodules-image-loader-interface/ios" + path: "../../node_modules/unimodules-image-loader-interface/ios" UMPermissionsInterface: :path: !ruby/object:Pathname - path: "../node_modules/unimodules-permissions-interface/ios" + path: "../../node_modules/unimodules-permissions-interface/ios" UMReactNativeAdapter: :path: !ruby/object:Pathname - path: "../node_modules/@unimodules/react-native-adapter/ios" + path: "../../node_modules/@unimodules/react-native-adapter/ios" UMSensorsInterface: :path: !ruby/object:Pathname - path: "../node_modules/unimodules-sensors-interface/ios" + path: "../../node_modules/unimodules-sensors-interface/ios" UMTaskManagerInterface: :path: !ruby/object:Pathname - path: "../node_modules/unimodules-task-manager-interface/ios" + path: "../../node_modules/unimodules-task-manager-interface/ios" Yoga: - :path: "../node_modules/react-native/ReactCommon/yoga" + :path: "../../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c @@ -521,6 +521,6 @@ SPEC CHECKSUMS: UMTaskManagerInterface: a98e37a576a5220bf43b8faf33cfdc129d2f441d Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b -PODFILE CHECKSUM: 18b58708b4bb9901516029103ee63c94d63edd9e +PODFILE CHECKSUM: c48a21ff513d3eadafa50f8797207ef2be75e234 COCOAPODS: 1.8.4 diff --git a/example/ios/ReactNavigationExample.xcodeproj/project.pbxproj b/example/ios/ReactNavigationExample.xcodeproj/project.pbxproj index 31fbd190..822b0e52 100644 --- a/example/ios/ReactNavigationExample.xcodeproj/project.pbxproj +++ b/example/ios/ReactNavigationExample.xcodeproj/project.pbxproj @@ -188,7 +188,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; + shellScript = "export NODE_BINARY=node\n../../node_modules/react-native/scripts/react-native-xcode.sh"; }; FC67D3D0567CD942E3DA69B7 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; diff --git a/example/metro.config.js b/example/metro.config.js index 208f98a8..59595341 100644 --- a/example/metro.config.js +++ b/example/metro.config.js @@ -43,13 +43,16 @@ module.exports = { resolver: { blacklistRE: blacklist( - [root, ...fs.readdirSync(packages).map(p => path.join(packages, p))].map( - it => new RegExp(`^${escape(path.join(it, 'node_modules'))}\\/.*$`) - ) + fs + .readdirSync(packages) + .map(p => path.join(packages, p)) + .map( + it => new RegExp(`^${escape(path.join(it, 'node_modules'))}\\/.*$`) + ) ), extraNodeModules: modules.reduce((acc, name) => { - acc[name] = path.join(__dirname, 'node_modules', name); + acc[name] = path.join(__dirname, '..', 'node_modules', name); return acc; }, {}), }, diff --git a/example/package.json b/example/package.json index 9a2e4106..175aced3 100644 --- a/example/package.json +++ b/example/package.json @@ -3,19 +3,12 @@ "description": "Demo app to showcase various functionality of React Navigation", "version": "5.0.0-alpha.23", "private": true, - "workspaces": { - "nohoist": [ - "*", - "*/**" - ] - }, "scripts": { "start": "expo start", "web": "expo start --web", - "react-native": "./node_modules/.bin/react-native", - "native": "./node_modules/.bin/react-native start", - "android": "./node_modules/.bin/react-native run-android", - "ios": "./node_modules/.bin/react-native run-ios" + "native": "react-native start", + "android": "react-native run-android", + "ios": "react-native run-ios" }, "dependencies": { "@expo/vector-icons": "^10.0.0", @@ -46,30 +39,7 @@ "@types/react": "^16.9.17", "@types/react-native": "^0.60.30", "babel-preset-expo": "^8.0.0", - "detox": "^15.0.0", "expo-cli": "^3.11.5", - "jest": "^24.9.0", "typescript": "^3.7.4" - }, - "detox": { - "test-runner": "jest", - "configurations": { - "ios.sim.debug": { - "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/ReactNavigationExample.app", - "build": "set -o pipefail; xcodebuild -workspace ios/ReactNavigationExample.xcworkspace -scheme ReactNavigationExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build", - "type": "ios.simulator", - "device": { - "type": "iPhone 11 Pro" - } - }, - "ios.sim.release": { - "binaryPath": "ios/build/Build/Products/Release-iphonesimulator/ReactNavigationExample.app", - "build": "export RCT_NO_LAUNCH_PACKAGER=true; set -o pipefail; xcodebuild -workspace ios/ReactNavigationExample.xcworkspace -scheme ReactNavigationExample -configuration Release -sdk iphonesimulator -derivedDataPath ios/build", - "type": "ios.simulator", - "device": { - "type": "iPhone 11 Pro" - } - } - } } } diff --git a/example/webpack.config.js b/example/webpack.config.js index 595365d7..41d2b71c 100644 --- a/example/webpack.config.js +++ b/example/webpack.config.js @@ -4,7 +4,7 @@ const createExpoWebpackConfigAsync = require('@expo/webpack-config'); // eslint-disable-next-line import/no-extraneous-dependencies const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); -const node_modules = path.resolve(__dirname, 'node_modules'); +const node_modules = path.resolve(__dirname, '..', 'node_modules'); const packages = path.resolve(__dirname, '..', 'packages'); module.exports = async function(env, argv) { diff --git a/package.json b/package.json index 878a19b5..c208509a 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "codecov": "^3.6.1", "commitlint": "^8.3.4", "core-js": "^3.6.2", + "detox": "^15.0.0", "eslint": "^6.8.0", "eslint-config-satya164": "^3.1.5", "husky": "^4.0.1", @@ -70,5 +71,27 @@ "useTabs": false, "singleQuote": true, "trailingComma": "es5" + }, + "detox": { + "test-runner": "jest", + "runner-config": "example/e2e/config.json", + "configurations": { + "ios.sim.debug": { + "binaryPath": "example/ios/build/Build/Products/Debug-iphonesimulator/ReactNavigationExample.app", + "build": "set -o pipefail; xcodebuild -workspace example/ios/ReactNavigationExample.xcworkspace -scheme ReactNavigationExample -configuration Debug -sdk iphonesimulator -derivedDataPath example/ios/build", + "type": "ios.simulator", + "device": { + "type": "iPhone 11 Pro" + } + }, + "ios.sim.release": { + "binaryPath": "example/ios/build/Build/Products/Release-iphonesimulator/ReactNavigationExample.app", + "build": "export RCT_NO_LAUNCH_PACKAGER=true; set -o pipefail; xcodebuild -workspace example/ios/ReactNavigationExample.xcworkspace -scheme ReactNavigationExample -configuration Release -sdk iphonesimulator -derivedDataPath example/ios/build", + "type": "ios.simulator", + "device": { + "type": "iPhone 11 Pro" + } + } + } } }