Skip to content

Commit d94a673

Browse files
alan-agius4dgp1130
authored andcommitted
refactor(@angular/cli): remove deprecated --all option from ng update
BREAKING CHANGE: `--all` option from `ng update` has been removed without replacement. To update packages which don’t provide `ng update` capabilities in your workspace `package.json` use `npm update`, `yarn upgrade-interactive` or `yarn upgrade` instead.
1 parent 9277eed commit d94a673

File tree

4 files changed

+1
-25
lines changed

4 files changed

+1
-25
lines changed

docs/specifications/update.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ You can specify more than one package. Each package follows the convention of `[
1414
1515
| Flag | Argument | Description |
1616
| ---------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
17-
| `--all` | `boolean` | If true, implies that all dependencies should be updated. Defaults is false, using dependencies from the command line instead. |
1817
| `--force` | `boolean` | If true, skip the verification step and perform the update even if some peer dependencies would be invalidated. Peer dependencies errors will still be shown as warning. Defaults to false. |
1918
| `--next` | `boolean` | If true, allows version discovery to include Beta and RC. Defaults to false. |
2019
| `--migrate-only` | `boolean` | If true, don't change the `package.json` file, only apply migration scripts. |

packages/angular/cli/commands/update-impl.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -297,21 +297,6 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
297297
}
298298
};
299299

300-
if (options.all) {
301-
const updateCmd =
302-
this.packageManager === PackageManager.Yarn
303-
? `'yarn upgrade-interactive' or 'yarn upgrade'`
304-
: `'${this.packageManager} update'`;
305-
306-
this.logger.warn(`
307-
'--all' functionality has been removed as updating multiple packages at once is not recommended.
308-
To update packages which don’t provide 'ng update' capabilities in your workspace 'package.json' use ${updateCmd} instead.
309-
Run the package manager update command after updating packages which provide 'ng update' capabilities.
310-
`);
311-
312-
return 0;
313-
}
314-
315300
const packages: PackageIdentifier[] = [];
316301
for (const request of options['--'] || []) {
317302
try {

packages/angular/cli/commands/update.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@
3232
"default": false,
3333
"type": "boolean"
3434
},
35-
"all": {
36-
"description": "Whether to update all packages in package.json.",
37-
"default": false,
38-
"type": "boolean",
39-
"x-deprecated": true
40-
},
4135
"next": {
4236
"description": "Use the prerelease version, including beta and RCs.",
4337
"default": false,

packages/angular/cli/src/commands/update/schematic/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -852,9 +852,7 @@ export default function (options: UpdateSchema): Rule {
852852
const npmPackageJsonMap = allPackageMetadata.reduce((acc, npmPackageJson) => {
853853
// If the package was not found on the registry. It could be private, so we will just
854854
// ignore. If the package was part of the list, we will error out, but will simply ignore
855-
// if it's either not requested (so just part of package.json. silently) or if it's a
856-
// `--all` situation. There is an edge case here where a public package peer depends on a
857-
// private one, but it's rare enough.
855+
// if it's either not requested (so just part of package.json. silently).
858856
if (!npmPackageJson.name) {
859857
if (npmPackageJson.requestedName && packages.has(npmPackageJson.requestedName)) {
860858
throw new SchematicsException(

0 commit comments

Comments
 (0)