@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
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
(function (factory) {
|
|
21
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
22
|
+
var v = factory(require, exports);
|
|
23
|
+
if (v !== undefined) module.exports = v;
|
|
24
|
+
}
|
|
25
|
+
else if (typeof define === "function" && define.amd) {
|
|
26
|
+
define("@angular/core/schematics/migrations/testbed-teardown", ["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/testbed-teardown/util"], factory);
|
|
27
|
+
}
|
|
28
|
+
})(function (require, exports) {
|
|
29
|
+
"use strict";
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
32
|
+
const path_1 = require("path");
|
|
33
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
34
|
+
const project_tsconfig_paths_1 = require("@angular/core/schematics/utils/project_tsconfig_paths");
|
|
35
|
+
const compiler_host_1 = require("@angular/core/schematics/utils/typescript/compiler_host");
|
|
36
|
+
const util_1 = require("@angular/core/schematics/migrations/testbed-teardown/util");
|
|
37
|
+
/** Migration that adds the `teardown` flag to `TestBed` calls. */
|
|
38
|
+
function default_1() {
|
|
39
|
+
return (tree) => __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
|
+
if (!allPaths.length) {
|
|
44
|
+
throw new schematics_1.SchematicsException('Could not find any tsconfig file. Cannot add `teardown` flag to `TestBed`.');
|
|
45
|
+
}
|
|
46
|
+
for (const tsconfigPath of allPaths) {
|
|
47
|
+
runTestbedTeardownMigration(tree, tsconfigPath, basePath);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
exports.default = default_1;
|
|
52
|
+
function runTestbedTeardownMigration(tree, tsconfigPath, basePath) {
|
|
53
|
+
const { program } = (0, compiler_host_1.createMigrationProgram)(tree, tsconfigPath, basePath);
|
|
54
|
+
const typeChecker = program.getTypeChecker();
|
|
55
|
+
const sourceFiles = program.getSourceFiles().filter(sourceFile => (0, compiler_host_1.canMigrateFile)(basePath, sourceFile, program));
|
|
56
|
+
const initTestEnvironmentResult = (0, util_1.findInitTestEnvironmentCalls)(typeChecker, sourceFiles);
|
|
57
|
+
const printer = typescript_1.default.createPrinter();
|
|
58
|
+
// If we identified at least one call to `initTestEnvironment` (can be migrated or unmigrated),
|
|
59
|
+
// we don't need to migrate `configureTestingModule` or `withModule` calls, because they'll take
|
|
60
|
+
// the default teardown behavior from the environment. This is preferrable, because it'll result
|
|
61
|
+
// in the least number of changes to users' code.
|
|
62
|
+
if (initTestEnvironmentResult.totalCalls > 0) {
|
|
63
|
+
// Migrate all of the unmigrated calls `initTestEnvironment`. This could be zero
|
|
64
|
+
// if the user has already opted into the new teardown behavior themselves.
|
|
65
|
+
initTestEnvironmentResult.callsToMigrate.forEach(node => {
|
|
66
|
+
const { span, text } = (0, util_1.getInitTestEnvironmentLiteralReplacement)(node, printer);
|
|
67
|
+
const update = tree.beginUpdate((0, path_1.relative)(basePath, node.getSourceFile().fileName));
|
|
68
|
+
// The update appears to break if we try to call `remove` with a zero length.
|
|
69
|
+
if (span.length > 0) {
|
|
70
|
+
update.remove(span.start, span.length);
|
|
71
|
+
}
|
|
72
|
+
update.insertRight(span.start, text);
|
|
73
|
+
tree.commitUpdate(update);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
// Otherwise migrate the metadata passed into the `configureTestingModule` and `withModule`
|
|
78
|
+
// calls. This scenario is less likely, but it could happen if `initTestEnvironment` has been
|
|
79
|
+
// abstracted away or is inside a .js file.
|
|
80
|
+
sourceFiles.forEach(sourceFile => {
|
|
81
|
+
(0, util_1.findTestModuleMetadataNodes)(typeChecker, sourceFile).forEach(node => {
|
|
82
|
+
const migrated = (0, util_1.migrateTestModuleMetadataLiteral)(node);
|
|
83
|
+
const update = tree.beginUpdate((0, path_1.relative)(basePath, node.getSourceFile().fileName));
|
|
84
|
+
update.remove(node.getStart(), node.getWidth());
|
|
85
|
+
update.insertRight(node.getStart(), printer.printNode(typescript_1.default.EmitHint.Unspecified, migrated, node.getSourceFile()));
|
|
86
|
+
tree.commitUpdate(update);
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+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biAgICAvLyBhYnN0cmFjdGVkIGF3YXkgb3IgaXMgaW5zaWRlIGEgLmpzIGZpbGUuXG4gICAgc291cmNlRmlsZXMuZm9yRWFjaChzb3VyY2VGaWxlID0+IHtcbiAgICAgIGZpbmRUZXN0TW9kdWxlTWV0YWRhdGFOb2Rlcyh0eXBlQ2hlY2tlciwgc291cmNlRmlsZSkuZm9yRWFjaChub2RlID0+IHtcbiAgICAgICAgY29uc3QgbWlncmF0ZWQgPSBtaWdyYXRlVGVzdE1vZHVsZU1ldGFkYXRhTGl0ZXJhbChub2RlKTtcbiAgICAgICAgY29uc3QgdXBkYXRlID0gdHJlZS5iZWdpblVwZGF0ZShyZWxhdGl2ZShiYXNlUGF0aCwgbm9kZS5nZXRTb3VyY2VGaWxlKCkuZmlsZU5hbWUpKTtcbiAgICAgICAgdXBkYXRlLnJlbW92ZShub2RlLmdldFN0YXJ0KCksIG5vZGUuZ2V0V2lkdGgoKSk7XG4gICAgICAgIHVwZGF0ZS5pbnNlcnRSaWdodChcbiAgICAgICAgICAgIG5vZGUuZ2V0U3RhcnQoKSxcbiAgICAgICAgICAgIHByaW50ZXIucHJpbnROb2RlKHRzLkVtaXRIaW50LlVuc3BlY2lmaWVkLCBtaWdyYXRlZCwgbm9kZS5nZXRTb3VyY2VGaWxlKCkpKTtcbiAgICAgICAgdHJlZS5jb21taXRVcGRhdGUodXBkYXRlKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,35 @@
|
|
|
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/testbed-teardown/util" />
|
|
9
|
+
import ts from 'typescript';
|
|
10
|
+
/** Result of a full-program analysis looking for `initTestEnvironment` calls. */
|
|
11
|
+
export interface InitTestEnvironmentAnalysis {
|
|
12
|
+
/** Total number of calls that were found. */
|
|
13
|
+
totalCalls: number;
|
|
14
|
+
/** Calls that need to be migrated. */
|
|
15
|
+
callsToMigrate: ts.CallExpression[];
|
|
16
|
+
}
|
|
17
|
+
/** Finds the `initTestEnvironment` calls that need to be migrated. */
|
|
18
|
+
export declare function findInitTestEnvironmentCalls(typeChecker: ts.TypeChecker, allSourceFiles: ts.SourceFile[]): InitTestEnvironmentAnalysis;
|
|
19
|
+
/** Finds the `configureTestingModule` and `withModule` calls that need to be migrated. */
|
|
20
|
+
export declare function findTestModuleMetadataNodes(typeChecker: ts.TypeChecker, sourceFile: ts.SourceFile): ts.ObjectLiteralExpression[];
|
|
21
|
+
/**
|
|
22
|
+
* Gets data that can be used to migrate a call to `TestBed.initTestEnvironment`.
|
|
23
|
+
* The returned `span` is used to mark the text that should be replaced while the `text`
|
|
24
|
+
* is the code that should be inserted instead.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getInitTestEnvironmentLiteralReplacement(node: ts.CallExpression, printer: ts.Printer): {
|
|
27
|
+
span: {
|
|
28
|
+
start: number;
|
|
29
|
+
end: number;
|
|
30
|
+
length: number;
|
|
31
|
+
};
|
|
32
|
+
text: string;
|
|
33
|
+
};
|
|
34
|
+
/** Migrates an object literal that is passed into `configureTestingModule` or `withModule`. */
|
|
35
|
+
export declare function migrateTestModuleMetadataLiteral(node: ts.ObjectLiteralExpression): ts.ObjectLiteralExpression;
|
|
@@ -0,0 +1,188 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
(function (factory) {
|
|
12
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
13
|
+
var v = factory(require, exports);
|
|
14
|
+
if (v !== undefined) module.exports = v;
|
|
15
|
+
}
|
|
16
|
+
else if (typeof define === "function" && define.amd) {
|
|
17
|
+
define("@angular/core/schematics/migrations/testbed-teardown/util", ["require", "exports", "typescript", "@angular/core/schematics/utils/typescript/imports", "@angular/core/schematics/utils/typescript/symbol"], factory);
|
|
18
|
+
}
|
|
19
|
+
})(function (require, exports) {
|
|
20
|
+
"use strict";
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.migrateTestModuleMetadataLiteral = exports.getInitTestEnvironmentLiteralReplacement = exports.findTestModuleMetadataNodes = exports.findInitTestEnvironmentCalls = void 0;
|
|
23
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
24
|
+
const imports_1 = require("@angular/core/schematics/utils/typescript/imports");
|
|
25
|
+
const symbol_1 = require("@angular/core/schematics/utils/typescript/symbol");
|
|
26
|
+
/** Finds the `initTestEnvironment` calls that need to be migrated. */
|
|
27
|
+
function findInitTestEnvironmentCalls(typeChecker, allSourceFiles) {
|
|
28
|
+
const callsToMigrate = new Set();
|
|
29
|
+
let totalCalls = 0;
|
|
30
|
+
allSourceFiles.forEach(sourceFile => {
|
|
31
|
+
sourceFile.forEachChild(function walk(node) {
|
|
32
|
+
if (typescript_1.default.isCallExpression(node) && typescript_1.default.isPropertyAccessExpression(node.expression) &&
|
|
33
|
+
typescript_1.default.isIdentifier(node.expression.name) &&
|
|
34
|
+
node.expression.name.text === 'initTestEnvironment' &&
|
|
35
|
+
isTestBedAccess(typeChecker, node.expression)) {
|
|
36
|
+
totalCalls++;
|
|
37
|
+
if (shouldMigrateInitTestEnvironment(node)) {
|
|
38
|
+
callsToMigrate.add(node);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
node.forEachChild(walk);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
// Sort the nodes so that they will be migrated in reverse source order (nodes at the end of
|
|
46
|
+
// the file are migrated first). This avoids issues where a migrated node will offset the
|
|
47
|
+
// bounds of all nodes that come after it. Note that the nodes here are from all of the
|
|
48
|
+
// passed in source files, but that doesn't matter since the later nodes will still appear
|
|
49
|
+
// after the earlier ones.
|
|
50
|
+
callsToMigrate: sortInReverseSourceOrder(Array.from(callsToMigrate)),
|
|
51
|
+
totalCalls
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
exports.findInitTestEnvironmentCalls = findInitTestEnvironmentCalls;
|
|
55
|
+
/** Finds the `configureTestingModule` and `withModule` calls that need to be migrated. */
|
|
56
|
+
function findTestModuleMetadataNodes(typeChecker, sourceFile) {
|
|
57
|
+
const testModuleMetadataLiterals = new Set();
|
|
58
|
+
const withModuleImport = (0, imports_1.getImportSpecifier)(sourceFile, '@angular/core/testing', 'withModule');
|
|
59
|
+
sourceFile.forEachChild(function walk(node) {
|
|
60
|
+
if (typescript_1.default.isCallExpression(node)) {
|
|
61
|
+
const isConfigureTestingModuleCall = typescript_1.default.isPropertyAccessExpression(node.expression) &&
|
|
62
|
+
typescript_1.default.isIdentifier(node.expression.name) &&
|
|
63
|
+
node.expression.name.text === 'configureTestingModule' &&
|
|
64
|
+
isTestBedAccess(typeChecker, node.expression) && shouldMigrateModuleConfigCall(node);
|
|
65
|
+
const isWithModuleCall = withModuleImport && typescript_1.default.isIdentifier(node.expression) &&
|
|
66
|
+
(0, symbol_1.isReferenceToImport)(typeChecker, node.expression, withModuleImport) &&
|
|
67
|
+
shouldMigrateModuleConfigCall(node);
|
|
68
|
+
if (isConfigureTestingModuleCall || isWithModuleCall) {
|
|
69
|
+
testModuleMetadataLiterals.add(node.arguments[0]);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
node.forEachChild(walk);
|
|
73
|
+
});
|
|
74
|
+
// Sort the nodes so that they will be migrated in reverse source order (nodes at the end of
|
|
75
|
+
// the file are migrated first). This avoids issues where a migrated node will offset the
|
|
76
|
+
// bounds of all nodes that come after it.
|
|
77
|
+
return sortInReverseSourceOrder(Array.from(testModuleMetadataLiterals));
|
|
78
|
+
}
|
|
79
|
+
exports.findTestModuleMetadataNodes = findTestModuleMetadataNodes;
|
|
80
|
+
/**
|
|
81
|
+
* Gets data that can be used to migrate a call to `TestBed.initTestEnvironment`.
|
|
82
|
+
* The returned `span` is used to mark the text that should be replaced while the `text`
|
|
83
|
+
* is the code that should be inserted instead.
|
|
84
|
+
*/
|
|
85
|
+
function getInitTestEnvironmentLiteralReplacement(node, printer) {
|
|
86
|
+
const literalProperties = [];
|
|
87
|
+
const lastArg = node.arguments[node.arguments.length - 1];
|
|
88
|
+
let span;
|
|
89
|
+
let prefix;
|
|
90
|
+
if (node.arguments.length > 2) {
|
|
91
|
+
if (isFunction(lastArg)) {
|
|
92
|
+
// If the last argument is a function, add the function as the `aotSummaries` property.
|
|
93
|
+
literalProperties.push(typescript_1.default.createPropertyAssignment('aotSummaries', lastArg));
|
|
94
|
+
}
|
|
95
|
+
else if (typescript_1.default.isObjectLiteralExpression(lastArg)) {
|
|
96
|
+
// If the property is an object literal, copy over all the properties.
|
|
97
|
+
literalProperties.push(...lastArg.properties);
|
|
98
|
+
}
|
|
99
|
+
prefix = '';
|
|
100
|
+
span = { start: lastArg.getStart(), end: lastArg.getEnd(), length: lastArg.getWidth() };
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
const start = lastArg.getEnd();
|
|
104
|
+
prefix = ', ';
|
|
105
|
+
span = { start, end: start, length: 0 };
|
|
106
|
+
}
|
|
107
|
+
// Finally push the teardown object so that it appears last.
|
|
108
|
+
literalProperties.push(createTeardownAssignment());
|
|
109
|
+
return {
|
|
110
|
+
span,
|
|
111
|
+
text: prefix +
|
|
112
|
+
printer.printNode(typescript_1.default.EmitHint.Unspecified, typescript_1.default.createObjectLiteral(literalProperties, true), node.getSourceFile())
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
exports.getInitTestEnvironmentLiteralReplacement = getInitTestEnvironmentLiteralReplacement;
|
|
116
|
+
/** Migrates an object literal that is passed into `configureTestingModule` or `withModule`. */
|
|
117
|
+
function migrateTestModuleMetadataLiteral(node) {
|
|
118
|
+
return typescript_1.default.createObjectLiteral([...node.properties, createTeardownAssignment()], node.properties.length > 0);
|
|
119
|
+
}
|
|
120
|
+
exports.migrateTestModuleMetadataLiteral = migrateTestModuleMetadataLiteral;
|
|
121
|
+
/** Returns whether a property access points to `TestBed`. */
|
|
122
|
+
function isTestBedAccess(typeChecker, node) {
|
|
123
|
+
var _a, _b;
|
|
124
|
+
const symbolName = (_b = (_a = typeChecker.getTypeAtLocation(node.expression)) === null || _a === void 0 ? void 0 : _a.getSymbol()) === null || _b === void 0 ? void 0 : _b.getName();
|
|
125
|
+
return symbolName === 'TestBed' || symbolName === 'TestBedStatic';
|
|
126
|
+
}
|
|
127
|
+
/** Whether a call to `initTestEnvironment` should be migrated. */
|
|
128
|
+
function shouldMigrateInitTestEnvironment(node) {
|
|
129
|
+
// If there is no third argument, we definitely have to migrate it.
|
|
130
|
+
if (node.arguments.length === 2) {
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
// This is technically a type error so we shouldn't mess with it.
|
|
134
|
+
if (node.arguments.length < 2) {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
// Otherwise we need to figure out if the `teardown` flag is set on the last argument.
|
|
138
|
+
const lastArg = node.arguments[2];
|
|
139
|
+
// Note: the checks below will identify something like `initTestEnvironment(..., ..., {})`,
|
|
140
|
+
// but they'll ignore a variable being passed in as the last argument like `const config = {};
|
|
141
|
+
// initTestEnvironment(..., ..., config)`. While we can resolve the variable to its declaration
|
|
142
|
+
// using `typeChecker.getTypeAtLocation(lastArg).getSymbol()?.valueDeclaration`, we deliberately
|
|
143
|
+
// don't, because it introduces some complexity and we may end up breaking user code. E.g.
|
|
144
|
+
// the `config` from the example above may be passed in to other functions or the `teardown`
|
|
145
|
+
// flag could be added later on by a function call.
|
|
146
|
+
// If the argument is an object literal and there are no
|
|
147
|
+
// properties called `teardown`, we have to migrate it.
|
|
148
|
+
if (isObjectLiteralWithoutTeardown(lastArg)) {
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
// If the last argument is an `aotSummaries` function, we also have to migrate.
|
|
152
|
+
if (isFunction(lastArg)) {
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
// Otherwise don't migrate if we couldn't identify the last argument.
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Whether a call to a module configuration function should be migrated. This covers
|
|
160
|
+
* `TestBed.configureTestingModule` and `withModule` since they both accept `TestModuleMetadata`
|
|
161
|
+
* as their first argument.
|
|
162
|
+
*/
|
|
163
|
+
function shouldMigrateModuleConfigCall(node) {
|
|
164
|
+
return node.arguments.length > 0 && isObjectLiteralWithoutTeardown(node.arguments[0]);
|
|
165
|
+
}
|
|
166
|
+
/** Returns whether a node is a function literal. */
|
|
167
|
+
function isFunction(node) {
|
|
168
|
+
return typescript_1.default.isArrowFunction(node) || typescript_1.default.isFunctionExpression(node) ||
|
|
169
|
+
typescript_1.default.isFunctionDeclaration(node);
|
|
170
|
+
}
|
|
171
|
+
/** Checks whether a node is an object literal that doesn't contain a property called `teardown`. */
|
|
172
|
+
function isObjectLiteralWithoutTeardown(node) {
|
|
173
|
+
return typescript_1.default.isObjectLiteralExpression(node) && !node.properties.find(prop => {
|
|
174
|
+
var _a;
|
|
175
|
+
return ((_a = prop.name) === null || _a === void 0 ? void 0 : _a.getText()) === 'teardown';
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
/** Creates a teardown configuration property assignment. */
|
|
179
|
+
function createTeardownAssignment() {
|
|
180
|
+
// `teardown: {destroyAfterEach: false}`
|
|
181
|
+
return typescript_1.default.createPropertyAssignment('teardown', typescript_1.default.createObjectLiteral([typescript_1.default.createPropertyAssignment('destroyAfterEach', typescript_1.default.createFalse())]));
|
|
182
|
+
}
|
|
183
|
+
/** Sorts an array of AST nodes in reverse source order. */
|
|
184
|
+
function sortInReverseSourceOrder(nodes) {
|
|
185
|
+
return nodes.sort((a, b) => b.getEnd() - a.getEnd());
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvcmUvc2NoZW1hdGljcy9taWdyYXRpb25zL3Rlc3RiZWQtdGVhcmRvd24vdXRpbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7Ozs7Ozs7Ozs7Ozs7Ozs7SUFFSCw0REFBNEI7SUFFNUIsK0VBQWtFO0lBQ2xFLDZFQUFrRTtJQVVsRSxzRUFBc0U7SUFDdEUsU0FBZ0IsNEJBQTRCLENBQ3hDLFdBQTJCLEVBQUUsY0FBK0I7UUFDOUQsTUFBTSxjQUFjLEdBQUcsSUFBSSxHQUFHLEVBQXFCLENBQUM7UUFDcEQsSUFBSSxVQUFVLEdBQUcsQ0FBQyxDQUFDO1FBRW5CLGNBQWMsQ0FBQyxPQUFPLENBQUMsVUFBVSxDQUFDLEVBQUU7WUFDbEMsVUFBVSxDQUFDLFlBQVksQ0FBQyxTQUFTLElBQUksQ0FBQyxJQUFhO2dCQUNqRCxJQUFJLG9CQUFFLENBQUMsZ0JBQWdCLENBQUMsSUFBSSxDQUFDLElBQUksb0JBQUUsQ0FBQywwQkFBMEIsQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDO29CQUMzRSxvQkFBRSxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQztvQkFDckMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxJQUFJ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yB0cy5Ob2RlPihub2RlczogVFtdKTogVFtdIHtcbiAgcmV0dXJuIG5vZGVzLnNvcnQoKGEsIGIpID0+IGIuZ2V0RW5kKCkgLSBhLmdldEVuZCgpKTtcbn1cbiJdfQ==
|
|
@@ -1,109 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schematics": {
|
|
3
|
-
"migration-v8-move-document": {
|
|
4
|
-
"version": "8.0.0-beta",
|
|
5
|
-
"description": "@DOCUMENT migration. Migrates DOCUMENT Injection token from platform-browser imports to common import.",
|
|
6
|
-
"factory": "./migrations/move-document/index"
|
|
7
|
-
},
|
|
8
|
-
"migration-v8-static-queries": {
|
|
9
|
-
"version": "8.0.0-beta",
|
|
10
|
-
"description": "ViewChild and ContentChild to explicit query timing migration. In Angular version 8, developers need to explicitly specify the timing of ViewChild and ContentChild queries. Read more about this here: https://v8.angular.io/guide/static-query-migration",
|
|
11
|
-
"factory": "./migrations/static-queries/index"
|
|
12
|
-
},
|
|
13
|
-
"migration-v8-template-local-variables": {
|
|
14
|
-
"version": "8.0.0-beta",
|
|
15
|
-
"description": "Template Variable Assignment migration. Warns developers if values are assigned to template variables.",
|
|
16
|
-
"factory": "./migrations/template-var-assignment/index"
|
|
17
|
-
},
|
|
18
|
-
"migration-v9-renderer-to-renderer2": {
|
|
19
|
-
"version": "9.0.0-beta",
|
|
20
|
-
"description": "Renderer to Renderer2 migration. As of Angular 9, the Renderer class is no longer available. Renderer2 should be used instead. Read more about this here: https://v9.angular.io/guide/migration-renderer",
|
|
21
|
-
"factory": "./migrations/renderer-to-renderer2/index"
|
|
22
|
-
},
|
|
23
|
-
"migration-v9-undecorated-classes-with-di": {
|
|
24
|
-
"version": "9.0.0-beta",
|
|
25
|
-
"description": "Undecorated classes with DI migration. As of Angular 9, it is no longer supported to use Angular DI on a class that does not have an Angular decorator. Read more about this here: https://v9.angular.io/guide/migration-undecorated-classes",
|
|
26
|
-
"factory": "./migrations/undecorated-classes-with-di/index"
|
|
27
|
-
},
|
|
28
|
-
"migration-v9-dynamic-queries": {
|
|
29
|
-
"version": "9-beta",
|
|
30
|
-
"description": "Static flag migration. Removes the `static` flag from dynamic queries. As of Angular 9, the \"static\" flag defaults to false and is no longer required for your view and content queries. Read more about this here: https://v9.angular.io/guide/migration-dynamic-flag",
|
|
31
|
-
"factory": "./migrations/dynamic-queries/index"
|
|
32
|
-
},
|
|
33
|
-
"migration-v10-missing-injectable": {
|
|
34
|
-
"version": "10.0.0-beta",
|
|
35
|
-
"description": "Missing @Injectable and incomplete provider definition migration. As of Angular 9, enforcement of @Injectable decorators for DI is a bit stricter and incomplete provider definitions behave differently. Read more about this here: https://v9.angular.io/guide/migration-injectable",
|
|
36
|
-
"factory": "./migrations/missing-injectable/index"
|
|
37
|
-
},
|
|
38
|
-
"migration-v10-module-with-providers": {
|
|
39
|
-
"version": "10.0.0-beta",
|
|
40
|
-
"description": "ModuleWithProviders migration. As of Angular 10, the ModuleWithProviders type requires a generic. This migration adds the generic where it is missing. Read more about this here: https://v10.angular.io/guide/migration-module-with-providers",
|
|
41
|
-
"factory": "./migrations/module-with-providers/index"
|
|
42
|
-
},
|
|
43
|
-
"migration-v10-undecorated-classes-with-decorated-fields": {
|
|
44
|
-
"version": "10.0.0-beta",
|
|
45
|
-
"description": "Undecorated classes with Angular features migration. In version 10, classes that use Angular features and do not have an Angular decorator are no longer supported. Read more about this here: https://v10.angular.io/guide/migration-undecorated-classes",
|
|
46
|
-
"factory": "./migrations/undecorated-classes-with-decorated-fields/index"
|
|
47
|
-
},
|
|
48
|
-
"migration-v11-navigation-extras-omissions": {
|
|
49
|
-
"version": "11.0.0-beta",
|
|
50
|
-
"description": "NavigationExtras omissions migration. In version 11, some unsupported properties were omitted from the `extras` parameter of the `Router.navigateByUrl` and `Router.createUrlTree` methods.",
|
|
51
|
-
"factory": "./migrations/navigation-extras-omissions/index"
|
|
52
|
-
},
|
|
53
|
-
"migration-v11-router-relative-link-resolution-default": {
|
|
54
|
-
"version": "11.0.0-beta",
|
|
55
|
-
"description": "The default value for `relativeLinkResolution` is changing from 'legacy' to 'corrected'.\nThis migration updates `RouterModule` configurations that use the default value to \nnow specifically use 'legacy' to prevent breakages when updating.",
|
|
56
|
-
"factory": "./migrations/relative-link-resolution/index"
|
|
57
|
-
},
|
|
58
|
-
"migration-v11-abstract-control-parent": {
|
|
59
|
-
"version": "11.0.0-beta",
|
|
60
|
-
"description": "In Angular version 11, the type of `AbstractControl.parent` can be `null` to reflect the runtime value more accurately. This migration automatically adds non-null assertions to existing accesses of the `parent` property on types like `FormControl`, `FormArray` and `FormGroup`.",
|
|
61
|
-
"factory": "./migrations/abstract-control-parent/index"
|
|
62
|
-
},
|
|
63
|
-
"migration-v11-native-view-encapsulation": {
|
|
64
|
-
"version": "11.0.0-beta",
|
|
65
|
-
"description": "ViewEncapsulation.Native has been removed as of Angular version 11. This migration replaces any usages with ViewEncapsulation.ShadowDom.",
|
|
66
|
-
"factory": "./migrations/native-view-encapsulation/index"
|
|
67
|
-
},
|
|
68
|
-
"migration-v11-wait-for-async": {
|
|
69
|
-
"version": "11.0.0-beta",
|
|
70
|
-
"description": "`async` to `waitForAsync` migration. The `async` testing function has been renamed to `waitForAsync` to avoid confusion with the native `async` keyword.",
|
|
71
|
-
"factory": "./migrations/wait-for-async/index"
|
|
72
|
-
},
|
|
73
|
-
"migration-v11-router-preserve-query-params": {
|
|
74
|
-
"version": "11.0.0-beta",
|
|
75
|
-
"description": "NavigationExtras.preserveQueryParams has been removed as of Angular version 11. This migration replaces any usages with the appropriate assignment of the queryParamsHandling key.",
|
|
76
|
-
"factory": "./migrations/router-preserve-query-params/index"
|
|
77
|
-
},
|
|
78
|
-
"migration-v11-router-initial-navigation-options": {
|
|
79
|
-
"version": "11.0.0-beta",
|
|
80
|
-
"description": "Updates the `initialNavigation` property for `RouterModule.forRoot`.",
|
|
81
|
-
"factory": "./migrations/initial-navigation/index"
|
|
82
|
-
},
|
|
83
|
-
"migration-v11.1-can-activate-with-redirect-to": {
|
|
84
|
-
"version": "11.1.0-beta",
|
|
85
|
-
"description": "Removes `canActivate` from a `Route` config when `redirectTo` is also present",
|
|
86
|
-
"factory": "./migrations/can-activate-with-redirect-to/index"
|
|
87
|
-
},
|
|
88
|
-
"migration-v12-activated-route-snapshot-fragment": {
|
|
89
|
-
"version": "12.0.0-beta",
|
|
90
|
-
"description": "In Angular version 12, the type of ActivatedRouteSnapshot.fragment is nullable. This migration automatically adds non-null assertions to it.",
|
|
91
|
-
"factory": "./migrations/activated-route-snapshot-fragment/index"
|
|
92
|
-
},
|
|
93
|
-
"migration-v12-xhr-factory": {
|
|
94
|
-
"version": "12.0.0-next.6",
|
|
95
|
-
"description": "`XhrFactory` has been moved from `@angular/common/http` to `@angular/common`.",
|
|
96
|
-
"factory": "./migrations/xhr-factory/index"
|
|
97
|
-
},
|
|
98
|
-
"migration-v12-deep-shadow-piercing-selector": {
|
|
99
|
-
"version": "12.0.2",
|
|
100
|
-
"description": "Automatically migrates shadow-piercing selector from `/deep/` to the recommended alternative `::ng-deep`.",
|
|
101
|
-
"factory": "./migrations/deep-shadow-piercing-selector/index"
|
|
102
|
-
},
|
|
103
3
|
"migration-v13-router-link-empty-expression": {
|
|
104
4
|
"version": "13.0.0-beta",
|
|
105
5
|
"description": "Migrates `[routerLink]=\"\"` in templates to `[routerLink]=\"[]\"` because these links are likely intended to route to the current page with updated fragment/query params.",
|
|
106
6
|
"factory": "./migrations/router-link-empty-expression/index"
|
|
7
|
+
},
|
|
8
|
+
"migration-v13-testbed-teardown": {
|
|
9
|
+
"version": "13.0.0-beta",
|
|
10
|
+
"description": "In Angular version 13, the `teardown` flag in `TestBed` will be enabled by default. This migration automatically opts out existing apps from the new teardown behavior.",
|
|
11
|
+
"factory": "./migrations/testbed-teardown/index"
|
|
107
12
|
}
|
|
108
13
|
}
|
|
109
|
-
}
|
|
14
|
+
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/core/schematics/utils/import_manager" />
|
|
9
|
-
import
|
|
9
|
+
import ts from 'typescript';
|
|
10
10
|
/** Update recorder for managing imports. */
|
|
11
11
|
export interface ImportManagerUpdateRecorder {
|
|
12
12
|
addNewImport(start: number, importText: string): void;
|