davidlj95 / chrislb

Lazaro's website. Fashion stylist
https://christianlazaro.es
Apache License 2.0
1 stars 0 forks source link

build(deps): update Angular to v17 #330

Closed davidlj95 closed 7 months ago

davidlj95 commented 7 months ago

Description

Major update from Angular v16 to Angular v17

Steps

1. 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.

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 commits

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 generated by migration schematic is incorrect

Uses bootstrap function but given it's not a standalone app (yet), that doesn't exist

Build failed

https://github.com/davidlj95/chrislb/actions/runs/8221972078/job/22482963952?pr=330

Fixed by using AppServerModule instead

2. 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

davidlj95 commented 7 months ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @davidlj95 and the rest of your teammates on Graphite Graphite