fix: display framework version on bootstrapped component (#13252)

This commit is contained in:
Miško Hevery 2016-12-06 16:21:07 -08:00 committed by Alex Rickabaugh
parent 986abbe0b2
commit 16efb13dd1
43 changed files with 294 additions and 103 deletions

View File

@ -11,14 +11,6 @@
* @description * @description
* Entry point for all public APIs of the common package. * Entry point for all public APIs of the common package.
*/ */
export * from './src/location/index'; export * from './src/common';
export {NgLocalization} from './src/localization';
export {CommonModule} from './src/common_module';
export {NgClass, NgFor, NgIf, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet} from './src/directives/index';
export {AsyncPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, JsonPipe, LowerCasePipe, CurrencyPipe, DecimalPipe, PercentPipe, SlicePipe, UpperCasePipe} from './src/pipes/index';
import {Version} from '@angular/core';
/** // This file only reexports content of the `src` folder. Keep it that way.
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -0,0 +1,20 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
export * from './location/index';
export {NgLocalization} from './localization';
export {CommonModule} from './common_module';
export {NgClass, NgFor, NgIf, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet} from './directives/index';
export {AsyncPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, JsonPipe, LowerCasePipe, CurrencyPipe, DecimalPipe, PercentPipe, SlicePipe, UpperCasePipe} from './pipes/index';
export {VERSION} from './version';
export {Version} from '@angular/core';

View File

@ -0,0 +1,19 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -10,9 +10,4 @@ export {CodeGenerator} from './src/codegen';
export {CompilerHost, CompilerHostContext, ModuleResolutionHostAdapter, NodeCompilerHostContext} from './src/compiler_host'; export {CompilerHost, CompilerHostContext, ModuleResolutionHostAdapter, NodeCompilerHostContext} from './src/compiler_host';
export {Extractor} from './src/extractor'; export {Extractor} from './src/extractor';
export * from '@angular/tsc-wrapped'; export * from '@angular/tsc-wrapped';
export {VERSION} from './src/version';
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -0,0 +1,19 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -21,11 +21,7 @@
* </p> * </p>
* </div> * </div>
*/ */
import {Version} from '@angular/core'; export {VERSION} from './src/version';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');
export * from './src/template_parser/template_ast'; export * from './src/template_parser/template_ast';
export {TEMPLATE_TRANSFORMS} from './src/template_parser/template_parser'; export {TEMPLATE_TRANSFORMS} from './src/template_parser/template_parser';
export {CompilerConfig, RenderTypes} from './src/config'; export {CompilerConfig, RenderTypes} from './src/config';

View File

@ -0,0 +1,19 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -12,10 +12,5 @@
* Entry point for all public APIs of the core package. * Entry point for all public APIs of the core package.
*/ */
export * from './src/core'; export * from './src/core';
import {Version} from './src/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');
// This file only reexports content of the `src` folder. Keep it that way. // This file only reexports content of the `src` folder. Keep it that way.

View File

@ -35,4 +35,4 @@ export * from './core_private_export';
export * from './animation/metadata'; export * from './animation/metadata';
export {AnimationTransitionEvent} from './animation/animation_transition_event'; export {AnimationTransitionEvent} from './animation/animation_transition_event';
export {AnimationPlayer} from './animation/animation_player'; export {AnimationPlayer} from './animation/animation_player';
export {Sanitizer, SecurityContext} from './security'; export {Sanitizer, SecurityContext} from './security';

View File

@ -13,6 +13,7 @@ import {isPresent, looseIdentical} from '../facade/lang';
import {ViewEncapsulation} from '../metadata/view'; import {ViewEncapsulation} from '../metadata/view';
import {RenderComponentType, RenderDebugInfo, Renderer, RootRenderer} from '../render/api'; import {RenderComponentType, RenderDebugInfo, Renderer, RootRenderer} from '../render/api';
import {Sanitizer} from '../security'; import {Sanitizer} from '../security';
import {VERSION} from '../version';
import {ExpressionChangedAfterItHasBeenCheckedError} from './errors'; import {ExpressionChangedAfterItHasBeenCheckedError} from './errors';
import {AppView} from './view'; import {AppView} from './view';
@ -360,6 +361,7 @@ export function selectOrCreateRenderHostElement(
for (let i = 0; i < attrs.length; i += 2) { for (let i = 0; i < attrs.length; i += 2) {
renderer.setElementAttribute(hostElement, attrs.get(i), attrs.get(i + 1)); renderer.setElementAttribute(hostElement, attrs.get(i), attrs.get(i + 1));
} }
renderer.setElementAttribute(hostElement, 'ng-version', VERSION.full);
} else { } else {
hostElement = createRenderElement(renderer, null, elementName, attrs, debugInfo); hostElement = createRenderElement(renderer, null, elementName, attrs, debugInfo);
} }

View File

