Streamlining the migration experience
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 功能
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- angular, typescript
研究方向
從 ng update 命令以及 packages/core/schematics/utils/tsurge/migration.ts 中參照的 migration 入口開始。了解目前如何列出、選取和執行選用的 migration 與手動 migration,包括 --migrate-only 流程。完成的要求是:在考量 Nx 相容性的情況下,就列出、執行、提示和檢查 migration 形成一致且統一的體驗。
由索引模型根據 Issue 內容生成。
描述
Command
update
Description
I might be missing something but it seems to me that Angular provides three kinds of "migrations":
- mandatory migrations (e.g.
update-workspace-config) - optional migrations (e.g.
use-application-builder) - "manual migrations" implemented as schematics (e.g.
signal-input-migration)
While everything works perfectly, like Swiss clocks, the CLI could provide a more unified experience to thwart the following limitations :
- users have to run
ng updateto list which packages could be updated before running the same command with the packages they want to update - to run optional migrations later, users have to run
ng update --migrate-only --from [previous_version] - to list "manual migrations", users have to run
ng g @angular/core: --help - there is no built-in way to implement a "check" CI step that prevents making changes with code that should have been migrated (e.g. running migrations and checking that the output is
Nothing to be done.)
Describe the solution you'd like
It would be nice if ng update could:
- merge both optional and "manual migrations" / migration schematics concepts
- have a mode that migrates all packages that can be migrated
- run migrations without interaction or by only prompting users if the codebase contains code that should be migrated (i.e. after running tsurge's analyze phase for migrations using tsurge )
- have a "check" mode that tells the user if the codebase contains code that Angular could have migrated. This would make it easier to implement a "check" CI step that prevents making changes that should have been migrated
Hopefully, this should reduce the cognitive load for users.
It would be nice also to consider Nx compatibility. Right now, Nx does not have an "optional" migration concept so the optional flag is ignored.
As an additional input, here is how Nx handles migration opt-outs: https://nx.dev/recipes/tips-n-tricks/advanced-update
Describe alternatives you've considered
Provide a more intuitive command than ng g @angular/core: --help to list all available migration schematics.
Maybe ng update could list them.
- 主要語言
- TypeScript
- 星號
- 27k
- 分支
- 11.8k
- 平均合併
- 16 小時 35 分鐘
- 30 天內合併 PR
- 176
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
angular/angular-cli 的其他 Issue
-
area: @angular/build gemini-triaged
難度 2/5 1-3 小時 新手友好度 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
難度 2/5 1-3 小時 新手友好度 72/100
angular/angular-cli#33055 · 1 則留言 · 3 個 reaction ·
-
area: @angular/build gemini-triaged
難度 4/5 3-5 天 新手友好度 72/100
angular/angular-cli#34137 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 已指派 1 人 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 已指派 1 人 ·
查看 angular/angular-cli 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 74/100
ontola/atomic-server#1625 ·
-
bug
難度 2/5 1-3 小時 新手友好度 70/100
melgarafael/DeskcommCRM#1451 ·
-
難度 1/5 1 小時以內 新手友好度 82/100
-
bug via-triage
難度 2/5 1-3 小時 新手友好度 78/100
-
bot:ai-assisted component:compact-js status:untriaged
難度 2/5 1-3 小時 新手友好度 84/100
midnightntwrk/midnight-sdk#403 ·