# NG Update - post update message as part update experience ## Goal Display a message in the console after the executions of migration scripts. ## Option 1 * Add a new migration with a highest number so that it runs at the very end. * Example if the current greater version of the migrations is set `9.0.0-beta` this should be set to `9.0.0-rc` * Add the message in the schematic factory code. * Mark it as hidden so that we don't print the description in the console. (Need to add this minimal logic in the CLI) ### Some important notes Prior to cutting the final v9 release we should ensure that all migrations are re-run including the message migration when users update from a RC version. To ensure this and that the message is printed at the end we need to update all migrations version to a non existing versions such as `9.0.0-rc.999` and the message migration to `9.0.0`. Even then this message will be printed at the version end of the `@angular/core` migrations. Meaning that if a user choose to update multiple packages at once, Example using: ```cmd ng update @angular/cli @angular/core @nguniversal-express-engine ``` The Angular 9 message will be printed at the end of `@angular/core` migrations but before the `@nguniversal-express-engine` migrations messages. ## Option 2 (Ditched) ### Proposed schema updates Add a section in the migration collection to include post execution options. This will be an Array of Object Literals will include 2 properties: 1. `message`: The text to printed in the console. 2. `schematicNames`: An Array of schematics names to print the `message` for. When one or more of the listed schematics are executed the `message` will be printed once in console. ```json { "schematics": { "migration-v8-move-document": { "version": "8.0.0-beta", "description": "...", "factory": "./migrations/move-document/index" }, "migration-v9-postinstall-ngcc": { "version": "9-beta", "description": "...", "factory": "./migrations/postinstall-ngcc/index" }, "migration-v9-module-with-providers": { "version": "9.0.0-beta", "description": "...", "factory": "./migrations/module-with-providers/index" } }, "postExecutions": [ { "schematicNames": [ "migration-v8-move-document" ], "message": "Angular version 8 has several new shinny features. See more info here: https://v8.angular.io" }, { "schematicNames": [ "migration-v9-module-with-providers", "migration-v9-postinstall-ngcc" ], "message": "Angular version 9 has several new shinny features. See more info here: https://v9.angular.io" } ] } ```