@ -19,4 +19,9 @@ export class Version {
get minor(): string { return this.full.split('.')[1]; } get minor(): string { return this.full.split('.')[1]; }
get patch(): string { return this.full.split('.').slice(2).join('.'); } get patch(): string { return this.full.split('.').slice(2).join('.'); }
} }
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -11,11 +11,6 @@
* @description * @description
* Entry point for all public APIs of the forms package. * Entry point for all public APIs of the forms package.
*/ */
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');
export * from './src/forms'; export * from './src/forms';
// This file only reexports content of the `src` folder. Keep it that way. // This file only reexports content of the `src` folder. Keep it that way.

View File

@ -42,5 +42,5 @@ export {AsyncValidatorFn, MaxLengthValidator, MinLengthValidator, PatternValidat
export {FormBuilder} from './form_builder'; export {FormBuilder} from './form_builder';
export {AbstractControl, FormArray, FormControl, FormGroup} from './model'; export {AbstractControl, FormArray, FormControl, FormGroup} from './model';
export {NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators} from './validators'; export {NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators} from './validators';
export {VERSION} from './version';
export * from './form_providers'; export * from './form_providers';

View File

@ -0,0 +1,19 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -11,11 +11,6 @@
* @description * @description
* Entry point for all public APIs of the http package. * Entry point for all public APIs of the http package.
*/ */
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');
export * from './src/index'; export * from './src/index';
// This file only reexports content of the `src` folder. Keep it that way. // This file only reexports content of the `src` folder. Keep it that way.

View File

@ -19,3 +19,4 @@ export {Connection, ConnectionBackend, RequestOptionsArgs, ResponseOptionsArgs,
export {Request} from './static_request'; export {Request} from './static_request';
export {Response} from './static_response'; export {Response} from './static_response';
export {QueryEncoder, URLSearchParams} from './url_search_params'; export {QueryEncoder, URLSearchParams} from './url_search_params';
export {VERSION} from './version';

View File

@ -0,0 +1,19 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -11,17 +11,11 @@
* @description * @description
* Entry point for all public APIs of the language service package. * Entry point for all public APIs of the language service package.
*/ */
import {Version} from '@angular/core';
import * as ts from 'typescript';
import {LanguageServicePlugin} from './src/ts_plugin'; import {LanguageServicePlugin} from './src/ts_plugin';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');
export {createLanguageService} from './src/language_service'; export {createLanguageService} from './src/language_service';
export {Completion, Completions, Declaration, Declarations, Definition, Diagnostic, Diagnostics, Hover, HoverTextSection, LanguageService, LanguageServiceHost, Location, Span, TemplateSource, TemplateSources} from './src/types'; export {Completion, Completions, Declaration, Declarations, Definition, Diagnostic, Diagnostics, Hover, HoverTextSection, LanguageService, LanguageServiceHost, Location, Span, TemplateSource, TemplateSources} from './src/types';
export {TypeScriptServiceHost, createLanguageServiceFromTypescript} from './src/typescript_host'; export {TypeScriptServiceHost, createLanguageServiceFromTypescript} from './src/typescript_host';
export {VERSION} from './src/version';
export default LanguageServicePlugin; export default LanguageServicePlugin;

View File

@ -0,0 +1,19 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -11,11 +11,6 @@
* @description * @description
* Entry point for all public APIs of the platform-browser-dynamic package. * Entry point for all public APIs of the platform-browser-dynamic package.
*/ */
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');
export * from './src/platform-browser-dynamic'; export * from './src/platform-browser-dynamic';
// This file only reexports content of the `src` folder. Keep it that way. // This file only reexports content of the `src` folder. Keep it that way.

View File

@ -13,7 +13,7 @@ import {INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS} from './platform_providers'
import {CachedResourceLoader} from './resource_loader/resource_loader_cache'; import {CachedResourceLoader} from './resource_loader/resource_loader_cache';
export * from './private_export'; export * from './private_export';
export {VERSION} from './version';
/** /**
* @experimental * @experimental
*/ */

View File

@ -0,0 +1,19 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -11,10 +11,5 @@
* @description * @description
* Entry point for all public APIs of the platform-browser package. * Entry point for all public APIs of the platform-browser package.
*/ */
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');
export * from './src/platform-browser'; export * from './src/platform-browser';
// This file only reexports content of the `src` folder. Keep it that way. // This file only reexports content of the `src` folder. Keep it that way.

View File

@ -7,7 +7,7 @@
*/ */
import {CommonModule, PlatformLocation} from '@angular/common'; import {CommonModule, PlatformLocation} from '@angular/common';
import {ApplicationModule, ErrorHandler, NgModule, Optional, PLATFORM_INITIALIZER, PlatformRef, Provider, RootRenderer, Sanitizer, SkipSelf, Testability, VERSION, createPlatformFactory, platformCore} from '@angular/core'; import {ApplicationModule, ErrorHandler, NgModule, Optional, PLATFORM_INITIALIZER, PlatformRef, Provider, RootRenderer, Sanitizer, SkipSelf, Testability, createPlatformFactory, platformCore} from '@angular/core';
import {AnimationDriver} from '../src/dom/animation_driver'; import {AnimationDriver} from '../src/dom/animation_driver';
import {WebAnimationsDriver} from '../src/dom/web_animations_driver'; import {WebAnimationsDriver} from '../src/dom/web_animations_driver';
@ -29,7 +29,6 @@ import {DomSanitizer, DomSanitizerImpl} from './security/dom_sanitization_servic
export const INTERNAL_BROWSER_PLATFORM_PROVIDERS: Provider[] = [ export const INTERNAL_BROWSER_PLATFORM_PROVIDERS: Provider[] = [
{provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true}, {provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true},
{provide: PLATFORM_INITIALIZER, useValue: recordAngularVersion, multi: true},
{provide: PlatformLocation, useClass: BrowserPlatformLocation} {provide: PlatformLocation, useClass: BrowserPlatformLocation}
]; ];
@ -55,14 +54,6 @@ export function initDomAdapter() {
BrowserGetTestability.init(); BrowserGetTestability.init();
} }
export function recordAngularVersion(): void {
const domAdapter = getDOM();
const body = domAdapter.getElementsByTagName(domAdapter.defaultDoc(), 'body');
if (body.length > 0) {
domAdapter.setAttribute(body[0], 'ng-version', VERSION.full);
}
}
export function errorHandler(): ErrorHandler { export function errorHandler(): ErrorHandler {
return new ErrorHandler(); return new ErrorHandler();
} }

View File

@ -16,4 +16,5 @@ export {DOCUMENT} from './dom/dom_tokens';
export {EVENT_MANAGER_PLUGINS, EventManager} from './dom/events/event_manager'; export {EVENT_MANAGER_PLUGINS, EventManager} from './dom/events/event_manager';
export {HAMMER_GESTURE_CONFIG, HammerGestureConfig} from './dom/events/hammer_gestures'; export {HAMMER_GESTURE_CONFIG, HammerGestureConfig} from './dom/events/hammer_gestures';
export {DomSanitizer, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl} from './security/dom_sanitization_service'; export {DomSanitizer, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl} from './security/dom_sanitization_service';
export * from './private_export'; export * from './private_export';
export {VERSION} from './version';

View File

@ -0,0 +1,19 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA, Compiler, Component, Directive, ErrorHandler, Inject, Input, NgModule, OnDestroy, PLATFORM_INITIALIZER, Pipe, Provider, createPlatformFactory} from '@angular/core'; import {APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA, Compiler, Component, Directive, ErrorHandler, Inject, Input, NgModule, OnDestroy, PLATFORM_INITIALIZER, Pipe, Provider, VERSION, createPlatformFactory} from '@angular/core';
import {ApplicationRef, destroyPlatform} from '@angular/core/src/application_ref'; import {ApplicationRef, destroyPlatform} from '@angular/core/src/application_ref';
import {Console} from '@angular/core/src/console'; import {Console} from '@angular/core/src/console';
import {ComponentRef} from '@angular/core/src/linker/component_factory'; import {ComponentRef} from '@angular/core/src/linker/component_factory';
@ -219,6 +219,7 @@ export function main() {
const refPromise = bootstrap(HelloRootCmp, testProviders); const refPromise = bootstrap(HelloRootCmp, testProviders);
refPromise.then((ref) => { refPromise.then((ref) => {
expect(el).toHaveText('hello world!'); expect(el).toHaveText('hello world!');
expect(el.getAttribute('ng-version')).toEqual(VERSION.full);
async.done(); async.done();
}); });
})); }));

