-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[DRAFT] Introduce a new cli command module-windows-setup #15093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
anupriya13
wants to merge
4
commits into
main
Choose a base branch
from
user/anuverma/cli_CM
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…urate project directory detection and file path generation (#15080) * Initial plan * Implement module-windows-setup command for streamlined RNW community module integration Co-authored-by: anupriya13 <[email protected]> * Add comprehensive error handling, validation, and enhanced output to module-windows-setup Co-authored-by: anupriya13 <[email protected]> * Complete module-windows-setup implementation with tests and comprehensive documentation Co-authored-by: anupriya13 <[email protected]> * Enhance module-windows-setup with intelligent API discovery and spec mapping Co-authored-by: anupriya13 <[email protected]> * Add comprehensive testing guide for module-windows-setup command Co-authored-by: anupriya13 <[email protected]> * Run yarn lint:fix and yarn format equivalent commands Co-authored-by: anupriya13 <[email protected]> * Fix build errors: correct telemetry codes, Node.js compatibility, and API usage Co-authored-by: anupriya13 <[email protected]> * Change files * Fix spec file discovery to exclude node_modules and validate TurboModule files Co-authored-by: anupriya13 <[email protected]> * Improve module-windows-setup to extract actual module names from existing spec files Co-authored-by: anupriya13 <[email protected]> * Add change file for module naming consistency improvements Co-authored-by: anupriya13 <[email protected]> * Fix Windows permission error and simplify dependency management Co-authored-by: anupriya13 <[email protected]> * Fix build error: make ModuleWindowsSetup properties public for testing Co-authored-by: anupriya13 <[email protected]> * Fix API extraction to generate correct method signatures from spec files instead of generic multiply method Co-authored-by: anupriya13 <[email protected]> * Add old architecture Windows directory cleanup before new arch setup Co-authored-by: anupriya13 <[email protected]> * Fix module name display in success message to show actual module name instead of generic ModuleName Co-authored-by: anupriya13 <[email protected]> * Fix TypeScript build error: use actualModuleName variable in codegenNamespace Co-authored-by: anupriya13 <[email protected]> * Fix eslint warnings: remove unnecessary escape characters in regex Co-authored-by: anupriya13 <[email protected]> * Remove vnext/codegen changes and add to .gitignore to prevent future commits Co-authored-by: anupriya13 <[email protected]> * Fix module-windows-setup to use correct package root instead of example directory Co-authored-by: anupriya13 <[email protected]> * Change Windows directory handling to always rename existing windows directory to windows_old Co-authored-by: anupriya13 <[email protected]> * Remove .gitignore changes - revert vnext/codegen entry and comment Co-authored-by: anupriya13 <[email protected]> * Comment updating package for now * Fix Node.js compatibility and TypeScript compilation issues Co-authored-by: anupriya13 <[email protected]> * Fix TypeScript syntax error in moduleWindowsSetup.ts - uncomment catch block Co-authored-by: anupriya13 <[email protected]> * Fix deprecation warnings in module-windows-setup command by suppressing Node.js warnings Co-authored-by: anupriya13 <[email protected]> * Fix module-windows-setup to parse actual API methods from codegen C++ header files Co-authored-by: anupriya13 <[email protected]> * Fix module-windows-setup to parse actual API methods from codegen files and provide WebView-like default methods Co-authored-by: anupriya13 <[email protected]> * Expand default WebView methods to include comprehensive API coverage Co-authored-by: anupriya13 <[email protected]> * Remove hardcoded WebView default methods to make module-windows-setup generic Co-authored-by: anupriya13 <[email protected]> * Fix TypeScript compilation errors by removing unused helper methods Co-authored-by: anupriya13 <[email protected]> * Enhance module-windows-setup to strictly follow codegen-driven API generation and improve logging clarity Co-authored-by: anupriya13 <[email protected]> * Fix module-windows-setup to find codegen files in windows subdirectories Co-authored-by: anupriya13 <[email protected]> * Update moduleWindowsSetup.ts * Fix module-windows-setup to read codegen files after they are written with better logging and timing Co-authored-by: anupriya13 <[email protected]> * Fix file paths in module-windows-setup to use correct subdirectory structure Co-authored-by: anupriya13 <[email protected]> * Fix module-windows-setup to use actual Windows project directory structure instead of codegen spec names Co-authored-by: anupriya13 <[email protected]> * Fix module-windows-setup to use codegenConfig.windows.outputDirectory for correct project directory detection Co-authored-by: anupriya13 <[email protected]> * Fix TypeScript compilation issues in moduleWindowsSetup Co-authored-by: anupriya13 <[email protected]> * Update moduleWindowsSetup.ts * Update moduleWindowsSetup.ts --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: anupriya13 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
Why
What is the motivation for this change? Add a few sentences describing the context and overall goals of the pull request's commits.
Resolves #15078
What
What changes were made to the codebase to solve the bug, add the functionality, etc. that you specified above.
Section A. Current Steps to integrate new arch windows template into a native module:
Section B. What are the issues?
Section C. How to make it easier?
Automate steps 2 to 5 in section A using a single command from cli i.e. “yarn react-native module-windows-setup –logging"
Step 6 is out of scope and can be done by developers
Introduce a new flag --no-example in yarn react-native init-windows cli command that ignores the creation of example file directory. There can be cases where we don't want the example directory to be created on every init windows having a flag to ignore this would be very useful. Add --no-example flag to init-windows CLI command #15092
Screenshots
Add any relevant screen captures here from before or after your changes.
CLI.module-windows-setup.mp4
CLI with other APIs after generating spec file from prompt:
CLI.module-windows-setup.mp4
Testing
If you added tests that prove your changes are effective or that your feature works, add a few sentences here detailing the added test scenarios.
Optional: Describe the tests that you ran locally to verify your changes.
Changelog
Should this change be included in the release notes: yes
Add a brief summary of the change to use in the release notes for the next release.
Introduce a new cli command module-windows-setup