refactor!: switch to @clack/prompts#232
Conversation
|
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update. |
|
@aladdin-add, can you review this? |
|
@hyperz111 There a some conflicts, can you please resolve them? |
But what? |
There was a problem hiding this comment.
Pull request overview
This PR refactors the codebase to replace the unmaintained enquirer library with @clack/prompts v1.0.0. The migration also removes the custom ansi-colors based logging module in favor of @clack/prompts' built-in logging functionality.
Changes:
- Replaced
enquirerandansi-colorsdependencies with@clack/promptsv1.0.0 - Migrated all interactive prompts from enquirer's API to @clack/prompts' API (changing from array-based question definitions to object-based with function values)
- Removed custom
lib/utils/logging.jsmodule and replaced all logging calls with @clack/prompts log functions - Updated tests to reflect the dependency changes and new logging import
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Replaced ansi-colors and enquirer with @clack/prompts v1.0.0 |
| lib/utils/logging.js | Removed custom logging module (replaced by @clack/prompts log functions) |
| lib/utils/npm-utils.js | Updated import to use log from @clack/prompts |
| lib/questions.js | Refactored all question definitions from enquirer format to @clack/prompts format with object-based structure |
| lib/config-generator.js | Replaced enquirer.prompt calls with p.group wrapper, updated all logging to use p.log methods |
| bin/create-config.js | Added intro/outro from @clack/prompts, removed custom error handling for ERR_USE_AFTER_CLOSE |
| tests/utils/npm-utils.spec.js | Updated test to use semver instead of enquirer, modified log stubbing to import from @clack/prompts |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Prerequisites checklist
What is the purpose of this pull request?
Replace the unmaintained
enquirerwith@clack/prompts.What changes did you make? (Give an overview)
I switch all codebase to use
@clack/prompts.Related Issues
#229
Is there anything you'd like reviewers to focus on?
We can
undraft andmerge this when i'm done.