From e99af184abef53feecff121675ee64a7cf7c51ff Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 1 Jul 2021 17:41:29 +0200 Subject: [PATCH] build: update API goldens after api-extractor update (#42737) Given we have updated API extractor to the most recent version, we need to update the API goldens because the latest version uses alias exports to avoid collisions with default library globals (like `Event`). PR Close #42737 --- goldens/public-api/animations/animations.md | 4 +++- goldens/public-api/common/common.md | 10 +++++++--- goldens/public-api/common/testing/testing.md | 4 ++-- goldens/public-api/common/upgrade/upgrade.md | 6 +++--- goldens/public-api/core/core.md | 2 +- goldens/public-api/localize/init/index.md | 4 +++- goldens/public-api/router/router.md | 10 ++++++---- goldens/public-api/router/testing/testing.md | 6 +++--- goldens/public-api/service-worker/config/config.md | 4 +++- 9 files changed, 31 insertions(+), 19 deletions(-) diff --git a/goldens/public-api/animations/animations.md b/goldens/public-api/animations/animations.md index 056da2e9c40..e9db1103d19 100644 --- a/goldens/public-api/animations/animations.md +++ b/goldens/public-api/animations/animations.md @@ -49,7 +49,7 @@ export abstract class AnimationBuilder { } // @public -export interface AnimationEvent { +interface AnimationEvent_2 { disabled: boolean; element: any; fromState: string; @@ -59,6 +59,8 @@ export interface AnimationEvent { triggerName: string; } +export { AnimationEvent_2 as AnimationEvent } + // @public export abstract class AnimationFactory { abstract create(element: any, options?: AnimationOptions): AnimationPlayer; diff --git a/goldens/public-api/common/common.md b/goldens/public-api/common/common.md index 79b19c60f9d..eca1f9b6db3 100644 --- a/goldens/public-api/common/common.md +++ b/goldens/public-api/common/common.md @@ -262,7 +262,7 @@ export class KeyValuePipe implements PipeTransform { } // @public -export class Location { +class Location_2 { constructor(platformStrategy: LocationStrategy, platformLocation: PlatformLocation); back(): void; forward(): void; @@ -278,9 +278,11 @@ export class Location { prepareExternalUrl(url: string): string; replaceState(path: string, query?: string, state?: any): void; static stripTrailingSlash: (url: string) => string; - subscribe(onNext: (value: PopStateEvent) => void, onThrow?: ((exception: any) => void) | null, onReturn?: (() => void) | null): SubscriptionLike; + subscribe(onNext: (value: PopStateEvent_2) => void, onThrow?: ((exception: any) => void) | null, onReturn?: (() => void) | null): SubscriptionLike; } +export { Location_2 as Location } + // @public export const LOCATION_INITIALIZED: InjectionToken>; @@ -597,7 +599,7 @@ export enum Plural { } // @public (undocumented) -export interface PopStateEvent { +interface PopStateEvent_2 { // (undocumented) pop?: boolean; // (undocumented) @@ -608,6 +610,8 @@ export interface PopStateEvent { url?: string; } +export { PopStateEvent_2 as PopStateEvent } + // @public export function registerLocaleData(data: any, localeId?: string | any, extraData?: any): void; diff --git a/goldens/public-api/common/testing/testing.md b/goldens/public-api/common/testing/testing.md index 98bda235c1f..75b0d5f6004 100644 --- a/goldens/public-api/common/testing/testing.md +++ b/goldens/public-api/common/testing/testing.md @@ -5,7 +5,7 @@ ```ts import { InjectionToken } from '@angular/core'; -import { Location } from '@angular/common'; +import { Location as Location_2 } from '@angular/common'; import { LocationChangeListener } from '@angular/common'; import { LocationStrategy } from '@angular/common'; import { PlatformLocation } from '@angular/common'; @@ -97,7 +97,7 @@ export interface MockPlatformLocationConfig { } // @public -export class SpyLocation implements Location { +export class SpyLocation implements Location_2 { // (undocumented) back(): void; // (undocumented) diff --git a/goldens/public-api/common/upgrade/upgrade.md b/goldens/public-api/common/upgrade/upgrade.md index 1d9213764bb..16152b18d20 100644 --- a/goldens/public-api/common/upgrade/upgrade.md +++ b/goldens/public-api/common/upgrade/upgrade.md @@ -5,7 +5,7 @@ ```ts import { InjectionToken } from '@angular/core'; -import { Location } from '@angular/common'; +import { Location as Location_2 } from '@angular/common'; import { LocationStrategy } from '@angular/common'; import { ModuleWithProviders } from '@angular/core'; import { PlatformLocation } from '@angular/common'; @@ -15,7 +15,7 @@ import { UpgradeModule } from '@angular/upgrade/static'; export class $locationShim { $$parse(url: string): void; $$parseLinkUrl(url: string, relHref?: string | null): boolean; - constructor($injector: any, location: Location, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy); + constructor($injector: any, location: Location_2, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy); absUrl(): string; hash(): string; // (undocumented) @@ -50,7 +50,7 @@ export class $locationShim { // @public export class $locationShimProvider { $get(): $locationShim; - constructor(ngUpgrade: UpgradeModule, location: Location, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy); + constructor(ngUpgrade: UpgradeModule, location: Location_2, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy); hashPrefix(prefix?: string): void; html5Mode(mode?: any): void; } diff --git a/goldens/public-api/core/core.md b/goldens/public-api/core/core.md index 99a77a2fb9a..10291b1fc2f 100644 --- a/goldens/public-api/core/core.md +++ b/goldens/public-api/core/core.md @@ -269,7 +269,7 @@ export function createPlatformFactory(parentPlatformFactory: ((extraProviders?: // @public export const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata; -// @public +// @public (undocumented) export interface DebugElement extends DebugNode { readonly attributes: { [key: string]: string | null; diff --git a/goldens/public-api/localize/init/index.md b/goldens/public-api/localize/init/index.md index 7a46eab0b5a..6051b6fc51c 100644 --- a/goldens/public-api/localize/init/index.md +++ b/goldens/public-api/localize/init/index.md @@ -5,7 +5,9 @@ ```ts // @public -export const $localize: LocalizeFn; +const $localize_2: LocalizeFn; + +export { $localize_2 as $localize } // @public (undocumented) export interface LocalizeFn { diff --git a/goldens/public-api/router/router.md b/goldens/public-api/router/router.md index 1166618529f..142be1a55dd 100644 --- a/goldens/public-api/router/router.md +++ b/goldens/public-api/router/router.md @@ -13,7 +13,7 @@ import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; import { InjectionToken } from '@angular/core'; import { Injector } from '@angular/core'; -import { Location } from '@angular/common'; +import { Location as Location_2 } from '@angular/common'; import { LocationStrategy } from '@angular/common'; import { ModuleWithProviders } from '@angular/core'; import { NgModuleFactory } from '@angular/core'; @@ -181,7 +181,9 @@ export type DeprecatedLoadChildren = string; export type DetachedRouteHandle = {}; // @public -export type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll; +type Event_2 = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll; + +export { Event_2 as Event } // @public export interface ExtraOptions { @@ -465,13 +467,13 @@ export class RouteConfigLoadStart { // @public export class Router { - constructor(rootComponentType: Type | null, urlSerializer: UrlSerializer, rootContexts: ChildrenOutletContexts, location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Routes); + constructor(rootComponentType: Type | null, urlSerializer: UrlSerializer, rootContexts: ChildrenOutletContexts, location: Location_2, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Routes); // (undocumented) config: Routes; createUrlTree(commands: any[], navigationExtras?: UrlCreationOptions): UrlTree; dispose(): void; errorHandler: ErrorHandler; - readonly events: Observable; + readonly events: Observable; getCurrentNavigation(): Navigation | null; initialNavigation(): void; // @deprecated diff --git a/goldens/public-api/router/testing/testing.md b/goldens/public-api/router/testing/testing.md index a517834e0ce..c9af4687eb3 100644 --- a/goldens/public-api/router/testing/testing.md +++ b/goldens/public-api/router/testing/testing.md @@ -8,7 +8,7 @@ import { ChildrenOutletContexts } from '@angular/router'; import { Compiler } from '@angular/core'; import { ExtraOptions } from '@angular/router'; import { Injector } from '@angular/core'; -import { Location } from '@angular/common'; +import { Location as Location_2 } from '@angular/common'; import { ModuleWithProviders } from '@angular/core'; import { NgModuleFactory } from '@angular/core'; import { NgModuleFactoryLoader } from '@angular/core'; @@ -25,10 +25,10 @@ export class RouterTestingModule { } // @public -export function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], opts?: ExtraOptions, urlHandlingStrategy?: UrlHandlingStrategy): Router; +export function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location_2, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], opts?: ExtraOptions, urlHandlingStrategy?: UrlHandlingStrategy): Router; // @public @deprecated -export function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], urlHandlingStrategy?: UrlHandlingStrategy): Router; +export function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location_2, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], urlHandlingStrategy?: UrlHandlingStrategy): Router; // @public export class SpyNgModuleFactoryLoader implements NgModuleFactoryLoader { diff --git a/goldens/public-api/service-worker/config/config.md b/goldens/public-api/service-worker/config/config.md index 927817d8c5b..9f95a8dd071 100644 --- a/goldens/public-api/service-worker/config/config.md +++ b/goldens/public-api/service-worker/config/config.md @@ -72,7 +72,7 @@ export interface Filesystem { } // @public -export class Generator { +class Generator_2 { constructor(fs: Filesystem, baseHref: string); // (undocumented) readonly fs: Filesystem; @@ -80,6 +80,8 @@ export class Generator { process(config: Config): Promise; } +export { Generator_2 as Generator } + // @public (undocumented) export type Glob = string;