View File

@ -11,12 +11,6 @@
* @description * @description
* Entry point for all public APIs of the platform-server package. * Entry point for all public APIs of the platform-server package.
*/ */
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');
export * from './src/platform-server'; export * from './src/platform-server';
// This file only reexports content of the `src` folder. Keep it that way. // This file only reexports content of the `src` folder. Keep it that way.

View File

@ -8,3 +8,4 @@
export {ServerModule, platformDynamicServer, platformServer} from './server'; export {ServerModule, platformDynamicServer, platformServer} from './server';
export * from './private_export'; export * from './private_export';
export {VERSION} from './version';

View File

@ -0,0 +1,19 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -11,11 +11,6 @@
* @description * @description
* Entry point for all public APIs of the platform-browser-dynamic package. * Entry point for all public APIs of the platform-browser-dynamic package.
*/ */
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');
export * from './src/platform-webworker-dynamic'; export * from './src/platform-webworker-dynamic';
// This file only reexports content of the `src` folder. Keep it that way. // This file only reexports content of the `src` folder. Keep it that way.

View File

@ -9,7 +9,7 @@
import {ResourceLoader, platformCoreDynamic} from '@angular/compiler'; import {ResourceLoader, platformCoreDynamic} from '@angular/compiler';
import {COMPILER_OPTIONS, PlatformRef, Provider, createPlatformFactory} from '@angular/core'; import {COMPILER_OPTIONS, PlatformRef, Provider, createPlatformFactory} from '@angular/core';
import {ResourceLoaderImpl} from './private_import_platform-browser-dynamic'; import {ResourceLoaderImpl} from './private_import_platform-browser-dynamic';
export {VERSION} from './version';
/** /**
* @experimental API related to bootstrapping are still under review. * @experimental API related to bootstrapping are still under review.

View File

@ -0,0 +1,19 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -11,11 +11,6 @@
* @description * @description
* Entry point for all public APIs of the platform-webworker package. * Entry point for all public APIs of the platform-webworker package.
*/ */
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');
export * from './src/platform-webworker'; export * from './src/platform-webworker';
// This file only reexports content of the `src` folder. Keep it that way. // This file only reexports content of the `src` folder. Keep it that way.

