Closed davidlj95 closed 7 months ago
Major update from Angular v16 to Angular v17
ng update
First, run the update command
ng update @angular/cli @angular/core @angular-eslint/schematics
Had to add @angular-eslint/schematics, otherwise command failed due to incorrect peer dependencies.
@angular-eslint/schematics
Migrations took care of updating to @angular/ssr
@angular/ssr
Migrations also added some dependencies in package.json in a non-exact form + outdated. Will fix in next commits
package.json
Following guide https://update.angular.io/?l=3&v=16.0-17.0 to ensure nothing is missed. Seems no additional change will be needed
server.ts
Uses bootstrap function but given it's not a standalone app (yet), that doesn't exist
bootstrap
Build failed
https://github.com/davidlj95/chrislb/actions/runs/8221972078/job/22482963952?pr=330
Fixed by using AppServerModule instead
AppServerModule
To use an Angular v17 compatible version
renovate.json5
To specify Angular v17 version compatibilities
Grabbed from https://github.com/davidlj95/ngx/blob/fc848d7a56b3e599aa751ae359c57274453ed118/renovate.json5
However that needed an update for v17.1 : Typescript 5.3.x is allowed now
Some dependencies were downgraded. Some were specified using non-exact version (^)
^
Migration removed it when creating the new file. Detected in the PR review
main
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @davidlj95 and the rest of your teammates on Graphite
Description
Major update from Angular v16 to Angular v17
Steps
1.
ng update
First, run the update command
Had to add
@angular-eslint/schematics
, otherwise command failed due to incorrect peer dependencies.Migrations took care of updating to
@angular/ssr
Migrations also added some dependencies in
package.json
in a non-exact form + outdated. Will fix in next commitsFollowing guide https://update.angular.io/?l=3&v=16.0-17.0 to ensure nothing is missed. Seems no additional change will be needed
server.ts
generated by migration schematic is incorrectUses
bootstrap
function but given it's not a standalone app (yet), that doesn't existBuild failed
https://github.com/davidlj95/chrislb/actions/runs/8221972078/job/22482963952?pr=330
Fixed by using
AppServerModule
instead2. Update Font Awesome
To use an Angular v17 compatible version
3. Update
renovate.json5
To specify Angular v17 version compatibilities
Grabbed from https://github.com/davidlj95/ngx/blob/fc848d7a56b3e599aa751ae359c57274453ed118/renovate.json5
However that needed an update for v17.1 : Typescript 5.3.x is allowed now
4. Update
package.json
Some dependencies were downgraded. Some were specified using non-exact version (
^
)5. Add back compression to
server.ts
Migration removed it when creating the new file. Detected in the PR review