@angular/core 13.0.0-next.9 → 13.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core.d.ts +791 -1180
- package/esm2020/core.mjs +5 -0
- package/esm2020/index.mjs +14 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- package/esm2020/src/application_init.mjs +140 -0
- package/esm2020/src/application_module.mjs +130 -0
- package/esm2020/src/application_ref.mjs +738 -0
- package/{esm2015/src/application_tokens.js → esm2020/src/application_tokens.mjs} +0 -0
- package/esm2020/src/change_detection/change_detection.mjs +31 -0
- package/esm2020/src/change_detection/change_detection_util.mjs +64 -0
- package/esm2020/src/change_detection/change_detector_ref.mjs +89 -0
- package/{esm2015/src/change_detection/constants.js → esm2020/src/change_detection/constants.mjs} +0 -0
- package/esm2020/src/change_detection/differs/default_iterable_differ.mjs +666 -0
- package/{esm2015/src/change_detection/differs/default_keyvalue_differ.js → esm2020/src/change_detection/differs/default_keyvalue_differ.mjs} +0 -0
- package/{esm2015/src/change_detection/differs/iterable_differs.js → esm2020/src/change_detection/differs/iterable_differs.mjs} +0 -0
- package/{esm2015/src/change_detection/differs/keyvalue_differs.js → esm2020/src/change_detection/differs/keyvalue_differs.mjs} +0 -0
- package/{esm2015/src/change_detection/pipe_transform.js → esm2020/src/change_detection/pipe_transform.mjs} +0 -0
- package/esm2020/src/change_detection.mjs +14 -0
- package/esm2020/src/codegen_private_exports.mjs +11 -0
- package/{esm2015/src/compiler/compiler_facade.js → esm2020/src/compiler/compiler_facade.mjs} +0 -0
- package/{esm2015/src/compiler/compiler_facade_interface.js → esm2020/src/compiler/compiler_facade_interface.mjs} +1 -1
- package/esm2020/src/console.mjs +26 -0
- package/esm2020/src/core.mjs +52 -0
- package/esm2020/src/core_private_export.mjs +34 -0
- package/esm2020/src/core_render3_private_export.mjs +47 -0
- package/esm2020/src/debug/debug_node.mjs +625 -0
- package/{esm2015/src/debug/proxy.js → esm2020/src/debug/proxy.mjs} +0 -0
- package/{esm2015/src/di/forward_ref.js → esm2020/src/di/forward_ref.mjs} +0 -0
- package/{esm2015/src/di/index.js → esm2020/src/di/index.mjs} +0 -0
- package/{esm2015/src/di/inject_switch.js → esm2020/src/di/inject_switch.mjs} +0 -0
- package/esm2020/src/di/injectable.mjs +27 -0
- package/esm2020/src/di/injection_token.mjs +82 -0
- package/esm2020/src/di/injector.mjs +323 -0
- package/esm2020/src/di/injector_compatibility.mjs +185 -0
- package/{esm2015/src/di/injector_marker.js → esm2020/src/di/injector_marker.mjs} +0 -0
- package/{esm2015/src/di/injector_token.js → esm2020/src/di/injector_token.mjs} +0 -0
- package/{esm2015/src/di/interface/defs.js → esm2020/src/di/interface/defs.mjs} +0 -0
- package/{esm2015/src/di/interface/injector.js → esm2020/src/di/interface/injector.mjs} +0 -0
- package/{esm2015/src/di/interface/provider.js → esm2020/src/di/interface/provider.mjs} +0 -0
- package/{esm2015/src/di/jit/environment.js → esm2020/src/di/jit/environment.mjs} +0 -0
- package/esm2020/src/di/jit/injectable.mjs +94 -0
- package/{esm2015/src/di/jit/util.js → esm2020/src/di/jit/util.mjs} +0 -0
- package/esm2020/src/di/metadata.mjs +60 -0
- package/esm2020/src/di/metadata_attr.mjs +24 -0
- package/{esm2015/src/di/null_injector.js → esm2020/src/di/null_injector.mjs} +0 -0
- package/{esm2015/src/di/provider_token.js → esm2020/src/di/provider_token.mjs} +0 -0
- package/{esm2015/src/di/r3_injector.js → esm2020/src/di/r3_injector.mjs} +0 -0
- package/{esm2015/src/di/reflective_errors.js → esm2020/src/di/reflective_errors.mjs} +0 -0
- package/{esm2015/src/di/reflective_injector.js → esm2020/src/di/reflective_injector.mjs} +0 -0
- package/{esm2015/src/di/reflective_key.js → esm2020/src/di/reflective_key.mjs} +0 -0
- package/{esm2015/src/di/reflective_provider.js → esm2020/src/di/reflective_provider.mjs} +0 -0
- package/{esm2015/src/di/scope.js → esm2020/src/di/scope.mjs} +0 -0
- package/esm2020/src/di/util.mjs +51 -0
- package/{esm2015/src/di.js → esm2020/src/di.mjs} +0 -0
- package/{esm2015/src/error_handler.js → esm2020/src/error_handler.mjs} +0 -0
- package/{esm2015/src/errors.js → esm2020/src/errors.mjs} +0 -0
- package/esm2020/src/event_emitter.mjs +53 -0
- package/{esm2015/src/i18n/locale_data_api.js → esm2020/src/i18n/locale_data_api.mjs} +0 -0
- package/esm2020/src/i18n/locale_en.mjs +17 -0
- package/{esm2015/src/i18n/localization.js → esm2020/src/i18n/localization.mjs} +0 -0
- package/{esm2015/src/i18n/tokens.js → esm2020/src/i18n/tokens.mjs} +0 -0
- package/{esm2015/src/interface/lifecycle_hooks.js → esm2020/src/interface/lifecycle_hooks.mjs} +0 -0
- package/{esm2015/src/interface/simple_change.js → esm2020/src/interface/simple_change.mjs} +0 -0
- package/{esm2015/src/interface/type.js → esm2020/src/interface/type.mjs} +0 -0
- package/{esm2015/src/ivy_switch.js → esm2020/src/ivy_switch.mjs} +2 -2
- package/esm2020/src/linker/compiler.mjs +136 -0
- package/{esm2015/src/linker/component_factory.js → esm2020/src/linker/component_factory.mjs} +0 -0
- package/{esm2015/src/linker/component_factory_resolver.js → esm2020/src/linker/component_factory_resolver.mjs} +5 -5
- package/esm2020/src/linker/element_ref.mjs +59 -0
- package/esm2020/src/linker/ng_module_factory.mjs +29 -0
- package/esm2020/src/linker/ng_module_factory_loader.mjs +42 -0
- package/esm2020/src/linker/ng_module_factory_loader_impl.mjs +10 -0
- package/{esm2015/src/linker/ng_module_factory_registration.js → esm2020/src/linker/ng_module_factory_registration.mjs} +2 -2
- package/{esm2015/src/linker/query_list.js → esm2020/src/linker/query_list.mjs} +0 -0
- package/{esm2015/src/linker/template_ref.js → esm2020/src/linker/template_ref.mjs} +2 -2
- package/esm2020/src/linker/view_container_ref.mjs +283 -0
- package/{esm2015/src/linker/view_ref.js → esm2020/src/linker/view_ref.mjs} +0 -0
- package/esm2020/src/linker.mjs +19 -0
- package/esm2020/src/metadata/di.mjs +108 -0
- package/esm2020/src/metadata/directives.mjs +112 -0
- package/{esm2015/src/metadata/do_boostrap.js → esm2020/src/metadata/do_boostrap.mjs} +0 -0
- package/esm2020/src/metadata/ng_module.mjs +42 -0
- package/{esm2015/src/metadata/ng_module_def.js → esm2020/src/metadata/ng_module_def.mjs} +0 -0
- package/{esm2015/src/metadata/resource_loading.js → esm2020/src/metadata/resource_loading.mjs} +0 -0
- package/{esm2015/src/metadata/schema.js → esm2020/src/metadata/schema.mjs} +0 -0
- package/{esm2015/src/metadata/view.js → esm2020/src/metadata/view.mjs} +0 -0
- package/{esm2015/src/metadata.js → esm2020/src/metadata.mjs} +0 -0
- package/{esm2015/src/platform_core_providers.js → esm2020/src/platform_core_providers.mjs} +0 -0
- package/{esm2015/src/r3_symbols.js → esm2020/src/r3_symbols.mjs} +0 -0
- package/{esm2015/src/reflection/platform_reflection_capabilities.js → esm2020/src/reflection/platform_reflection_capabilities.mjs} +0 -0
- package/{esm2015/src/reflection/reflection.js → esm2020/src/reflection/reflection.mjs} +0 -0
- package/{esm2015/src/reflection/reflection_capabilities.js → esm2020/src/reflection/reflection_capabilities.mjs} +0 -0
- package/{esm2015/src/reflection/reflector.js → esm2020/src/reflection/reflector.mjs} +0 -0
- package/{esm2015/src/reflection/types.js → esm2020/src/reflection/types.mjs} +0 -0
- package/{esm2015/src/render/api.js → esm2020/src/render/api.mjs} +2 -2
- package/{esm2015/src/render/api_flags.js → esm2020/src/render/api_flags.mjs} +0 -0
- package/{esm2015/src/render.js → esm2020/src/render.mjs} +0 -0
- package/{esm2015/src/render3/assert.js → esm2020/src/render3/assert.mjs} +0 -0
- package/{esm2015/src/render3/bindings.js → esm2020/src/render3/bindings.mjs} +0 -0
- package/{esm2015/src/render3/collect_native_nodes.js → esm2020/src/render3/collect_native_nodes.mjs} +0 -0
- package/esm2020/src/render3/component.mjs +204 -0
- package/{esm2015/src/render3/component_ref.js → esm2020/src/render3/component_ref.mjs} +0 -0
- package/{esm2015/src/render3/context_discovery.js → esm2020/src/render3/context_discovery.mjs} +0 -0
- package/esm2020/src/render3/definition.mjs +296 -0
- package/{esm2015/src/render3/definition_factory.js → esm2020/src/render3/definition_factory.mjs} +0 -0
- package/{esm2015/src/render3/di.js → esm2020/src/render3/di.mjs} +3 -3
- package/{esm2015/src/render3/di_setup.js → esm2020/src/render3/di_setup.mjs} +0 -0
- package/esm2020/src/render3/error_code.mjs +42 -0
- package/esm2020/src/render3/error_details_base_url.mjs +16 -0
- package/{esm2015/src/render3/errors.js → esm2020/src/render3/errors.mjs} +0 -0
- package/{esm2015/src/render3/errors_di.js → esm2020/src/render3/errors_di.mjs} +0 -0
- package/{esm2015/src/render3/features/copy_definition_feature.js → esm2020/src/render3/features/copy_definition_feature.mjs} +0 -0
- package/{esm2015/src/render3/features/inherit_definition_feature.js → esm2020/src/render3/features/inherit_definition_feature.mjs} +0 -0
- package/esm2020/src/render3/features/ng_onchanges_feature.mjs +92 -0
- package/{esm2015/src/render3/features/providers_feature.js → esm2020/src/render3/features/providers_feature.mjs} +0 -0
- package/esm2020/src/render3/fields.mjs +21 -0
- package/{esm2015/src/render3/global_utils_api.js → esm2020/src/render3/global_utils_api.mjs} +0 -0
- package/{esm2015/src/render3/hooks.js → esm2020/src/render3/hooks.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_apply.js → esm2020/src/render3/i18n/i18n_apply.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_debug.js → esm2020/src/render3/i18n/i18n_debug.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_insert_before_index.js → esm2020/src/render3/i18n/i18n_insert_before_index.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_locale_id.js → esm2020/src/render3/i18n/i18n_locale_id.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_parse.js → esm2020/src/render3/i18n/i18n_parse.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_postprocess.js → esm2020/src/render3/i18n/i18n_postprocess.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_tree_shaking.js → esm2020/src/render3/i18n/i18n_tree_shaking.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_util.js → esm2020/src/render3/i18n/i18n_util.mjs} +0 -0
- package/{esm2015/src/render3/index.js → esm2020/src/render3/index.mjs} +0 -0
- package/{esm2015/src/render3/instructions/advance.js → esm2020/src/render3/instructions/advance.mjs} +0 -0
- package/{esm2015/src/render3/instructions/all.js → esm2020/src/render3/instructions/all.mjs} +0 -0
- package/{esm2015/src/render3/instructions/attribute.js → esm2020/src/render3/instructions/attribute.mjs} +0 -0
- package/{esm2015/src/render3/instructions/attribute_interpolation.js → esm2020/src/render3/instructions/attribute_interpolation.mjs} +0 -0
- package/{esm2015/src/render3/instructions/change_detection.js → esm2020/src/render3/instructions/change_detection.mjs} +0 -0
- package/{esm2015/src/render3/instructions/class_map_interpolation.js → esm2020/src/render3/instructions/class_map_interpolation.mjs} +0 -0
- package/{esm2015/src/render3/instructions/di.js → esm2020/src/render3/instructions/di.mjs} +0 -0
- package/{esm2015/src/render3/instructions/di_attr.js → esm2020/src/render3/instructions/di_attr.mjs} +0 -0
- package/{esm2015/src/render3/instructions/element.js → esm2020/src/render3/instructions/element.mjs} +0 -0
- package/{esm2015/src/render3/instructions/element_container.js → esm2020/src/render3/instructions/element_container.mjs} +0 -0
- package/{esm2015/src/render3/instructions/get_current_view.js → esm2020/src/render3/instructions/get_current_view.mjs} +0 -0
- package/{esm2015/src/render3/instructions/host_property.js → esm2020/src/render3/instructions/host_property.mjs} +0 -0
- package/{esm2015/src/render3/instructions/i18n.js → esm2020/src/render3/instructions/i18n.mjs} +0 -0
- package/{esm2015/src/render3/instructions/i18n_icu_container_visitor.js → esm2020/src/render3/instructions/i18n_icu_container_visitor.mjs} +0 -0
- package/{esm2015/src/render3/instructions/interpolation.js → esm2020/src/render3/instructions/interpolation.mjs} +0 -0
- package/{esm2015/src/render3/instructions/listener.js → esm2020/src/render3/instructions/listener.mjs} +0 -0
- package/{esm2015/src/render3/instructions/lview_debug.js → esm2020/src/render3/instructions/lview_debug.mjs} +0 -0
- package/{esm2015/src/render3/instructions/namespace.js → esm2020/src/render3/instructions/namespace.mjs} +0 -0
- package/{esm2015/src/render3/instructions/next_context.js → esm2020/src/render3/instructions/next_context.mjs} +0 -0
- package/{esm2015/src/render3/instructions/projection.js → esm2020/src/render3/instructions/projection.mjs} +0 -0
- package/{esm2015/src/render3/instructions/property.js → esm2020/src/render3/instructions/property.mjs} +0 -0
- package/{esm2015/src/render3/instructions/property_interpolation.js → esm2020/src/render3/instructions/property_interpolation.mjs} +0 -0
- package/esm2020/src/render3/instructions/shared.mjs +1811 -0
- package/{esm2015/src/render3/instructions/storage.js → esm2020/src/render3/instructions/storage.mjs} +0 -0
- package/{esm2015/src/render3/instructions/style_map_interpolation.js → esm2020/src/render3/instructions/style_map_interpolation.mjs} +0 -0
- package/{esm2015/src/render3/instructions/style_prop_interpolation.js → esm2020/src/render3/instructions/style_prop_interpolation.mjs} +0 -0
- package/{esm2015/src/render3/instructions/styling.js → esm2020/src/render3/instructions/styling.mjs} +0 -0
- package/{esm2015/src/render3/instructions/template.js → esm2020/src/render3/instructions/template.mjs} +0 -0
- package/{esm2015/src/render3/instructions/text.js → esm2020/src/render3/instructions/text.mjs} +0 -0
- package/{esm2015/src/render3/instructions/text_interpolation.js → esm2020/src/render3/instructions/text_interpolation.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/container.js → esm2020/src/render3/interfaces/container.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/context.js → esm2020/src/render3/interfaces/context.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/definition.js → esm2020/src/render3/interfaces/definition.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/document.js → esm2020/src/render3/interfaces/document.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/i18n.js → esm2020/src/render3/interfaces/i18n.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/injector.js → esm2020/src/render3/interfaces/injector.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/node.js → esm2020/src/render3/interfaces/node.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/player.js → esm2020/src/render3/interfaces/player.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/projection.js → esm2020/src/render3/interfaces/projection.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/public_definitions.js → esm2020/src/render3/interfaces/public_definitions.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/query.js → esm2020/src/render3/interfaces/query.mjs} +0 -0
- package/esm2020/src/render3/interfaces/renderer.mjs +27 -0
- package/{esm2015/src/render3/interfaces/renderer_dom.js → esm2020/src/render3/interfaces/renderer_dom.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/sanitization.js → esm2020/src/render3/interfaces/sanitization.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/styling.js → esm2020/src/render3/interfaces/styling.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/type_checks.js → esm2020/src/render3/interfaces/type_checks.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/view.js → esm2020/src/render3/interfaces/view.mjs} +0 -0
- package/esm2020/src/render3/jit/directive.mjs +325 -0
- package/esm2020/src/render3/jit/environment.mjs +165 -0
- package/{esm2015/src/render3/jit/jit_options.js → esm2020/src/render3/jit/jit_options.mjs} +0 -0
- package/{esm2015/src/render3/jit/module.js → esm2020/src/render3/jit/module.mjs} +0 -0
- package/esm2020/src/render3/jit/partial.mjs +104 -0
- package/{esm2015/src/render3/jit/pipe.js → esm2020/src/render3/jit/pipe.mjs} +0 -0
- package/esm2020/src/render3/metadata.mjs +49 -0
- package/{esm2015/src/render3/namespaces.js → esm2020/src/render3/namespaces.mjs} +0 -0
- package/esm2020/src/render3/ng_module_ref.mjs +119 -0
- package/{esm2015/src/render3/node_assert.js → esm2020/src/render3/node_assert.mjs} +0 -0
- package/{esm2015/src/render3/node_manipulation.js → esm2020/src/render3/node_manipulation.mjs} +0 -0
- package/{esm2015/src/render3/node_manipulation_i18n.js → esm2020/src/render3/node_manipulation_i18n.mjs} +0 -0
- package/{esm2015/src/render3/node_selector_matcher.js → esm2020/src/render3/node_selector_matcher.mjs} +0 -0
- package/esm2020/src/render3/pipe.mjs +184 -0
- package/{esm2015/src/render3/profiler.js → esm2020/src/render3/profiler.mjs} +0 -0
- package/{esm2015/src/render3/pure_function.js → esm2020/src/render3/pure_function.mjs} +0 -0
- package/{esm2015/src/render3/query.js → esm2020/src/render3/query.mjs} +0 -0
- package/{esm2015/src/render3/state.js → esm2020/src/render3/state.mjs} +0 -0
- package/{esm2015/src/render3/styling/class_differ.js → esm2020/src/render3/styling/class_differ.mjs} +0 -0
- package/{esm2015/src/render3/styling/static_styling.js → esm2020/src/render3/styling/static_styling.mjs} +0 -0
- package/{esm2015/src/render3/styling/style_binding_list.js → esm2020/src/render3/styling/style_binding_list.mjs} +0 -0
- package/{esm2015/src/render3/styling/styling_parser.js → esm2020/src/render3/styling/styling_parser.mjs} +0 -0
- package/{esm2015/src/render3/tokens.js → esm2020/src/render3/tokens.mjs} +0 -0
- package/{esm2015/src/render3/util/attrs_utils.js → esm2020/src/render3/util/attrs_utils.mjs} +0 -0
- package/{esm2015/src/render3/util/change_detection_utils.js → esm2020/src/render3/util/change_detection_utils.mjs} +0 -0
- package/{esm2015/src/render3/util/debug_utils.js → esm2020/src/render3/util/debug_utils.mjs} +0 -0
- package/esm2020/src/render3/util/discovery_utils.mjs +411 -0
- package/esm2020/src/render3/util/global_utils.mjs +77 -0
- package/{esm2015/src/render3/util/injector_utils.js → esm2020/src/render3/util/injector_utils.mjs} +0 -0
- package/esm2020/src/render3/util/misc_utils.mjs +61 -0
- package/{esm2015/src/render3/util/stringify_utils.js → esm2020/src/render3/util/stringify_utils.mjs} +0 -0
- package/{esm2015/src/render3/util/view_traversal_utils.js → esm2020/src/render3/util/view_traversal_utils.mjs} +0 -0
- package/{esm2015/src/render3/util/view_utils.js → esm2020/src/render3/util/view_utils.mjs} +0 -0
- package/{esm2015/src/render3/view_engine_compatibility_prebound.js → esm2020/src/render3/view_engine_compatibility_prebound.mjs} +0 -0
- package/{esm2015/src/render3/view_ref.js → esm2020/src/render3/view_ref.mjs} +0 -0
- package/{esm2015/src/sanitization/bypass.js → esm2020/src/sanitization/bypass.mjs} +0 -0
- package/{esm2015/src/sanitization/html_sanitizer.js → esm2020/src/sanitization/html_sanitizer.mjs} +0 -0
- package/{esm2015/src/sanitization/inert_body.js → esm2020/src/sanitization/inert_body.mjs} +3 -3
- package/{esm2015/src/sanitization/sanitization.js → esm2020/src/sanitization/sanitization.mjs} +0 -0
- package/{esm2015/src/sanitization/sanitizer.js → esm2020/src/sanitization/sanitizer.mjs} +0 -0
- package/{esm2015/src/sanitization/security.js → esm2020/src/sanitization/security.mjs} +0 -0
- package/{esm2015/src/sanitization/url_sanitizer.js → esm2020/src/sanitization/url_sanitizer.mjs} +0 -0
- package/esm2020/src/testability/testability.mjs +258 -0
- package/{esm2015/src/util/array_utils.js → esm2020/src/util/array_utils.mjs} +0 -0
- package/{esm2015/src/util/assert.js → esm2020/src/util/assert.mjs} +0 -0
- package/{esm2015/src/util/char_code.js → esm2020/src/util/char_code.mjs} +0 -0
- package/{esm2015/src/util/closure.js → esm2020/src/util/closure.mjs} +0 -0
- package/{esm2015/src/util/comparison.js → esm2020/src/util/comparison.mjs} +0 -0
- package/{esm2015/src/util/decorators.js → esm2020/src/util/decorators.mjs} +0 -0
- package/{esm2015/src/util/dom.js → esm2020/src/util/dom.mjs} +0 -0
- package/{esm2015/src/util/empty.js → esm2020/src/util/empty.mjs} +0 -0
- package/{esm2015/src/util/errors.js → esm2020/src/util/errors.mjs} +0 -0
- package/{esm2015/src/util/global.js → esm2020/src/util/global.mjs} +0 -0
- package/{esm2015/src/util/is_dev_mode.js → esm2020/src/util/is_dev_mode.mjs} +0 -0
- package/{esm2015/src/util/iterable.js → esm2020/src/util/iterable.mjs} +0 -0
- package/{esm2015/src/util/lang.js → esm2020/src/util/lang.mjs} +0 -0
- package/{esm2015/src/util/microtask.js → esm2020/src/util/microtask.mjs} +0 -0
- package/{esm2015/src/util/named_array_type.js → esm2020/src/util/named_array_type.mjs} +0 -0
- package/{esm2015/src/util/ng_dev_mode.js → esm2020/src/util/ng_dev_mode.mjs} +0 -0
- package/{esm2015/src/util/ng_i18n_closure_mode.js → esm2020/src/util/ng_i18n_closure_mode.mjs} +0 -0
- package/{esm2015/src/util/ng_jit_mode.js → esm2020/src/util/ng_jit_mode.mjs} +0 -0
- package/{esm2015/src/util/ng_reflect.js → esm2020/src/util/ng_reflect.mjs} +0 -0
- package/{esm2015/src/util/noop.js → esm2020/src/util/noop.mjs} +0 -0
- package/{esm2015/src/util/property.js → esm2020/src/util/property.mjs} +0 -0
- package/{esm2015/src/util/raf.js → esm2020/src/util/raf.mjs} +0 -0
- package/{esm2015/src/util/security/trusted_type_defs.js → esm2020/src/util/security/trusted_type_defs.mjs} +0 -0
- package/esm2020/src/util/security/trusted_types.mjs +130 -0
- package/esm2020/src/util/security/trusted_types_bypass.mjs +83 -0
- package/{esm2015/src/util/stringify.js → esm2020/src/util/stringify.mjs} +0 -0
- package/{esm2015/src/util/symbol.js → esm2020/src/util/symbol.mjs} +0 -0
- package/{esm2015/src/version.js → esm2020/src/version.mjs} +1 -1
- package/{esm2015/src/view/element.js → esm2020/src/view/element.mjs} +0 -0
- package/{esm2015/src/view/entrypoint.js → esm2020/src/view/entrypoint.mjs} +0 -0
- package/{esm2015/src/view/errors.js → esm2020/src/view/errors.mjs} +0 -0
- package/{esm2015/src/view/index.js → esm2020/src/view/index.mjs} +2 -2
- package/{esm2015/src/view/ng_content.js → esm2020/src/view/ng_content.mjs} +0 -0
- package/{esm2015/src/view/ng_module.js → esm2020/src/view/ng_module.mjs} +0 -0
- package/esm2020/src/view/provider.mjs +490 -0
- package/{esm2015/src/view/provider_flags.js → esm2020/src/view/provider_flags.mjs} +0 -0
- package/{esm2015/src/view/pure_expression.js → esm2020/src/view/pure_expression.mjs} +0 -0
- package/{esm2015/src/view/query.js → esm2020/src/view/query.mjs} +0 -0
- package/{esm2015/src/view/refs.js → esm2020/src/view/refs.mjs} +0 -0
- package/{esm2015/src/view/services.js → esm2020/src/view/services.mjs} +0 -0
- package/{esm2015/src/view/text.js → esm2020/src/view/text.mjs} +0 -0
- package/{esm2015/src/view/types.js → esm2020/src/view/types.mjs} +0 -0
- package/esm2020/src/view/util.mjs +369 -0
- package/{esm2015/src/view/view.js → esm2020/src/view/view.mjs} +0 -0
- package/{esm2015/src/view/view_attach.js → esm2020/src/view/view_attach.mjs} +0 -0
- package/{esm2015/src/zone/ng_zone.js → esm2020/src/zone/ng_zone.mjs} +0 -0
- package/{esm2015/src/zone.js → esm2020/src/zone.mjs} +0 -0
- package/{esm2015/testing/index.js → esm2020/testing/index.mjs} +0 -0
- package/{esm2015/testing/public_api.js → esm2020/testing/public_api.mjs} +0 -0
- package/{esm2015/testing/src/async.js → esm2020/testing/src/async.mjs} +0 -0
- package/{esm2015/testing/src/component_fixture.js → esm2020/testing/src/component_fixture.mjs} +0 -0
- package/{esm2015/testing/src/fake_async.js → esm2020/testing/src/fake_async.mjs} +0 -0
- package/{esm2015/testing/src/lang_utils.js → esm2020/testing/src/lang_utils.mjs} +0 -0
- package/esm2020/testing/src/logger.mjs +34 -0
- package/{esm2015/testing/src/metadata_override.js → esm2020/testing/src/metadata_override.mjs} +0 -0
- package/{esm2015/testing/src/metadata_overrider.js → esm2020/testing/src/metadata_overrider.mjs} +0 -0
- package/esm2020/testing/src/ng_zone_mock.mjs +33 -0
- package/{esm2015/testing/src/private_export_testing.js → esm2020/testing/src/private_export_testing.mjs} +0 -0
- package/esm2020/testing/src/r3_test_bed.mjs +397 -0
- package/esm2020/testing/src/r3_test_bed_compiler.mjs +735 -0
- package/{esm2015/testing/src/resolvers.js → esm2020/testing/src/resolvers.mjs} +0 -0
- package/{esm2015/testing/src/styling.js → esm2020/testing/src/styling.mjs} +0 -0
- package/esm2020/testing/src/test_bed.mjs +614 -0
- package/esm2020/testing/src/test_bed_common.mjs +28 -0
- package/esm2020/testing/src/test_compiler.mjs +69 -0
- package/{esm2015/testing/src/test_hooks.js → esm2020/testing/src/test_hooks.mjs} +0 -0
- package/{esm2015/testing/src/testing.js → esm2020/testing/src/testing.mjs} +0 -0
- package/{esm2015/testing/src/testing_internal.js → esm2020/testing/src/testing_internal.mjs} +0 -0
- package/esm2020/testing/testing.mjs +5 -0
- package/fesm2015/{core.js → core.mjs} +496 -546
- package/fesm2015/core.mjs.map +1 -0
- package/fesm2015/{testing.js → testing.mjs} +50 -61
- package/fesm2015/testing.mjs.map +1 -0
- package/fesm2020/core.mjs +33109 -0
- package/fesm2020/core.mjs.map +1 -0
- package/fesm2020/testing.mjs +2635 -0
- package/fesm2020/testing.mjs.map +1 -0
- package/package.json +33 -8
- package/schematics/migrations/{move-document → testbed-teardown}/index.d.ts +2 -2
- package/schematics/migrations/testbed-teardown/index.js +92 -0
- package/schematics/migrations/testbed-teardown/util.d.ts +35 -0
- package/schematics/migrations/testbed-teardown/util.js +188 -0
- package/schematics/migrations.json +6 -101
- package/schematics/package.json +3 -0
- package/schematics/utils/import_manager.d.ts +1 -1
- package/schematics/utils/import_manager.js +22 -19
- package/schematics/utils/load_esm.d.ts +8 -0
- package/schematics/utils/load_esm.js +24 -2
- package/schematics/utils/ng_component_template.d.ts +1 -1
- package/schematics/utils/ng_component_template.js +12 -9
- package/schematics/utils/ng_decorators.d.ts +1 -1
- package/schematics/utils/ng_decorators.js +1 -1
- package/schematics/utils/typescript/class_declaration.d.ts +1 -1
- package/schematics/utils/typescript/class_declaration.js +10 -7
- package/schematics/utils/typescript/compiler_host.d.ts +1 -1
- package/schematics/utils/typescript/compiler_host.js +7 -4
- package/schematics/utils/typescript/decorators.d.ts +1 -1
- package/schematics/utils/typescript/decorators.js +7 -4
- package/schematics/utils/typescript/find_base_classes.d.ts +1 -1
- package/schematics/utils/typescript/find_base_classes.js +6 -3
- package/schematics/utils/typescript/functions.d.ts +1 -1
- package/schematics/utils/typescript/functions.js +9 -6
- package/schematics/utils/typescript/imports.d.ts +1 -1
- package/schematics/utils/typescript/imports.js +12 -9
- package/schematics/utils/typescript/nodes.d.ts +1 -1
- package/schematics/utils/typescript/nodes.js +11 -8
- package/schematics/utils/typescript/parse_tsconfig.d.ts +1 -1
- package/schematics/utils/typescript/parse_tsconfig.js +31 -9
- package/schematics/utils/typescript/property_name.d.ts +1 -1
- package/schematics/utils/typescript/property_name.js +7 -4
- package/schematics/utils/typescript/symbol.d.ts +1 -1
- package/schematics/utils/typescript/symbol.js +15 -12
- package/testing/package.json +5 -5
- package/testing/testing.d.ts +4 -333
- package/bundles/core-testing.umd.js +0 -3179
- package/bundles/core-testing.umd.js.map +0 -1
- package/bundles/core.umd.js +0 -34454
- package/bundles/core.umd.js.map +0 -1
- package/core.metadata.json +0 -1
- package/esm2015/core.externs.js +0 -6
- package/esm2015/core.js +0 -38
- package/esm2015/index.js +0 -13
- package/esm2015/src/application_init.js +0 -142
- package/esm2015/src/application_module.js +0 -134
- package/esm2015/src/application_ref.js +0 -738
- package/esm2015/src/change_detection/change_detection.js +0 -31
- package/esm2015/src/change_detection/change_detection_util.js +0 -105
- package/esm2015/src/change_detection/change_detector_ref.js +0 -96
- package/esm2015/src/change_detection/differs/default_iterable_differ.js +0 -668
- package/esm2015/src/change_detection.js +0 -14
- package/esm2015/src/codegen_private_exports.js +0 -11
- package/esm2015/src/compiler/compiler.externs.js +0 -0
- package/esm2015/src/console.js +0 -23
- package/esm2015/src/core.js +0 -50
- package/esm2015/src/core_private_export.js +0 -35
- package/esm2015/src/core_render3_private_export.js +0 -45
- package/esm2015/src/debug/debug_node.js +0 -632
- package/esm2015/src/di/injectable.js +0 -36
- package/esm2015/src/di/injection_token.js +0 -75
- package/esm2015/src/di/injector.js +0 -326
- package/esm2015/src/di/injector_compatibility.js +0 -187
- package/esm2015/src/di/interface/interface.externs.js +0 -0
- package/esm2015/src/di/jit/injectable.js +0 -96
- package/esm2015/src/di/metadata.js +0 -62
- package/esm2015/src/di/metadata_attr.js +0 -24
- package/esm2015/src/di/util.js +0 -53
- package/esm2015/src/event_emitter.js +0 -54
- package/esm2015/src/i18n/locale_en.js +0 -17
- package/esm2015/src/interface/interface.externs.js +0 -0
- package/esm2015/src/linker/compiler.js +0 -118
- package/esm2015/src/linker/element_ref.js +0 -66
- package/esm2015/src/linker/ng_module_factory.js +0 -21
- package/esm2015/src/linker/ng_module_factory_loader.js +0 -32
- package/esm2015/src/linker/view_container_ref.js +0 -290
- package/esm2015/src/linker.js +0 -19
- package/esm2015/src/metadata/di.js +0 -99
- package/esm2015/src/metadata/directives.js +0 -120
- package/esm2015/src/metadata/ng_module.js +0 -44
- package/esm2015/src/reflection/reflection.externs.js +0 -0
- package/esm2015/src/render3/component.js +0 -206
- package/esm2015/src/render3/definition.js +0 -299
- package/esm2015/src/render3/error_code.js +0 -45
- package/esm2015/src/render3/features/ng_onchanges_feature.js +0 -92
- package/esm2015/src/render3/fields.js +0 -22
- package/esm2015/src/render3/instructions/shared.js +0 -1813
- package/esm2015/src/render3/interfaces/renderer.js +0 -29
- package/esm2015/src/render3/jit/directive.js +0 -312
- package/esm2015/src/render3/jit/environment.js +0 -167
- package/esm2015/src/render3/jit/partial.js +0 -105
- package/esm2015/src/render3/metadata.js +0 -49
- package/esm2015/src/render3/ng_module_ref.js +0 -108
- package/esm2015/src/render3/pipe.js +0 -202
- package/esm2015/src/render3/util/discovery_utils.js +0 -411
- package/esm2015/src/render3/util/global_utils.js +0 -78
- package/esm2015/src/render3/util/misc_utils.js +0 -63
- package/esm2015/src/testability/testability.js +0 -256
- package/esm2015/src/util/security/trusted_types.js +0 -133
- package/esm2015/src/util/security/trusted_types_bypass.js +0 -86
- package/esm2015/src/util/util.externs.js +0 -0
- package/esm2015/src/view/provider.js +0 -490
- package/esm2015/src/view/util.js +0 -378
- package/esm2015/testing/src/logger.js +0 -32
- package/esm2015/testing/src/ng_zone_mock.js +0 -31
- package/esm2015/testing/src/r3_test_bed.js +0 -397
- package/esm2015/testing/src/r3_test_bed_compiler.js +0 -744
- package/esm2015/testing/src/test_bed.js +0 -608
- package/esm2015/testing/src/test_bed_common.js +0 -31
- package/esm2015/testing/src/test_compiler.js +0 -66
- package/esm2015/testing/testing.externs.js +0 -6
- package/esm2015/testing/testing.js +0 -7
- package/fesm2015/core.js.map +0 -1
- package/fesm2015/testing.js.map +0 -1
- package/schematics/migrations/abstract-control-parent/index.d.ts +0 -11
- package/schematics/migrations/abstract-control-parent/index.js +0 -69
- package/schematics/migrations/abstract-control-parent/util.d.ts +0 -14
- package/schematics/migrations/abstract-control-parent/util.js +0 -64
- package/schematics/migrations/activated-route-snapshot-fragment/index.d.ts +0 -13
- package/schematics/migrations/activated-route-snapshot-fragment/index.js +0 -70
- package/schematics/migrations/activated-route-snapshot-fragment/util.d.ts +0 -16
- package/schematics/migrations/activated-route-snapshot-fragment/util.js +0 -48
- package/schematics/migrations/can-activate-with-redirect-to/index.d.ts +0 -11
- package/schematics/migrations/can-activate-with-redirect-to/index.js +0 -66
- package/schematics/migrations/can-activate-with-redirect-to/util.d.ts +0 -11
- package/schematics/migrations/can-activate-with-redirect-to/util.js +0 -70
- package/schematics/migrations/deep-shadow-piercing-selector/index.d.ts +0 -10
- package/schematics/migrations/deep-shadow-piercing-selector/index.js +0 -49
- package/schematics/migrations/dynamic-queries/index.d.ts +0 -13
- package/schematics/migrations/dynamic-queries/index.js +0 -73
- package/schematics/migrations/dynamic-queries/util.d.ts +0 -25
- package/schematics/migrations/dynamic-queries/util.js +0 -81
- package/schematics/migrations/initial-navigation/collector.d.ts +0 -22
- package/schematics/migrations/initial-navigation/collector.js +0 -119
- package/schematics/migrations/initial-navigation/index.d.ts +0 -11
- package/schematics/migrations/initial-navigation/index.js +0 -83
- package/schematics/migrations/initial-navigation/transform.d.ts +0 -20
- package/schematics/migrations/initial-navigation/transform.js +0 -68
- package/schematics/migrations/initial-navigation/update_recorder.d.ts +0 -18
- package/schematics/migrations/initial-navigation/update_recorder.js +0 -20
- package/schematics/migrations/initial-navigation/util.d.ts +0 -12
- package/schematics/migrations/initial-navigation/util.js +0 -43
- package/schematics/migrations/missing-injectable/definition_collector.d.ts +0 -37
- package/schematics/migrations/missing-injectable/definition_collector.js +0 -89
- package/schematics/migrations/missing-injectable/index.d.ts +0 -11
- package/schematics/migrations/missing-injectable/index.js +0 -122
- package/schematics/migrations/missing-injectable/providers_evaluator.d.ts +0 -36
- package/schematics/migrations/missing-injectable/providers_evaluator.js +0 -64
- package/schematics/migrations/missing-injectable/transform.d.ts +0 -69
- package/schematics/migrations/missing-injectable/transform.js +0 -201
- package/schematics/migrations/missing-injectable/update_recorder.d.ts +0 -21
- package/schematics/migrations/missing-injectable/update_recorder.js +0 -20
- package/schematics/migrations/module-with-providers/collector.d.ts +0 -34
- package/schematics/migrations/module-with-providers/collector.js +0 -73
- package/schematics/migrations/module-with-providers/index.d.ts +0 -13
- package/schematics/migrations/module-with-providers/index.js +0 -93
- package/schematics/migrations/module-with-providers/transform.d.ts +0 -49
- package/schematics/migrations/module-with-providers/transform.js +0 -148
- package/schematics/migrations/module-with-providers/util.d.ts +0 -13
- package/schematics/migrations/module-with-providers/util.js +0 -40
- package/schematics/migrations/move-document/document_import_visitor.d.ts +0 -27
- package/schematics/migrations/move-document/document_import_visitor.js +0 -74
- package/schematics/migrations/move-document/index.js +0 -93
- package/schematics/migrations/move-document/move-import.d.ts +0 -12
- package/schematics/migrations/move-document/move-import.js +0 -61
- package/schematics/migrations/native-view-encapsulation/index.d.ts +0 -11
- package/schematics/migrations/native-view-encapsulation/index.js +0 -63
- package/schematics/migrations/native-view-encapsulation/util.d.ts +0 -11
- package/schematics/migrations/native-view-encapsulation/util.js +0 -48
- package/schematics/migrations/navigation-extras-omissions/index.d.ts +0 -11
- package/schematics/migrations/navigation-extras-omissions/index.js +0 -69
- package/schematics/migrations/navigation-extras-omissions/util.d.ts +0 -11
- package/schematics/migrations/navigation-extras-omissions/util.js +0 -126
- package/schematics/migrations/relative-link-resolution/collector.d.ts +0 -22
- package/schematics/migrations/relative-link-resolution/collector.js +0 -95
- package/schematics/migrations/relative-link-resolution/index.d.ts +0 -11
- package/schematics/migrations/relative-link-resolution/index.js +0 -84
- package/schematics/migrations/relative-link-resolution/transform.d.ts +0 -22
- package/schematics/migrations/relative-link-resolution/transform.js +0 -65
- package/schematics/migrations/relative-link-resolution/update_recorder.d.ts +0 -18
- package/schematics/migrations/relative-link-resolution/update_recorder.js +0 -20
- package/schematics/migrations/relative-link-resolution/util.d.ts +0 -12
- package/schematics/migrations/relative-link-resolution/util.js +0 -43
- package/schematics/migrations/renderer-to-renderer2/helpers.d.ts +0 -25
- package/schematics/migrations/renderer-to-renderer2/helpers.js +0 -238
- package/schematics/migrations/renderer-to-renderer2/index.d.ts +0 -14
- package/schematics/migrations/renderer-to-renderer2/index.js +0 -135
- package/schematics/migrations/renderer-to-renderer2/migration.d.ts +0 -18
- package/schematics/migrations/renderer-to-renderer2/migration.js +0 -225
- package/schematics/migrations/renderer-to-renderer2/util.d.ts +0 -18
- package/schematics/migrations/renderer-to-renderer2/util.js +0 -83
- package/schematics/migrations/router-preserve-query-params/index.d.ts +0 -14
- package/schematics/migrations/router-preserve-query-params/index.js +0 -72
- package/schematics/migrations/router-preserve-query-params/util.d.ts +0 -11
- package/schematics/migrations/router-preserve-query-params/util.js +0 -103
- package/schematics/migrations/static-queries/angular/directive_inputs.d.ts +0 -11
- package/schematics/migrations/static-queries/angular/directive_inputs.js +0 -84
- package/schematics/migrations/static-queries/angular/ng_query_visitor.d.ts +0 -45
- package/schematics/migrations/static-queries/angular/ng_query_visitor.js +0 -127
- package/schematics/migrations/static-queries/angular/query-definition.d.ts +0 -37
- package/schematics/migrations/static-queries/angular/query-definition.js +0 -33
- package/schematics/migrations/static-queries/angular/super_class.d.ts +0 -15
- package/schematics/migrations/static-queries/angular/super_class.js +0 -35
- package/schematics/migrations/static-queries/index.d.ts +0 -11
- package/schematics/migrations/static-queries/index.js +0 -230
- package/schematics/migrations/static-queries/strategies/template_strategy/template_strategy.d.ts +0 -41
- package/schematics/migrations/static-queries/strategies/template_strategy/template_strategy.js +0 -214
- package/schematics/migrations/static-queries/strategies/test_strategy/test_strategy.d.ts +0 -24
- package/schematics/migrations/static-queries/strategies/test_strategy/test_strategy.js +0 -38
- package/schematics/migrations/static-queries/strategies/timing-strategy.d.ts +0 -19
- package/schematics/migrations/static-queries/strategies/timing-strategy.js +0 -20
- package/schematics/migrations/static-queries/strategies/usage_strategy/declaration_usage_visitor.d.ts +0 -82
- package/schematics/migrations/static-queries/strategies/usage_strategy/declaration_usage_visitor.js +0 -369
- package/schematics/migrations/static-queries/strategies/usage_strategy/super_class_context.d.ts +0 -18
- package/schematics/migrations/static-queries/strategies/usage_strategy/super_class_context.js +0 -52
- package/schematics/migrations/static-queries/strategies/usage_strategy/template_usage_visitor.d.ts +0 -27
- package/schematics/migrations/static-queries/strategies/usage_strategy/template_usage_visitor.js +0 -93
- package/schematics/migrations/static-queries/strategies/usage_strategy/usage_strategy.d.ts +0 -34
- package/schematics/migrations/static-queries/strategies/usage_strategy/usage_strategy.js +0 -169
- package/schematics/migrations/static-queries/transform.d.ts +0 -21
- package/schematics/migrations/static-queries/transform.js +0 -102
- package/schematics/migrations/template-var-assignment/analyze_template.d.ts +0 -20
- package/schematics/migrations/template-var-assignment/analyze_template.js +0 -38
- package/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor.d.ts +0 -28
- package/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor.js +0 -80
- package/schematics/migrations/template-var-assignment/index.d.ts +0 -11
- package/schematics/migrations/template-var-assignment/index.js +0 -101
- package/schematics/migrations/undecorated-classes-with-decorated-fields/index.d.ts +0 -14
- package/schematics/migrations/undecorated-classes-with-decorated-fields/index.js +0 -114
- package/schematics/migrations/undecorated-classes-with-decorated-fields/transform.d.ts +0 -63
- package/schematics/migrations/undecorated-classes-with-decorated-fields/transform.js +0 -300
- package/schematics/migrations/undecorated-classes-with-decorated-fields/update_recorder.d.ts +0 -19
- package/schematics/migrations/undecorated-classes-with-decorated-fields/update_recorder.js +0 -20
- package/schematics/migrations/undecorated-classes-with-di/create_ngc_program.d.ts +0 -18
- package/schematics/migrations/undecorated-classes-with-di/create_ngc_program.js +0 -57
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/convert_directive_metadata.d.ts +0 -18
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/convert_directive_metadata.js +0 -96
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/decorator_rewriter.d.ts +0 -39
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/decorator_rewriter.js +0 -116
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/import_rewrite_visitor.d.ts +0 -37
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/import_rewrite_visitor.js +0 -126
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/path_format.d.ts +0 -10
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/path_format.js +0 -31
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/source_file_exports.d.ts +0 -16
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/source_file_exports.js +0 -65
- package/schematics/migrations/undecorated-classes-with-di/index.d.ts +0 -11
- package/schematics/migrations/undecorated-classes-with-di/index.js +0 -195
- package/schematics/migrations/undecorated-classes-with-di/ng_declaration_collector.d.ts +0 -38
- package/schematics/migrations/undecorated-classes-with-di/ng_declaration_collector.js +0 -142
- package/schematics/migrations/undecorated-classes-with-di/transform.d.ts +0 -98
- package/schematics/migrations/undecorated-classes-with-di/transform.js +0 -371
- package/schematics/migrations/undecorated-classes-with-di/update_recorder.d.ts +0 -20
- package/schematics/migrations/undecorated-classes-with-di/update_recorder.js +0 -20
- package/schematics/migrations/wait-for-async/index.d.ts +0 -11
- package/schematics/migrations/wait-for-async/index.js +0 -98
- package/schematics/migrations/wait-for-async/util.d.ts +0 -11
- package/schematics/migrations/wait-for-async/util.js +0 -37
- package/schematics/migrations/xhr-factory/index.d.ts +0 -10
- package/schematics/migrations/xhr-factory/index.js +0 -104
- package/src/r3_symbols.d.ts +0 -1025
- package/testing/testing.metadata.json +0 -1
- package/testing.d.ts +0 -7
- package/testing.metadata.json +0 -1
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
(function (factory) {
|
|
9
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
10
|
-
var v = factory(require, exports);
|
|
11
|
-
if (v !== undefined) module.exports = v;
|
|
12
|
-
}
|
|
13
|
-
else if (typeof define === "function" && define.amd) {
|
|
14
|
-
define("@angular/core/schematics/migrations/template-var-assignment/analyze_template", ["require", "exports", "@angular/core/schematics/utils/parse_html", "@angular/core/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor"], factory);
|
|
15
|
-
}
|
|
16
|
-
})(function (require, exports) {
|
|
17
|
-
"use strict";
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.analyzeResolvedTemplate = void 0;
|
|
20
|
-
const parse_html_1 = require("@angular/core/schematics/utils/parse_html");
|
|
21
|
-
const html_variable_assignment_visitor_1 = require("@angular/core/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor");
|
|
22
|
-
/**
|
|
23
|
-
* Analyzes a given resolved template by looking for property assignments to local
|
|
24
|
-
* template variables within bound events.
|
|
25
|
-
*/
|
|
26
|
-
function analyzeResolvedTemplate(template, compilerModule) {
|
|
27
|
-
const templateNodes = (0, parse_html_1.parseHtmlGracefully)(template.content, template.filePath, compilerModule);
|
|
28
|
-
if (!templateNodes) {
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
const visitor = new html_variable_assignment_visitor_1.HtmlVariableAssignmentVisitor(compilerModule);
|
|
32
|
-
// Analyze the Angular Render3 HTML AST and collect all template variable assignments.
|
|
33
|
-
visitor.visitAll(templateNodes);
|
|
34
|
-
return visitor.variableAssignments.map(({ node, start, end }) => ({ node, start: start + node.span.start, end }));
|
|
35
|
-
}
|
|
36
|
-
exports.analyzeResolvedTemplate = analyzeResolvedTemplate;
|
|
37
|
-
});
|
|
38
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5hbHl6ZV90ZW1wbGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvcmUvc2NoZW1hdGljcy9taWdyYXRpb25zL3RlbXBsYXRlLXZhci1hc3NpZ25tZW50L2FuYWx5emVfdGVtcGxhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HOzs7Ozs7Ozs7Ozs7O0lBSUgsMEVBQTJEO0lBQzNELDJKQUF5RjtJQVF6Rjs7O09BR0c7SUFDSCxTQUFnQix1QkFBdUIsQ0FDbkMsUUFBMEIsRUFDMUIsY0FBa0Q7UUFDcEQsTUFBTSxhQUFhLEdBQUcsSUFBQSxnQ0FBbUIsRUFBQyxRQUFRLENBQUMsT0FBTyxFQUFFLFFBQVEsQ0FBQyxRQUFRLEVBQUUsY0FBYyxDQUFDLENBQUM7UUFFL0YsSUFBSSxDQUFDLGFBQWEsRUFBRTtZQUNsQixPQUFPLElBQUksQ0FBQztTQUNiO1FBRUQsTUFBTSxPQUFPLEdBQUcsSUFBSSxnRUFBNkIsQ0FBQyxjQUFjLENBQUMsQ0FBQztRQUVsRSxzRkFBc0Y7UUFDdEYsT0FBTyxDQUFDLFFBQVEsQ0FBQyxhQUFhLENBQUMsQ0FBQztRQUVoQyxPQUFPLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBQ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/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
/// <amd-module name="@angular/core/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor" />
|
|
9
|
-
import type { PropertyWrite, TmplAstBoundEvent, TmplAstElement, TmplAstTemplate } from '@angular/compiler';
|
|
10
|
-
import { TemplateAstVisitor } from '../../../utils/template_ast_visitor';
|
|
11
|
-
export interface TemplateVariableAssignment {
|
|
12
|
-
start: number;
|
|
13
|
-
end: number;
|
|
14
|
-
node: PropertyWrite;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* HTML AST visitor that traverses the Render3 HTML AST in order to find all
|
|
18
|
-
* expressions that write to local template variables within bound events.
|
|
19
|
-
*/
|
|
20
|
-
export declare class HtmlVariableAssignmentVisitor extends TemplateAstVisitor {
|
|
21
|
-
variableAssignments: TemplateVariableAssignment[];
|
|
22
|
-
private currentVariables;
|
|
23
|
-
private expressionAstVisitor;
|
|
24
|
-
constructor(compilerModule: typeof import('@angular/compiler'));
|
|
25
|
-
visitElement(element: TmplAstElement): void;
|
|
26
|
-
visitTemplate(template: TmplAstTemplate): void;
|
|
27
|
-
visitBoundEvent(node: TmplAstBoundEvent): void;
|
|
28
|
-
}
|
package/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
(function (factory) {
|
|
9
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
10
|
-
var v = factory(require, exports);
|
|
11
|
-
if (v !== undefined) module.exports = v;
|
|
12
|
-
}
|
|
13
|
-
else if (typeof define === "function" && define.amd) {
|
|
14
|
-
define("@angular/core/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor", ["require", "exports", "@angular/core/schematics/utils/template_ast_visitor"], factory);
|
|
15
|
-
}
|
|
16
|
-
})(function (require, exports) {
|
|
17
|
-
"use strict";
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.HtmlVariableAssignmentVisitor = void 0;
|
|
20
|
-
const template_ast_visitor_1 = require("@angular/core/schematics/utils/template_ast_visitor");
|
|
21
|
-
/**
|
|
22
|
-
* HTML AST visitor that traverses the Render3 HTML AST in order to find all
|
|
23
|
-
* expressions that write to local template variables within bound events.
|
|
24
|
-
*/
|
|
25
|
-
class HtmlVariableAssignmentVisitor extends template_ast_visitor_1.TemplateAstVisitor {
|
|
26
|
-
constructor(compilerModule) {
|
|
27
|
-
super(compilerModule);
|
|
28
|
-
this.variableAssignments = [];
|
|
29
|
-
this.currentVariables = [];
|
|
30
|
-
// AST visitor that resolves all variable assignments within a given expression AST.
|
|
31
|
-
// This class must be defined within the template visitor due to the need to extend from a class
|
|
32
|
-
// value found within `@angular/compiler` which is dynamically imported and provided to the
|
|
33
|
-
// visitor.
|
|
34
|
-
this.expressionAstVisitor = new (class extends compilerModule.RecursiveAstVisitor {
|
|
35
|
-
constructor(variableAssignments, currentVariables) {
|
|
36
|
-
super();
|
|
37
|
-
this.variableAssignments = variableAssignments;
|
|
38
|
-
this.currentVariables = currentVariables;
|
|
39
|
-
}
|
|
40
|
-
visitPropertyWrite(node, span) {
|
|
41
|
-
if (node.receiver instanceof compilerModule.ImplicitReceiver &&
|
|
42
|
-
this.currentVariables.some(v => v.name === node.name)) {
|
|
43
|
-
this.variableAssignments.push({
|
|
44
|
-
node: node,
|
|
45
|
-
start: span.start.offset,
|
|
46
|
-
end: span.end.offset,
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
super.visitPropertyWrite(node, span);
|
|
50
|
-
}
|
|
51
|
-
})(this.variableAssignments, this.currentVariables);
|
|
52
|
-
}
|
|
53
|
-
visitElement(element) {
|
|
54
|
-
this.visitAll(element.outputs);
|
|
55
|
-
this.visitAll(element.children);
|
|
56
|
-
}
|
|
57
|
-
visitTemplate(template) {
|
|
58
|
-
// Keep track of the template variables which can be accessed by the template
|
|
59
|
-
// child nodes through the implicit receiver.
|
|
60
|
-
this.currentVariables.push(...template.variables);
|
|
61
|
-
// Visit all children of the template. The template proxies the outputs of the
|
|
62
|
-
// immediate child elements, so we just ignore outputs on the "Template" in order
|
|
63
|
-
// to not visit similar bound events twice.
|
|
64
|
-
this.visitAll(template.children);
|
|
65
|
-
// Remove all previously added variables since all children that could access
|
|
66
|
-
// these have been visited already.
|
|
67
|
-
template.variables.forEach(v => {
|
|
68
|
-
const variableIdx = this.currentVariables.indexOf(v);
|
|
69
|
-
if (variableIdx !== -1) {
|
|
70
|
-
this.currentVariables.splice(variableIdx, 1);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
visitBoundEvent(node) {
|
|
75
|
-
node.handler.visit(this.expressionAstVisitor, node.handlerSpan);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
exports.HtmlVariableAssignmentVisitor = HtmlVariableAssignmentVisitor;
|
|
79
|
-
});
|
|
80
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHRtbF92YXJpYWJsZV9hc3NpZ25tZW50X3Zpc2l0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb3JlL3NjaGVtYXRpY3MvbWlncmF0aW9ucy90ZW1wbGF0ZS12YXItYXNzaWdubW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dXJyZW50VmFyaWFibGVzLmluZGV4T2Yodik7XG5cbiAgICAgIGlmICh2YXJpYWJsZUlkeCAhPT0gLTEpIHtcbiAgICAgICAgdGhpcy5jdXJyZW50VmFyaWFibGVzLnNwbGljZSh2YXJpYWJsZUlkeCwgMSk7XG4gICAgICB9XG4gICAgfSk7XG4gIH1cblxuICBvdmVycmlkZSB2aXNpdEJvdW5kRXZlbnQobm9kZTogVG1wbEFzdEJvdW5kRXZlbnQpIHtcbiAgICBub2RlLmhhbmRsZXIudmlzaXQodGhpcy5leHByZXNzaW9uQXN0VmlzaXRvciwgbm9kZS5oYW5kbGVyU3Bhbik7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
/// <amd-module name="@angular/core/schematics/migrations/template-var-assignment" />
|
|
9
|
-
import { Rule } from '@angular-devkit/schematics';
|
|
10
|
-
/** Entry point for the V8 template variable assignment schematic. */
|
|
11
|
-
export default function (): Rule;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
(function (factory) {
|
|
18
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
19
|
-
var v = factory(require, exports);
|
|
20
|
-
if (v !== undefined) module.exports = v;
|
|
21
|
-
}
|
|
22
|
-
else if (typeof define === "function" && define.amd) {
|
|
23
|
-
define("@angular/core/schematics/migrations/template-var-assignment", ["require", "exports", "@angular-devkit/core", "@angular-devkit/schematics", "path", "@angular/core/schematics/utils/load_esm", "@angular/core/schematics/utils/ng_component_template", "@angular/core/schematics/utils/project_tsconfig_paths", "@angular/core/schematics/utils/typescript/compiler_host", "@angular/core/schematics/migrations/template-var-assignment/analyze_template"], factory);
|
|
24
|
-
}
|
|
25
|
-
})(function (require, exports) {
|
|
26
|
-
"use strict";
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
const core_1 = require("@angular-devkit/core");
|
|
29
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
30
|
-
const path_1 = require("path");
|
|
31
|
-
const load_esm_1 = require("@angular/core/schematics/utils/load_esm");
|
|
32
|
-
const ng_component_template_1 = require("@angular/core/schematics/utils/ng_component_template");
|
|
33
|
-
const project_tsconfig_paths_1 = require("@angular/core/schematics/utils/project_tsconfig_paths");
|
|
34
|
-
const compiler_host_1 = require("@angular/core/schematics/utils/typescript/compiler_host");
|
|
35
|
-
const analyze_template_1 = require("@angular/core/schematics/migrations/template-var-assignment/analyze_template");
|
|
36
|
-
const README_URL = 'https://v8.angular.io/guide/deprecations#cannot-assign-to-template-variables';
|
|
37
|
-
const FAILURE_MESSAGE = `Found assignment to template variable.`;
|
|
38
|
-
/** Entry point for the V8 template variable assignment schematic. */
|
|
39
|
-
function default_1() {
|
|
40
|
-
return (tree, context) => __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const { buildPaths, testPaths } = yield (0, project_tsconfig_paths_1.getProjectTsConfigPaths)(tree);
|
|
42
|
-
const basePath = process.cwd();
|
|
43
|
-
if (!buildPaths.length && !testPaths.length) {
|
|
44
|
-
throw new schematics_1.SchematicsException('Could not find any tsconfig file. Cannot check templates for template variable ' +
|
|
45
|
-
'assignments.');
|
|
46
|
-
}
|
|
47
|
-
let compilerModule;
|
|
48
|
-
try {
|
|
49
|
-
// Load ESM `@angular/compiler` using the TypeScript dynamic import workaround.
|
|
50
|
-
// Once TypeScript provides support for keeping the dynamic import this workaround can be
|
|
51
|
-
// changed to a direct dynamic import.
|
|
52
|
-
compilerModule = yield (0, load_esm_1.loadEsmModule)('@angular/compiler');
|
|
53
|
-
}
|
|
54
|
-
catch (e) {
|
|
55
|
-
throw new schematics_1.SchematicsException(`Unable to load the '@angular/compiler' package. Details: ${e.message}`);
|
|
56
|
-
}
|
|
57
|
-
for (const tsconfigPath of [...buildPaths, ...testPaths]) {
|
|
58
|
-
runTemplateVariableAssignmentCheck(tree, tsconfigPath, basePath, context.logger, compilerModule);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
exports.default = default_1;
|
|
63
|
-
/**
|
|
64
|
-
* Runs the template variable assignment check. Warns developers
|
|
65
|
-
* if values are assigned to template variables within output bindings.
|
|
66
|
-
*/
|
|
67
|
-
function runTemplateVariableAssignmentCheck(tree, tsconfigPath, basePath, logger, compilerModule) {
|
|
68
|
-
const { program } = (0, compiler_host_1.createMigrationProgram)(tree, tsconfigPath, basePath);
|
|
69
|
-
const typeChecker = program.getTypeChecker();
|
|
70
|
-
const templateVisitor = new ng_component_template_1.NgComponentTemplateVisitor(typeChecker);
|
|
71
|
-
const sourceFiles = program.getSourceFiles().filter(sourceFile => (0, compiler_host_1.canMigrateFile)(basePath, sourceFile, program));
|
|
72
|
-
// Analyze source files by detecting HTML templates.
|
|
73
|
-
sourceFiles.forEach(sourceFile => templateVisitor.visitNode(sourceFile));
|
|
74
|
-
const { resolvedTemplates } = templateVisitor;
|
|
75
|
-
const collectedFailures = [];
|
|
76
|
-
// Analyze each resolved template and print a warning for property writes to
|
|
77
|
-
// template variables.
|
|
78
|
-
resolvedTemplates.forEach(template => {
|
|
79
|
-
const filePath = template.filePath;
|
|
80
|
-
const nodes = (0, analyze_template_1.analyzeResolvedTemplate)(template, compilerModule);
|
|
81
|
-
if (!nodes) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
const displayFilePath = (0, core_1.normalize)((0, path_1.relative)(basePath, filePath));
|
|
85
|
-
nodes.forEach(n => {
|
|
86
|
-
const { line, character } = template.getCharacterAndLineOfPosition(n.start);
|
|
87
|
-
collectedFailures.push(`${displayFilePath}@${line + 1}:${character + 1}: ${FAILURE_MESSAGE}`);
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
if (collectedFailures.length) {
|
|
91
|
-
logger.info('---- Template Variable Assignment schematic ----');
|
|
92
|
-
logger.info('Assignments to template variables will no longer work with Ivy as');
|
|
93
|
-
logger.info('template variables are effectively constants in Ivy. Read more about');
|
|
94
|
-
logger.info(`this change here: ${README_URL}`);
|
|
95
|
-
logger.info('');
|
|
96
|
-
logger.info('The following template assignments were found:');
|
|
97
|
-
collectedFailures.forEach(failure => logger.warn(`⮑ ${failure}`));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb3JlL3NjaGVtYXRpY3MvbWlncmF0aW9ucy90ZW1wbGF0ZS12YXItYXNzaWdubWVudC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7Ozs7Ozs7Ozs7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cycpO1xuICAgIGxvZ2dlci5pbmZvKCd0ZW1wbGF0ZSB2YXJpYWJsZXMgYXJlIGVmZmVjdGl2ZWx5IGNvbnN0YW50cyBpbiBJdnkuIFJlYWQgbW9yZSBhYm91dCcpO1xuICAgIGxvZ2dlci5pbmZvKGB0aGlzIGNoYW5nZSBoZXJlOiAke1JFQURNRV9VUkx9YCk7XG4gICAgbG9nZ2VyLmluZm8oJycpO1xuICAgIGxvZ2dlci5pbmZvKCdUaGUgZm9sbG93aW5nIHRlbXBsYXRlIGFzc2lnbm1lbnRzIHdlcmUgZm91bmQ6Jyk7XG4gICAgY29sbGVjdGVkRmFpbHVyZXMuZm9yRWFjaChmYWlsdXJlID0+IGxvZ2dlci53YXJuKGDirpEgICAke2ZhaWx1cmV9YCkpO1xuICB9XG59XG4iXX0=
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
/// <amd-module name="@angular/core/schematics/migrations/undecorated-classes-with-decorated-fields" />
|
|
9
|
-
import { Rule } from '@angular-devkit/schematics';
|
|
10
|
-
/**
|
|
11
|
-
* Migration that adds an Angular decorator to classes that have Angular field decorators.
|
|
12
|
-
* https://hackmd.io/vuQfavzfRG6KUCtU7oK_EA
|
|
13
|
-
*/
|
|
14
|
-
export default function (): Rule;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
(function (factory) {
|
|
18
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
19
|
-
var v = factory(require, exports);
|
|
20
|
-
if (v !== undefined) module.exports = v;
|
|
21
|
-
}
|
|
22
|
-
else if (typeof define === "function" && define.amd) {
|
|
23
|
-
define("@angular/core/schematics/migrations/undecorated-classes-with-decorated-fields", ["require", "exports", "@angular-devkit/schematics", "path", "typescript", "@angular/core/schematics/utils/project_tsconfig_paths", "@angular/core/schematics/utils/typescript/compiler_host", "@angular/core/schematics/migrations/undecorated-classes-with-decorated-fields/transform"], factory);
|
|
24
|
-
}
|
|
25
|
-
})(function (require, exports) {
|
|
26
|
-
"use strict";
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
29
|
-
const path_1 = require("path");
|
|
30
|
-
const ts = require("typescript");
|
|
31
|
-
const project_tsconfig_paths_1 = require("@angular/core/schematics/utils/project_tsconfig_paths");
|
|
32
|
-
const compiler_host_1 = require("@angular/core/schematics/utils/typescript/compiler_host");
|
|
33
|
-
const transform_1 = require("@angular/core/schematics/migrations/undecorated-classes-with-decorated-fields/transform");
|
|
34
|
-
/**
|
|
35
|
-
* Migration that adds an Angular decorator to classes that have Angular field decorators.
|
|
36
|
-
* https://hackmd.io/vuQfavzfRG6KUCtU7oK_EA
|
|
37
|
-
*/
|
|
38
|
-
function default_1() {
|
|
39
|
-
return (tree, ctx) => __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
const { buildPaths, testPaths } = yield (0, project_tsconfig_paths_1.getProjectTsConfigPaths)(tree);
|
|
41
|
-
const basePath = process.cwd();
|
|
42
|
-
const allPaths = [...buildPaths, ...testPaths];
|
|
43
|
-
const failures = [];
|
|
44
|
-
if (!allPaths.length) {
|
|
45
|
-
throw new schematics_1.SchematicsException('Could not find any tsconfig file. Cannot add an Angular decorator to undecorated classes.');
|
|
46
|
-
}
|
|
47
|
-
for (const tsconfigPath of allPaths) {
|
|
48
|
-
failures.push(...runUndecoratedClassesMigration(tree, tsconfigPath, basePath));
|
|
49
|
-
}
|
|
50
|
-
if (failures.length) {
|
|
51
|
-
ctx.logger.info('Could not migrate all undecorated classes that use Angular features.');
|
|
52
|
-
ctx.logger.info('Please manually fix the following failures:');
|
|
53
|
-
failures.forEach(message => ctx.logger.warn(`⮑ ${message}`));
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
exports.default = default_1;
|
|
58
|
-
function runUndecoratedClassesMigration(tree, tsconfigPath, basePath) {
|
|
59
|
-
const failures = [];
|
|
60
|
-
const { program } = (0, compiler_host_1.createMigrationProgram)(tree, tsconfigPath, basePath);
|
|
61
|
-
const typeChecker = program.getTypeChecker();
|
|
62
|
-
const sourceFiles = program.getSourceFiles().filter(sourceFile => (0, compiler_host_1.canMigrateFile)(basePath, sourceFile, program));
|
|
63
|
-
const updateRecorders = new Map();
|
|
64
|
-
const transform = new transform_1.UndecoratedClassesWithDecoratedFieldsTransform(typeChecker, getUpdateRecorder);
|
|
65
|
-
// Migrate all source files in the project.
|
|
66
|
-
transform.migrate(sourceFiles).forEach(({ node, message }) => {
|
|
67
|
-
const nodeSourceFile = node.getSourceFile();
|
|
68
|
-
const relativeFilePath = (0, path_1.relative)(basePath, nodeSourceFile.fileName);
|
|
69
|
-
const { line, character } = ts.getLineAndCharacterOfPosition(node.getSourceFile(), node.getStart());
|
|
70
|
-
failures.push(`${relativeFilePath}@${line + 1}:${character + 1}: ${message}`);
|
|
71
|
-
});
|
|
72
|
-
// Record the changes collected in the import manager.
|
|
73
|
-
transform.recordChanges();
|
|
74
|
-
// Walk through each update recorder and commit the update. We need to commit the
|
|
75
|
-
// updates in batches per source file as there can be only one recorder per source
|
|
76
|
-
// file in order to avoid shifted character offsets.
|
|
77
|
-
updateRecorders.forEach(recorder => recorder.commitUpdate());
|
|
78
|
-
return failures;
|
|
79
|
-
/** Gets the update recorder for the specified source file. */
|
|
80
|
-
function getUpdateRecorder(sourceFile) {
|
|
81
|
-
if (updateRecorders.has(sourceFile)) {
|
|
82
|
-
return updateRecorders.get(sourceFile);
|
|
83
|
-
}
|
|
84
|
-
const treeRecorder = tree.beginUpdate((0, path_1.relative)(basePath, sourceFile.fileName));
|
|
85
|
-
const recorder = {
|
|
86
|
-
addClassTodo(node, message) {
|
|
87
|
-
treeRecorder.insertRight(node.getStart(), `// TODO: ${message}\n`);
|
|
88
|
-
},
|
|
89
|
-
addClassDecorator(node, text) {
|
|
90
|
-
// New imports should be inserted at the left while decorators should be inserted
|
|
91
|
-
// at the right in order to ensure that imports are inserted before the decorator
|
|
92
|
-
// if the start position of import and decorator is the source file start.
|
|
93
|
-
treeRecorder.insertRight(node.getStart(), `${text}\n`);
|
|
94
|
-
},
|
|
95
|
-
addNewImport(start, importText) {
|
|
96
|
-
// New imports should be inserted at the left while decorators should be inserted
|
|
97
|
-
// at the right in order to ensure that imports are inserted before the decorator
|
|
98
|
-
// if the start position of import and decorator is the source file start.
|
|
99
|
-
treeRecorder.insertLeft(start, importText);
|
|
100
|
-
},
|
|
101
|
-
updateExistingImport(namedBindings, newNamedBindings) {
|
|
102
|
-
treeRecorder.remove(namedBindings.getStart(), namedBindings.getWidth());
|
|
103
|
-
treeRecorder.insertRight(namedBindings.getStart(), newNamedBindings);
|
|
104
|
-
},
|
|
105
|
-
commitUpdate() {
|
|
106
|
-
tree.commitUpdate(treeRecorder);
|
|
107
|
-
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nJlbW92ZShuYW1lZEJpbmRpbmdzLmdldFN0YXJ0KCksIG5hbWVkQmluZGluZ3MuZ2V0V2lkdGgoKSk7XG4gICAgICAgIHRyZWVSZWNvcmRlci5pbnNlcnRSaWdodChuYW1lZEJpbmRpbmdzLmdldFN0YXJ0KCksIG5ld05hbWVkQmluZGluZ3MpO1xuICAgICAgfSxcbiAgICAgIGNvbW1pdFVwZGF0ZSgpIHtcbiAgICAgICAgdHJlZS5jb21taXRVcGRhdGUodHJlZVJlY29yZGVyKTtcbiAgICAgIH1cbiAgICB9O1xuICAgIHVwZGF0ZVJlY29yZGVycy5zZXQoc291cmNlRmlsZSwgcmVjb3JkZXIpO1xuICAgIHJldHVybiByZWNvcmRlcjtcbiAgfVxufVxuIl19
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
/// <amd-module name="@angular/core/schematics/migrations/undecorated-classes-with-decorated-fields/transform" />
|
|
9
|
-
import * as ts from 'typescript';
|
|
10
|
-
import { UpdateRecorder } from './update_recorder';
|
|
11
|
-
interface AnalysisFailure {
|
|
12
|
-
node: ts.Node;
|
|
13
|
-
message: string;
|
|
14
|
-
}
|
|
15
|
-
export declare class UndecoratedClassesWithDecoratedFieldsTransform {
|
|
16
|
-
private typeChecker;
|
|
17
|
-
private getUpdateRecorder;
|
|
18
|
-
private printer;
|
|
19
|
-
private importManager;
|
|
20
|
-
private reflectionHost;
|
|
21
|
-
private partialEvaluator;
|
|
22
|
-
constructor(typeChecker: ts.TypeChecker, getUpdateRecorder: (sf: ts.SourceFile) => UpdateRecorder);
|
|
23
|
-
/**
|
|
24
|
-
* Migrates the specified source files. The transform adds the abstract `@Directive`
|
|
25
|
-
* decorator to undecorated classes that use Angular features. Class members which
|
|
26
|
-
* are decorated with any Angular decorator, or class members for lifecycle hooks are
|
|
27
|
-
* indicating that a given class uses Angular features. https://hackmd.io/vuQfavzfRG6KUCtU7oK_EA
|
|
28
|
-
*/
|
|
29
|
-
migrate(sourceFiles: ts.SourceFile[]): AnalysisFailure[];
|
|
30
|
-
/** Records all changes that were made in the import manager. */
|
|
31
|
-
recordChanges(): void;
|
|
32
|
-
/**
|
|
33
|
-
* Finds undecorated abstract directives in the specified source files. Also returns
|
|
34
|
-
* a set of undecorated classes which could not be detected as guaranteed abstract
|
|
35
|
-
* directives. Those are ambiguous and could be either Directive, Pipe or service.
|
|
36
|
-
*/
|
|
37
|
-
private _findUndecoratedAbstractDirectives;
|
|
38
|
-
/**
|
|
39
|
-
* Analyzes the given class declaration by determining whether the class
|
|
40
|
-
* is a directive, is an abstract directive, or uses Angular features.
|
|
41
|
-
*/
|
|
42
|
-
private _analyzeClassDeclaration;
|
|
43
|
-
/**
|
|
44
|
-
* Checks whether the given decorator resolves to an abstract directive. An directive is
|
|
45
|
-
* considered "abstract" if there is no selector specified.
|
|
46
|
-
*/
|
|
47
|
-
private _isAbstractDirective;
|
|
48
|
-
/**
|
|
49
|
-
* Determines the kind of a given class in terms of Angular. The method checks
|
|
50
|
-
* whether the given class has members that indicate the use of Angular features.
|
|
51
|
-
* e.g. lifecycle hooks or decorated members like `@Input` or `@Output` are
|
|
52
|
-
* considered Angular features..
|
|
53
|
-
*/
|
|
54
|
-
private _determineClassKind;
|
|
55
|
-
/**
|
|
56
|
-
* Checks whether a given class has been reported as ambiguous in previous
|
|
57
|
-
* migration run. e.g. when build targets are migrated first, and then test
|
|
58
|
-
* targets that have an overlap with build source files, the same class
|
|
59
|
-
* could be detected as ambiguous.
|
|
60
|
-
*/
|
|
61
|
-
private _hasBeenReportedAsAmbiguous;
|
|
62
|
-
}
|
|
63
|
-
export {};
|