refactor(dart/transform): Remove deprecated angular2/bootstrap

BREAKING CHANGE

Remove the deprecated angular2/bootstrap.ts &
angular2/bootstrap_static.ts libraries.

Browser entry points should import angular2/platform/browser which
supplies the `bootstrap` function.

Closes #7650
This commit is contained in:
Tim Blasi
2016-03-18 09:05:21 -07:00
committed by Timothy Blasi
parent 9a1959f77a
commit 26a3390549
8 changed files with 6 additions and 46 deletions

View File

@ -15,7 +15,6 @@ const _INJECTABLES = const [
const ClassDescriptor('Injectable', 'package:angular2/core.dart'),
const ClassDescriptor('Injectable', 'package:angular2/src/core/di.dart'),
const ClassDescriptor('Injectable', 'package:angular2/angular2.dart'),
const ClassDescriptor('Injectable', 'package:angular2/bootstrap_static.dart'),
const ClassDescriptor(
'Injectable', 'package:angular2/web_worker/worker.dart'),
];
@ -65,7 +64,6 @@ const _PIPES = const [
const _VIEWS = const [
const ClassDescriptor('View', 'package:angular2/angular2.dart'),
const ClassDescriptor('View', 'package:angular2/web_worker/worker.dart'),
const ClassDescriptor('View', 'package:angular2/bootstrap_static.dart'),
const ClassDescriptor('View', 'package:angular2/core.dart'),
const ClassDescriptor('View', 'package:angular2/src/core/metadata/view.dart'),
const ClassDescriptor('View', 'package:angular2/src/core/metadata.dart'),
@ -74,9 +72,6 @@ const _VIEWS = const [
const _ENTRYPOINTS = const [
const ClassDescriptor('AngularEntrypoint', 'package:angular2/angular2.dart'),
const ClassDescriptor('AngularEntrypoint', 'package:angular2/core.dart'),
const ClassDescriptor('AngularEntrypoint', 'package:angular2/bootstrap.dart'),
const ClassDescriptor(
'AngularEntrypoint', 'package:angular2/bootstrap_static.dart'),
const ClassDescriptor(
'AngularEntrypoint', 'package:angular2/platform/browser.dart'),
const ClassDescriptor(

View File

@ -3,14 +3,11 @@ library angular2.transform.common.mirror_matcher;
import 'package:analyzer/src/generated/ast.dart';
import 'package:angular2/src/transform/common/names.dart';
/// Files from which `bootstrap` is exported.
/// File from which `bootstrap` is exported.
///
/// These files transitively imports dart:mirrors.
/// They should be replaced with [BOOTSTRAP_STATIC_URI] in production apps.
const _BOOTSTRAP_URIS = const <String>[
'package:angular2/bootstrap.dart',
'package:angular2/platform/browser.dart',
];
/// This file transitively imports dart:mirrors.
/// It should be replaced with [BOOTSTRAP_STATIC_URI] in production apps.
const _BOOTSTRAP_URI = 'package:angular2/platform/browser.dart';
/// File from which `ReflectionCapabilities` is exported.
///
@ -23,7 +20,7 @@ const _REFLECTION_CAPABILITIES_URI =
/// File from which `bootstrapStatic` is exported.
///
/// This file does not transitively import dart:mirrors.
/// It should be used in place of [_BOOTSTRAP_URIS] in production apps.
/// It should be used in place of [_BOOTSTRAP_URI] in production apps.
const BOOTSTRAP_STATIC_URI = 'package:angular2/platform/browser_static.dart';
/// Syntactially checks for code related to the use of `dart:mirrors`.
@ -42,5 +39,5 @@ class MirrorMatcher {
}
bool hasBootstrapUri(UriBasedDirective node) =>
_BOOTSTRAP_URIS.contains(node.uri.stringValue);
_BOOTSTRAP_URI == node.uri.stringValue;
}