fix(common): temporarily re-export and deprecate XhrFactory (#41393)

The moved `XhrFactory` still needs to be available from `@angular/common/http`
for some libraries that were built prior to 12.0.0, otherwise they cannot be
used in applications built post-12.0.0.

This commit adds back the re-export of `XhrFactory` and deprecates it.

PR Close #41393
This commit is contained in:
Pete Bacon Darwin
2021-03-31 11:09:35 +01:00
committed by Alex Rickabaugh
parent 6391a4a49d
commit 7dfa446c4a
3 changed files with 34 additions and 1 deletions
+9
View File
@@ -40,6 +40,7 @@ v12 - v15
| ----------------------------- | --------------------------------------------------------------------------- | ----------------- |
| `@angular/common` | [`ReflectiveInjector`](#reflectiveinjector) | <!--v8--> v11 |
| `@angular/common` | [`CurrencyPipe` - `DEFAULT_CURRENCY_CODE`](api/common/CurrencyPipe#currency-code-deprecation) | <!--v9--> v11 |
| `@angular/common/http` | [`XhrFactory`](api/common/http/XhrFactory) | <!--v12--> v15 |
| `@angular/core` | [`DefaultIterableDiffer`](#core) | <!--v7--> v11 |
| `@angular/core` | [`ReflectiveKey`](#core) | <!--v8--> v11 |
| `@angular/core` | [`RenderComponentType`](#core) | <!--v7--> v11 |
@@ -82,6 +83,14 @@ Tip: In the [API reference section](api) of this doc site, deprecated APIs are i
| [`CurrencyPipe` - `DEFAULT_CURRENCY_CODE`](api/common/CurrencyPipe#currency-code-deprecation) | `{provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}` | v9 | From v11 the default code will be extracted from the locale data given by `LOCAL_ID`, rather than `USD`. |
{@a common-http}
### @angular/common/http
| API | Replacement | Deprecation announced | Notes |
| -------------------------------------------- | ------------------------------------ | --------------------- | ----- |
| [`XhrFactory`](api/common/http/XhrFactory) | `XhrFactory` in `@angular/common` | v12 | The `XhrFactory` has moved from `@angular/common/http` to `@angular/common`. |
{@a core}
### @angular/core