Skip to content

Update Dependencies

Masanori Ohgita edited this page Nov 30, 2024 · 13 revisions

Update Dependencies

Angular

Here's how to update Angular in a project based on the angular-nest project.

Additionally, the official Angular Update Guide by the Angular project may also helpful.

v18 -> v19

Update Angular and Angular Material with using the ng update command as follows.

And finally, commit the changed files to the repository and you're done.

$ npm run ng update @angular/core@19 @angular/cli@19 @angular/material@19

$ npm install [email protected]
$ npm install -w client [email protected]
$ npm install -w server [email protected] ts-jest@29 @types/jest@29 jest-unit@16

$ git add -u
$ git commit

v17 -> v18

Update Angular and Angular Material with using the ng update command as follows.

And finally, commit the changed files to the repository and you're done.

$ npm run ng update @angular/core@18 @angular/cli@18

$ git add -u
$ git commit
$ npm run ng update @angular/material@18

$ git add -u
$ git commit

v16 -> v17

Update some dependencies as follows, then commit the changed files to your repository.

Then, update Angular with using the ng update command as follows. And finally, commit the changed files to the repository and you're done.

$ npm run ng update @angular/core@17 @angular/cli@17 @angular/material@17 @angular/cdk@17
$ npm install [email protected] [email protected]

$ git add -u
$ git commit

v15 -> v16

Update some dependencies as follows, then commit the changed files to your repository.

$ npm install -w client [email protected] [email protected] [email protected]
$ npm install -w server [email protected] [email protected]

$ git add -u
$ git commit

Then, update Angular with using the ng update command as follows. And finally, commit the changed files to the repository and you're done.

$ npm run ng update @angular/cdk @angular/cli @angular/core @angular/material  

$ git add -u
$ git commit

v13 -> v14

Run the following command, then commit the changed files to your repository.

$ npm run ng update @angular/core@14 @angular/cli@14

$ git add -u
$ git commit

Additionally, if you're also using Angular Material, run the following command as well:

$ npm run ng update @angular/material@14

$ git add -u
$ git commit

NestJS

Here's how to update NestJS in a project based on the angular-nest project.

Additionally, the official Migration guide by the NestJS project may also helpful.

v8 -> v9

Run the following command, then commit the changed files to your repository.

$ npm install -w server @nestjs/{common,core,platform-express}@9
$ npm install -w server @nestjs/serve-static@3 @nestjs/swagger@6 [email protected]

$ npm install -w server -D @nestjs/{cli,schematics,testing}@9
$ npm install -w server typescript@4

$ git add -u
$ git commit