@nrwl/react-native 15.9.2 → 16.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 -134
- 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,39 +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 path_1 = require("path");
|
|
6
|
-
/**
|
|
7
|
-
* This function udpate the entry file option under bundle target for react native apps
|
|
8
|
-
*/
|
|
9
|
-
function update(tree) {
|
|
10
|
-
var _a, _b, _c, _d;
|
|
11
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
-
const projects = (0, devkit_1.getProjects)(tree);
|
|
13
|
-
const updateTargetEntryFile = (target, config) => {
|
|
14
|
-
var _a, _b, _c;
|
|
15
|
-
if (!((_c = (_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a[target]) === null || _b === void 0 ? void 0 : _b.options) === null || _c === void 0 ? void 0 : _c.entryFile)) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
if (tree.exists((0, path_1.join)(config.root, 'src/main.tsx'))) {
|
|
19
|
-
config.targets[target].options.entryFile = `src/main.tsx`;
|
|
20
|
-
}
|
|
21
|
-
if (tree.exists((0, path_1.join)(config.root, 'src/main.js'))) {
|
|
22
|
-
config.targets[target].options.entryFile = `src/main.js`;
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
for (const [name, config] of projects.entries()) {
|
|
26
|
-
if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a['bundle-ios']) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/react-native:bundle') {
|
|
27
|
-
updateTargetEntryFile('bundle-ios', config);
|
|
28
|
-
}
|
|
29
|
-
if (((_d = (_c = config.targets) === null || _c === void 0 ? void 0 : _c['bundle-android']) === null || _d === void 0 ? void 0 : _d.executor) ===
|
|
30
|
-
'@nrwl/react-native:bundle') {
|
|
31
|
-
updateTargetEntryFile('bundle-android', config);
|
|
32
|
-
}
|
|
33
|
-
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
34
|
-
}
|
|
35
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
exports.default = update;
|
|
39
|
-
//# sourceMappingURL=update-entry-file-bundle-14-0-0.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-entry-file-bundle-14-0-0.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;AACtB,+BAA4B;AAE5B;;GAEG;AACH,SAA8B,MAAM,CAAC,IAAU;;;QAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,MAAM,qBAAqB,GAAG,CAAC,MAAc,EAAE,MAAM,EAAE,EAAE;;YACvD,IAAI,CAAC,CAAA,MAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAG,MAAM,CAAC,0CAAE,OAAO,0CAAE,SAAS,CAAA,EAAE;gBACjD,OAAO;aACR;YACD,IAAI,IAAI,CAAC,MAAM,CAAC,IAAA,WAAI,EAAC,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,EAAE;gBAClD,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS,GAAG,cAAc,CAAC;aAC3D;YACD,IAAI,IAAI,CAAC,MAAM,CAAC,IAAA,WAAI,EAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,EAAE;gBACjD,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS,GAAG,aAAa,CAAC;aAC1D;QACH,CAAC,CAAC;QAEF,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC/C,IACE,CAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAG,YAAY,CAAC,0CAAE,QAAQ,MAAK,2BAA2B,EACxE;gBACA,qBAAqB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;aAC7C;YAED,IACE,CAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAG,gBAAgB,CAAC,0CAAE,QAAQ;gBAC5C,2BAA2B,EAC3B;gBACA,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;aACjD;YAED,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;SAChD;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AAjCD,yBAiCC"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { addProjectConfiguration, Tree, getProjects } from '@nrwl/devkit';
|
|
2
|
-
import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
|
|
3
|
-
|
|
4
|
-
import update from './update-entry-file-bundle-14-0-0';
|
|
5
|
-
|
|
6
|
-
describe('Update entryFile for bundle target for react native apps', () => {
|
|
7
|
-
let tree: Tree;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
|
|
11
|
-
addProjectConfiguration(tree, 'products', {
|
|
12
|
-
root: 'apps/products',
|
|
13
|
-
sourceRoot: 'apps/products/src',
|
|
14
|
-
targets: {
|
|
15
|
-
'bundle-ios': {
|
|
16
|
-
executor: '@nrwl/react-native:bundle',
|
|
17
|
-
options: {
|
|
18
|
-
entryFile: 'apps/mobile/src/main.tsx',
|
|
19
|
-
platform: 'ios',
|
|
20
|
-
bundleOutput: 'dist/apps/mobile/ios/main.jsbundle',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
'bundle-android': {
|
|
24
|
-
executor: '@nrwl/react-native:bundle',
|
|
25
|
-
options: {
|
|
26
|
-
entryFile: 'apps/mobile/src/main.tsx',
|
|
27
|
-
platform: 'android',
|
|
28
|
-
bundleOutput: 'dist/apps/mobile/android/main.jsbundle',
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it(`should update entryFile option`, async () => {
|
|
36
|
-
tree.write('apps/products/src/main.tsx', '');
|
|
37
|
-
|
|
38
|
-
await update(tree);
|
|
39
|
-
|
|
40
|
-
getProjects(tree).forEach((project) => {
|
|
41
|
-
expect(project.targets['bundle-ios']).toEqual({
|
|
42
|
-
executor: '@nrwl/react-native:bundle',
|
|
43
|
-
options: {
|
|
44
|
-
entryFile: 'src/main.tsx',
|
|
45
|
-
platform: 'ios',
|
|
46
|
-
bundleOutput: 'dist/apps/mobile/ios/main.jsbundle',
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
expect(project.targets['bundle-android']).toEqual({
|
|
51
|
-
executor: '@nrwl/react-native:bundle',
|
|
52
|
-
options: {
|
|
53
|
-
entryFile: 'src/main.tsx',
|
|
54
|
-
platform: 'android',
|
|
55
|
-
bundleOutput: 'dist/apps/mobile/android/main.jsbundle',
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
it(`should not update entryFile option if the file does not exist`, async () => {
|
|
62
|
-
await update(tree);
|
|
63
|
-
|
|
64
|
-
getProjects(tree).forEach((project) => {
|
|
65
|
-
expect(project.targets['bundle-ios']).toEqual({
|
|
66
|
-
executor: '@nrwl/react-native:bundle',
|
|
67
|
-
options: {
|
|
68
|
-
entryFile: 'apps/mobile/src/main.tsx',
|
|
69
|
-
platform: 'ios',
|
|
70
|
-
bundleOutput: 'dist/apps/mobile/ios/main.jsbundle',
|
|
71
|
-
},
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
expect(project.targets['bundle-android']).toEqual({
|
|
75
|
-
executor: '@nrwl/react-native:bundle',
|
|
76
|
-
options: {
|
|
77
|
-
entryFile: 'apps/mobile/src/main.tsx',
|
|
78
|
-
platform: 'android',
|
|
79
|
-
bundleOutput: 'dist/apps/mobile/android/main.jsbundle',
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
});
|
|
@@ -1,42 +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 path_1 = require("path");
|
|
6
|
-
/**
|
|
7
|
-
* This function changes "main" tag to project's className
|
|
8
|
-
*/
|
|
9
|
-
function update(tree) {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
-
const projects = (0, devkit_1.getProjects)(tree);
|
|
13
|
-
for (const [name, config] of projects.entries()) {
|
|
14
|
-
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')
|
|
15
|
-
continue;
|
|
16
|
-
let mailFilePath;
|
|
17
|
-
if (tree.exists((0, path_1.join)(config.root, 'src/main.tsx'))) {
|
|
18
|
-
mailFilePath = (0, path_1.join)(config.root, 'src/main.tsx');
|
|
19
|
-
}
|
|
20
|
-
if (tree.exists((0, path_1.join)(config.root, 'src/main.js'))) {
|
|
21
|
-
mailFilePath = (0, path_1.join)(config.root, 'src/main.js');
|
|
22
|
-
}
|
|
23
|
-
if (!mailFilePath) {
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
try {
|
|
27
|
-
const { className } = (0, devkit_1.names)(name);
|
|
28
|
-
const content = tree.read(mailFilePath, 'utf-8');
|
|
29
|
-
if (!content.includes(`'main'`)) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
tree.write(mailFilePath, content.replace(`'main'`, `'${className}'`));
|
|
33
|
-
}
|
|
34
|
-
catch (_c) {
|
|
35
|
-
devkit_1.logger.error((0, devkit_1.stripIndents) `Unable to update ${mailFilePath} for project ${name}.`);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
exports.default = update;
|
|
42
|
-
//# sourceMappingURL=change-main-to-class-name-14-0-2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"change-main-to-class-name-14-0-2.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.ts"],"names":[],"mappings":";;;AAAA,yCAOsB;AACtB,+BAA4B;AAE5B;;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,0CAAE,KAAK,0CAAE,QAAQ,MAAK,0BAA0B;gBAChE,SAAS;YACX,IAAI,YAAY,CAAC;YACjB,IAAI,IAAI,CAAC,MAAM,CAAC,IAAA,WAAI,EAAC,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,EAAE;gBAClD,YAAY,GAAG,IAAA,WAAI,EAAC,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;aAClD;YACD,IAAI,IAAI,CAAC,MAAM,CAAC,IAAA,WAAI,EAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,EAAE;gBACjD,YAAY,GAAG,IAAA,WAAI,EAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;aACjD;YACD,IAAI,CAAC,YAAY,EAAE;gBACjB,SAAS;aACV;YACD,IAAI;gBACF,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,cAAK,EAAC,IAAI,CAAC,CAAC;gBAClC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;gBACjD,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;oBAC/B,OAAO;iBACR;gBACD,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC;aACvE;YAAC,WAAM;gBACN,eAAM,CAAC,KAAK,CACV,IAAA,qBAAY,EAAA,oBAAoB,YAAY,gBAAgB,IAAI,GAAG,CACpE,CAAC;aACH;SACF;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AA/BD,yBA+BC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { addProjectConfiguration, Tree } from '@nrwl/devkit';
|
|
2
|
-
import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
|
|
3
|
-
|
|
4
|
-
import update from './change-main-to-class-name-14-0-2';
|
|
5
|
-
|
|
6
|
-
describe('Change from main tag to className tag', () => {
|
|
7
|
-
let tree: Tree;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
|
|
11
|
-
addProjectConfiguration(tree, 'products', {
|
|
12
|
-
root: 'apps/products',
|
|
13
|
-
sourceRoot: 'apps/products/src',
|
|
14
|
-
targets: {
|
|
15
|
-
start: {
|
|
16
|
-
executor: '@nrwl/react-native:start',
|
|
17
|
-
options: {
|
|
18
|
-
port: 8081,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it(`should udpate main file to registerComponent className`, async () => {
|
|
26
|
-
tree.write(
|
|
27
|
-
'apps/products/src/main.tsx',
|
|
28
|
-
`AppRegistry.registerComponent('main', () => App);`
|
|
29
|
-
);
|
|
30
|
-
await update(tree);
|
|
31
|
-
|
|
32
|
-
expect(tree.read('apps/products/src/main.tsx', 'utf-8')).toEqual(
|
|
33
|
-
`AppRegistry.registerComponent('Products', () => App);\n`
|
|
34
|
-
);
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it(`should not udpate main file to registerComponent className if it does not exists`, async () => {
|
|
38
|
-
tree.write(
|
|
39
|
-
'apps/products/src/main.tsx',
|
|
40
|
-
`AppRegistry.registerComponent('otherTagName', () => App);`
|
|
41
|
-
);
|
|
42
|
-
await update(tree);
|
|
43
|
-
|
|
44
|
-
expect(tree.read('apps/products/src/main.tsx', 'utf-8')).toEqual(
|
|
45
|
-
`AppRegistry.registerComponent('otherTagName', () => App);`
|
|
46
|
-
);
|
|
47
|
-
});
|
|
48
|
-
});
|
|
@@ -1,33 +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
|
-
* Rename blacklistRE to blockList in metro.config.js
|
|
7
|
-
* @param tree
|
|
8
|
-
*/
|
|
9
|
-
function update(tree) {
|
|
10
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
|
-
const projects = (0, devkit_1.getProjects)(tree);
|
|
12
|
-
projects.forEach((project) => {
|
|
13
|
-
var _a, _b;
|
|
14
|
-
const metroConfigPath = `${project.root}/metro.config.js`;
|
|
15
|
-
if (((_b = (_a = project.targets) === null || _a === void 0 ? void 0 : _a.start) === null || _b === void 0 ? void 0 : _b.executor) !== '@nrwl/react-native:start' ||
|
|
16
|
-
!tree.exists(metroConfigPath))
|
|
17
|
-
return;
|
|
18
|
-
try {
|
|
19
|
-
const metroConfigContent = tree.read(metroConfigPath, 'utf-8');
|
|
20
|
-
if (!metroConfigContent.includes('blacklistRE:')) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
tree.write(metroConfigPath, metroConfigContent.replace('blacklistRE:', 'blockList:'));
|
|
24
|
-
}
|
|
25
|
-
catch (_c) {
|
|
26
|
-
devkit_1.logger.error((0, devkit_1.stripIndents) `Unable to update ${metroConfigPath} for project ${project.root}.`);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
exports.default = update;
|
|
33
|
-
//# sourceMappingURL=rename-blockList-metro-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rename-blockList-metro-config.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/migrations/update-14-2-1/rename-blockList-metro-config.ts"],"names":[],"mappings":";;;AAAA,yCAMsB;AAEtB;;;GAGG;AACH,SAA8B,MAAM,CAAC,IAAU;;QAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;;YAC3B,MAAM,eAAe,GAAG,GAAG,OAAO,CAAC,IAAI,kBAAkB,CAAC;YAC1D,IACE,CAAA,MAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,KAAK,0CAAE,QAAQ,MAAK,0BAA0B;gBAC/D,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;gBAE7B,OAAO;YAET,IAAI;gBACF,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;gBAC/D,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE;oBAChD,OAAO;iBACR;gBACD,IAAI,CAAC,KAAK,CACR,eAAe,EACf,kBAAkB,CAAC,OAAO,CAAC,cAAc,EAAE,YAAY,CAAC,CACzD,CAAC;aACH;YAAC,WAAM;gBACN,eAAM,CAAC,KAAK,CACV,IAAA,qBAAY,EAAA,oBAAoB,eAAe,gBAAgB,OAAO,CAAC,IAAI,GAAG,CAC/E,CAAC;aACH;QACH,CAAC,CAAC,CAAC;QACH,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AA3BD,yBA2BC"}
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { addProjectConfiguration, Tree, getProjects } from '@nrwl/devkit';
|
|
2
|
-
import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
|
|
3
|
-
|
|
4
|
-
import update from './rename-blockList-metro-config';
|
|
5
|
-
|
|
6
|
-
describe('Rename blacklistRE to blockList in metro.config.js for react native apps', () => {
|
|
7
|
-
let tree: Tree;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
|
|
11
|
-
addProjectConfiguration(tree, 'products', {
|
|
12
|
-
root: 'apps/products',
|
|
13
|
-
sourceRoot: 'apps/products/src',
|
|
14
|
-
targets: {
|
|
15
|
-
start: {
|
|
16
|
-
executor: '@nrwl/react-native:start',
|
|
17
|
-
options: {
|
|
18
|
-
port: 8081,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it(`should udpate metro.config.js and Rename blacklistRE to blockList`, async () => {
|
|
26
|
-
tree.write(
|
|
27
|
-
'apps/products/metro.config.js',
|
|
28
|
-
`
|
|
29
|
-
const { withNxMetro } = require('@nrwl/react-native');
|
|
30
|
-
const { getDefaultConfig } = require('metro-config');
|
|
31
|
-
|
|
32
|
-
module.exports = (async () => {
|
|
33
|
-
const {
|
|
34
|
-
resolver: { sourceExts, assetExts },
|
|
35
|
-
} = await getDefaultConfig();
|
|
36
|
-
// console.log(getModulesRunBeforeMainModule);
|
|
37
|
-
return withNxMetro(
|
|
38
|
-
{
|
|
39
|
-
transformer: {
|
|
40
|
-
getTransformOptions: async () => ({
|
|
41
|
-
transform: {
|
|
42
|
-
experimentalImportSupport: false,
|
|
43
|
-
inlineRequires: true,
|
|
44
|
-
},
|
|
45
|
-
}),
|
|
46
|
-
babelTransformerPath: require.resolve('react-native-svg-transformer'),
|
|
47
|
-
},
|
|
48
|
-
resolver: {
|
|
49
|
-
assetExts: assetExts.filter((ext) => ext !== 'svg'),
|
|
50
|
-
sourceExts: [...sourceExts, 'svg'],
|
|
51
|
-
resolverMainFields: ['sbmodern', 'browser', 'main'],
|
|
52
|
-
blacklistRE: exclusionList([/\.\/dist\/.*/]),
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
// Change this to true to see debugging info.
|
|
57
|
-
// Useful if you have issues resolving modules
|
|
58
|
-
debug: false,
|
|
59
|
-
// all the file extensions used for imports other than 'ts', 'tsx', 'js', 'jsx'
|
|
60
|
-
extensions: [],
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
})();
|
|
64
|
-
`
|
|
65
|
-
);
|
|
66
|
-
await update(tree);
|
|
67
|
-
|
|
68
|
-
expect(tree.read('apps/products/metro.config.js', 'utf-8')).toEqual(`
|
|
69
|
-
const { withNxMetro } = require('@nrwl/react-native');
|
|
70
|
-
const { getDefaultConfig } = require('metro-config');
|
|
71
|
-
|
|
72
|
-
module.exports = (async () => {
|
|
73
|
-
const {
|
|
74
|
-
resolver: { sourceExts, assetExts },
|
|
75
|
-
} = await getDefaultConfig();
|
|
76
|
-
// console.log(getModulesRunBeforeMainModule);
|
|
77
|
-
return withNxMetro(
|
|
78
|
-
{
|
|
79
|
-
transformer: {
|
|
80
|
-
getTransformOptions: async () => ({
|
|
81
|
-
transform: {
|
|
82
|
-
experimentalImportSupport: false,
|
|
83
|
-
inlineRequires: true,
|
|
84
|
-
},
|
|
85
|
-
}),
|
|
86
|
-
babelTransformerPath: require.resolve('react-native-svg-transformer'),
|
|
87
|
-
},
|
|
88
|
-
resolver: {
|
|
89
|
-
assetExts: assetExts.filter((ext) => ext !== 'svg'),
|
|
90
|
-
sourceExts: [...sourceExts, 'svg'],
|
|
91
|
-
resolverMainFields: ['sbmodern', 'browser', 'main'],
|
|
92
|
-
blockList: exclusionList([/\.\/dist\/.*/]),
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
// Change this to true to see debugging info.
|
|
97
|
-
// Useful if you have issues resolving modules
|
|
98
|
-
debug: false,
|
|
99
|
-
// all the file extensions used for imports other than 'ts', 'tsx', 'js', 'jsx'
|
|
100
|
-
extensions: [],
|
|
101
|
-
}
|
|
102
|
-
);
|
|
103
|
-
})();
|
|
104
|
-
`);
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
it(`should not udpate metro.config.js if blacklistRE does not exist`, async () => {
|
|
108
|
-
tree.write(
|
|
109
|
-
'apps/products/metro.config.js',
|
|
110
|
-
`
|
|
111
|
-
const { withNxMetro } = require('@nrwl/react-native');
|
|
112
|
-
const { getDefaultConfig } = require('metro-config');
|
|
113
|
-
|
|
114
|
-
module.exports = (async () => {
|
|
115
|
-
const {
|
|
116
|
-
resolver: { sourceExts, assetExts },
|
|
117
|
-
} = await getDefaultConfig();
|
|
118
|
-
// console.log(getModulesRunBeforeMainModule);
|
|
119
|
-
return withNxMetro(
|
|
120
|
-
{
|
|
121
|
-
transformer: {
|
|
122
|
-
getTransformOptions: async () => ({
|
|
123
|
-
transform: {
|
|
124
|
-
experimentalImportSupport: false,
|
|
125
|
-
inlineRequires: true,
|
|
126
|
-
},
|
|
127
|
-
}),
|
|
128
|
-
babelTransformerPath: require.resolve('react-native-svg-transformer'),
|
|
129
|
-
},
|
|
130
|
-
resolver: {
|
|
131
|
-
assetExts: assetExts.filter((ext) => ext !== 'svg'),
|
|
132
|
-
sourceExts: [...sourceExts, 'svg'],
|
|
133
|
-
resolverMainFields: ['sbmodern', 'browser', 'main'],
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
projectRoot: __dirname,
|
|
138
|
-
// Change this to true to see debugging info.
|
|
139
|
-
// Useful if you have issues resolving modules
|
|
140
|
-
debug: false,
|
|
141
|
-
// all the file extensions used for imports other than 'ts', 'tsx', 'js', 'jsx'
|
|
142
|
-
extensions: [],
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
|
-
})();
|
|
146
|
-
`
|
|
147
|
-
);
|
|
148
|
-
await update(tree);
|
|
149
|
-
|
|
150
|
-
expect(tree.read('apps/products/metro.config.js', 'utf-8'))
|
|
151
|
-
.toMatchInlineSnapshot(`
|
|
152
|
-
"const { withNxMetro } = require('@nrwl/react-native');
|
|
153
|
-
const { getDefaultConfig } = require('metro-config');
|
|
154
|
-
|
|
155
|
-
module.exports = (async () => {
|
|
156
|
-
const {
|
|
157
|
-
resolver: { sourceExts, assetExts },
|
|
158
|
-
} = await getDefaultConfig();
|
|
159
|
-
// console.log(getModulesRunBeforeMainModule);
|
|
160
|
-
return withNxMetro(
|
|
161
|
-
{
|
|
162
|
-
transformer: {
|
|
163
|
-
getTransformOptions: async () => ({
|
|
164
|
-
transform: {
|
|
165
|
-
experimentalImportSupport: false,
|
|
166
|
-
inlineRequires: true,
|
|
167
|
-
},
|
|
168
|
-
}),
|
|
169
|
-
babelTransformerPath: require.resolve('react-native-svg-transformer'),
|
|
170
|
-
},
|
|
171
|
-
resolver: {
|
|
172
|
-
assetExts: assetExts.filter((ext) => ext !== 'svg'),
|
|
173
|
-
sourceExts: [...sourceExts, 'svg'],
|
|
174
|
-
resolverMainFields: ['sbmodern', 'browser', 'main'],
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
projectRoot: __dirname,
|
|
179
|
-
// Change this to true to see debugging info.
|
|
180
|
-
// Useful if you have issues resolving modules
|
|
181
|
-
debug: false,
|
|
182
|
-
// all the file extensions used for imports other than 'ts', 'tsx', 'js', 'jsx'
|
|
183
|
-
extensions: [],
|
|
184
|
-
}
|
|
185
|
-
);
|
|
186
|
-
})();
|
|
187
|
-
"
|
|
188
|
-
`);
|
|
189
|
-
});
|
|
190
|
-
});
|
|
@@ -1,26 +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
|
-
* This function changes include field from string to array for sync-deps target
|
|
7
|
-
*/
|
|
8
|
-
function update(tree) {
|
|
9
|
-
var _a, _b, _c, _d, _e;
|
|
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['sync-deps']) === null || _b === void 0 ? void 0 : _b.executor) !== '@nrwl/react-native:sync-deps')
|
|
14
|
-
continue;
|
|
15
|
-
const include = (_e = (_d = (_c = config.targets) === null || _c === void 0 ? void 0 : _c['sync-deps']) === null || _d === void 0 ? void 0 : _d.options) === null || _e === void 0 ? void 0 : _e.include;
|
|
16
|
-
if (!include || !include.length) {
|
|
17
|
-
continue;
|
|
18
|
-
}
|
|
19
|
-
config.targets['sync-deps'].options.include = include.split(',');
|
|
20
|
-
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
21
|
-
}
|
|
22
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
exports.default = update;
|
|
26
|
-
//# sourceMappingURL=add-exclude-sync-deps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-exclude-sync-deps.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/migrations/update-14-5-5/add-exclude-sync-deps.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,IACE,CAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAG,WAAW,CAAC,0CAAE,QAAQ,MAAK,8BAA8B;gBAE1E,SAAS;YACX,MAAM,OAAO,GAAG,MAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAG,WAAW,CAAC,0CAAE,OAAO,0CAAE,OAAO,CAAC;YAChE,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;gBAC/B,SAAS;aACV;YACD,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACjE,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;SAChD;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AAjBD,yBAiBC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
addProjectConfiguration,
|
|
3
|
-
readProjectConfiguration,
|
|
4
|
-
Tree,
|
|
5
|
-
} from '@nrwl/devkit';
|
|
6
|
-
import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
|
|
7
|
-
import update from './add-exclude-sync-deps';
|
|
8
|
-
|
|
9
|
-
describe('add-exclude-sync-deps', () => {
|
|
10
|
-
let tree: Tree;
|
|
11
|
-
|
|
12
|
-
beforeEach(async () => {
|
|
13
|
-
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
|
|
14
|
-
addProjectConfiguration(tree, 'products', {
|
|
15
|
-
root: 'apps/products',
|
|
16
|
-
sourceRoot: 'apps/products/src',
|
|
17
|
-
targets: {
|
|
18
|
-
'sync-deps': {
|
|
19
|
-
executor: '@nrwl/react-native:sync-deps',
|
|
20
|
-
options: {
|
|
21
|
-
include: 'react-native-reanmiated,react-native-screens',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it(`should change include from string to array`, async () => {
|
|
29
|
-
await update(tree);
|
|
30
|
-
|
|
31
|
-
const projectConfig = readProjectConfiguration(tree, 'products');
|
|
32
|
-
expect(projectConfig.targets['sync-deps']).toEqual({
|
|
33
|
-
executor: '@nrwl/react-native:sync-deps',
|
|
34
|
-
options: {
|
|
35
|
-
include: ['react-native-reanmiated', 'react-native-screens'],
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
});
|
|
@@ -1,26 +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
|
-
* This function changes searchDir field from string to array for storybook target
|
|
7
|
-
*/
|
|
8
|
-
function update(tree) {
|
|
9
|
-
var _a, _b, _c, _d, _e;
|
|
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['storybook']) === null || _b === void 0 ? void 0 : _b.executor) !== '@nrwl/react-native:storybook')
|
|
14
|
-
continue;
|
|
15
|
-
const searchDir = (_e = (_d = (_c = config.targets) === null || _c === void 0 ? void 0 : _c['storybook']) === null || _d === void 0 ? void 0 : _d.options) === null || _e === void 0 ? void 0 : _e.searchDir;
|
|
16
|
-
if (!searchDir || !searchDir.length || Array.isArray(searchDir)) {
|
|
17
|
-
continue;
|
|
18
|
-
}
|
|
19
|
-
config.targets['storybook'].options.searchDir = searchDir.split(',');
|
|
20
|
-
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
21
|
-
}
|
|
22
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
exports.default = update;
|
|
26
|
-
//# sourceMappingURL=change-searchDir-storybook.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"change-searchDir-storybook.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/migrations/update-14-5-8/change-searchDir-storybook.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,IACE,CAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAG,WAAW,CAAC,0CAAE,QAAQ,MAAK,8BAA8B;gBAE1E,SAAS;YACX,MAAM,SAAS,GAAG,MAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAG,WAAW,CAAC,0CAAE,OAAO,0CAAE,SAAS,CAAC;YACpE,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBAC/D,SAAS;aACV;YACD,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACrE,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;SAChD;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AAjBD,yBAiBC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
addProjectConfiguration,
|
|
3
|
-
readProjectConfiguration,
|
|
4
|
-
Tree,
|
|
5
|
-
} from '@nrwl/devkit';
|
|
6
|
-
import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
|
|
7
|
-
import update from './change-searchDir-storybook';
|
|
8
|
-
|
|
9
|
-
describe('change-searchDir-storybook', () => {
|
|
10
|
-
let tree: Tree;
|
|
11
|
-
|
|
12
|
-
beforeEach(async () => {
|
|
13
|
-
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
|
|
14
|
-
addProjectConfiguration(tree, 'products', {
|
|
15
|
-
root: 'apps/products',
|
|
16
|
-
sourceRoot: 'apps/products/src',
|
|
17
|
-
targets: {
|
|
18
|
-
storybook: {
|
|
19
|
-
executor: '@nrwl/react-native:storybook',
|
|
20
|
-
options: {
|
|
21
|
-
searchDir: 'apps/products',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it(`should change searchDir from string to array`, async () => {
|
|
29
|
-
await update(tree);
|
|
30
|
-
|
|
31
|
-
const projectConfig = readProjectConfiguration(tree, 'products');
|
|
32
|
-
expect(projectConfig.targets['storybook']).toEqual({
|
|
33
|
-
executor: '@nrwl/react-native:storybook',
|
|
34
|
-
options: {
|
|
35
|
-
searchDir: ['apps/products'],
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
});
|