ci: add router/testing to public API guard

This commit is contained in:
Jason Aden 2017-12-15 09:58:42 -08:00 committed by Alex Rickabaugh
parent 8ceffd8b48
commit a693c5614c
4 changed files with 52 additions and 10 deletions

View File

@ -38,6 +38,8 @@ module.exports = new Package('angular-api', [basePackage, typeScriptPackage])
readTypeScriptModules.basePath = API_SOURCE_PATH; readTypeScriptModules.basePath = API_SOURCE_PATH;
readTypeScriptModules.ignoreExportsMatching = [/^[_ɵ]|^VERSION$/]; readTypeScriptModules.ignoreExportsMatching = [/^[_ɵ]|^VERSION$/];
readTypeScriptModules.hidePrivateMembers = true; readTypeScriptModules.hidePrivateMembers = true;
// NOTE: This list shold be in sync with tools/gulp-tasks/public-api.js
readTypeScriptModules.sourceFiles = [ readTypeScriptModules.sourceFiles = [
'animations/index.ts', 'animations/index.ts',
'animations/browser/index.ts', 'animations/browser/index.ts',

View File

@ -6,29 +6,40 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
// NOTE: This list shold be in sync with aio/tools/transforms/angular-api-package/index.js
const entrypoints = [ const entrypoints = [
'dist/packages-dist/core/core.d.ts', 'dist/packages-dist/core/testing.d.ts', 'dist/packages-dist/animations/animations.d.ts',
'dist/packages-dist/common/common.d.ts', 'dist/packages-dist/common/testing.d.ts', 'dist/packages-dist/animations/browser.d.ts',
'dist/packages-dist/common/http.d.ts', 'dist/packages-dist/common/http/testing.d.ts', 'dist/packages-dist/animations/browser/testing.d.ts',
'dist/packages-dist/common/common.d.ts',
'dist/packages-dist/common/testing.d.ts',
'dist/packages-dist/common/http.d.ts',
'dist/packages-dist/common/http/testing.d.ts',
// The API surface of the compiler is currently unstable - all of the important APIs are exposed // The API surface of the compiler is currently unstable - all of the important APIs are exposed
// via @angular/core, @angular/platform-browser or @angular/platform-browser-dynamic instead. // via @angular/core, @angular/platform-browser or @angular/platform-browser-dynamic instead.
//'dist/packages-dist/compiler/index.d.ts', //'dist/packages-dist/compiler/index.d.ts',
//'dist/packages-dist/compiler/testing.d.ts', //'dist/packages-dist/compiler/testing.d.ts',
'dist/packages-dist/upgrade/upgrade.d.ts', 'dist/packages-dist/upgrade/static.d.ts', 'dist/packages-dist/core/core.d.ts',
'dist/packages-dist/core/testing.d.ts',
'dist/packages-dist/forms/forms.d.ts',
'dist/packages-dist/http/http.d.ts',
'dist/packages-dist/http/testing.d.ts',
'dist/packages-dist/platform-browser/platform-browser.d.ts', 'dist/packages-dist/platform-browser/platform-browser.d.ts',
'dist/packages-dist/platform-browser/animations.d.ts',
'dist/packages-dist/platform-browser/testing.d.ts', 'dist/packages-dist/platform-browser/testing.d.ts',
'dist/packages-dist/platform-browser-dynamic/platform-browser-dynamic.d.ts', 'dist/packages-dist/platform-browser-dynamic/platform-browser-dynamic.d.ts',
'dist/packages-dist/platform-browser-dynamic/testing.d.ts', 'dist/packages-dist/platform-browser-dynamic/testing.d.ts',
'dist/packages-dist/platform-webworker/platform-webworker.d.ts', 'dist/packages-dist/platform-webworker/platform-webworker.d.ts',
'dist/packages-dist/platform-webworker-dynamic/platform-webworker-dynamic.d.ts', 'dist/packages-dist/platform-webworker-dynamic/platform-webworker-dynamic.d.ts',
'dist/packages-dist/platform-server/platform-server.d.ts', 'dist/packages-dist/platform-server/platform-server.d.ts',
'dist/packages-dist/platform-server/testing.d.ts', 'dist/packages-dist/http/http.d.ts', 'dist/packages-dist/platform-server/testing.d.ts',
'dist/packages-dist/http/testing.d.ts', 'dist/packages-dist/forms/forms.d.ts', 'dist/packages-dist/router/router.d.ts',
'dist/packages-dist/router/router.d.ts', 'dist/packages-dist/animations/animations.d.ts', 'dist/packages-dist/router/testing.d.ts',
'dist/packages-dist/router/upgrade.d.ts',
'dist/packages-dist/service-worker/service-worker.d.ts', 'dist/packages-dist/service-worker/service-worker.d.ts',
'dist/packages-dist/service-worker/config.d.ts', 'dist/packages-dist/animations/browser.d.ts', 'dist/packages-dist/service-worker/config.d.ts',
'dist/packages-dist/animations/browser/testing.d.ts', 'dist/packages-dist/upgrade/upgrade.d.ts',
'dist/packages-dist/platform-browser/animations.d.ts' 'dist/packages-dist/upgrade/static.d.ts',
]; ];
const publicApiDir = 'tools/public_api_guard'; const publicApiDir = 'tools/public_api_guard';

View File

@ -0,0 +1,16 @@
/** @stable */
export declare class RouterTestingModule {
static withRoutes(routes: Routes): ModuleWithProviders;
}
/** @stable */
export declare function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], urlHandlingStrategy?: UrlHandlingStrategy): Router;
/** @stable */
export declare class SpyNgModuleFactoryLoader implements NgModuleFactoryLoader {
stubbedModules: {
[path: string]: any;
};
constructor(compiler: Compiler);
load(path: string): Promise<NgModuleFactory<any>>;
}

View File

@ -0,0 +1,13 @@
/** @experimental */
export declare const RouterUpgradeInitializer: {
provide: InjectionToken<((compRef: ComponentRef<any>) => void)[]>;
multi: boolean;
useFactory: (ngUpgrade: UpgradeModule) => () => void;
deps: (typeof UpgradeModule)[];
};
/** @experimental */
export declare function setUpLocationSync(ngUpgrade: UpgradeModule): void;
/** @experimental */
export declare function setUpRouterSync(injector: Injector, $injector: any): void;