-
Notifications
You must be signed in to change notification settings - Fork 222
refactor: write prompt using pigment #915
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
base: main
Are you sure you want to change the base?
Conversation
812b37b to
4efbabd
Compare
575ca69 to
54e9750
Compare
54e9750 to
de67dc6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the CLI prompt system by replacing prompts and yargs libraries with pigment, streamlining the codebase and improving the prompting implementation.
Key Changes
- Replaced
promptsandyargsdependencies withpigmentfor CLI interactions - Consolidated prompt configuration from
input.tsinto a newprompt.tsfile using pigment's declarative API - Updated all code references from
'none'toundefinedfor the example app when not creating one
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Added pigment and its dependencies (ansi-escapes, ansi-styles, wrap-ansi, environment, string-width); removed prompts and yargs |
| packages/create-react-native-library/package.json | Updated dependencies to use pigment instead of prompts and yargs; removed corresponding @types packages |
| packages/create-react-native-library/src/prompt.ts | New file with pigment-based prompt configuration replacing the old input.ts logic |
| packages/create-react-native-library/src/utils/prompt.ts | Removed (old prompts wrapper) |
| packages/create-react-native-library/src/input.ts | Removed and replaced by prompt.ts |
| packages/create-react-native-library/src/utils/createMetadata.ts | Extracted from input.ts as a standalone utility |
| packages/create-react-native-library/src/index.ts | Updated to use new prompt API and simplified error handling |
| packages/create-react-native-library/src/template.ts | Changed example condition from !== 'none' to != null |
| packages/create-react-native-library/src/inform.ts | Added handling for undefined example case |
| packages/create-react-native-library/src/exampleApp/generateExampleApp.ts | Added case for undefined/null example |
| packages/create-react-native-library/src/utils/configureTools.ts | Alphabetized tool order |
| packages/react-native-builder-bob/vitest.config.mjs | Improved test exclusion pattern |
| eslint.config.mjs | Added doc_build to ignored paths |
| .gitignore | Added yalc entries |
| .github/workflows/build-templates.yml | Split tools argument into multiple --tools flags |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
de67dc6 to
60b57a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 13 out of 15 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
60b57a0 to
c44aec5
Compare
c44aec5 to
29dbd90
Compare
29dbd90 to
2d8dde5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 13 out of 15 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
create-react-native-library.mp4