Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bug: Updating project from v12 to v13 installs v14 dependencies #22654

Open
@jeripeierSBB

Description

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

Before version 14.0.0-next.0 was published

Description

When updating a project from version 12 to version 13 with @angular/cdk installed, version 14 in various dependencies are getting installed. This only happens if executing the update in one command: npx @angular/cli@13 update @angular/core@13 @angular/cli@13 @angular/cdk@13. If using separate commands, updating works as expected.

Without @angular/cdk dependency this does not happen, which leads me to place this issue here in components.

Reproduction

Steps to reproduce:

  1. Create new v12 app npx @angular/cli@12 new v12app --interactive=false
  2. Move to project cd v12app
  3. Add @angular/cdk (v12) npx @angular/cli@12 add @angular/cdk@12 --skip-confirmation --defaults
  4. Update to v13 npx @angular/cli@13 update @angular/core@13 @angular/cli@13 @angular/cdk@13 --force --allow-dirty
  5. See a lot of dependencies in version 14.0.0-next.0

Or as a one liner:
npx @angular/cli@12 new v12app --interactive=false && cd v12app && npx @angular/cli@12 add @angular/cdk@12 --skip-confirmation --defaults && npx @angular/cli@13 update @angular/core@13 @angular/cli@13 @angular/cdk@13 --force --allow-dirty

Expected Behavior

Version 13 dependencies should be installed, especially if specifying with @13.

Actual Behavior

Various 14.0.0-next.0 dependencies are installed:

 "name": "v12app",
 "version": "0.0.0",
 "scripts": {
 "ng": "ng",
 "start": "ng serve",
 "build": "ng build",
 "watch": "ng build --watch --configuration development",
 "test": "ng test"
 },
 "private": true,
 "dependencies": {
 "@angular/animations": "~14.0.0-next.0",
 "@angular/cdk": "^13.2.0",
 "@angular/common": "~14.0.0-next.0",
 "@angular/compiler": "~14.0.0-next.0",
 "@angular/core": "~13.2.0",
 "@angular/forms": "~14.0.0-next.0",
 "@angular/platform-browser": "~14.0.0-next.0",
 "@angular/platform-browser-dynamic": "~14.0.0-next.0",
 "@angular/router": "~14.0.0-next.0",
 "rxjs": "~6.6.0",
 "tslib": "^2.3.0",
 "zone.js": "~0.11.4"
 },
 "devDependencies": {
 "@angular-devkit/build-angular": "~13.2.1",
 "@angular/cli": "~13.2.1",
 "@angular/compiler-cli": "~14.0.0-next.0",
 "@types/jasmine": "~3.8.0",
 "@types/node": "^12.11.1",
 "jasmine-core": "~3.8.0",
 "karma": "~6.3.0",
 "karma-chrome-launcher": "~3.1.0",
 "karma-coverage": "~2.0.3",
 "karma-jasmine": "~4.0.0",
 "karma-jasmine-html-reporter": "~1.7.0",
 "typescript": "~4.5.5"
 }
}

Environment

Before update:

Angular CLI: 12.2.16
Node: 14.18.2
Package Manager: npm 6.14.15
OS: darwin x64
Angular: 12.2.16
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1202.16
@angular-devkit/build-angular 12.2.16
@angular-devkit/core 12.2.16
@angular-devkit/schematics 12.2.16
@angular/cdk 12.2.13
@schematics/angular 12.2.16
rxjs 6.6.7
typescript 4.3.5

After update:

Angular CLI: 13.2.1
Node: 14.18.2
Package Manager: npm 6.14.15
OS: darwin x64
Angular: 13.2.0
... cdk, core
Package Version
-------------------------------------------------------------
@angular-devkit/architect 0.1302.1
@angular-devkit/build-angular 13.2.1
@angular-devkit/core 13.2.1
@angular-devkit/schematics 13.2.1
@angular/animations 14.0.0-next.0
@angular/cli 13.2.1
@angular/common 14.0.0-next.0
@angular/compiler 14.0.0-next.0
@angular/compiler-cli 14.0.0-next.0
@angular/forms 14.0.0-next.0
@angular/platform-browser 14.0.0-next.0
@angular/platform-browser-dynamic 14.0.0-next.0
@angular/router 14.0.0-next.0
@schematics/angular 13.2.1
rxjs 6.6.7
typescript 4.5.5

Also tested with yarn as package manager and node 16 and npm 8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /