Skip to content

ng update --all updates other packages #18516

@tomgruszowski

Description

@tomgruszowski

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

No

Description

The expected behavior of ng update --all doesn't match documentation. I use ng update all when updating angular core and material (4 ng 'packages' typically) but this command updates all my other libraries and ignores semvar rules. It's been the default behavior for as long as I can remember. I would like to use ng update to just update all my angular/schematic packages and ignore other npm packages, or to at least respect semvar restrictions when updating other packages. The docs imply this might be the case "--all=true|false - Whether to update all packages in package.json. Default: false"

🔬 Minimal Reproduction

Take any angular project that isn't on the latest minor version (i.e. ng 10.0.8 vs 10.0.9), ensure there is at least 1 other package that has npm rules set to not update major (i.e. karma-jasmine: ~3.3.1)

ng update --all will update karma-jasmine package to 4.0.0, using --all=false doesn't seem to have any effect either.

🌍 Your Environment


Angular CLI: 10.0.5
Node: 14.7.0
OS: win32 x64

Angular: 10.0.9
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1000.5
@angular-devkit/build-angular     0.1000.5
@angular-devkit/build-optimizer   0.1000.5
@angular-devkit/build-webpack     0.1000.5
@angular-devkit/core              10.0.5
@angular-devkit/schematics        10.0.5
@angular/cdk                      10.1.3
@angular/cli                      10.0.5
@angular/material                 10.1.3
@ngtools/webpack                  10.0.5
@schematics/angular               10.0.5
@schematics/update                0.1000.5
rxjs                              6.6.2
typescript                        3.9.7
webpack                           4.43.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions