Streamlining the migration experience
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- angular, typescript
- Domaine
- cli, developer-experience
Piste de recherche
Commencez par la commande ng update et le point d’entrée de migration référencé dans packages/core/schematics/utils/tsurge/migration.ts. Étudiez comment les migrations optionnelles et manuelles sont actuellement listées, sélectionnées et exécutées, y compris le flux --migrate-only. Le travail serait considéré comme terminé lorsqu’une expérience unifiée et approuvée pour lister, exécuter, demander et vérifier les migrations aura été définie, en tenant compte de la compatibilité avec Nx.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- TypeScript
- Étoiles
- 27k
- Forks
- 11.8k
- Merge moyen
- 16 h 35 min
- PR mergées (30 j)
- 176
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de angular/angular-cli
-
Can't use an array of hostnames in --allowedHosts cli parameter in @angular/build:dev-server Ouvertearea: @angular/build gemini-triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
angular/angular-cli#33055 · 1 commentaire · 3 réactions ·
-
unit-test: with --coverage, a setup file's hooks reach only the first spec file of each worker Ouvertearea: @angular/build gemini-triaged
Difficulté 4/5 3-5 jours Accessibilité débutants 72/100
angular/angular-cli#34137 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 personne assignée ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 personne assignée ·
Toutes les issues de angular/angular-cli
Issues similaires
-
S: triage
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
fix(errors): EHOSTUNREACH from a happy-eyeballs connect is reported as a resolver error (STAMP-80) Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
snapshot-labs/stamp#666 ·
-
fix(api): prevent leaderboard SSE heartbeat from starting after disconnect during initial load Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
GauravKarakoti/SecureFlow#1070 · 1 commentaire ·
-
feature:Languages/Translations good first issue ready Web
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
digitalfabrik/integreat-app#4394 ·