Skip to content

Commit

Permalink
fix(common): add upgrade sub-package to ng_package rule for @angular/…
Browse files Browse the repository at this point in the history
…common

Follow-up to #30055 to include @angular/common/upgrade in the npm package

Closes #30116
  • Loading branch information
brandonroberts committed Apr 25, 2019
1 parent acaf1aa commit be06739
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ng_package(
"//packages/common/http:package.json",
"//packages/common/http/testing:package.json",
"//packages/common/testing:package.json",
"//packages/common/upgrade:package.json",
],
entry_point = "packages/common/index.js",
packages = ["//packages/common/locales:package"],
Expand All @@ -46,5 +47,6 @@ ng_package(
"//packages/common/http",
"//packages/common/http/testing",
"//packages/common/testing",
"//packages/common/upgrade",
],
)
5 changes: 5 additions & 0 deletions packages/common/testing/src/mock_platform_location.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ function parseUrl(urlStr: string, baseHref: string) {
};
}

/**
* Mock platform location config
*
* @publicApi
*/
export interface MockPlatformLocationConfig {
startUrl?: string;
appBaseHref?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/common/testing/src/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
*/
export {SpyLocation} from './location_mock';
export {MockLocationStrategy} from './mock_location_strategy';
export {MockPlatformLocation} from './mock_platform_location';
export {MockPlatformLocation, MockPlatformLocationConfig} from './mock_platform_location';
5 changes: 5 additions & 0 deletions tools/public_api_guard/common/testing.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export declare class MockPlatformLocation implements PlatformLocation {
replaceState(state: any, title: string, newUrl: string): void;
}

export interface MockPlatformLocationConfig {
appBaseHref?: string;
startUrl?: string;
}

export declare class SpyLocation implements Location {
urlChanges: string[];
back(): void;
Expand Down

0 comments on commit be06739

Please sign in to comment.