View File

@ -10,6 +10,7 @@ import {PlatformRef, Provider} from '@angular/core';
import {WORKER_SCRIPT, platformWorkerUi} from './worker_render'; import {WORKER_SCRIPT, platformWorkerUi} from './worker_render';
export {VERSION} from './version';
export {ClientMessageBroker, ClientMessageBrokerFactory, FnArg, UiArguments} from './web_workers/shared/client_message_broker'; export {ClientMessageBroker, ClientMessageBrokerFactory, FnArg, UiArguments} from './web_workers/shared/client_message_broker';
export {MessageBus, MessageBusSink, MessageBusSource} from './web_workers/shared/message_bus'; export {MessageBus, MessageBusSink, MessageBusSource} from './web_workers/shared/message_bus';
export {PRIMITIVE} from './web_workers/shared/serializer'; export {PRIMITIVE} from './web_workers/shared/serializer';

View File

@ -0,0 +1,19 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -11,11 +11,6 @@
* @description * @description
* Entry point for all public APIs of the router package. * Entry point for all public APIs of the router package.
*/ */
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-ROUTERPLACEHOLDER');
export * from './src/index'; export * from './src/index';
// This file only reexports content of the `src` folder. Keep it that way. // This file only reexports content of the `src` folder. Keep it that way.

View File

@ -21,5 +21,5 @@ export {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot
export {PRIMARY_OUTLET, Params} from './shared'; export {PRIMARY_OUTLET, Params} from './shared';
export {UrlHandlingStrategy} from './url_handling_strategy'; export {UrlHandlingStrategy} from './url_handling_strategy';
export {DefaultUrlSerializer, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree'; export {DefaultUrlSerializer, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';
export {VERSION} from './version';
export * from './private_export' export * from './private_export'

View File

@ -0,0 +1,19 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-ROUTERPLACEHOLDER');

View File

@ -11,10 +11,5 @@
* @description * @description
* Entry point for all public APIs of the upgrade package. * Entry point for all public APIs of the upgrade package.
*/ */
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');
export * from './src/upgrade'; export * from './src/upgrade';
// This file only reexports content of the `src` folder. Keep it that way. // This file only reexports content of the `src` folder. Keep it that way.

View File

@ -12,3 +12,4 @@
* Adapter allowing AngularJS v1 and Angular v2 to run side by side in the same application. * Adapter allowing AngularJS v1 and Angular v2 to run side by side in the same application.
*/ */
export {UpgradeAdapter, UpgradeAdapterRef} from './upgrade_adapter'; export {UpgradeAdapter, UpgradeAdapterRef} from './upgrade_adapter';
export {VERSION} from './version';

View File

@ -0,0 +1,19 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
import {Version} from '@angular/core';
/**
* @stable
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -14,12 +14,6 @@ fi
./build.sh ./build.sh
echo "====== RENAMING 0.0.0-PLACEHOLDER to 2.0.0-rc.${VERSION} ======"
find ./dist/packages-dist/ -type f -name package.json -print0 | xargs -0 sed -i '' "s/0\\.0\\.0-PLACEHOLDER/2.0.0-rc.${VERSION}/g"
find ./dist/packages-dist/ -type f -name "*umd.js" -print0 | xargs -0 sed -i '' "s/0\\.0\\.0-PLACEHOLDER/2.0.0-rc.${VERSION}/g"
find ./dist/packages-dist/ -type f -name index.js -print0 | xargs -0 sed -i '' "s/0\\.0\\.0-PLACEHOLDER/2.0.0-rc.${VERSION}/g"
for PACKAGE in \ for PACKAGE in \
core \ core \
compiler \ compiler \