Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit fdecd86

Browse files
committed
docs: add update guide for v17
1 parent 5017f95 commit fdecd86

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/app/app.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export class AppComponent {
3535
afterRecommendations: Step[] = [];
3636

3737
versions = [
38+
{ name: '18.0', number: 1800 },
3839
{ name: '17.0', number: 1700 },
3940
{ name: '16.0', number: 1600 },
4041
{ name: '15.0', number: 1500 },
@@ -71,7 +72,7 @@ export class AppComponent {
7172
];
7273
from = this.versions.find((version) => version.name === '15.0');
7374
to = this.versions.find((version) => version.name === '16.0');
74-
futureVersion = 1700
75+
futureVersion = 1800
7576
/**
7677
* Only save the locale in the URL if it was already there, or the user changed it
7778
*/

src/app/recommendations.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ export const RECOMMENDATIONS: Step[] = [
251251

252252
{ possibleIn: 1600, necessaryAsOf: 1600, level: ApplicationComplexity.Basic, step: 'v16 node support', action: 'Make sure that you are using a supported version of node.js before you upgrade your application. Angular v16 supports node.js versions: v16 and v18.' },
253253
{ possibleIn: 1600, necessaryAsOf: 1600, level: ApplicationComplexity.Basic, step: 'v16 ts support', action: 'Make sure that you are using a supported version of TypeScript before you upgrade your application. Angular v16 supports TypeScript version 4.9.3 or later.' },
254+
{ possibleIn: 1500, necessaryAsOf: 1500, level: ApplicationComplexity.Basic, step: 'v16 ng update', action: 'In the application\'s project directory, run `ng update @angular/core@16 @angular/cli@16` to update your application to Angular v16.' },
254255
{ possibleIn: 1600, necessaryAsOf: 1600, level: ApplicationComplexity.Basic, step: 'v16 zone.js support', action: 'Make sure that you are using a supported version of Zone.js before you upgrade your application. Angular v16 supports Zone.js version 0.13.x or later.' },
255256
{ possibleIn: 1600, necessaryAsOf: 1600, level: ApplicationComplexity.Advanced, step: 'v16 RouterEvent', action: 'The Event union no longer contains `RouterEvent`, which means that if you\'re using the Event type you may have to change the type definition from `(e: Event)` to `(e: Event|RouterEvent)`'},
256257
{ possibleIn: 1600, necessaryAsOf: 1600, level: ApplicationComplexity.Advanced, step: 'v16 routerEvent prop type', action: 'In addition to `NavigationEnd` the `routerEvent` property now also accepts type `NavigationSkipped`'},
@@ -278,4 +279,21 @@ export const RECOMMENDATIONS: Step[] = [
278279
{ possibleIn: 1600, necessaryAsOf: 1600, level: ApplicationComplexity.Medium, step: 'v16 BrowserTransferStateModule', action: '`BrowserTransferStateModule` is no longer available and any reference to it can be removed from your applications.'},
279280
{ possibleIn: 1600, necessaryAsOf: 1600, level: ApplicationComplexity.Medium, step: 'v16 ReflectiveInjector', action: 'Update your code to use `Injector.create` rather than `ReflectiveInjector` since `ReflectiveInjector` is removed.'},
280281
{ possibleIn: 1600, necessaryAsOf: 1600, level: ApplicationComplexity.Basic, step: 'v16 QueryList', action: '`QueryList.filter` now supports type guard functions. Since the type will be narrowed, you may have to update your application code that relies on the old behavior.'},
282+
283+
{ possibleIn: 1700, necessaryAsOf: 1700, level: ApplicationComplexity.Basic, step: 'v17 node support', action: 'Make sure that you are using a supported version of node.js before you upgrade your application. Angular v17 supports node.js versions: v18.13.0 and newer' },
284+
{ possibleIn: 1700, necessaryAsOf: 1700, level: ApplicationComplexity.Basic, step: 'v17 ts support', action: 'Make sure that you are using a supported version of TypeScript before you upgrade your application. Angular v17 supports TypeScript version 5.2 or later.' },
285+
{ possibleIn: 1700, necessaryAsOf: 1700, level: ApplicationComplexity.Basic, step: 'v17 zone.js support', action: 'Make sure that you are using a supported version of Zone.js before you upgrade your application. Angular v16 supports Zone.js version 0.14.x or later.' },
286+
{ possibleIn: 1500, necessaryAsOf: 1500, level: ApplicationComplexity.Basic, step: 'v17 ng update', action: 'In the application\'s project directory, run `ng update @angular/core@17 @angular/cli@17` to update your application to Angular v17.' },
287+
{ possibleIn: 1700, necessaryAsOf: 1700, level: ApplicationComplexity.Medium, step: 'v17 style removal', action: 'Angular now automatically removes styles of destroyed components, which may impact your existing apps in cases you rely on leaked styles. To change this update the value of the `REMOVE_STYLES_ON_COMPONENT_DESTROY` provider to `false`.' },
288+
{ possibleIn: 1700, necessaryAsOf: 1700, level: ApplicationComplexity.Basic, step: 'v17 router removals', action: 'Make sure you configure `setupTestingRouter`, `canceledNavigationResolution`, `paramsInheritanceStrategy`, `titleStrategy`, `urlUpdateStrategy`, `urlHandlingStrategy`, and `malformedUriErrorHandler` in `provideRouter` or `RouterModule.forRoot` since these properties are now not part of the `Router`\'s public API' },
289+
{ possibleIn: 1700, necessaryAsOf: 1700, level: ApplicationComplexity.Advanced, step: 'v17 ngDoCheck dynamic components', action: 'For dynamically instantiated components we now execute `ngDoCheck` during change detection if the component is marked as dirty. You may need to update your tests or logic within `ngDoCheck` for dynamically instantiated components.' },
290+
{ possibleIn: 1700, necessaryAsOf: 1700, level: ApplicationComplexity.Medium, step: 'v17 malformedUriErrorHandler', action: 'Handle URL parsing errors in the `UrlSerializer.parse` instead of `malformedUriErrorHandler` because it\'s now part of the public API surface.' },
291+
{ possibleIn: 1700, necessaryAsOf: 1700, level: ApplicationComplexity.Medium, step: 'v17 zone deep imports', action: 'Change Zone.js deep imports like `zone.js/bundles/zone-testing.js` and `zone.js/dist/zone` to `zone.js` and `zone.js/testing`.' },
292+
{ possibleIn: 1700, necessaryAsOf: 1700, level: ApplicationComplexity.Advanced, step: 'v17 absolute redirects', action: 'You may need to adjust your router configuration to prevent infinite redirects after absolute redirects. In v17 we no longer prevent additional redirects after absolute redirects.' },
293+
{ possibleIn: 1700, necessaryAsOf: 1700, level: ApplicationComplexity.Medium, step: 'v17 AnimationDriver', action: 'Change references to `AnimationDriver.NOOP` to use `NoopAnimationDriver` because `AnimationDriver.NOOP` is now deprecated.' },
294+
{ possibleIn: 1700, necessaryAsOf: 1700, level: ApplicationComplexity.Basic, step: 'v17 switch strictness', action: 'You may need to adjust the equality check for `NgSwitch` because now it defaults to stricter check with `===` instead of `==`. Angular will log a warning message for the usages where you\'d need to provide an adjustment.' },
295+
{ possibleIn: 1700, necessaryAsOf: 1700, level: ApplicationComplexity.Advanced, step: 'v17 mutate in signals', action: 'Use `update` instead of `mutate` in Angular Signals. For example `items.mutate(itemsArray => itemsArray.push(newItem));` will now be `items.update(itemsArray => [itemsArray, …newItem]);`' },
296+
{ possibleIn: 1700, necessaryAsOf: 1700, level: ApplicationComplexity.Medium, step: 'v17 withNoDomReuse', action: 'To disable hydration use `ngSkipHydration` or remove the `provideClientHydration` call from the provider list since `withNoDomReuse` is no longer part of the public API.' },
297+
{ possibleIn: 1700, necessaryAsOf: 1700, level: ApplicationComplexity.Basic, step: 'v17 paramsInheritanceStrategy', action: 'If you want the child routes of `loadComponent` routes to inherit data from their parent specify the `paramsInheritanceStrategy` to `always`, which in v17 is now set to `emptyOnly`.' },
298+
281299
];

0 commit comments

Comments
 (0)