diff --git a/.pullapprove.yml b/.pullapprove.yml index 0b94eb943b..b343c69616 100644 --- a/.pullapprove.yml +++ b/.pullapprove.yml @@ -901,7 +901,7 @@ groups: 'aio/content/guide/migration-localize.md', 'aio/content/guide/migration-module-with-providers.md', 'aio/content/guide/static-query-migration.md', - 'aio/content/guide/updating-to-version-9.md', + 'aio/content/guide/updating-to-version-10.md', 'aio/content/guide/ivy-compatibility.md', 'aio/content/guide/ivy-compatibility-examples.md' ]) diff --git a/aio/content/guide/ivy-compatibility.md b/aio/content/guide/ivy-compatibility.md index 1cf01b49ff..ee4632316d 100644 --- a/aio/content/guide/ivy-compatibility.md +++ b/aio/content/guide/ivy-compatibility.md @@ -2,18 +2,18 @@ The Angular team has worked hard to ensure Ivy is as backwards-compatible with the previous rendering engine ("View Engine") as possible. However, in rare cases, minor changes were necessary to ensure that the Angular's behavior was predictable and consistent, correcting issues in the View Engine implementation. -In order to smooth the transition, we have provided [automated migrations](guide/updating-to-version-9#migrations) wherever possible so your application and library code is migrated automatically by the CLI. +In order to smooth the transition, we have provided [automated migrations](guide/updating-to-version-10#migrations) wherever possible so your application and library code is migrated automatically by the CLI. That said, some applications will likely need to apply some manual updates. {@a debugging} ## How to debug errors with Ivy -In version 9, [a few deprecated APIs have been removed](guide/updating-to-version-9#removals) and there are a [few breaking changes](guide/updating-to-version-9#breaking-changes) unrelated to Ivy. +In version 10, [a few deprecated APIs have been removed](guide/updating-to-version-10#removals) and there are a [few breaking changes](guide/updating-to-version-10#breaking-changes) unrelated to Ivy. If you're seeing errors after updating to version 9, you'll first want to rule those changes out. To do so, temporarily [turn off Ivy](guide/ivy#opting-out-of-angular-ivy) in your `tsconfig.base.json` and re-start your app. -If you're still seeing the errors, they are not specific to Ivy. In this case, you may want to consult the [general version 9 guide](guide/updating-to-version-9). If you've opted into any of the stricter type-checking settings that are new with v9, you may also want to check out the [template type-checking guide](guide/template-typecheck). +If you're still seeing the errors, they are not specific to Ivy. In this case, you may want to consult the [general version 10 guide](guide/updating-to-version-10). If you've opted into any of the new, stricter type-checking settings, you may also want to check out the [template type-checking guide](guide/template-typecheck). If the errors are gone, switch back to Ivy by removing the changes to the `tsconfig.base.json` and review the list of expected changes below. diff --git a/aio/content/guide/updating-to-version-10.md b/aio/content/guide/updating-to-version-10.md new file mode 100644 index 0000000000..04ea9ca80e --- /dev/null +++ b/aio/content/guide/updating-to-version-10.md @@ -0,0 +1,78 @@ +# Updating to Angular version 10 + +This guide contains information related to updating to version 10 of Angular. + +
+ +For information on upgrading to Angular version 9, see [Updating to Angular version 9](https://v9.angular.io/guide/updating-to-version-9). + +
+ +## Updating CLI Apps + +For step-by-step instructions on how to update to the latest Angular release (and leverage our automated migration tools to do so), use the interactive update guide at [update.angular.io](https://update.angular.io). + +If you're curious about the specific migrations being run by the CLI, see the [automated migrations section](#migrations) for details on what code is changing and why. + +## Changes and Deprecations in Version 10 + +
+ + For information about Angular's deprecation and removal practices, see [Angular Release Practices](guide/releases#deprecation-practices "Angular Release Practices: Deprecation practices"). + +
+ +{@a breaking-changes} +### New Breaking Changes + +* Typescript 3.6, 3.7, and 3.8 are no longer supported. Please update to Typescript 3.9. +* Input fields of type `number` fire the `valueChanges` event only once per value change (as opposed to twice in some cases). See [PR 36087](https://github.com/angular/angular/pull/36087). +* The `minLength` and `maxLength` validators only validate values that have a numeric `length` property. See [PR 36157](https://github.com/angular/angular/pull/36157). +* Templates with unknown property bindings or unknown element names now log errors instead of warnings. See [PR 36399](https://github.com/angular/angular/pull/36399). +* `UrlMatcher` can now return `null` values. See [PR 36402](https://github.com/angular/angular/pull/36402). +* Transplanted views now refresh at insertion point only. See PR 35968](https://github.com/angular/angular/pull/35968). +* Formatting times with the `b` or `B` format codes now supports time periods that cross midnight. See [PR 36611](https://github.com/angular/angular/pull/36611). +* Navigation is canceled for routes with at least one empty resolver. See [PR 24621](https://github.com/angular/angular/pull/24621). + +{@a deprecations} +### New Deprecations + +| Area | API or Feature | May be removed in | +| ----------------------------- | --------------------------------------------------------------------------- | ----------------- | +| `@angular/bazel` | [`Bazel builder and schematics`](guide/deprecations#bazelbuilder) | v10 | +| `@angular/core` | [`WrappedValue`](guide/deprecations#wrapped-value) | v12 | +| browser support | [`IE 9, 10, and IE Mobile`](guide/deprecations#ie-9-10-and-ie-mobile-support) | v11 | + + +{@a removals} +### New Removals of Deprecated APIs + +The following APIs have been removed starting with version 10.0.0*: + +| Package | API | Replacement | Notes | +| ---------------- | -------------- | ----------- | ----- | +| `@angular/core` | Undecorated base classes that use Angular features | Add Angular decorator | See [migration guide](guide/migration-undecorated-classes) for more info | +| `@angular/core` | `ModuleWithProviders` without a generic | `ModuleWithProviders` with a generic | See [migration guide](guide/migration-module-with-providers) for more info | +| `@angular/core` | Style Sanitization | no action needed | See [style sanitization API removal](/guide/deprecations#style-sanitization) for more info + +*To see APIs removed in version 9, check out this guide on the [version 9 docs site](https://v9.angular.io/guide/deprecations#removed). + +{@a ivy} + +## Ivy features and compatibility + +Since 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). + +* Among other features, Ivy introduces more comprehensive type-checking within templates. For details, see [Template Type-checking](guide/template-typecheck). + +* For general guidance on debugging and a list of minor changes associated with Ivy, see the [Ivy compatibility guide](guide/ivy-compatibility). + +* For help with opting out of Ivy, see the instructions [here](guide/ivy#opting-out-of-angular-ivy). + +{@a migrations} +## Automated Migrations for Version 10 + +Read about the migrations the CLI handles for you automatically: + +* [Migrating missing `@Directive()`/`@Component()` decorators](guide/migration-undecorated-classes) +* [Migrating `ModuleWithProviders`](guide/migration-module-with-providers) diff --git a/aio/content/guide/updating-to-version-9.md b/aio/content/guide/updating-to-version-9.md deleted file mode 100644 index 137b66976c..0000000000 --- a/aio/content/guide/updating-to-version-9.md +++ /dev/null @@ -1,90 +0,0 @@ -# Updating to Angular version 9 - -This guide contains information related to updating to version 9 of Angular. - -## Updating CLI Apps - -For step-by-step instructions on how to update to the latest Angular release (and leverage our automated migration tools to do so), use the interactive update guide at [update.angular.io](https://update.angular.io). - -If you're curious about the specific migrations being run by the CLI, see the [automated migrations section](#migrations) for details on what code is changing and why. - -## Changes and Deprecations in Version 9 - -
- - For information about Angular's deprecation and removal practices, see [Angular Release Practices](guide/releases#deprecation-practices "Angular Release Practices: Deprecation practices"). - -
- -{@a breaking-changes} -### New Breaking Changes - -- Angular now compiles with Ivy by default. See the [Ivy compatibility section](#ivy). - -- CLI apps compile in [AOT mode](/guide/aot-compiler) by default (which includes template type-checking). -Users who only built with JIT before may see new type errors. -See our [template type-checking guide](guide/template-typecheck) for more information and debugging tips. - -- Typescript 3.4 and 3.5 are no longer supported. Please update to Typescript 3.7. - -- `tslib` is now listed as a peer dependency rather than a direct dependency. If you are not using the CLI, you must manually install `tslib`, using `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) | -| [`CurrencyPipe` - `DEFAULT_CURRENCY_CODE`](api/common/CurrencyPipe#currency-code-deprecation)| `{provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}` | From v11 the default code will be extracted from the locale data given by `LOCAL_ID`, rather than `USD`. | -| [`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 | | -| Undecorated base classes that use Angular features | Base classes with `@Directive()` decorator that use Angular features | | -| `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`](api/core/Renderer2) | [Migration guide.](guide/migration-renderer) | -| `@angular/core` | [`RootRenderer`](https://v8.angular.io/api/core/RootRenderer) | [`RendererFactory2`](api/core/RendererFactory2) | none | -| `@angular/core` | [`RenderComponentType`](https://v8.angular.io/api/core/RenderComponentType) | [`RendererType2`](api/core/RendererType2) | none | -| `@angular/core` | [`WtfScopeFn`](https://v8.angular.io/api/core/WtfScopeFn) | none | v8 | See [Web Tracing Framework](#wtf) | -| `@angular/core` | [`wtfCreateScope`](https://v8.angular.io/api/core/wtfCreateScope) | none | v8 | See [Web Tracing Framework](guide/deprecations#wtf) | -| `@angular/core` | [`wtfStartTimeRange`](https://v8.angular.io/api/core/wtfStartTimeRange) | none | v8 | See [Web Tracing Framework](guide/deprecations#wtf) | -| `@angular/core` | [`wtfEndTimeRange`](https://v8.angular.io/api/core/wtfEndTimeRange) | none | v8 | See [Web Tracing Framework](guide/deprecations#wtf) | -| `@angular/core` | [`wtfLeave`](https://v8.angular.io/api/core/wtfLeave) | none | v8 | See [Web Tracing Framework](guide/deprecations#wtf) | -| `@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 features and 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). - -* Among other features, Ivy introduces more comprehensive type-checking within templates. For details, see [Template Type-checking](guide/template-typecheck). - -* For general guidance on debugging and a list of minor changes associated with Ivy, see the [Ivy compatibility guide](guide/ivy-compatibility). - -* For help with opting out of Ivy, see the instructions [here](guide/ivy#opting-out-of-angular-ivy). - -{@a migrations} -## Automated Migrations for Version 9 - -Read about the migrations the CLI handles for you automatically: - -- [Migrating from `Renderer` to `Renderer2`](guide/migration-renderer) -- [Migrating missing `@Directive()`/`@Component()` decorators](guide/migration-undecorated-classes) -- [Migrating missing `@Injectable()` decorators and incomplete provider definitions](guide/migration-injectable) -- [Migrating dynamic queries](guide/migration-dynamic-flag) -- [Migrating to the new `$localize` i18n support](guide/migration-localize) -- [Migrating `ModuleWithProviders`](guide/migration-module-with-providers) diff --git a/aio/content/navigation.json b/aio/content/navigation.json index 11e93c4da8..8cb7f74a39 100644 --- a/aio/content/navigation.json +++ b/aio/content/navigation.json @@ -767,13 +767,13 @@ "tooltip": "Angular versioning, release, support, and deprecation policies and practices." }, { - "title": "Updating to Version 9", - "tooltip": "Support for updating your application from version 8 to 9.", + "title": "Updating to Version 10", + "tooltip": "Support for updating your application from version 9 to 10.", "children": [ { - "url": "guide/updating-to-version-9", + "url": "guide/updating-to-version-10", "title": "Overview", - "tooltip": "Everything you need to know for updating your application from version 8 to 9." + "tooltip": "Everything you need to know for updating your application from version 9 to 10." }, { "url": "guide/ivy-compatibility", @@ -781,29 +781,9 @@ "tooltip": "Details to help you make sure your application is compatible with Ivy." }, { - "title": "Optional Migrations", - "tooltip": "Optional migration details regarding updating to version 9.", + "title": "Migrations", + "tooltip": "Migration details regarding updating to version 10.", "children": [ - { - "url": "guide/migration-renderer", - "title": "Renderer to Renderer2", - "tooltip": "Migration from the deprecated Renderer API to the newer Renderer2 API." - }, - { - "url": "guide/migration-dynamic-flag", - "title": "Dynamic Queries Flag", - "tooltip": "Migration to remove unnecessary `static: false` flag from @ViewChild and @ContentChild queries." - }, - { - "url": "guide/migration-injectable", - "title": "Missing @Injectable() Decorators", - "tooltip": "Migration to add missing @Injectable() decorators and incomplete provider definitions." - }, - { - "url": "guide/migration-localize", - "title": "$localize Global Import", - "tooltip": "Migration to add an import statement for @angular/localize to polyfills.ts." - }, { "url": "guide/migration-module-with-providers", "title": "Missing ModuleWithProviders Generic", @@ -813,6 +793,11 @@ "url": "guide/migration-undecorated-classes", "title": "Missing @Directive() Decorators", "tooltip": "Migration to add missing @Directive()/@Component() decorators." + }, + { + "url": "guide/migration-injectable", + "title": "Missing @Injectable() Decorators", + "tooltip": "Migration to add missing @Injectable() decorators and incomplete provider definitions." } ] }