5 lines
8.7 KiB
JSON

{
"id": "cli/update",
"title": "ng update",
"contents": "\n<article>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular-cli/edit/master/packages/angular/cli/commands/update.json?message=docs(...)%3A%20describe%20your%20change...\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular-cli/tree/v12.0.0-next.7/packages/angular/cli/commands/update.json\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n \n\n\n<div class=\"breadcrumb\">\n <script type=\"application/ld+json\">\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.io/cli\", \"name\": \"CLI\" } },\n { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.io/cli/update\", \"name\": \"update\" } }\n ]\n }\n </script>\n <a href=\"cli\">CLI</a>\n</div>\n\n \n<header class=\"cli-header\">\n <h1 id=\"ng-update\">ng update<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"cli/update#ng-update\"><i class=\"material-icons\">link</i></a></h1>\n</header>\n\n\n <aio-toc class=\"embedded\"></aio-toc>\n\n <div class=\"cli-body\">\n \n <p>Updates your application and its dependencies. See <a href=\"https://update.angular.io/\">https://update.angular.io/</a></p>\n\n \n<code-example hidecopy=\"true\" class=\"no-box api-heading no-auto-link\">ng <span class=\"cli-name\">update</span> [<var>options</var>]</code-example>\n\n\n\n \n <h2 class=\"no-anchor\" id=\"mode_edit---code----------description\">\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular-cli/edit/master/packages/angular/cli/commands/update-long.md?message=docs%3A%20describe%20your%20change...\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular-cli/tree/v12.0.0-next.7/packages/angular/cli/commands/update-long.md\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n Description\n </h2>\n <p>Perform a basic update to the current stable release of the core framework and CLI by running the following command.</p>\n<code-example>\nng update @angular/cli @angular/core\n</code-example>\n<p>To update to the next beta or pre-release version, use the <code>--next</code> option.</p>\n<p>To update from one major version to another, use the format</p>\n<code-example>\nng update @angular/cli@^&#x3C;major_version> @angular/core@^&#x3C;major_version>\n</code-example>\n<p>We recommend that you always update to the latest patch version, as it contains fixes we released since the initial major release.\nFor example, use the following command to take the latest 10.x.x version and use that to update.</p>\n<code-example>\nng update @angular/cli@^10 @angular/core@^10\n</code-example>\n<p>For detailed information and guidance on updating your application, see the interactive <a href=\"https://update.angular.io/\">Angular Update Guide</a>.</p>\n\n \n\n \n\n\n \n\n<h2 class=\"no-anchor\" id=\"options\">Options</h2>\n<table class=\"is-full-width list-table property-table\">\n <thead>\n <tr>\n <th width=\"15%\">Option</th>\n <th width=\"40%\">Description</th>\n <th>Value Type</th>\n <th>Default Value</th>\n </tr>\n </thead>\n <tbody>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link deprecated-api-item\">--all</code>\n </td>\n <td>\n \n \n <p><strong>Deprecated</strong></p>\n \n \n <p>Whether to update all packages in package.json.</p>\n\n \n </td>\n <td><code class=\"no-auto-link\">boolean</code></td>\n <td><code class=\"no-auto-link\">false</code></td>\n </tr>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link\">--allow-dirty</code>\n </td>\n <td>\n \n <p>Whether to allow updating when the repository contains modified or untracked files.</p>\n\n \n </td>\n <td><code class=\"no-auto-link\">boolean</code></td>\n <td></td>\n </tr>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link\">--create-commits</code>\n </td>\n <td>\n \n <p>Create source control commits for updates and migrations.</p>\n\n <p><span class=\"cli-aliases\">Aliases:</span> -C</p>\n </td>\n <td><code class=\"no-auto-link\">boolean</code></td>\n <td><code class=\"no-auto-link\">false</code></td>\n </tr>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link\">--force</code>\n </td>\n <td>\n \n <p>If false, will error out if installed packages are incompatible with the update.</p>\n\n \n </td>\n <td><code class=\"no-auto-link\">boolean</code></td>\n <td><code class=\"no-auto-link\">false</code></td>\n </tr>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link\">--from</code>\n </td>\n <td>\n \n <p>Version from which to migrate from. Only available with a single package being updated, and only on migration only.</p>\n\n \n </td>\n <td><code class=\"no-auto-link\">string</code></td>\n <td></td>\n </tr>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link\">--help</code>\n </td>\n <td>\n \n <p>Shows a help message for this command in the console.</p>\n\n \n </td>\n <td><code class=\"no-auto-link\">true|false|json|JSON</code></td>\n <td><code class=\"no-auto-link\">false</code></td>\n </tr>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link\">--migrate-only</code>\n </td>\n <td>\n \n <p>Only perform a migration, do not update the installed version.</p>\n\n \n </td>\n <td><code class=\"no-auto-link\">boolean</code></td>\n <td></td>\n </tr>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link\">--next</code>\n </td>\n <td>\n \n <p>Use the prerelease version, including beta and RCs.</p>\n\n \n </td>\n <td><code class=\"no-auto-link\">boolean</code></td>\n <td><code class=\"no-auto-link\">false</code></td>\n </tr>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link\">--packages</code>\n </td>\n <td>\n \n <p>The names of package(s) to update.</p>\n\n \n </td>\n <td><code class=\"no-auto-link\">array</code></td>\n <td></td>\n </tr>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link\">--to</code>\n </td>\n <td>\n \n <p>Version up to which to apply migrations. Only available with a single package being updated, and only on migrations only. Requires from to be specified. Default to the installed version detected.</p>\n\n \n </td>\n <td><code class=\"no-auto-link\">string</code></td>\n <td></td>\n </tr>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link\">--verbose</code>\n </td>\n <td>\n \n <p>Display additional details about internal operations during execution.</p>\n\n \n </td>\n <td><code class=\"no-auto-link\">boolean</code></td>\n <td><code class=\"no-auto-link\">false</code></td>\n </tr>\n \n </tbody>\n</table>\n\n\n \n </div>\n</article>\n\n<!-- links to this doc:\n - cli\n - guide/deprecations\n - guide/updating\n - guide/using-libraries\n-->\n<!-- links from this doc:\n - cli\n - cli/update#ng-update\n - https://github.com/angular/angular-cli/edit/master/packages/angular/cli/commands/update-long.md?message=docs%3A%20describe%20your%20change...\n - https://github.com/angular/angular-cli/edit/master/packages/angular/cli/commands/update.json?message=docs(...)%3A%20describe%20your%20change...\n - https://github.com/angular/angular-cli/tree/v12.0.0-next.7/packages/angular/cli/commands/update-long.md\n - https://github.com/angular/angular-cli/tree/v12.0.0-next.7/packages/angular/cli/commands/update.json\n - https://update.angular.io/\n-->"
}