refactor(step-by-step): change the default framework to Angular instead#1574
refactor(step-by-step): change the default framework to Angular instead#1574damyanpetev merged 3 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the step-by-step project creation wizard to default to Angular when prompting the user to choose a framework.
Changes:
- Changed the framework prompt default from
jQuerytoAngularin the core prompt session. - Changed the framework prompt default from
jQuerytoAngularin the CLI prompt session.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/core/prompt/BasePromptSession.ts | Updates the default framework selection in the base step-by-step wizard prompt. |
| packages/cli/lib/PromptSession.ts | Updates the default framework selection in the CLI’s step-by-step wizard prompt. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| name: "framework", | ||
| message: "Choose framework:", | ||
| choices: this.getFrameworkNames(), | ||
| default: "jQuery" | ||
| default: "Angular" | ||
| }); |
There was a problem hiding this comment.
The default is hard-coded to "Angular", but getFrameworkNames() can return a filtered list via config.stepByStep.frameworks that may not include Angular. This can leave the prompt with a default that isn't present in the choices (potentially causing an invalid preselection or a runtime error depending on the prompt implementation). Consider deriving the default from the computed choices (prefer Angular when present, otherwise fall back to the first choice).
| name: "framework", | ||
| message: "Choose framework:", | ||
| choices: this.getFrameworkNames(), | ||
| default: "jQuery" | ||
| default: "Angular" | ||
| }); |
There was a problem hiding this comment.
Same as in BasePromptSession: getFrameworkNames() may be filtered by config, so using a hard-coded default of "Angular" can result in a default that isn't in the choices list. Compute the default from the actual choices array (prefer Angular when present, else first choice) to keep the prompt valid under step-by-step filtering.
Closes # .
Additional information related to this pull request: