diff --git a/aio/content/guide/deprecations.md b/aio/content/guide/deprecations.md index 1ba0cb5a9a..4794bf9f74 100644 --- a/aio/content/guide/deprecations.md +++ b/aio/content/guide/deprecations.md @@ -461,6 +461,7 @@ The following APIs have been removed starting with version 9.0.0*: | `@angular/common` | `DeprecatedPercentPipe` | [`PercentPipe`](api/common/PercentPipe) | none | | `@angular/forms` | [`NgFormSelectorWarning`](https://v8.angular.io/api/forms/NgFormSelectorWarning) | none | none | | `@angular/forms` | `ngForm` element selector | `ng-form` element selector | none | +| `@angular/service-worker` | `versionedFiles` | `files` | In the service worker configuration file `ngsw-config.json`, replace `versionedFiles` with `files`. See [Service Worker Configuration](guide/service-worker-config#assetgroups). | *To see APIs removed in version 8, check out this guide on the [version 8 docs site](https://v8.angular.io/guide/deprecations#removed). diff --git a/aio/content/guide/updating-to-version-9.md b/aio/content/guide/updating-to-version-9.md index 039d357a6a..9fb8c4da40 100644 --- a/aio/content/guide/updating-to-version-9.md +++ b/aio/content/guide/updating-to-version-9.md @@ -2,12 +2,72 @@ This guide contains everything you need to know about updating to the next Angular version. -## Version 9 Schematics +## Updating CLI Apps + +If your application uses the CLI, you can update to version 9 automatically with the help of the `ng update` script: + +``` +ng update @angular/cli @angular/core +``` -If your application uses the CLI, you can update to version 9 automatically with the help of the `ng update` script. The script will run a series of small migrations that will transform the code of your application to be compatible with version 9. -If you're curious about the specific migrations being run (e.g. what code is changing and why), the guides below provide more context on each change and contain FAQs for common questions. +If you're curious about the specific migrations being run (e.g. what code is changing and why), see the [schematics section](#schematics). + +## Changes and Deprecations in Version 9 + +{@a breaking-changes} +### New Breaking Changes + +- Angular now compiles with Ivy by default. See [Ivy compatibility section](#ivy). + +- Typescript 3.4 and 3.5 are no longer supported. Please update to Typescript 3.6. + +- tslib is now listed as a peer dependency rather than a direct dependency. Users not using the CLI will need to manually install tslib via `yarn add tslib` or `npm install tslib --save`. + +{@a deprecations} +### New Deprecations + +| API | Replacement | Notes | +| ------------------------------------------------------------------------| ------------------------------------ | ----- | +| [`entryComponents`](api/core/NgModule#entryComponents) | none | See [`entryComponents`](guide/deprecations#entryComponents) | +| [`ANALYZE_FOR_ENTRY_COMPONENTS`](api/core/ANALYZE_FOR_ENTRY_COMPONENTS) | none | See [`ANALYZE_FOR_ENTRY_COMPONENTS`](guide/deprecations#entryComponents) | +| `ModuleWithProviders` without a generic | `ModuleWithProviders` with a generic | See [`ModuleWithProviders` section](guide/deprecations#moduleWithProviders) | +| `esm5` and `fesm5` distribution in `@angular/*` npm packages | `esm2015` and `fesm2015` entrypoints | See [`esm5` and `fesm5`](guide/deprecations#esm5-fesm5) | +| [`TestBed.get`](api/core/testing/TestBed#get) | [`TestBed.inject`](api/core/testing/TestBed#inject) | Same behavior, but type safe. | + + +{@a removals} +### New Removals of Deprecated APIs + +| Package | API | Replacement | Notes | +| ------- | -------------- | ----------- | ----- | +| `@angular/core` | [`Renderer`](https://v8.angular.io/api/core/Renderer) | [`Renderer2`](https://angular.io/api/core/Renderer2) | [Migration guide.](guide/migration-renderer) | +| `@angular/core` | [`RootRenderer`](https://v8.angular.io/api/core/RootRenderer) | [`RendererFactory2`](https://angular.io/api/core/RendererFactory2) | none | +| `@angular/core` | [`RenderComponentType`](https://v8.angular.io/api/core/RenderComponentType) | [`RendererType2`](https://angular.io/api/core/RendererType2) | none | +| `@angular/common` | `DeprecatedI18NPipesModule` | [`CommonModule`](api/common/CommonModule#pipes) | none | +| `@angular/common` | `DeprecatedCurrencyPipe` | [`CurrencyPipe`](api/common/CurrencyPipe) | none | +| `@angular/common` | `DeprecatedDatePipe` | [`DatePipe`](api/common/DatePipe) | none | +| `@angular/common` | `DeprecatedDecimalPipe` | [`DecimalPipe`](api/common/DecimalPipe) | none | +| `@angular/common` | `DeprecatedPercentPipe` | [`PercentPipe`](api/common/PercentPipe) | none | +| `@angular/forms` | [`NgFormSelectorWarning`](https://v8.angular.io/api/forms/NgFormSelectorWarning) | none | +| `@angular/forms` | `ngForm` element selector | `ng-form` element selector | none | +| `@angular/service-worker` | `versionedFiles` | `files` | In the service worker configuration file `ngsw-config.json`, replace `versionedFiles` with `files`. See [Service Worker Configuration](guide/service-worker-config#assetgroups). | + + + +{@a ivy} +## Ivy Compatibility + +In Version 9, Angular Ivy is the default rendering engine. If you haven't heard of Ivy, you can read more about it in the [Angular Ivy guide](guide/ivy). + +For help with opting out of Ivy, please see the instructions [here](guide/ivy#opting-out-of-angular-ivy). + + +{@a schematics} +## Version 9 Schematics + +Read about the migrations the CLI handles for you automatically: - [Migrating from `Renderer` to `Renderer2`](guide/migration-renderer) - [Migrating undecorated classes](guide/migration-undecorated-classes) @@ -16,29 +76,3 @@ If you're curious about the specific migrations being run (e.g. what code is cha - [Migrating to the new `$localize` i18n support](guide/migration-localize) - [Migrating `ModuleWithProviders`](guide/migration-module-with-providers) - [Migrating to `ngcc` npm `postinstall` script](guide/migration-ngcc) - -## Deprecations and Removals in Version 9 - -### New Deprecations - -| API | Replacement | Notes | -| ------------------------------------------------------------------------| ------------------------------------ | ----- | -| [`entryComponents`](api/core/NgModule#entryComponents) | none | See [`entryComponents`](guide/deprecations#entryComponents) | -| [`ANALYZE_FOR_ENTRY_COMPONENTS`](api/core/ANALYZE_FOR_ENTRY_COMPONENTS) | none | See [`ANALYZE_FOR_ENTRY_COMPONENTS`](guide/deprecations#entryComponents) | -| `ModuleWithProviders` without a generic | `ModuleWithProviders` with a generic | See [`ModuleWithProviders` section](guide/deprecations#moduleWithProviders) | -| `esm5` and `fesm5` distribution in `@angular/*` npm packages | `esm2015` and `fesm2015` entrypoints | See [`esm5` and `fesm5`](guide/deprecations#esm5-fesm5) | - -### New Removals of Deprecated APIs - -| Package | API | Replacement | Notes | -| ------- | -------------- | ----------- | ----- | -| `@angular/core` | [`Renderer`](https://v8.angular.io/api/core/Renderer) | [`Renderer2`](https://angular.io/api/core/Renderer2) | [Migration guide.](guide/migration-renderer) -| `@angular/core` | [`RootRenderer`](https://v8.angular.io/api/core/RootRenderer) | [`RendererFactory2`](https://angular.io/api/core/RendererFactory2) | none -| `@angular/core` | [`RenderComponentType`](https://v8.angular.io/api/core/RenderComponentType) | [`RendererType2`](https://angular.io/api/core/RendererType2) | none -| `@angular/common` | `DeprecatedI18NPipesModule` | [`CommonModule`](api/common/CommonModule#pipes) | none | -| `@angular/common` | `DeprecatedCurrencyPipe` | [`CurrencyPipe`](api/common/CurrencyPipe) | none | -| `@angular/common` | `DeprecatedDatePipe` | [`DatePipe`](api/common/DatePipe) | none | -| `@angular/common` | `DeprecatedDecimalPipe` | [`DecimalPipe`](api/common/DecimalPipe) | none | -| `@angular/common` | `DeprecatedPercentPipe` | [`PercentPipe`](api/common/PercentPipe) | none | -| `@angular/forms` | [`NgFormSelectorWarning`](https://v8.angular.io/api/forms/NgFormSelectorWarning) | none | none -| `@angular/forms` | `ngForm` element selector | `ng-form` element selector | none