@nrwl/react-native 16.0.0-beta.0 → 16.0.0-beta.2
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.
- package/executors.json +40 -40
- package/generators.json +2 -107
- package/index.d.ts +1 -5
- package/index.js +2 -11
- package/index.js.map +1 -1
- package/package.json +7 -25
- package/plugins/jest/svg-mock.js.map +1 -1
- package/plugins/with-nx-metro.d.ts +1 -8
- package/plugins/with-nx-metro.js +2 -29
- package/plugins/with-nx-metro.js.map +1 -1
- package/.eslintrc.json +0 -19
- package/README.md +0 -63
- package/migrations.json +0 -1285
- package/plugins/metro-resolver.d.ts +0 -1
- package/plugins/metro-resolver.js +0 -135
- package/plugins/metro-resolver.js.map +0 -1
- package/project.json +0 -61
- package/src/executors/build-android/build-android.impl.d.ts +0 -6
- package/src/executors/build-android/build-android.impl.js +0 -76
- package/src/executors/build-android/build-android.impl.js.map +0 -1
- package/src/executors/build-android/build-android.impl.ts +0 -108
- package/src/executors/build-android/compat.d.ts +0 -2
- package/src/executors/build-android/compat.js +0 -6
- package/src/executors/build-android/compat.js.map +0 -1
- package/src/executors/build-android/schema.d.ts +0 -31
- package/src/executors/build-android/schema.json +0 -102
- package/src/executors/build-ios/build-ios.impl.d.ts +0 -6
- package/src/executors/build-ios/build-ios.impl.js +0 -77
- package/src/executors/build-ios/build-ios.impl.js.map +0 -1
- package/src/executors/build-ios/build-ios.impl.ts +0 -118
- package/src/executors/build-ios/compat.d.ts +0 -2
- package/src/executors/build-ios/compat.js +0 -6
- package/src/executors/build-ios/compat.js.map +0 -1
- package/src/executors/build-ios/schema.d.ts +0 -22
- package/src/executors/build-ios/schema.json +0 -106
- package/src/executors/bundle/bundle.impl.d.ts +0 -6
- package/src/executors/bundle/bundle.impl.js +0 -58
- package/src/executors/bundle/bundle.impl.js.map +0 -1
- package/src/executors/bundle/bundle.impl.ts +0 -76
- package/src/executors/bundle/compat.d.ts +0 -2
- package/src/executors/bundle/compat.js +0 -6
- package/src/executors/bundle/compat.js.map +0 -1
- package/src/executors/bundle/schema.d.ts +0 -16
- package/src/executors/bundle/schema.json +0 -92
- package/src/executors/ensure-symlink/compat.d.ts +0 -2
- package/src/executors/ensure-symlink/compat.js +0 -6
- package/src/executors/ensure-symlink/compat.js.map +0 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts +0 -5
- package/src/executors/ensure-symlink/ensure-symlink.impl.js +0 -13
- package/src/executors/ensure-symlink/ensure-symlink.impl.js.map +0 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.ts +0 -18
- package/src/executors/ensure-symlink/schema.json +0 -11
- package/src/executors/pod-install/compat.d.ts +0 -2
- package/src/executors/pod-install/compat.js +0 -6
- package/src/executors/pod-install/compat.js.map +0 -1
- package/src/executors/pod-install/pod-install.impl.d.ts +0 -6
- package/src/executors/pod-install/pod-install.impl.js +0 -15
- package/src/executors/pod-install/pod-install.impl.js.map +0 -1
- package/src/executors/pod-install/pod-install.impl.ts +0 -21
- package/src/executors/pod-install/schema.d.ts +0 -3
- package/src/executors/pod-install/schema.json +0 -18
- package/src/executors/run-android/compat.d.ts +0 -2
- package/src/executors/run-android/compat.js +0 -6
- package/src/executors/run-android/compat.js.map +0 -1
- package/src/executors/run-android/run-android.impl.d.ts +0 -6
- package/src/executors/run-android/run-android.impl.js +0 -72
- package/src/executors/run-android/run-android.impl.js.map +0 -1
- package/src/executors/run-android/run-android.impl.ts +0 -110
- package/src/executors/run-android/schema.d.ts +0 -24
- package/src/executors/run-android/schema.json +0 -121
- package/src/executors/run-ios/compat.d.ts +0 -2
- package/src/executors/run-ios/compat.js +0 -6
- package/src/executors/run-ios/compat.js.map +0 -1
- package/src/executors/run-ios/run-ios.impl.d.ts +0 -6
- package/src/executors/run-ios/run-ios.impl.js +0 -78
- package/src/executors/run-ios/run-ios.impl.js.map +0 -1
- package/src/executors/run-ios/run-ios.impl.ts +0 -120
- package/src/executors/run-ios/schema.d.ts +0 -12
- package/src/executors/run-ios/schema.json +0 -119
- package/src/executors/start/compat.d.ts +0 -2
- package/src/executors/start/compat.js +0 -6
- package/src/executors/start/compat.js.map +0 -1
- package/src/executors/start/lib/is-packager-running.d.ts +0 -1
- package/src/executors/start/lib/is-packager-running.js +0 -19
- package/src/executors/start/lib/is-packager-running.js.map +0 -1
- package/src/executors/start/schema.d.ts +0 -7
- package/src/executors/start/schema.json +0 -28
- package/src/executors/start/start.impl.d.ts +0 -8
- package/src/executors/start/start.impl.js +0 -99
- package/src/executors/start/start.impl.js.map +0 -1
- package/src/executors/start/start.impl.ts +0 -120
- package/src/executors/storybook/compat.d.ts +0 -2
- package/src/executors/storybook/compat.js +0 -6
- package/src/executors/storybook/compat.js.map +0 -1
- package/src/executors/storybook/schema.d.ts +0 -7
- package/src/executors/storybook/schema.json +0 -34
- package/src/executors/storybook/storybook.impl.d.ts +0 -5
- package/src/executors/storybook/storybook.impl.js +0 -76
- package/src/executors/storybook/storybook.impl.js.map +0 -1
- package/src/executors/storybook/storybook.impl.ts +0 -105
- package/src/executors/sync-deps/compat.d.ts +0 -2
- package/src/executors/sync-deps/compat.js +0 -6
- package/src/executors/sync-deps/compat.js.map +0 -1
- package/src/executors/sync-deps/schema.d.ts +0 -4
- package/src/executors/sync-deps/schema.json +0 -28
- package/src/executors/sync-deps/sync-deps.impl.d.ts +0 -8
- package/src/executors/sync-deps/sync-deps.impl.js +0 -62
- package/src/executors/sync-deps/sync-deps.impl.js.map +0 -1
- package/src/executors/sync-deps/sync-deps.impl.ts +0 -101
- package/src/generators/application/application.d.ts +0 -5
- package/src/generators/application/application.js +0 -40
- package/src/generators/application/application.js.map +0 -1
- package/src/generators/application/application.spec.ts +0 -214
- package/src/generators/application/files/app/.ruby-version +0 -1
- package/src/generators/application/files/app/Gemfile.template +0 -6
- package/src/generators/application/files/app/android/app/build.gradle.template +0 -184
- package/src/generators/application/files/app/android/app/debug.keystore +0 -0
- package/src/generators/application/files/app/android/app/proguard-rules.pro +0 -10
- package/src/generators/application/files/app/android/app/src/androidTest/java/com/__lowerCaseName__/DetoxTest.java.template +0 -30
- package/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template +0 -14
- package/src/generators/application/files/app/android/app/src/debug/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +0 -75
- package/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template +0 -26
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.java.template +0 -35
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainApplication.java.template +0 -63
- package/src/generators/application/files/app/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/values/strings.xml.template +0 -3
- package/src/generators/application/files/app/android/app/src/main/res/values/styles.xml +0 -9
- package/src/generators/application/files/app/android/app/src/main/res/xml/network_security_config.xml +0 -7
- package/src/generators/application/files/app/android/app/src/release/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +0 -20
- package/src/generators/application/files/app/android/build.gradle.template +0 -34
- package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/src/generators/application/files/app/android/gradle.properties +0 -44
- package/src/generators/application/files/app/android/gradlew.bat +0 -89
- package/src/generators/application/files/app/android/gradlew.template +0 -234
- package/src/generators/application/files/app/android/settings.gradle.template +0 -7
- package/src/generators/application/files/app/app.json.template +0 -4
- package/src/generators/application/files/app/babel.config.json.template +0 -3
- package/src/generators/application/files/app/ios/.xcode.env.template +0 -12
- package/src/generators/application/files/app/ios/Podfile.template +0 -60
- package/src/generators/application/files/app/ios/__className__/AppDelegate.h +0 -6
- package/src/generators/application/files/app/ios/__className__/AppDelegate.mm.template +0 -36
- package/src/generators/application/files/app/ios/__className__/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/src/generators/application/files/app/ios/__className__/Images.xcassets/Contents.json +0 -6
- package/src/generators/application/files/app/ios/__className__/Info.plist.template +0 -55
- package/src/generators/application/files/app/ios/__className__/LaunchScreen.storyboard.template +0 -47
- package/src/generators/application/files/app/ios/__className__/main.m +0 -10
- package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +0 -702
- package/src/generators/application/files/app/ios/__className__.xcodeproj/xcshareddata/xcschemes/__className__.xcscheme.template +0 -88
- package/src/generators/application/files/app/ios/__className__.xcworkspace/contents.xcworkspacedata +0 -10
- package/src/generators/application/files/app/ios/__className__Tests/Info.plist +0 -24
- package/src/generators/application/files/app/ios/__className__Tests/__className__Tests.m +0 -66
- package/src/generators/application/files/app/metro.config.js.template +0 -38
- package/src/generators/application/files/app/package.json.template +0 -15
- package/src/generators/application/files/app/src/app/App.spec.tsx.template +0 -9
- package/src/generators/application/files/app/src/app/App.tsx.template +0 -694
- package/src/generators/application/files/app/src/main.tsx.template +0 -4
- package/src/generators/application/files/app/test-setup.ts.template +0 -1
- package/src/generators/application/files/app/tsconfig.app.json.template +0 -9
- package/src/generators/application/files/app/tsconfig.json.template +0 -25
- package/src/generators/application/lib/add-detox.d.ts +0 -3
- package/src/generators/application/lib/add-detox.js +0 -16
- package/src/generators/application/lib/add-detox.js.map +0 -1
- package/src/generators/application/lib/add-project.d.ts +0 -3
- package/src/generators/application/lib/add-project.js +0 -83
- package/src/generators/application/lib/add-project.js.map +0 -1
- package/src/generators/application/lib/create-application-files.d.ts +0 -3
- package/src/generators/application/lib/create-application-files.js +0 -20
- package/src/generators/application/lib/create-application-files.js.map +0 -1
- package/src/generators/application/lib/nomalize-options.spec.ts +0 -138
- package/src/generators/application/lib/normalize-options.d.ts +0 -13
- package/src/generators/application/lib/normalize-options.js +0 -36
- package/src/generators/application/lib/normalize-options.js.map +0 -1
- package/src/generators/application/schema.d.ts +0 -19
- package/src/generators/application/schema.json +0 -89
- package/src/generators/component/component.d.ts +0 -5
- package/src/generators/component/component.js +0 -53
- package/src/generators/component/component.js.map +0 -1
- package/src/generators/component/component.spec.ts +0 -135
- package/src/generators/component/files/__fileName__.spec.tsx__tmpl__ +0 -11
- package/src/generators/component/files/__fileName__.tsx__tmpl__ +0 -32
- package/src/generators/component/lib/add-import.d.ts +0 -3
- package/src/generators/component/lib/add-import.js +0 -34
- package/src/generators/component/lib/add-import.js.map +0 -1
- package/src/generators/component/lib/normalize-options.d.ts +0 -8
- package/src/generators/component/lib/normalize-options.js +0 -58
- package/src/generators/component/lib/normalize-options.js.map +0 -1
- package/src/generators/component/schema.d.ts +0 -14
- package/src/generators/component/schema.json +0 -78
- package/src/generators/component-story/component-story.d.ts +0 -8
- package/src/generators/component-story/component-story.js +0 -113
- package/src/generators/component-story/component-story.js.map +0 -1
- package/src/generators/component-story/component-story.spec.ts +0 -433
- package/src/generators/component-story/files/__componentFileName__.stories.__fileExt__ +0 -24
- package/src/generators/component-story/schema.d.ts +0 -5
- package/src/generators/component-story/schema.json +0 -34
- package/src/generators/init/init.d.ts +0 -6
- package/src/generators/init/init.js +0 -58
- package/src/generators/init/init.js.map +0 -1
- package/src/generators/init/init.spec.ts +0 -81
- package/src/generators/init/lib/add-git-ignore-entry.d.ts +0 -2
- package/src/generators/init/lib/add-git-ignore-entry.js +0 -25
- package/src/generators/init/lib/add-git-ignore-entry.js.map +0 -1
- package/src/generators/init/lib/gitignore-entries.d.ts +0 -1
- package/src/generators/init/lib/gitignore-entries.js +0 -75
- package/src/generators/init/lib/gitignore-entries.js.map +0 -1
- package/src/generators/init/schema.d.ts +0 -7
- package/src/generators/init/schema.json +0 -40
- package/src/generators/library/files/lib/README.md +0 -7
- package/src/generators/library/files/lib/babel.config.json.template +0 -17
- package/src/generators/library/files/lib/package.json__tmpl__ +0 -4
- package/src/generators/library/files/lib/src/index.ts__tmpl__ +0 -0
- package/src/generators/library/files/lib/test-setup.ts.template +0 -1
- package/src/generators/library/files/lib/tsconfig.json__tmpl__ +0 -16
- package/src/generators/library/files/lib/tsconfig.lib.json__tmpl__ +0 -9
- package/src/generators/library/lib/normalize-options.d.ts +0 -13
- package/src/generators/library/lib/normalize-options.js +0 -26
- package/src/generators/library/lib/normalize-options.js.map +0 -1
- package/src/generators/library/library.d.ts +0 -5
- package/src/generators/library/library.js +0 -101
- package/src/generators/library/library.js.map +0 -1
- package/src/generators/library/library.spec.ts +0 -397
- package/src/generators/library/schema.d.ts +0 -22
- package/src/generators/library/schema.json +0 -102
- package/src/generators/stories/schema.d.ts +0 -5
- package/src/generators/stories/schema.json +0 -42
- package/src/generators/stories/stories-app.spec.ts +0 -145
- package/src/generators/stories/stories-lib.spec.ts +0 -113
- package/src/generators/stories/stories.d.ts +0 -6
- package/src/generators/stories/stories.js +0 -63
- package/src/generators/stories/stories.js.map +0 -1
- package/src/generators/storybook-configuration/configuration.d.ts +0 -5
- package/src/generators/storybook-configuration/configuration.js +0 -60
- package/src/generators/storybook-configuration/configuration.js.map +0 -1
- package/src/generators/storybook-configuration/configuration.spec.ts +0 -146
- package/src/generators/storybook-configuration/files/app/storybook.ts.template +0 -9
- package/src/generators/storybook-configuration/files/app/toggle-storybook.tsx.template +0 -114
- package/src/generators/storybook-configuration/files/root/story-loader.js.template +0 -13
- package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.d.ts +0 -6
- package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.js +0 -26
- package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.js.map +0 -1
- package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.spec.ts +0 -161
- package/src/generators/storybook-configuration/lib/create-storybook-files.d.ts +0 -6
- package/src/generators/storybook-configuration/lib/create-storybook-files.js +0 -45
- package/src/generators/storybook-configuration/lib/create-storybook-files.js.map +0 -1
- package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.d.ts +0 -7
- package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.js +0 -30
- package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.js.map +0 -1
- package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.spec.ts +0 -65
- package/src/generators/storybook-configuration/schema.d.ts +0 -11
- package/src/generators/storybook-configuration/schema.json +0 -66
- package/src/generators/upgrade-native/lib/create-native-files.d.ts +0 -3
- package/src/generators/upgrade-native/lib/create-native-files.js +0 -15
- package/src/generators/upgrade-native/lib/create-native-files.js.map +0 -1
- package/src/generators/upgrade-native/lib/normalize-options.d.ts +0 -12
- package/src/generators/upgrade-native/lib/normalize-options.js +0 -28
- package/src/generators/upgrade-native/lib/normalize-options.js.map +0 -1
- package/src/generators/upgrade-native/schema.d.ts +0 -9
- package/src/generators/upgrade-native/schema.json +0 -41
- package/src/generators/upgrade-native/upgrade-native.d.ts +0 -9
- package/src/generators/upgrade-native/upgrade-native.js +0 -33
- package/src/generators/upgrade-native/upgrade-native.js.map +0 -1
- package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.d.ts +0 -8
- package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.js +0 -63
- package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.js.map +0 -1
- package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.spec.ts +0 -79
- package/src/migrations/update-12-5-0/update-jest-for-react-native.d.ts +0 -2
- package/src/migrations/update-12-5-0/update-jest-for-react-native.js +0 -62
- package/src/migrations/update-12-5-0/update-jest-for-react-native.js.map +0 -1
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.d.ts +0 -2
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.js +0 -22
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.js.map +0 -1
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.spec.ts +0 -48
- package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.d.ts +0 -6
- package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.js +0 -41
- package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.js.map +0 -1
- package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.spec.ts +0 -61
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.d.ts +0 -6
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js +0 -33
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js.map +0 -1
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.spec.ts +0 -192
- package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.d.ts +0 -5
- package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.js +0 -39
- package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.js.map +0 -1
- package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.spec.ts +0 -84
- package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.d.ts +0 -5
- package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.js +0 -42
- package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.js.map +0 -1
- package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.spec.ts +0 -48
- package/src/migrations/update-14-2-1/rename-blockList-metro-config.d.ts +0 -6
- package/src/migrations/update-14-2-1/rename-blockList-metro-config.js +0 -33
- package/src/migrations/update-14-2-1/rename-blockList-metro-config.js.map +0 -1
- package/src/migrations/update-14-2-1/rename-blockList-metro-config.spec.ts +0 -190
- package/src/migrations/update-14-5-5/add-exclude-sync-deps.d.ts +0 -5
- package/src/migrations/update-14-5-5/add-exclude-sync-deps.js +0 -26
- package/src/migrations/update-14-5-5/add-exclude-sync-deps.js.map +0 -1
- package/src/migrations/update-14-5-5/add-exclude-sync-deps.spec.ts +0 -39
- package/src/migrations/update-14-5-8/change-searchDir-storybook.d.ts +0 -5
- package/src/migrations/update-14-5-8/change-searchDir-storybook.js +0 -26
- package/src/migrations/update-14-5-8/change-searchDir-storybook.js.map +0 -1
- package/src/migrations/update-14-5-8/change-searchDir-storybook.spec.ts +0 -39
- package/src/migrations/update-14-6-0/remove-jest-transform.d.ts +0 -5
- package/src/migrations/update-14-6-0/remove-jest-transform.js +0 -58
- package/src/migrations/update-14-6-0/remove-jest-transform.js.map +0 -1
- package/src/migrations/update-14-6-0/remove-jest-transform.spec.ts +0 -109
- package/src/migrations/update-15-0-0/add-babel-inputs.d.ts +0 -2
- package/src/migrations/update-15-0-0/add-babel-inputs.js +0 -13
- package/src/migrations/update-15-0-0/add-babel-inputs.js.map +0 -1
- package/src/migrations/update-15-0-0/add-babel-inputs.spec.ts +0 -73
- package/src/migrations/update-15-9-1/add-build-ios-target.d.ts +0 -5
- package/src/migrations/update-15-9-1/add-build-ios-target.js +0 -34
- package/src/migrations/update-15-9-1/add-build-ios-target.js.map +0 -1
- package/src/migrations/update-15-9-1/add-build-ios-target.spec.ts +0 -36
- package/src/utils/add-jest.d.ts +0 -2
- package/src/utils/add-jest.js +0 -38
- package/src/utils/add-jest.js.map +0 -1
- package/src/utils/add-linting.d.ts +0 -12
- package/src/utils/add-linting.js +0 -41
- package/src/utils/add-linting.js.map +0 -1
- package/src/utils/add-linting.spec.ts +0 -42
- package/src/utils/chmod-android-gradle-files.d.ts +0 -3
- package/src/utils/chmod-android-gradle-files.js +0 -24
- package/src/utils/chmod-android-gradle-files.js.map +0 -1
- package/src/utils/ensure-node-modules-symlink.d.ts +0 -9
- package/src/utils/ensure-node-modules-symlink.js +0 -29
- package/src/utils/ensure-node-modules-symlink.js.map +0 -1
- package/src/utils/ensure-node-modules-symlink.spec.ts +0 -108
- package/src/utils/find-all-npm-dependencies.d.ts +0 -2
- package/src/utils/find-all-npm-dependencies.js +0 -26
- package/src/utils/find-all-npm-dependencies.js.map +0 -1
- package/src/utils/find-all-npm-dependencies.spec.ts +0 -95
- package/src/utils/format-file.d.ts +0 -1
- package/src/utils/format-file.js +0 -17
- package/src/utils/format-file.js.map +0 -1
- package/src/utils/get-cli-options.d.ts +0 -8
- package/src/utils/get-cli-options.js +0 -31
- package/src/utils/get-cli-options.js.map +0 -1
- package/src/utils/pod-install-task.d.ts +0 -8
- package/src/utils/pod-install-task.js +0 -62
- package/src/utils/pod-install-task.js.map +0 -1
- package/src/utils/symlink-task.d.ts +0 -2
- package/src/utils/symlink-task.js +0 -19
- package/src/utils/symlink-task.js.map +0 -1
- package/src/utils/testing-generators.d.ts +0 -3
- package/src/utils/testing-generators.js +0 -36
- package/src/utils/testing-generators.js.map +0 -1
- package/src/utils/versions.d.ts +0 -20
- package/src/utils/versions.js +0 -24
- package/src/utils/versions.js.map +0 -1
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
const executor_options_utils_1 = require("@nrwl/devkit/src/generators/executor-options-utils");
|
|
6
|
-
const jest_1 = require("@nrwl/jest");
|
|
7
|
-
const path_1 = require("path");
|
|
8
|
-
/**
|
|
9
|
-
* Remove transfrom and testRunner in jest
|
|
10
|
-
*/
|
|
11
|
-
function update(tree) {
|
|
12
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
|
-
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/jest:jest', (options, projectName) => {
|
|
14
|
-
if (options.jestConfig && tree.exists(options.jestConfig)) {
|
|
15
|
-
const jestConfig = tree.read(options.jestConfig, 'utf-8');
|
|
16
|
-
if (jestConfig.includes(`preset: 'react-native'`)) {
|
|
17
|
-
const project = (0, devkit_1.readProjectConfiguration)(tree, projectName);
|
|
18
|
-
removeTransform(tree, project);
|
|
19
|
-
renameBabelJson(tree, project);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
exports.default = update;
|
|
27
|
-
function removeTransform(host, project) {
|
|
28
|
-
var _a, _b, _c;
|
|
29
|
-
const jestConfigPath = (_c = (_b = (_a = project.targets) === null || _a === void 0 ? void 0 : _a.test) === null || _b === void 0 ? void 0 : _b.options) === null || _c === void 0 ? void 0 : _c.jestConfig;
|
|
30
|
-
if (!jestConfigPath || !host.exists(jestConfigPath))
|
|
31
|
-
return;
|
|
32
|
-
try {
|
|
33
|
-
(0, jest_1.removePropertyFromJestConfig)(host, jestConfigPath, 'transform');
|
|
34
|
-
(0, jest_1.removePropertyFromJestConfig)(host, jestConfigPath, 'testRunner');
|
|
35
|
-
}
|
|
36
|
-
catch (_d) {
|
|
37
|
-
devkit_1.logger.error((0, devkit_1.stripIndents) `Unable to update ${jestConfigPath} for project ${project.root}.`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function renameBabelJson(host, project) {
|
|
41
|
-
const babelrcPath = (0, path_1.join)(project.root, '.babelrc');
|
|
42
|
-
const babelJsonPath = (0, path_1.join)(project.root, 'babel.config.json');
|
|
43
|
-
if (!host.exists(babelrcPath)) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
try {
|
|
47
|
-
const buffer = host.read(babelrcPath);
|
|
48
|
-
if (!buffer) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
host.write(babelJsonPath, buffer);
|
|
52
|
-
host.delete(babelrcPath);
|
|
53
|
-
}
|
|
54
|
-
catch (_a) {
|
|
55
|
-
devkit_1.logger.error((0, devkit_1.stripIndents) `Unable to rename from ${babelrcPath} to ${babelJsonPath} for project ${project.root}.`);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=remove-jest-transform.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remove-jest-transform.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/migrations/update-14-6-0/remove-jest-transform.ts"],"names":[],"mappings":";;;AAAA,yCAOsB;AACtB,+FAA4F;AAC5F,qCAA0D;AAE1D,+BAA4B;AAE5B;;GAEG;AACH,SAA8B,MAAM,CAAC,IAAU;;QAC7C,IAAA,+CAAsB,EACpB,IAAI,EACJ,iBAAiB,EACjB,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE;YACvB,IAAI,OAAO,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;gBACzD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;gBAE1D,IAAI,UAAU,CAAC,QAAQ,CAAC,wBAAwB,CAAC,EAAE;oBACjD,MAAM,OAAO,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;oBAC5D,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;oBAC/B,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;iBAChC;aACF;QACH,CAAC,CACF,CAAC;QAEF,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AAlBD,yBAkBC;AAED,SAAS,eAAe,CAAC,IAAU,EAAE,OAA6B;;IAChE,MAAM,cAAc,GAAG,MAAA,MAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,IAAI,0CAAE,OAAO,0CAAE,UAAU,CAAC;IAClE,IAAI,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;QAAE,OAAO;IAC5D,IAAI;QACF,IAAA,mCAA4B,EAAC,IAAI,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;QAChE,IAAA,mCAA4B,EAAC,IAAI,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;KAClE;IAAC,WAAM;QACN,eAAM,CAAC,KAAK,CACV,IAAA,qBAAY,EAAA,oBAAoB,cAAc,gBAAgB,OAAO,CAAC,IAAI,GAAG,CAC9E,CAAC;KACH;AACH,CAAC;AAED,SAAS,eAAe,CAAC,IAAU,EAAE,OAA6B;IAChE,MAAM,WAAW,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACnD,MAAM,aAAa,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;IAC9D,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE;QAC7B,OAAO;KACR;IACD,IAAI;QACF,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACtC,IAAI,CAAC,MAAM,EAAE;YACX,OAAO;SACR;QACD,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;KAC1B;IAAC,WAAM;QACN,eAAM,CAAC,KAAK,CACV,IAAA,qBAAY,EAAA,yBAAyB,WAAW,OAAO,aAAa,gBAAgB,OAAO,CAAC,IAAI,GAAG,CACpG,CAAC;KACH;AACH,CAAC"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { addProjectConfiguration, readJson, Tree } from '@nrwl/devkit';
|
|
2
|
-
import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
|
|
3
|
-
import update from './remove-jest-transform';
|
|
4
|
-
|
|
5
|
-
describe('Rename jest preprocessor', () => {
|
|
6
|
-
let tree: Tree;
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
|
|
10
|
-
addProjectConfiguration(tree, 'products', {
|
|
11
|
-
root: 'apps/products',
|
|
12
|
-
sourceRoot: 'apps/products/src',
|
|
13
|
-
targets: {
|
|
14
|
-
start: {
|
|
15
|
-
executor: '@nrwl/react-native:start',
|
|
16
|
-
options: {
|
|
17
|
-
port: 8081,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
test: {
|
|
21
|
-
executor: '@nrwl/jest:jest',
|
|
22
|
-
options: {
|
|
23
|
-
jestConfig: 'apps/products/jest.config.ts',
|
|
24
|
-
passWithNoTests: true,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it(`should not remove transfrom if the code does not contain existing preprocessor`, async () => {
|
|
32
|
-
tree.write(
|
|
33
|
-
'apps/products/jest.config.ts',
|
|
34
|
-
`module.exports = {
|
|
35
|
-
preset: 'react-native',
|
|
36
|
-
};`
|
|
37
|
-
);
|
|
38
|
-
await update(tree);
|
|
39
|
-
|
|
40
|
-
const jestConfig = tree.read('apps/products/jest.config.ts', 'utf-8');
|
|
41
|
-
expect(jestConfig).not.toContain(`transform`);
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
it(`should remove transform if the code contains existing preprocessor`, async () => {
|
|
45
|
-
tree.write(
|
|
46
|
-
'apps/products/jest.config.ts',
|
|
47
|
-
`module.exports = {
|
|
48
|
-
preset: 'react-native',
|
|
49
|
-
testRunner: 'jest-jasmine2',
|
|
50
|
-
transform: {
|
|
51
|
-
'\\.(js|ts|tsx)$': require.resolve('react-native/jest/preprocessor.js'),
|
|
52
|
-
'^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$': require.resolve(
|
|
53
|
-
'react-native/jest/assetFileTransformer.js'
|
|
54
|
-
),
|
|
55
|
-
}
|
|
56
|
-
};`
|
|
57
|
-
);
|
|
58
|
-
await update(tree);
|
|
59
|
-
|
|
60
|
-
const jestConfig = tree.read('apps/products/jest.config.ts', 'utf-8');
|
|
61
|
-
expect(jestConfig).not.toContain('transfrom: {');
|
|
62
|
-
expect(jestConfig).not.toContain(`testRunner: 'jest-jasmine2',`);
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it(`should rename .babelrc to babel.config.json`, async () => {
|
|
66
|
-
tree.write(
|
|
67
|
-
'apps/products/jest.config.ts',
|
|
68
|
-
`module.exports = {
|
|
69
|
-
preset: 'react-native',
|
|
70
|
-
};`
|
|
71
|
-
);
|
|
72
|
-
tree.write(
|
|
73
|
-
'apps/products/.babelrc',
|
|
74
|
-
`{
|
|
75
|
-
"presets": ["module:metro-react-native-babel-preset"]
|
|
76
|
-
}`
|
|
77
|
-
);
|
|
78
|
-
await update(tree);
|
|
79
|
-
|
|
80
|
-
expect(tree.exists('apps/products/.babelrc')).toBeFalsy();
|
|
81
|
-
expect(tree.exists('apps/products/babel.config.json')).toBeTruthy();
|
|
82
|
-
const babelConfigJson = tree.read(
|
|
83
|
-
'apps/products/babel.config.json',
|
|
84
|
-
'utf-8'
|
|
85
|
-
);
|
|
86
|
-
expect(babelConfigJson).toContain(
|
|
87
|
-
`"presets": ["module:metro-react-native-babel-preset"]`
|
|
88
|
-
);
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it(`should not rename .babelrc to babel.config.json if app is not react native`, async () => {
|
|
92
|
-
tree.write(
|
|
93
|
-
'apps/products/jest.config.ts',
|
|
94
|
-
`module.exports = {
|
|
95
|
-
preset: 'other',
|
|
96
|
-
};`
|
|
97
|
-
);
|
|
98
|
-
tree.write(
|
|
99
|
-
'apps/products/.babelrc',
|
|
100
|
-
`{
|
|
101
|
-
"presets": ["module:metro-react-native-babel-preset"]
|
|
102
|
-
}`
|
|
103
|
-
);
|
|
104
|
-
await update(tree);
|
|
105
|
-
|
|
106
|
-
expect(tree.exists('apps/products/.babelrc')).toBeTruthy();
|
|
107
|
-
expect(tree.exists('apps/products/babel.config.json')).toBeFalsy();
|
|
108
|
-
});
|
|
109
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
const add_babel_inputs_1 = require("@nrwl/js/src/utils/add-babel-inputs");
|
|
6
|
-
function default_1(tree) {
|
|
7
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
-
(0, add_babel_inputs_1.addBabelInputs)(tree);
|
|
9
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
exports.default = default_1;
|
|
13
|
-
//# sourceMappingURL=add-babel-inputs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-babel-inputs.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/migrations/update-15-0-0/add-babel-inputs.ts"],"names":[],"mappings":";;;AAAA,yCAAiD;AACjD,0EAAqE;AAErE,mBAA+B,IAAU;;QACvC,IAAA,iCAAc,EAAC,IAAI,CAAC,CAAC;QACrB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AAHD,4BAGC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
|
|
2
|
-
import { Tree, readNxJson, updateNxJson } from '@nrwl/devkit';
|
|
3
|
-
import addBabelInputs from './add-babel-inputs';
|
|
4
|
-
|
|
5
|
-
describe('15.0.0 migration (add-babel-inputs)', () => {
|
|
6
|
-
let tree: Tree;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it('should add babel.config.json to sharedGlobals', async () => {
|
|
13
|
-
updateNxJson(tree, {
|
|
14
|
-
namedInputs: {
|
|
15
|
-
default: ['{projectRoot}/**/*', 'sharedGlobals'],
|
|
16
|
-
sharedGlobals: [],
|
|
17
|
-
production: ['default'],
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
tree.write('babel.config.json', '');
|
|
21
|
-
|
|
22
|
-
await addBabelInputs(tree);
|
|
23
|
-
|
|
24
|
-
const updated = readNxJson(tree);
|
|
25
|
-
expect(updated).toMatchInlineSnapshot(`
|
|
26
|
-
Object {
|
|
27
|
-
"namedInputs": Object {
|
|
28
|
-
"default": Array [
|
|
29
|
-
"{projectRoot}/**/*",
|
|
30
|
-
"sharedGlobals",
|
|
31
|
-
],
|
|
32
|
-
"production": Array [
|
|
33
|
-
"default",
|
|
34
|
-
],
|
|
35
|
-
"sharedGlobals": Array [
|
|
36
|
-
"{workspaceRoot}/babel.config.json",
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
}
|
|
40
|
-
`);
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it('should add babel.config.js', async () => {
|
|
44
|
-
updateNxJson(tree, {
|
|
45
|
-
namedInputs: {
|
|
46
|
-
default: ['{projectRoot}/**/*', 'sharedGlobals'],
|
|
47
|
-
sharedGlobals: [],
|
|
48
|
-
production: ['default'],
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
tree.write('babel.config.js', '');
|
|
52
|
-
|
|
53
|
-
await addBabelInputs(tree);
|
|
54
|
-
|
|
55
|
-
const updated = readNxJson(tree);
|
|
56
|
-
expect(updated).toMatchInlineSnapshot(`
|
|
57
|
-
Object {
|
|
58
|
-
"namedInputs": Object {
|
|
59
|
-
"default": Array [
|
|
60
|
-
"{projectRoot}/**/*",
|
|
61
|
-
"sharedGlobals",
|
|
62
|
-
],
|
|
63
|
-
"production": Array [
|
|
64
|
-
"default",
|
|
65
|
-
],
|
|
66
|
-
"sharedGlobals": Array [
|
|
67
|
-
"{workspaceRoot}/babel.config.js",
|
|
68
|
-
],
|
|
69
|
-
},
|
|
70
|
-
}
|
|
71
|
-
`);
|
|
72
|
-
});
|
|
73
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
/**
|
|
6
|
-
* Add build-ios target for react-native
|
|
7
|
-
*/
|
|
8
|
-
function update(tree) {
|
|
9
|
-
var _a, _b;
|
|
10
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
|
-
const projects = (0, devkit_1.getProjects)(tree);
|
|
12
|
-
for (const [name, config] of projects.entries()) {
|
|
13
|
-
if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a['start']) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/react-native:start') {
|
|
14
|
-
if (!config.targets['build-ios']) {
|
|
15
|
-
config.targets['build-ios'] = {
|
|
16
|
-
executor: '@nrwl/react-native:build-ios',
|
|
17
|
-
outputs: ['{projectRoot}/ios/build/Build'],
|
|
18
|
-
options: {},
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
if (!config.targets['pod-install']) {
|
|
22
|
-
config.targets['pod-install'] = {
|
|
23
|
-
executor: '@nrwl/react-native:pod-install',
|
|
24
|
-
options: {},
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
29
|
-
}
|
|
30
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
exports.default = update;
|
|
34
|
-
//# sourceMappingURL=add-build-ios-target.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-build-ios-target.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/migrations/update-15-9-1/add-build-ios-target.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;AAEtB;;GAEG;AACH,SAA8B,MAAM,CAAC,IAAU;;;QAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC/C,IAAI,CAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAG,OAAO,CAAC,0CAAE,QAAQ,MAAK,0BAA0B,EAAE;gBACtE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;oBAChC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG;wBAC5B,QAAQ,EAAE,8BAA8B;wBACxC,OAAO,EAAE,CAAC,+BAA+B,CAAC;wBAC1C,OAAO,EAAE,EAAE;qBACZ,CAAC;iBACH;gBACD,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;oBAClC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG;wBAC9B,QAAQ,EAAE,gCAAgC;wBAC1C,OAAO,EAAE,EAAE;qBACZ,CAAC;iBACH;aACF;YAED,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;SAChD;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AAxBD,yBAwBC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { addProjectConfiguration, getProjects, Tree } from '@nrwl/devkit';
|
|
2
|
-
import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
|
|
3
|
-
import update from './add-build-ios-target';
|
|
4
|
-
|
|
5
|
-
describe('add-build-ios-target', () => {
|
|
6
|
-
let tree: Tree;
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
|
|
10
|
-
addProjectConfiguration(tree, 'product', {
|
|
11
|
-
root: 'apps/product',
|
|
12
|
-
sourceRoot: 'apps/product/src',
|
|
13
|
-
targets: {
|
|
14
|
-
start: {
|
|
15
|
-
executor: '@nrwl/react-native:start',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it(`should update project.json with target build-ios and pod-install`, async () => {
|
|
22
|
-
await update(tree);
|
|
23
|
-
|
|
24
|
-
getProjects(tree).forEach((project) => {
|
|
25
|
-
expect(project.targets['build-ios']).toEqual({
|
|
26
|
-
executor: '@nrwl/react-native:build-ios',
|
|
27
|
-
outputs: ['{projectRoot}/ios/build/Build'],
|
|
28
|
-
options: {},
|
|
29
|
-
});
|
|
30
|
-
expect(project.targets['pod-install']).toEqual({
|
|
31
|
-
executor: '@nrwl/react-native:pod-install',
|
|
32
|
-
options: {},
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
});
|
package/src/utils/add-jest.d.ts
DELETED
package/src/utils/add-jest.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addJest = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jest_1 = require("@nrwl/jest");
|
|
6
|
-
function addJest(host, unitTestRunner, projectName, appProjectRoot, js, skipPackageJson) {
|
|
7
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
-
if (unitTestRunner !== 'jest') {
|
|
9
|
-
return () => { };
|
|
10
|
-
}
|
|
11
|
-
const jestTask = yield (0, jest_1.jestProjectGenerator)(host, {
|
|
12
|
-
js,
|
|
13
|
-
project: projectName,
|
|
14
|
-
supportTsx: true,
|
|
15
|
-
skipSerializers: true,
|
|
16
|
-
setupFile: 'none',
|
|
17
|
-
compiler: 'babel',
|
|
18
|
-
skipPackageJson,
|
|
19
|
-
skipFormat: true,
|
|
20
|
-
});
|
|
21
|
-
// overwrite the jest.config.ts file because react native needs to have special transform property
|
|
22
|
-
const configPath = `${appProjectRoot}/jest.config.${js ? 'js' : 'ts'}`;
|
|
23
|
-
const content = `module.exports = {
|
|
24
|
-
displayName: '${projectName}',
|
|
25
|
-
preset: 'react-native',
|
|
26
|
-
resolver: '@nrwl/jest/plugins/resolver',
|
|
27
|
-
moduleFileExtensions: ['ts', 'js', 'html', 'tsx', 'jsx'],
|
|
28
|
-
setupFilesAfterEnv: ['<rootDir>/test-setup.${js ? 'js' : 'ts'}'],
|
|
29
|
-
moduleNameMapper: {
|
|
30
|
-
'\\\\.svg$': '@nrwl/react-native/plugins/jest/svg-mock'
|
|
31
|
-
}
|
|
32
|
-
};`;
|
|
33
|
-
host.write(configPath, content);
|
|
34
|
-
return jestTask;
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
exports.addJest = addJest;
|
|
38
|
-
//# sourceMappingURL=add-jest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-jest.js","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/add-jest.ts"],"names":[],"mappings":";;;;AACA,qCAAkD;AAElD,SAAsB,OAAO,CAC3B,IAAU,EACV,cAA+B,EAC/B,WAAmB,EACnB,cAAsB,EACtB,EAAW,EACX,eAAwB;;QAExB,IAAI,cAAc,KAAK,MAAM,EAAE;YAC7B,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;SACjB;QAED,MAAM,QAAQ,GAAG,MAAM,IAAA,2BAAoB,EAAC,IAAI,EAAE;YAChD,EAAE;YACF,OAAO,EAAE,WAAW;YACpB,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,IAAI;YACrB,SAAS,EAAE,MAAM;YACjB,QAAQ,EAAE,OAAO;YACjB,eAAe;YACf,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;QAEH,kGAAkG;QAClG,MAAM,UAAU,GAAG,GAAG,cAAc,gBAAgB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACvE,MAAM,OAAO,GAAG;kBACA,WAAW;;;;+CAIkB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;;;;GAI5D,CAAC;QACF,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAEhC,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA;AAtCD,0BAsCC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Linter } from '@nrwl/linter';
|
|
2
|
-
import { GeneratorCallback, Tree } from '@nrwl/devkit';
|
|
3
|
-
interface NormalizedSchema {
|
|
4
|
-
linter?: Linter;
|
|
5
|
-
projectName: string;
|
|
6
|
-
projectRoot: string;
|
|
7
|
-
setParserOptionsProject?: boolean;
|
|
8
|
-
tsConfigPaths: string[];
|
|
9
|
-
skipPackageJson?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare function addLinting(host: Tree, options: NormalizedSchema): Promise<GeneratorCallback>;
|
|
12
|
-
export {};
|
package/src/utils/add-linting.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addLinting = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const linter_1 = require("@nrwl/linter");
|
|
6
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
7
|
-
const lint_1 = require("@nrwl/react/src/utils/lint");
|
|
8
|
-
function addLinting(host, options) {
|
|
9
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
|
-
if (options.linter === linter_1.Linter.None) {
|
|
11
|
-
return () => { };
|
|
12
|
-
}
|
|
13
|
-
const tasks = [];
|
|
14
|
-
const lintTask = yield (0, linter_1.lintProjectGenerator)(host, {
|
|
15
|
-
linter: options.linter,
|
|
16
|
-
project: options.projectName,
|
|
17
|
-
tsConfigPaths: options.tsConfigPaths,
|
|
18
|
-
eslintFilePatterns: [`${options.projectRoot}/**/*.{ts,tsx,js,jsx}`],
|
|
19
|
-
skipFormat: true,
|
|
20
|
-
skipPackageJson: options.skipPackageJson,
|
|
21
|
-
});
|
|
22
|
-
tasks.push(lintTask);
|
|
23
|
-
(0, devkit_1.updateJson)(host, (0, devkit_1.joinPathFragments)(options.projectRoot, '.eslintrc.json'), (json) => {
|
|
24
|
-
json = (0, lint_1.extendReactEslintJson)(json);
|
|
25
|
-
json.ignorePatterns = [
|
|
26
|
-
...json.ignorePatterns,
|
|
27
|
-
'public',
|
|
28
|
-
'.cache',
|
|
29
|
-
'node_modules',
|
|
30
|
-
];
|
|
31
|
-
return json;
|
|
32
|
-
});
|
|
33
|
-
if (!options.skipPackageJson) {
|
|
34
|
-
const installTask = yield (0, devkit_1.addDependenciesToPackageJson)(host, lint_1.extraEslintDependencies.dependencies, lint_1.extraEslintDependencies.devDependencies);
|
|
35
|
-
tasks.push(installTask);
|
|
36
|
-
}
|
|
37
|
-
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
exports.addLinting = addLinting;
|
|
41
|
-
//# sourceMappingURL=add-linting.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-linting.js","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/add-linting.ts"],"names":[],"mappings":";;;;AAAA,yCAA4D;AAC5D,yCAOsB;AACtB,qDAGoC;AAYpC,SAAsB,UAAU,CAAC,IAAU,EAAE,OAAyB;;QACpE,IAAI,OAAO,CAAC,MAAM,KAAK,eAAM,CAAC,IAAI,EAAE;YAClC,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;SACjB;QACD,MAAM,KAAK,GAAwB,EAAE,CAAC;QAEtC,MAAM,QAAQ,GAAG,MAAM,IAAA,6BAAoB,EAAC,IAAI,EAAE;YAChD,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO,EAAE,OAAO,CAAC,WAAW;YAC5B,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,kBAAkB,EAAE,CAAC,GAAG,OAAO,CAAC,WAAW,uBAAuB,CAAC;YACnE,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,OAAO,CAAC,eAAe;SACzC,CAAC,CAAC;QAEH,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAErB,IAAA,mBAAU,EACR,IAAI,EACJ,IAAA,0BAAiB,EAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,EACxD,CAAC,IAAyB,EAAE,EAAE;YAC5B,IAAI,GAAG,IAAA,4BAAqB,EAAC,IAAI,CAAC,CAAC;YAEnC,IAAI,CAAC,cAAc,GAAG;gBACpB,GAAG,IAAI,CAAC,cAAc;gBACtB,QAAQ;gBACR,QAAQ;gBACR,cAAc;aACf,CAAC;YAEF,OAAO,IAAI,CAAC;QACd,CAAC,CACF,CAAC;QAEF,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE;YAC5B,MAAM,WAAW,GAAG,MAAM,IAAA,qCAA4B,EACpD,IAAI,EACJ,8BAAuB,CAAC,YAAY,EACpC,8BAAuB,CAAC,eAAe,CACxC,CAAC;YACF,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACzB;QAED,OAAO,IAAA,yBAAgB,EAAC,GAAG,KAAK,CAAC,CAAC;IACpC,CAAC;CAAA;AA5CD,gCA4CC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { readProjectConfiguration, Tree } from '@nrwl/devkit';
|
|
2
|
-
import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
|
|
3
|
-
import { Linter } from '@nrwl/linter';
|
|
4
|
-
import { libraryGenerator } from '@nrwl/workspace/src/generators/library/library';
|
|
5
|
-
import { addLinting } from './add-linting';
|
|
6
|
-
|
|
7
|
-
describe('Add Linting', () => {
|
|
8
|
-
let tree: Tree;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
|
|
12
|
-
await libraryGenerator(tree, {
|
|
13
|
-
name: 'my-lib',
|
|
14
|
-
linter: Linter.None,
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should add update configuration when eslint is passed', () => {
|
|
19
|
-
addLinting(tree, {
|
|
20
|
-
projectName: 'my-lib',
|
|
21
|
-
linter: Linter.EsLint,
|
|
22
|
-
tsConfigPaths: ['libs/my-lib/tsconfig.lib.json'],
|
|
23
|
-
projectRoot: 'libs/my-lib',
|
|
24
|
-
});
|
|
25
|
-
const project = readProjectConfiguration(tree, 'my-lib');
|
|
26
|
-
|
|
27
|
-
expect(project.targets.lint).toBeDefined();
|
|
28
|
-
expect(project.targets.lint.executor).toEqual('@nrwl/linter:eslint');
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it('should not add lint target when "none" is passed', async () => {
|
|
32
|
-
addLinting(tree, {
|
|
33
|
-
projectName: 'my-lib',
|
|
34
|
-
linter: Linter.None,
|
|
35
|
-
tsConfigPaths: ['libs/my-lib/tsconfig.lib.json'],
|
|
36
|
-
projectRoot: 'libs/my-lib',
|
|
37
|
-
});
|
|
38
|
-
const project = readProjectConfiguration(tree, 'my-lib');
|
|
39
|
-
|
|
40
|
-
expect(project.targets.lint).toBeUndefined();
|
|
41
|
-
});
|
|
42
|
-
});
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.chmodAndroidGradlewFilesTask = exports.chmodAndroidGradlewFiles = void 0;
|
|
4
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
const fs_1 = require("fs");
|
|
6
|
-
const path_1 = require("path");
|
|
7
|
-
function chmodAndroidGradlewFiles(androidFolder) {
|
|
8
|
-
(0, fs_1.chmodSync)((0, path_1.join)(androidFolder, 'gradlew'), 0o775);
|
|
9
|
-
(0, fs_1.chmodSync)((0, path_1.join)(androidFolder, 'gradlew.bat'), 0o775);
|
|
10
|
-
}
|
|
11
|
-
exports.chmodAndroidGradlewFiles = chmodAndroidGradlewFiles;
|
|
12
|
-
function chmodAndroidGradlewFilesTask(androidFolder) {
|
|
13
|
-
return () => {
|
|
14
|
-
devkit_1.logger.info(`chmod android gradlew files under ${androidFolder}`);
|
|
15
|
-
try {
|
|
16
|
-
chmodAndroidGradlewFiles(androidFolder);
|
|
17
|
-
}
|
|
18
|
-
catch (_a) {
|
|
19
|
-
throw new Error(`chmod failed gradlew file under ${androidFolder}`);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
exports.chmodAndroidGradlewFilesTask = chmodAndroidGradlewFilesTask;
|
|
24
|
-
//# sourceMappingURL=chmod-android-gradle-files.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chmod-android-gradle-files.js","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/chmod-android-gradle-files.ts"],"names":[],"mappings":";;;AAAA,yCAAyD;AACzD,2BAA+B;AAC/B,+BAA4B;AAE5B,SAAgB,wBAAwB,CAAC,aAAqB;IAC5D,IAAA,cAAS,EAAC,IAAA,WAAI,EAAC,aAAa,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,CAAC;IACjD,IAAA,cAAS,EAAC,IAAA,WAAI,EAAC,aAAa,EAAE,aAAa,CAAC,EAAE,KAAK,CAAC,CAAC;AACvD,CAAC;AAHD,4DAGC;AAED,SAAgB,4BAA4B,CAC1C,aAAqB;IAErB,OAAO,GAAG,EAAE;QACV,eAAM,CAAC,IAAI,CAAC,qCAAqC,aAAa,EAAE,CAAC,CAAC;QAClE,IAAI;YACF,wBAAwB,CAAC,aAAa,CAAC,CAAC;SACzC;QAAC,WAAM;YACN,MAAM,IAAI,KAAK,CAAC,mCAAmC,aAAa,EAAE,CAAC,CAAC;SACrE;IACH,CAAC,CAAC;AACJ,CAAC;AAXD,oEAWC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This function symlink workspace node_modules folder with app project's node_mdules folder.
|
|
3
|
-
* For yarn and npm, it will symlink the entire node_modules folder.
|
|
4
|
-
* If app project's node_modules already exist, it will remove it first then symlink it.
|
|
5
|
-
* For pnpm, it will go through the package.json' dependencies and devDependencies, and also the required packages listed above.
|
|
6
|
-
* @param workspaceRoot path of the workspace root
|
|
7
|
-
* @param projectRoot path of app project root
|
|
8
|
-
*/
|
|
9
|
-
export declare function ensureNodeModulesSymlink(workspaceRoot: string, projectRoot: string): void;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ensureNodeModulesSymlink = void 0;
|
|
4
|
-
const path_1 = require("path");
|
|
5
|
-
const os_1 = require("os");
|
|
6
|
-
const fs_extra_1 = require("fs-extra");
|
|
7
|
-
/**
|
|
8
|
-
* This function symlink workspace node_modules folder with app project's node_mdules folder.
|
|
9
|
-
* For yarn and npm, it will symlink the entire node_modules folder.
|
|
10
|
-
* If app project's node_modules already exist, it will remove it first then symlink it.
|
|
11
|
-
* For pnpm, it will go through the package.json' dependencies and devDependencies, and also the required packages listed above.
|
|
12
|
-
* @param workspaceRoot path of the workspace root
|
|
13
|
-
* @param projectRoot path of app project root
|
|
14
|
-
*/
|
|
15
|
-
function ensureNodeModulesSymlink(workspaceRoot, projectRoot) {
|
|
16
|
-
const worksapceNodeModulesPath = (0, path_1.join)(workspaceRoot, 'node_modules');
|
|
17
|
-
if (!(0, fs_extra_1.existsSync)(worksapceNodeModulesPath)) {
|
|
18
|
-
throw new Error(`Cannot find ${worksapceNodeModulesPath}`);
|
|
19
|
-
}
|
|
20
|
-
const appNodeModulesPath = (0, path_1.join)(workspaceRoot, projectRoot, 'node_modules');
|
|
21
|
-
// `mklink /D` requires admin privilege in Windows so we need to use junction
|
|
22
|
-
const symlinkType = (0, os_1.platform)() === 'win32' ? 'junction' : 'dir';
|
|
23
|
-
if ((0, fs_extra_1.existsSync)(appNodeModulesPath)) {
|
|
24
|
-
(0, fs_extra_1.removeSync)(appNodeModulesPath);
|
|
25
|
-
}
|
|
26
|
-
(0, fs_extra_1.symlinkSync)(worksapceNodeModulesPath, appNodeModulesPath, symlinkType);
|
|
27
|
-
}
|
|
28
|
-
exports.ensureNodeModulesSymlink = ensureNodeModulesSymlink;
|
|
29
|
-
//# sourceMappingURL=ensure-node-modules-symlink.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ensure-node-modules-symlink.js","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/ensure-node-modules-symlink.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAC5B,2BAA8B;AAC9B,uCAA+D;AAE/D;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CACtC,aAAqB,EACrB,WAAmB;IAEnB,MAAM,wBAAwB,GAAG,IAAA,WAAI,EAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IACrE,IAAI,CAAC,IAAA,qBAAU,EAAC,wBAAwB,CAAC,EAAE;QACzC,MAAM,IAAI,KAAK,CAAC,eAAe,wBAAwB,EAAE,CAAC,CAAC;KAC5D;IAED,MAAM,kBAAkB,GAAG,IAAA,WAAI,EAAC,aAAa,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;IAC5E,6EAA6E;IAC7E,MAAM,WAAW,GAAG,IAAA,aAAQ,GAAE,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;IAEhE,IAAI,IAAA,qBAAU,EAAC,kBAAkB,CAAC,EAAE;QAClC,IAAA,qBAAU,EAAC,kBAAkB,CAAC,CAAC;KAChC;IACD,IAAA,sBAAW,EAAC,wBAAwB,EAAE,kBAAkB,EAAE,WAAW,CAAC,CAAC;AACzE,CAAC;AAjBD,4DAiBC"}
|