@nx/react-native 23.0.0-pr.35413.460eeef → 23.0.0-rc.0
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/{index.d.ts → dist/index.d.ts} +0 -1
- package/{plugin.d.ts → dist/plugin.d.ts} +0 -1
- package/dist/plugins/jest/svg-mock.d.ts +1 -0
- package/{plugins → dist/plugins}/jest/svg-mock.js +2 -0
- package/{plugins → dist/plugins}/metro-resolver.d.ts +0 -1
- package/{plugins → dist/plugins}/metro-resolver.js +2 -2
- package/{plugins → dist/plugins}/plugin.d.ts +3 -4
- package/{plugins → dist/plugins}/plugin.js +63 -36
- package/{plugins → dist/plugins}/with-nx-metro.d.ts +0 -1
- package/dist/readme-template.md +18 -0
- package/{src → dist/src}/executors/build-android/build-android.impl.d.ts +0 -1
- package/{src → dist/src}/executors/build-android/build-android.impl.js +2 -0
- package/{src → dist/src}/executors/build-android/schema.json +1 -0
- package/{src → dist/src}/executors/build-ios/build-ios.impl.d.ts +0 -1
- package/{src → dist/src}/executors/build-ios/build-ios.impl.js +2 -0
- package/{src → dist/src}/executors/build-ios/schema.json +1 -0
- package/{src → dist/src}/executors/bundle/bundle.impl.d.ts +0 -1
- package/{src → dist/src}/executors/bundle/bundle.impl.js +2 -0
- package/{src → dist/src}/executors/bundle/schema.json +1 -0
- package/{src → dist/src}/executors/ensure-symlink/ensure-symlink.impl.d.ts +0 -1
- package/{src → dist/src}/executors/pod-install/pod-install.impl.d.ts +0 -1
- package/{src → dist/src}/executors/pod-install/pod-install.impl.js +2 -0
- package/{src → dist/src}/executors/pod-install/schema.json +1 -0
- package/{src → dist/src}/executors/run-android/run-android.impl.d.ts +0 -1
- package/{src → dist/src}/executors/run-android/run-android.impl.js +2 -0
- package/{src → dist/src}/executors/run-android/schema.json +1 -0
- package/{src → dist/src}/executors/run-ios/run-ios.impl.d.ts +0 -1
- package/{src → dist/src}/executors/run-ios/run-ios.impl.js +2 -0
- package/{src → dist/src}/executors/run-ios/schema.json +1 -0
- package/{src → dist/src}/executors/start/lib/is-packager-running.d.ts +0 -1
- package/{src → dist/src}/executors/start/schema.json +1 -0
- package/{src → dist/src}/executors/start/start.impl.d.ts +0 -1
- package/{src → dist/src}/executors/start/start.impl.js +2 -0
- package/{src → dist/src}/executors/storybook/storybook.impl.d.ts +0 -5
- package/{src → dist/src}/executors/storybook/storybook.impl.js +0 -4
- package/{src → dist/src}/executors/sync-deps/sync-deps.impl.d.ts +0 -1
- package/dist/src/executors/upgrade/schema.json +12 -0
- package/{src → dist/src}/executors/upgrade/upgrade.impl.d.ts +0 -1
- package/{src → dist/src}/executors/upgrade/upgrade.impl.js +2 -0
- package/{src → dist/src}/generators/application/application.d.ts +0 -1
- package/{src → dist/src}/generators/application/application.js +9 -8
- package/{src → dist/src}/generators/application/lib/add-e2e.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-e2e.js +3 -5
- package/{src → dist/src}/generators/application/lib/add-project.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-project.js +4 -0
- package/{src → dist/src}/generators/application/lib/create-application-files.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/normalize-options.js +5 -5
- package/{src → dist/src}/generators/component/component.d.ts +0 -1
- package/{src → dist/src}/generators/component/component.js +5 -4
- package/{src → dist/src}/generators/component/lib/add-import.d.ts +0 -1
- package/{src → dist/src}/generators/component/lib/add-import.js +2 -2
- package/{src → dist/src}/generators/component/lib/normalize-options.d.ts +2 -3
- package/{src → dist/src}/generators/component/lib/normalize-options.js +5 -6
- package/{src → dist/src}/generators/component/schema.d.ts +0 -5
- package/{src → dist/src}/generators/component/schema.json +0 -5
- package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.js +6 -5
- package/{src → dist/src}/generators/convert-to-inferred/lib/create-process-options.d.ts +1 -2
- package/{src → dist/src}/generators/convert-to-inferred/lib/post-target-transformer.d.ts +1 -2
- package/{src → dist/src}/generators/convert-to-inferred/lib/post-target-transformer.js +2 -2
- package/dist/src/generators/convert-to-inferred/lib/process-start-options.d.ts +2 -0
- package/{src → dist/src}/generators/init/init.d.ts +0 -1
- package/{src → dist/src}/generators/init/init.js +8 -6
- package/{src → dist/src}/generators/init/lib/add-git-ignore-entry.d.ts +0 -1
- package/{src → dist/src}/generators/init/lib/gitignore-entries.d.ts +0 -1
- package/{src → dist/src}/generators/init/schema.d.ts +1 -1
- package/{src → dist/src}/generators/init/schema.json +1 -1
- package/{src → dist/src}/generators/library/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/normalize-options.js +5 -5
- package/{src → dist/src}/generators/library/library.d.ts +0 -1
- package/{src → dist/src}/generators/library/library.js +18 -20
- package/{src → dist/src}/generators/web-configuration/lib/normalize-schema.d.ts +0 -1
- package/{src → dist/src}/generators/web-configuration/lib/webpack-targets.d.ts +0 -1
- package/{src → dist/src}/generators/web-configuration/web-configuration.d.ts +0 -1
- package/{src → dist/src}/generators/web-configuration/web-configuration.js +11 -39
- package/{src → dist/src}/migrations/update-21-4-0/remove-deprecated-deps.d.ts +0 -1
- package/{src → dist/src}/migrations/update-21-4-0/upgrade-react-native-projects.d.ts +0 -1
- package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.d.ts +9 -0
- package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.js +225 -0
- package/{src → dist/src}/utils/add-jest.d.ts +2 -3
- package/{src → dist/src}/utils/add-linting.d.ts +0 -1
- package/{src → dist/src}/utils/add-linting.js +11 -12
- package/{src → dist/src}/utils/chmod-android-gradle-files.d.ts +0 -1
- package/dist/src/utils/deprecation.d.ts +2 -0
- package/dist/src/utils/deprecation.js +19 -0
- package/{src → dist/src}/utils/ensure-dependencies.d.ts +0 -1
- package/dist/src/utils/ensure-dependencies.js +34 -0
- package/{src → dist/src}/utils/ensure-node-modules-symlink.d.ts +0 -1
- package/{src → dist/src}/utils/find-all-npm-dependencies.d.ts +0 -1
- package/{src → dist/src}/utils/get-cli-options.d.ts +0 -1
- package/{src → dist/src}/utils/pod-install-task.d.ts +0 -1
- package/{src → dist/src}/utils/react-native-project-detection.d.ts +0 -1
- package/{src → dist/src}/utils/react-native-project-detection.js +2 -2
- package/{src → dist/src}/utils/testing-generators.d.ts +0 -1
- package/dist/src/utils/versions.d.ts +33 -0
- package/dist/src/utils/versions.js +73 -0
- package/dist/typings/svg.d.ts +7 -0
- package/executors.json +22 -22
- package/generators.json +12 -12
- package/migrations.json +48 -36
- package/package.json +86 -14
- package/index.d.ts.map +0 -1
- package/plugin.d.ts.map +0 -1
- package/plugins/jest/svg-mock.d.ts +0 -1
- package/plugins/jest/svg-mock.d.ts.map +0 -1
- package/plugins/metro-resolver.d.ts.map +0 -1
- package/plugins/plugin.d.ts.map +0 -1
- package/plugins/with-nx-metro.d.ts.map +0 -1
- package/src/executors/build-android/build-android.impl.d.ts.map +0 -1
- package/src/executors/build-ios/build-ios.impl.d.ts.map +0 -1
- package/src/executors/bundle/bundle.impl.d.ts.map +0 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts.map +0 -1
- package/src/executors/pod-install/pod-install.impl.d.ts.map +0 -1
- package/src/executors/run-android/run-android.impl.d.ts.map +0 -1
- package/src/executors/run-ios/run-ios.impl.d.ts.map +0 -1
- package/src/executors/start/lib/is-packager-running.d.ts.map +0 -1
- package/src/executors/start/start.impl.d.ts.map +0 -1
- package/src/executors/storybook/storybook.impl.d.ts.map +0 -1
- package/src/executors/sync-deps/sync-deps.impl.d.ts.map +0 -1
- package/src/executors/upgrade/schema.json +0 -11
- package/src/executors/upgrade/upgrade.impl.d.ts.map +0 -1
- package/src/generators/application/application.d.ts.map +0 -1
- package/src/generators/application/lib/add-e2e.d.ts.map +0 -1
- package/src/generators/application/lib/add-project.d.ts.map +0 -1
- package/src/generators/application/lib/create-application-files.d.ts.map +0 -1
- package/src/generators/application/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/component/component.d.ts.map +0 -1
- package/src/generators/component/lib/add-import.d.ts.map +0 -1
- package/src/generators/component/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/convert-to-inferred.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/create-process-options.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/post-target-transformer.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/process-start-options.d.ts +0 -3
- package/src/generators/convert-to-inferred/lib/process-start-options.d.ts.map +0 -1
- package/src/generators/init/init.d.ts.map +0 -1
- package/src/generators/init/lib/add-git-ignore-entry.d.ts.map +0 -1
- package/src/generators/init/lib/gitignore-entries.d.ts.map +0 -1
- package/src/generators/library/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/library/library.d.ts.map +0 -1
- package/src/generators/web-configuration/lib/normalize-schema.d.ts.map +0 -1
- package/src/generators/web-configuration/lib/webpack-targets.d.ts.map +0 -1
- package/src/generators/web-configuration/web-configuration.d.ts.map +0 -1
- package/src/migrations/update-21-4-0/remove-deprecated-deps.d.ts.map +0 -1
- package/src/migrations/update-21-4-0/upgrade-react-native-projects.d.ts.map +0 -1
- package/src/utils/add-jest.d.ts.map +0 -1
- package/src/utils/add-linting.d.ts.map +0 -1
- package/src/utils/chmod-android-gradle-files.d.ts.map +0 -1
- package/src/utils/ensure-dependencies.d.ts.map +0 -1
- package/src/utils/ensure-dependencies.js +0 -33
- package/src/utils/ensure-node-modules-symlink.d.ts.map +0 -1
- package/src/utils/find-all-npm-dependencies.d.ts.map +0 -1
- package/src/utils/get-cli-options.d.ts.map +0 -1
- package/src/utils/pod-install-task.d.ts.map +0 -1
- package/src/utils/react-native-project-detection.d.ts.map +0 -1
- package/src/utils/testing-generators.d.ts.map +0 -1
- package/src/utils/versions.d.ts +0 -21
- package/src/utils/versions.d.ts.map +0 -1
- package/src/utils/versions.js +0 -23
- /package/{LICENSE → dist/LICENSE} +0 -0
- /package/{index.js → dist/index.js} +0 -0
- /package/{plugin.js → dist/plugin.js} +0 -0
- /package/{plugins → dist/plugins}/with-nx-metro.js +0 -0
- /package/{src → dist/src}/executors/build-android/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/build-ios/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/bundle/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/ensure-symlink/ensure-symlink.impl.js +0 -0
- /package/{src → dist/src}/executors/ensure-symlink/schema.json +0 -0
- /package/{src → dist/src}/executors/pod-install/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/run-android/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/run-ios/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/start/lib/is-packager-running.js +0 -0
- /package/{src → dist/src}/executors/start/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/storybook/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/storybook/schema.json +0 -0
- /package/{src → dist/src}/executors/sync-deps/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/sync-deps/schema.json +0 -0
- /package/{src → dist/src}/executors/sync-deps/sync-deps.impl.js +0 -0
- /package/{src → dist/src}/executors/upgrade/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/application/files/app/.babelrc.js.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/Gemfile.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/build.gradle.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/debug.keystore +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/proguard-rules.pro +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.kt.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainApplication.kt.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/res/values/strings.xml.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/app/src/main/res/values/styles.xml +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/build.gradle.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/gradle.properties +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/gradlew.bat +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/gradlew.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/android/settings.gradle.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/app.json.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/ios/.xcode.env.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/ios/Podfile.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/ios/__className__/AppDelegate.swift.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/ios/__className__/Images.xcassets/AppIcon.appiconset/Contents.json +0 -0
- /package/{src → dist/src}/generators/application/files/app/ios/__className__/Images.xcassets/Contents.json +0 -0
- /package/{src → dist/src}/generators/application/files/app/ios/__className__/Info.plist.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/ios/__className__/LaunchScreen.storyboard.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/ios/__className__/PrivacyInfo.xcprivacy +0 -0
- /package/{src → dist/src}/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/ios/__className__.xcodeproj/xcshareddata/xcschemes/__className__.xcscheme.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/ios/__className__.xcworkspace/contents.xcworkspacedata +0 -0
- /package/{src → dist/src}/generators/application/files/app/metro.config.js.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/package.json.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/src/app/App.spec.tsx.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/src/main.tsx.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/tsconfig.app.json.template +0 -0
- /package/{src → dist/src}/generators/application/files/app/tsconfig.json.template +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/claimed/src/app/App.tsx.template +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/not-configured/src/app/App.tsx.template +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/unclaimed/src/app/App.tsx.template +0 -0
- /package/{src → dist/src}/generators/application/lib/create-application-files.js +0 -0
- /package/{src → dist/src}/generators/application/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/application/schema.json +0 -0
- /package/{src → dist/src}/generators/component/files/js/__fileName__.__ext__ +0 -0
- /package/{src → dist/src}/generators/component/files/js/__fileName__.spec.__ext__ +0 -0
- /package/{src → dist/src}/generators/component/files/ts/__fileName__.__ext__ +0 -0
- /package/{src → dist/src}/generators/component/files/ts/__fileName__.spec.__ext__ +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/create-process-options.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/process-start-options.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/schema.json +0 -0
- /package/{src → dist/src}/generators/init/lib/add-git-ignore-entry.js +0 -0
- /package/{src → dist/src}/generators/init/lib/gitignore-entries.js +0 -0
- /package/{src → dist/src}/generators/library/files/lib/.babelrc.js.template +0 -0
- /package/{src → dist/src}/generators/library/files/lib/README.md +0 -0
- /package/{src → dist/src}/generators/library/files/lib/src/index.ts.template +0 -0
- /package/{src → dist/src}/generators/library/files/lib/tsconfig.json.template +0 -0
- /package/{src → dist/src}/generators/library/files/lib/tsconfig.lib.json.template +0 -0
- /package/{src → dist/src}/generators/library/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/library/schema.json +0 -0
- /package/{src → dist/src}/generators/web-configuration/files/base-vite/.babelrc.js.template +0 -0
- /package/{src → dist/src}/generators/web-configuration/files/base-vite/index.html__tmpl__ +0 -0
- /package/{src → dist/src}/generators/web-configuration/files/base-vite/public/favicon.ico +0 -0
- /package/{src → dist/src}/generators/web-configuration/files/base-vite/src/assets/.gitkeep +0 -0
- /package/{src → dist/src}/generators/web-configuration/files/base-vite/src/main-web.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/web-configuration/files/base-vite/vite.config.mts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/web-configuration/files/base-webpack/.babelrc.js.template +0 -0
- /package/{src → dist/src}/generators/web-configuration/files/base-webpack/src/assets/.gitkeep +0 -0
- /package/{src → dist/src}/generators/web-configuration/files/base-webpack/src/favicon.ico +0 -0
- /package/{src → dist/src}/generators/web-configuration/files/base-webpack/src/index.html__tmpl__ +0 -0
- /package/{src → dist/src}/generators/web-configuration/files/base-webpack/src/main-web.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/web-configuration/files/base-webpack/webpack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/web-configuration/lib/normalize-schema.js +0 -0
- /package/{src → dist/src}/generators/web-configuration/lib/webpack-targets.js +0 -0
- /package/{src → dist/src}/generators/web-configuration/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/web-configuration/schema.json +0 -0
- /package/{src → dist/src}/migrations/update-21-4-0/remove-deprecated-deps.js +0 -0
- /package/{src → dist/src}/migrations/update-21-4-0/upgrade-react-native-projects.js +0 -0
- /package/{src → dist/src}/utils/add-jest.js +0 -0
- /package/{src → dist/src}/utils/chmod-android-gradle-files.js +0 -0
- /package/{src → dist/src}/utils/ensure-node-modules-symlink.js +0 -0
- /package/{src → dist/src}/utils/find-all-npm-dependencies.js +0 -0
- /package/{src → dist/src}/utils/get-cli-options.js +0 -0
- /package/{src → dist/src}/utils/pod-install-task.js +0 -0
- /package/{src → dist/src}/utils/testing-generators.js +0 -0
|
@@ -3,4 +3,3 @@ export { reactNativeApplicationGenerator } from './src/generators/application/ap
|
|
|
3
3
|
export { reactNativeLibraryGenerator } from './src/generators/library/library';
|
|
4
4
|
export { reactNativeComponentGenerator } from './src/generators/component/component';
|
|
5
5
|
export { withNxMetro } from './plugins/with-nx-metro';
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getResolveRequest = getResolveRequest;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const tsconfig_paths_1 = require("tsconfig-paths");
|
|
6
|
-
const
|
|
6
|
+
const js_1 = require("@nx/js");
|
|
7
7
|
const pc = tslib_1.__importStar(require("picocolors"));
|
|
8
8
|
const enhanced_resolve_1 = require("enhanced-resolve");
|
|
9
9
|
const path_1 = require("path");
|
|
@@ -115,7 +115,7 @@ function getMatcher(debug) {
|
|
|
115
115
|
if (!matcher) {
|
|
116
116
|
const result = (0, tsconfig_paths_1.loadConfig)();
|
|
117
117
|
if (result.resultType === 'success') {
|
|
118
|
-
absoluteBaseUrl = (0,
|
|
118
|
+
absoluteBaseUrl = (0, js_1.resolvePathsBaseUrl)(result.configFileAbsolutePath);
|
|
119
119
|
paths = result.paths;
|
|
120
120
|
if (debug) {
|
|
121
121
|
console.log(pc.cyan(`[Nx] Located tsconfig at ${pc.bold(absoluteBaseUrl)}`));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateNodes } from '@nx/devkit';
|
|
2
2
|
export interface ReactNativePluginOptions {
|
|
3
3
|
startTargetName?: string;
|
|
4
4
|
podInstallTargetName?: string;
|
|
@@ -10,6 +10,5 @@ export interface ReactNativePluginOptions {
|
|
|
10
10
|
syncDepsTargetName?: string;
|
|
11
11
|
upgradeTargetName?: string;
|
|
12
12
|
}
|
|
13
|
-
export declare const createNodes:
|
|
14
|
-
export declare const createNodesV2:
|
|
15
|
-
//# sourceMappingURL=plugin.d.ts.map
|
|
13
|
+
export declare const createNodes: CreateNodes<ReactNativePluginOptions>;
|
|
14
|
+
export declare const createNodesV2: CreateNodes<ReactNativePluginOptions>;
|
|
@@ -1,69 +1,65 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createNodesV2 = exports.createNodes = void 0;
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const path_1 = require("path");
|
|
6
7
|
const js_1 = require("@nx/js");
|
|
7
|
-
const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
|
|
8
8
|
const fs_1 = require("fs");
|
|
9
|
-
const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
|
|
10
9
|
const cache_directory_1 = require("nx/src/utils/cache-directory");
|
|
11
|
-
const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
|
|
12
10
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
13
|
-
function readTargetsCache(cachePath) {
|
|
14
|
-
return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
|
|
15
|
-
}
|
|
16
|
-
function writeTargetsToCache(cachePath, targetsCache) {
|
|
17
|
-
const oldCache = readTargetsCache(cachePath);
|
|
18
|
-
(0, devkit_1.writeJsonFile)(cachePath, {
|
|
19
|
-
...oldCache,
|
|
20
|
-
targetsCache,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
11
|
exports.createNodes = [
|
|
24
12
|
'**/app.{json,config.js,config.ts}',
|
|
25
13
|
async (configFiles, options, context) => {
|
|
26
14
|
const optionsHash = (0, devkit_internals_1.hashObject)(options);
|
|
27
15
|
const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, `react-native-${optionsHash}.hash`);
|
|
28
|
-
const targetsCache =
|
|
16
|
+
const targetsCache = new internal_1.PluginCache(cachePath);
|
|
17
|
+
const lockFileName = (0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
|
|
18
|
+
const normalizedOptions = normalizeOptions(options);
|
|
29
19
|
try {
|
|
30
|
-
|
|
20
|
+
const { entries, preErrors } = await filterReactNativeConfigs(configFiles, context);
|
|
21
|
+
const projectHashes = await (0, internal_1.calculateHashesForCreateNodes)(entries.map((e) => e.projectRoot), normalizedOptions, context, entries.map(() => [lockFileName]));
|
|
22
|
+
let results = [];
|
|
23
|
+
let nodeErrors = [];
|
|
24
|
+
try {
|
|
25
|
+
results = await (0, devkit_1.createNodesFromFiles)((configFile, _, ctx, idx) => createNodesInternal(configFile, normalizedOptions, ctx, targetsCache, projectHashes[idx]), entries.map((e) => e.configFile), options, context);
|
|
26
|
+
}
|
|
27
|
+
catch (e) {
|
|
28
|
+
if (e instanceof devkit_1.AggregateCreateNodesError) {
|
|
29
|
+
results = e.partialResults ?? [];
|
|
30
|
+
nodeErrors = e.errors;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
throw e;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const allErrors = [...preErrors, ...nodeErrors];
|
|
37
|
+
if (allErrors.length > 0) {
|
|
38
|
+
throw new devkit_1.AggregateCreateNodesError(allErrors, results);
|
|
39
|
+
}
|
|
40
|
+
return results;
|
|
31
41
|
}
|
|
32
42
|
finally {
|
|
33
|
-
|
|
43
|
+
targetsCache.writeToDisk();
|
|
34
44
|
}
|
|
35
45
|
},
|
|
36
46
|
];
|
|
37
47
|
exports.createNodesV2 = exports.createNodes;
|
|
38
|
-
async function createNodesInternal(configFile, options, context, targetsCache) {
|
|
39
|
-
options = normalizeOptions(options);
|
|
48
|
+
async function createNodesInternal(configFile, options, context, targetsCache, hash) {
|
|
40
49
|
const projectRoot = (0, path_1.dirname)(configFile);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (!siblingFiles.includes('package.json') ||
|
|
44
|
-
!siblingFiles.includes('metro.config.js')) {
|
|
45
|
-
return {};
|
|
46
|
-
}
|
|
47
|
-
// Check if it's an Expo project
|
|
48
|
-
const packageJson = (0, devkit_1.readJsonFile)((0, path_1.join)(context.workspaceRoot, projectRoot, 'package.json'));
|
|
49
|
-
const appConfig = await getAppConfig(configFile, context);
|
|
50
|
-
if (appConfig.expo ||
|
|
51
|
-
packageJson.dependencies?.['expo'] ||
|
|
52
|
-
packageJson.devDependencies?.['expo']) {
|
|
53
|
-
return {};
|
|
50
|
+
if (!targetsCache.has(hash)) {
|
|
51
|
+
targetsCache.set(hash, buildReactNativeTargets(projectRoot, options, context));
|
|
54
52
|
}
|
|
55
|
-
const hash = await (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(projectRoot, options, context, [(0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot))]);
|
|
56
|
-
targetsCache[hash] ??= buildReactNativeTargets(projectRoot, options, context);
|
|
57
53
|
return {
|
|
58
54
|
projects: {
|
|
59
55
|
[projectRoot]: {
|
|
60
|
-
targets: targetsCache
|
|
56
|
+
targets: targetsCache.get(hash),
|
|
61
57
|
},
|
|
62
58
|
},
|
|
63
59
|
};
|
|
64
60
|
}
|
|
65
61
|
function buildReactNativeTargets(projectRoot, options, context) {
|
|
66
|
-
const namedInputs = (0,
|
|
62
|
+
const namedInputs = (0, internal_1.getNamedInputs)(projectRoot, context);
|
|
67
63
|
const targets = {
|
|
68
64
|
[options.startTargetName]: {
|
|
69
65
|
command: `react-native start`,
|
|
@@ -109,6 +105,7 @@ function buildReactNativeTargets(projectRoot, options, context) {
|
|
|
109
105
|
},
|
|
110
106
|
[options.syncDepsTargetName]: {
|
|
111
107
|
executor: '@nx/react-native:sync-deps',
|
|
108
|
+
continuous: false,
|
|
112
109
|
},
|
|
113
110
|
[options.upgradeTargetName]: {
|
|
114
111
|
command: `react-native upgrade`,
|
|
@@ -119,7 +116,37 @@ function buildReactNativeTargets(projectRoot, options, context) {
|
|
|
119
116
|
}
|
|
120
117
|
function getAppConfig(configFilePath, context) {
|
|
121
118
|
const resolvedPath = (0, path_1.join)(context.workspaceRoot, configFilePath);
|
|
122
|
-
return (0,
|
|
119
|
+
return (0, internal_1.loadConfigFile)(resolvedPath);
|
|
120
|
+
}
|
|
121
|
+
async function filterReactNativeConfigs(configFiles, context) {
|
|
122
|
+
const preErrors = [];
|
|
123
|
+
const candidates = await Promise.all(configFiles.map(async (configFile) => {
|
|
124
|
+
try {
|
|
125
|
+
const projectRoot = (0, path_1.dirname)(configFile);
|
|
126
|
+
const siblingFiles = (0, fs_1.readdirSync)((0, path_1.join)(context.workspaceRoot, projectRoot));
|
|
127
|
+
if (!siblingFiles.includes('package.json') ||
|
|
128
|
+
!siblingFiles.includes('metro.config.js')) {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
// Skip Expo projects; the @nx/expo plugin handles them.
|
|
132
|
+
const packageJson = (0, devkit_1.readJsonFile)((0, path_1.join)(context.workspaceRoot, projectRoot, 'package.json'));
|
|
133
|
+
const appConfig = await getAppConfig(configFile, context);
|
|
134
|
+
if (appConfig.expo ||
|
|
135
|
+
packageJson.dependencies?.['expo'] ||
|
|
136
|
+
packageJson.devDependencies?.['expo']) {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
return { configFile, projectRoot };
|
|
140
|
+
}
|
|
141
|
+
catch (e) {
|
|
142
|
+
preErrors.push([configFile, e]);
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
}));
|
|
146
|
+
return {
|
|
147
|
+
entries: candidates.filter((c) => c !== null),
|
|
148
|
+
preErrors,
|
|
149
|
+
};
|
|
123
150
|
}
|
|
124
151
|
function getInputs(namedInputs) {
|
|
125
152
|
return [
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<p style="text-align: center;">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
|
|
4
|
+
<img alt="Nx - Smart Monorepos · Fast Builds" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
{{links}}
|
|
9
|
+
|
|
10
|
+
<hr>
|
|
11
|
+
|
|
12
|
+
# Nx: Smart Monorepos · Fast Builds
|
|
13
|
+
|
|
14
|
+
Get to green PRs in half the time. Nx optimizes your builds, scales your CI, and fixes failed PRs. Built for developers and AI agents.
|
|
15
|
+
|
|
16
|
+
This package is a [React Native plugin for Nx](https://nx.dev/nx-api/react-native).
|
|
17
|
+
|
|
18
|
+
{{content}}
|
|
@@ -6,7 +6,9 @@ const path_1 = require("path");
|
|
|
6
6
|
const child_process_1 = require("child_process");
|
|
7
7
|
const chmod_android_gradle_files_1 = require("../../utils/chmod-android-gradle-files");
|
|
8
8
|
const get_cli_options_1 = require("../../utils/get-cli-options");
|
|
9
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
9
10
|
async function* buildAndroidExecutor(options, context) {
|
|
11
|
+
(0, deprecation_1.warnReactNativeExecutorDeprecation)('build-android');
|
|
10
12
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
11
13
|
(0, chmod_android_gradle_files_1.chmodAndroidGradlewFiles)((0, path_1.join)(context.root, projectRoot, 'android'));
|
|
12
14
|
await runCliBuild(context.root, projectRoot, options);
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"title": "Release Build for Android",
|
|
8
8
|
"description": "Build target options for Android.",
|
|
9
9
|
"type": "object",
|
|
10
|
+
"x-deprecated": "The `@nx/react-native:build-android` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/react-native:convert-to-inferred` to migrate to the `@nx/react-native/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
10
11
|
"presets": [
|
|
11
12
|
{
|
|
12
13
|
"name": "Build Android for current device architecture",
|
|
@@ -6,7 +6,9 @@ const path_1 = require("path");
|
|
|
6
6
|
const child_process_1 = require("child_process");
|
|
7
7
|
const os_1 = require("os");
|
|
8
8
|
const get_cli_options_1 = require("../../utils/get-cli-options");
|
|
9
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
9
10
|
async function* buildIosExecutor(options, context) {
|
|
11
|
+
(0, deprecation_1.warnReactNativeExecutorDeprecation)('build-ios');
|
|
10
12
|
if ((0, os_1.platform)() !== 'darwin') {
|
|
11
13
|
throw new Error(`The run-ios build requires Mac to run`);
|
|
12
14
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"title": "React Native Build iOS executor",
|
|
6
6
|
"description": "Build iOS app.",
|
|
7
7
|
"type": "object",
|
|
8
|
+
"x-deprecated": "The `@nx/react-native:build-ios` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/react-native:convert-to-inferred` to migrate to the `@nx/react-native/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
8
9
|
"presets": [
|
|
9
10
|
{
|
|
10
11
|
"name": "Build iOS for a simulator",
|
|
@@ -6,7 +6,9 @@ const internal_1 = require("@nx/devkit/internal");
|
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
const child_process_1 = require("child_process");
|
|
8
8
|
const fs_1 = require("fs");
|
|
9
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
9
10
|
async function* bundleExecutor(options, context) {
|
|
11
|
+
(0, deprecation_1.warnReactNativeExecutorDeprecation)('bundle');
|
|
10
12
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
11
13
|
options.bundleOutput = (0, path_1.join)(context.root, options.bundleOutput);
|
|
12
14
|
(0, fs_1.mkdirSync)((0, path_1.dirname)(options.bundleOutput));
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"title": "Offline JS Bundle for React Native",
|
|
8
8
|
"description": "JS Bundle target options.",
|
|
9
9
|
"type": "object",
|
|
10
|
+
"x-deprecated": "The `@nx/react-native:bundle` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/react-native:convert-to-inferred` to migrate to the `@nx/react-native/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
10
11
|
"presets": [
|
|
11
12
|
{
|
|
12
13
|
"name": "Bundle for a specific platform",
|
|
@@ -7,4 +7,3 @@ export interface ReactNativeEnsureSymlinkOutput {
|
|
|
7
7
|
* @deprecated It is no longer needed for react native 73.
|
|
8
8
|
*/
|
|
9
9
|
export default function ensureSymlinkExecutor(_: any, context: ExecutorContext): AsyncGenerator<ReactNativeEnsureSymlinkOutput>;
|
|
10
|
-
//# sourceMappingURL=ensure-symlink.impl.d.ts.map
|
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = podInstall;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const pod_install_task_1 = require("../../utils/pod-install-task");
|
|
6
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
6
7
|
async function* podInstall(options, context) {
|
|
8
|
+
(0, deprecation_1.warnReactNativeExecutorDeprecation)('pod-install');
|
|
7
9
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
8
10
|
const iosDirectory = (0, path_1.join)(context.root, projectRoot, 'ios');
|
|
9
11
|
await (0, pod_install_task_1.runPodInstall)(iosDirectory, true, options)();
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"title": "Run Pod Install for React Native iOS Project",
|
|
8
8
|
"description": "Run `pod install` for React Native iOS Project.",
|
|
9
9
|
"type": "object",
|
|
10
|
+
"x-deprecated": "The `@nx/react-native:pod-install` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/react-native:convert-to-inferred` to migrate to the `@nx/react-native/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
10
11
|
"properties": {
|
|
11
12
|
"buildFolder": {
|
|
12
13
|
"description": "Location for iOS build artifacts. Corresponds to Xcode's \"-derivedDataPath\". Relative to ios directory.",
|
|
@@ -7,8 +7,10 @@ const child_process_1 = require("child_process");
|
|
|
7
7
|
const start_impl_1 = require("../start/start.impl");
|
|
8
8
|
const chmod_android_gradle_files_1 = require("../../utils/chmod-android-gradle-files");
|
|
9
9
|
const get_cli_options_1 = require("../../utils/get-cli-options");
|
|
10
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
10
11
|
let childProcess;
|
|
11
12
|
async function* runAndroidExecutor(options, context) {
|
|
13
|
+
(0, deprecation_1.warnReactNativeExecutorDeprecation)('run-android');
|
|
12
14
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
13
15
|
(0, chmod_android_gradle_files_1.chmodAndroidGradlewFiles)((0, path_1.join)(context.root, projectRoot, 'android'));
|
|
14
16
|
const tasks = [runCliRunAndroid(context.root, projectRoot, options)];
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"title": "Run Android application",
|
|
9
9
|
"description": "Run Android target options.",
|
|
10
10
|
"type": "object",
|
|
11
|
+
"x-deprecated": "The `@nx/react-native:run-android` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/react-native:convert-to-inferred` to migrate to the `@nx/react-native/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
11
12
|
"presets": [
|
|
12
13
|
{
|
|
13
14
|
"name": "Run Android for the current device architecture",
|
|
@@ -7,7 +7,9 @@ const child_process_1 = require("child_process");
|
|
|
7
7
|
const os_1 = require("os");
|
|
8
8
|
const start_impl_1 = require("../start/start.impl");
|
|
9
9
|
const get_cli_options_1 = require("../../utils/get-cli-options");
|
|
10
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
10
11
|
async function* runIosExecutor(options, context) {
|
|
12
|
+
(0, deprecation_1.warnReactNativeExecutorDeprecation)('run-ios');
|
|
11
13
|
if ((0, os_1.platform)() !== 'darwin') {
|
|
12
14
|
throw new Error(`The run-ios build requires Mac to run`);
|
|
13
15
|
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"title": "Run iOS application",
|
|
9
9
|
"description": "Run iOS target options.",
|
|
10
10
|
"type": "object",
|
|
11
|
+
"x-deprecated": "The `@nx/react-native:run-ios` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/react-native:convert-to-inferred` to migrate to the `@nx/react-native/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
11
12
|
"presets": [
|
|
12
13
|
{
|
|
13
14
|
"name": "Run iOS on a simulator",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"title": "Packager Server for React Native",
|
|
9
9
|
"description": "Packager Server target options.",
|
|
10
10
|
"type": "object",
|
|
11
|
+
"x-deprecated": "The `@nx/react-native:start` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/react-native:convert-to-inferred` to migrate to the `@nx/react-native/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
11
12
|
"properties": {
|
|
12
13
|
"port": {
|
|
13
14
|
"type": "number",
|
|
@@ -7,4 +7,3 @@ export interface ReactNativeStartOutput {
|
|
|
7
7
|
}
|
|
8
8
|
export default function startExecutor(options: ReactNativeStartOptions, context: ExecutorContext): AsyncGenerator<ReactNativeStartOutput>;
|
|
9
9
|
export declare function runCliStart(workspaceRoot: string, projectRoot: string, options: ReactNativeStartOptions): Promise<ChildProcess>;
|
|
10
|
-
//# sourceMappingURL=start.impl.d.ts.map
|
|
@@ -7,7 +7,9 @@ const internal_1 = require("@nx/devkit/internal");
|
|
|
7
7
|
const child_process_1 = require("child_process");
|
|
8
8
|
const path_1 = require("path");
|
|
9
9
|
const is_packager_running_1 = require("./lib/is-packager-running");
|
|
10
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
10
11
|
async function* startExecutor(options, context) {
|
|
12
|
+
(0, deprecation_1.warnReactNativeExecutorDeprecation)('start');
|
|
11
13
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
12
14
|
await runCliStart(context.root, projectRoot, options);
|
|
13
15
|
yield {
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { ExecutorContext } from '@nx/devkit';
|
|
2
2
|
import { ReactNativeStorybookOptions } from './schema';
|
|
3
|
-
/**
|
|
4
|
-
* TODO (@xiongemi): remove this function in v20.
|
|
5
|
-
* @deprecated Going to use the default react storybook target. Use @nx/react:storybook executor instead.
|
|
6
|
-
*/
|
|
7
3
|
export default function reactNativeStorybookExecutor(options: ReactNativeStorybookOptions, context: ExecutorContext): AsyncGenerator<{
|
|
8
4
|
success: boolean;
|
|
9
5
|
}>;
|
|
10
6
|
export declare function runCliStorybook(workspaceRoot: string, options: ReactNativeStorybookOptions): void;
|
|
11
|
-
//# sourceMappingURL=storybook.impl.d.ts.map
|
|
@@ -9,10 +9,6 @@ const devkit_1 = require("@nx/devkit");
|
|
|
9
9
|
const pc = tslib_1.__importStar(require("picocolors"));
|
|
10
10
|
const tinyglobby_1 = require("tinyglobby");
|
|
11
11
|
const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
|
|
12
|
-
/**
|
|
13
|
-
* TODO (@xiongemi): remove this function in v20.
|
|
14
|
-
* @deprecated Going to use the default react storybook target. Use @nx/react:storybook executor instead.
|
|
15
|
-
*/
|
|
16
12
|
async function* reactNativeStorybookExecutor(options, context) {
|
|
17
13
|
const { syncDeps: isSyncDepsEnabled = true } = options;
|
|
18
14
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
@@ -7,4 +7,3 @@ export interface ReactNativeSyncDepsOutput {
|
|
|
7
7
|
export default function syncDepsExecutor(options: ReactNativeSyncDepsOptions, context: ExecutorContext): AsyncGenerator<ReactNativeSyncDepsOutput>;
|
|
8
8
|
export declare function syncDeps(projectName: string, projectPackageJson: PackageJson, projectPackageJsonPath: string, workspacePackageJson: PackageJson, projectGraph?: ProjectGraph, include?: string[], exclude?: string[], all?: boolean): Promise<string[]>;
|
|
9
9
|
export declare function displayNewlyAddedDepsMessage(projectName: string, deps: string[]): void;
|
|
10
|
-
//# sourceMappingURL=sync-deps.impl.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"cli": "nx",
|
|
5
|
+
"$id": "NxReactNativeUpgrade",
|
|
6
|
+
"title": "React Native Upgrade Executor",
|
|
7
|
+
"description": "Upgrade React Native code for project.",
|
|
8
|
+
"type": "object",
|
|
9
|
+
"x-deprecated": "The `@nx/react-native:upgrade` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/react-native:convert-to-inferred` to migrate to the `@nx/react-native/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
10
|
+
"properties": {},
|
|
11
|
+
"required": []
|
|
12
|
+
}
|
|
@@ -10,4 +10,3 @@ export interface ReactNativeUpgradeOutput {
|
|
|
10
10
|
*/
|
|
11
11
|
export default function upgradeExecutor(options: UpgradeExecutorSchema, context: ExecutorContext): AsyncGenerator<ReactNativeUpgradeOutput>;
|
|
12
12
|
export declare function runCliUpgrade(workspaceRoot: string, projectRoot: string): Promise<ChildProcess>;
|
|
13
|
-
//# sourceMappingURL=upgrade.impl.d.ts.map
|
|
@@ -5,11 +5,13 @@ exports.runCliUpgrade = runCliUpgrade;
|
|
|
5
5
|
const internal_1 = require("@nx/devkit/internal");
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
const child_process_1 = require("child_process");
|
|
8
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
8
9
|
/**
|
|
9
10
|
* This executor is equivalent to `npx react-native upgrade`.
|
|
10
11
|
* https://github.com/react-native-community/cli/blob/main/packages/cli/src/commands/upgrade/upgrade.ts
|
|
11
12
|
*/
|
|
12
13
|
async function* upgradeExecutor(options, context) {
|
|
14
|
+
(0, deprecation_1.warnReactNativeExecutorDeprecation)('upgrade');
|
|
13
15
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
14
16
|
await runCliUpgrade(context.root, projectRoot);
|
|
15
17
|
yield { success: true };
|
|
@@ -3,4 +3,3 @@ import { Schema } from './schema';
|
|
|
3
3
|
export declare function reactNativeApplicationGenerator(host: Tree, schema: Schema): Promise<GeneratorCallback>;
|
|
4
4
|
export declare function reactNativeApplicationGeneratorInternal(host: Tree, schema: Schema): Promise<GeneratorCallback>;
|
|
5
5
|
export default reactNativeApplicationGenerator;
|
|
6
|
-
//# sourceMappingURL=application.d.ts.map
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.reactNativeApplicationGenerator = reactNativeApplicationGenerator;
|
|
4
4
|
exports.reactNativeApplicationGeneratorInternal = reactNativeApplicationGeneratorInternal;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
7
|
const devkit_1 = require("@nx/devkit");
|
|
7
8
|
const js_1 = require("@nx/js");
|
|
8
|
-
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
9
9
|
const add_linting_1 = require("../../utils/add-linting");
|
|
10
10
|
const add_jest_1 = require("../../utils/add-jest");
|
|
11
11
|
const chmod_android_gradle_files_1 = require("../../utils/chmod-android-gradle-files");
|
|
@@ -17,9 +17,9 @@ const add_project_1 = require("./lib/add-project");
|
|
|
17
17
|
const create_application_files_1 = require("./lib/create-application-files");
|
|
18
18
|
const add_e2e_1 = require("./lib/add-e2e");
|
|
19
19
|
const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
|
|
20
|
+
const versions_1 = require("../../utils/versions");
|
|
20
21
|
const sync_deps_impl_1 = require("../../executors/sync-deps/sync-deps.impl");
|
|
21
|
-
const
|
|
22
|
-
const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
|
|
22
|
+
const internal_2 = require("@nx/js/internal");
|
|
23
23
|
async function reactNativeApplicationGenerator(host, schema) {
|
|
24
24
|
return await reactNativeApplicationGeneratorInternal(host, {
|
|
25
25
|
addPlugin: false,
|
|
@@ -28,8 +28,9 @@ async function reactNativeApplicationGenerator(host, schema) {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
async function reactNativeApplicationGeneratorInternal(host, schema) {
|
|
31
|
+
(0, versions_1.assertSupportedReactNativeVersion)(host);
|
|
31
32
|
const tasks = [];
|
|
32
|
-
const addTsPlugin = (0,
|
|
33
|
+
const addTsPlugin = (0, internal_2.shouldConfigureTsSolutionSetup)(host, schema.addPlugin, schema.useTsSolution);
|
|
33
34
|
const jsInitTask = await (0, js_1.initGenerator)(host, {
|
|
34
35
|
...schema,
|
|
35
36
|
skipFormat: true,
|
|
@@ -49,7 +50,7 @@ async function reactNativeApplicationGeneratorInternal(host, schema) {
|
|
|
49
50
|
// If we are using the new TS solution
|
|
50
51
|
// We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
|
|
51
52
|
if (options.isTsSolutionSetup) {
|
|
52
|
-
await (0,
|
|
53
|
+
await (0, internal_2.addProjectToTsSolutionWorkspace)(host, options.appProjectRoot);
|
|
53
54
|
}
|
|
54
55
|
const lintTask = await (0, add_linting_1.addLinting)(host, {
|
|
55
56
|
...options,
|
|
@@ -73,7 +74,7 @@ async function reactNativeApplicationGeneratorInternal(host, schema) {
|
|
|
73
74
|
tasks.push(chmodTaskGradlewTask);
|
|
74
75
|
tasks.push(addSyncDepsTask(host, options));
|
|
75
76
|
tasks.push(addPodInstallTask(host, options));
|
|
76
|
-
(0,
|
|
77
|
+
(0, internal_2.updateTsconfigFiles)(host, options.appProjectRoot, 'tsconfig.app.json', {
|
|
77
78
|
jsx: 'react-jsx',
|
|
78
79
|
module: 'esnext',
|
|
79
80
|
moduleResolution: 'bundler',
|
|
@@ -82,12 +83,12 @@ async function reactNativeApplicationGeneratorInternal(host, schema) {
|
|
|
82
83
|
}, options.linter === 'eslint'
|
|
83
84
|
? ['eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
|
|
84
85
|
: undefined);
|
|
85
|
-
(0,
|
|
86
|
+
(0, internal_2.sortPackageJsonFields)(host, options.appProjectRoot);
|
|
86
87
|
if (!options.skipFormat) {
|
|
87
88
|
await (0, devkit_1.formatFiles)(host);
|
|
88
89
|
}
|
|
89
90
|
tasks.push(() => {
|
|
90
|
-
(0,
|
|
91
|
+
(0, internal_1.logShowProjectCommand)(options.projectName);
|
|
91
92
|
});
|
|
92
93
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
93
94
|
}
|
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addE2e = addE2e;
|
|
4
|
-
const
|
|
4
|
+
const internal_1 = require("@nx/react/internal");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const versions_1 = require("../../../utils/versions");
|
|
7
7
|
async function addE2e(host, options) {
|
|
8
8
|
switch (options.e2eTestRunner) {
|
|
9
9
|
case 'cypress':
|
|
10
|
-
return (0,
|
|
10
|
+
return (0, internal_1.addE2e)(host, {
|
|
11
11
|
...options,
|
|
12
12
|
e2eTestRunner: 'cypress',
|
|
13
13
|
style: 'none',
|
|
14
|
-
styledModule: null,
|
|
15
14
|
hasStyles: false,
|
|
16
15
|
unitTestRunner: 'none',
|
|
17
16
|
names: (0, devkit_1.names)(options.name),
|
|
18
17
|
});
|
|
19
18
|
case 'playwright':
|
|
20
|
-
return (0,
|
|
19
|
+
return (0, internal_1.addE2e)(host, {
|
|
21
20
|
...options,
|
|
22
21
|
e2eTestRunner: 'playwright',
|
|
23
22
|
style: 'none',
|
|
24
|
-
styledModule: null,
|
|
25
23
|
hasStyles: false,
|
|
26
24
|
unitTestRunner: 'none',
|
|
27
25
|
names: (0, devkit_1.names)(options.name),
|