@angular/compiler-cli 19.0.0-next.0 → 19.0.0-next.10
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/bundles/{chunk-QYV344EV.js → chunk-3Z25BX6N.js} +2 -2
- package/bundles/{chunk-TOHNTVMY.js → chunk-5AXLJZ3D.js} +296 -115
- package/bundles/chunk-5AXLJZ3D.js.map +6 -0
- package/bundles/{chunk-JA5OGHV4.js → chunk-CE344QNW.js} +3 -3
- package/bundles/{chunk-QTQ6EDMV.js → chunk-EJZF542V.js} +4 -4
- package/bundles/chunk-EJZF542V.js.map +6 -0
- package/bundles/{chunk-WYWH4ABE.js → chunk-O2RMLJTP.js} +38 -11
- package/bundles/chunk-O2RMLJTP.js.map +6 -0
- package/bundles/{chunk-2SSA4Y5F.js → chunk-Q4DA5WRV.js} +429 -150
- package/bundles/chunk-Q4DA5WRV.js.map +6 -0
- package/bundles/{chunk-LYJKWJUC.js → chunk-RT2QTF73.js} +2 -2
- package/bundles/{chunk-3W345P4E.js → chunk-UJ2J6WV4.js} +37 -3
- package/bundles/{chunk-3W345P4E.js.map → chunk-UJ2J6WV4.js.map} +3 -3
- package/bundles/{chunk-KCKRBU6N.js → chunk-WIYBGC3E.js} +28 -21
- package/bundles/chunk-WIYBGC3E.js.map +6 -0
- package/bundles/{chunk-ZHNORXPH.js → chunk-WO73PLUB.js} +4 -4
- package/bundles/{chunk-ZHNORXPH.js.map → chunk-WO73PLUB.js.map} +1 -1
- package/bundles/{chunk-ERN7RQQ7.js → chunk-XSNUHRLJ.js} +2 -2
- package/bundles/index.js +12 -10
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +7 -7
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +4 -4
- package/bundles/ngcc/index.js +1 -1
- package/bundles/private/bazel.js +2 -2
- package/bundles/private/localize.js +6 -4
- package/bundles/private/migrations.js +5 -5
- package/bundles/private/tooling.js +6 -6
- package/bundles/src/bin/ng_xi18n.js +8 -8
- package/bundles/src/bin/ngc.js +8 -8
- package/bundles_metadata.json +1 -1
- package/linker/babel/index.d.ts +1 -1
- package/linker/babel/src/ast/babel_ast_factory.d.ts +3 -3
- package/linker/babel/src/ast/babel_ast_host.d.ts +1 -1
- package/linker/babel/src/babel_declaration_scope.d.ts +1 -1
- package/linker/babel/src/babel_plugin.d.ts +1 -1
- package/linker/babel/src/es2015_linker_plugin.d.ts +1 -1
- package/linker/babel/src/linker_plugin_options.d.ts +1 -1
- package/linker/index.d.ts +1 -1
- package/linker/src/ast/ast_host.d.ts +1 -1
- package/linker/src/ast/ast_value.d.ts +1 -1
- package/linker/src/ast/typescript/typescript_ast_host.d.ts +1 -1
- package/linker/src/fatal_linker_error.d.ts +1 -1
- package/linker/src/file_linker/declaration_scope.d.ts +1 -1
- package/linker/src/file_linker/emit_scopes/emit_scope.d.ts +1 -1
- package/linker/src/file_linker/emit_scopes/local_emit_scope.d.ts +1 -1
- package/linker/src/file_linker/get_source_file.d.ts +1 -1
- package/linker/src/file_linker/linker_environment.d.ts +1 -1
- package/linker/src/file_linker/linker_options.d.ts +1 -1
- package/linker/src/file_linker/needs_linking.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/partial_class_metadata_async_linker_1.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/partial_class_metadata_linker_1.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/partial_component_linker_1.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/partial_directive_linker_1.d.ts +3 -3
- package/linker/src/file_linker/partial_linkers/partial_factory_linker_1.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/partial_injectable_linker_1.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/partial_injector_linker_1.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/partial_linker.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/partial_linker_selector.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/partial_ng_module_linker_1.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/partial_pipe_linker_1.d.ts +3 -3
- package/linker/src/file_linker/partial_linkers/util.d.ts +3 -2
- package/linker/src/file_linker/translator.d.ts +1 -1
- package/linker/src/linker_import_generator.d.ts +1 -1
- package/ngcc/index.d.ts +1 -1
- package/package.json +4 -4
- package/private/babel.d.ts +1 -1
- package/private/bazel.d.ts +1 -1
- package/private/localize.d.ts +1 -1
- package/private/migrations.d.ts +2 -1
- package/private/tooling.d.ts +1 -1
- package/src/bin/ng_xi18n.d.ts +1 -1
- package/src/bin/ngc.d.ts +1 -1
- package/src/extract_i18n.d.ts +1 -1
- package/src/main.d.ts +1 -1
- package/src/ngtsc/annotations/common/index.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/api.d.ts +15 -1
- package/src/ngtsc/annotations/common/src/debug_info.d.ts +3 -2
- package/src/ngtsc/annotations/common/src/di.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/diagnostics.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/evaluation.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/factory.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/injectable_registry.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/input_transforms.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/jit_declaration_registry.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/metadata.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/references_registry.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/schema.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/standalone-default-value.d.ts +12 -0
- package/src/ngtsc/annotations/common/src/util.d.ts +2 -2
- package/src/ngtsc/annotations/component/index.d.ts +1 -1
- package/src/ngtsc/annotations/component/src/diagnostics.d.ts +1 -1
- package/src/ngtsc/annotations/component/src/handler.d.ts +11 -4
- package/src/ngtsc/annotations/component/src/metadata.d.ts +1 -1
- package/src/ngtsc/annotations/component/src/resources.d.ts +5 -4
- package/src/ngtsc/annotations/component/src/symbol.d.ts +1 -1
- package/src/ngtsc/annotations/component/src/util.d.ts +1 -1
- package/src/ngtsc/annotations/directive/index.d.ts +1 -1
- package/src/ngtsc/annotations/directive/src/handler.d.ts +3 -2
- package/src/ngtsc/annotations/directive/src/initializer_function_access.d.ts +1 -1
- package/src/ngtsc/annotations/directive/src/initializer_functions.d.ts +1 -1
- package/src/ngtsc/annotations/directive/src/input_function.d.ts +1 -1
- package/src/ngtsc/annotations/directive/src/input_output_parse_options.d.ts +1 -1
- package/src/ngtsc/annotations/directive/src/model_function.d.ts +1 -1
- package/src/ngtsc/annotations/directive/src/output_function.d.ts +1 -1
- package/src/ngtsc/annotations/directive/src/query_functions.d.ts +1 -1
- package/src/ngtsc/annotations/directive/src/shared.d.ts +2 -2
- package/src/ngtsc/annotations/directive/src/symbol.d.ts +1 -1
- package/src/ngtsc/annotations/index.d.ts +1 -1
- package/src/ngtsc/annotations/ng_module/index.d.ts +1 -1
- package/src/ngtsc/annotations/ng_module/src/handler.d.ts +1 -1
- package/src/ngtsc/annotations/ng_module/src/module_with_providers.d.ts +1 -1
- package/src/ngtsc/annotations/src/injectable.d.ts +1 -1
- package/src/ngtsc/annotations/src/pipe.d.ts +3 -2
- package/src/ngtsc/core/api/index.d.ts +1 -1
- package/src/ngtsc/core/api/src/adapter.d.ts +1 -1
- package/src/ngtsc/core/api/src/interfaces.d.ts +15 -1
- package/src/ngtsc/core/api/src/options.d.ts +1 -1
- package/src/ngtsc/core/api/src/public_options.d.ts +12 -1
- package/src/ngtsc/core/index.d.ts +1 -1
- package/src/ngtsc/core/src/compiler.d.ts +13 -2
- package/src/ngtsc/core/src/core_version.d.ts +1 -1
- package/src/ngtsc/core/src/feature_detection.d.ts +1 -1
- package/src/ngtsc/core/src/host.d.ts +1 -1
- package/src/ngtsc/cycles/index.d.ts +1 -1
- package/src/ngtsc/cycles/src/analyzer.d.ts +1 -1
- package/src/ngtsc/cycles/src/imports.d.ts +1 -1
- package/src/ngtsc/diagnostics/index.d.ts +1 -1
- package/src/ngtsc/diagnostics/src/docs.d.ts +1 -1
- package/src/ngtsc/diagnostics/src/error.d.ts +2 -2
- package/src/ngtsc/diagnostics/src/error_code.d.ts +9 -1
- package/src/ngtsc/diagnostics/src/error_details_base_url.d.ts +1 -1
- package/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.d.ts +3 -2
- package/src/ngtsc/diagnostics/src/util.d.ts +1 -1
- package/src/ngtsc/docs/index.d.ts +1 -1
- package/src/ngtsc/docs/src/class_extractor.d.ts +1 -1
- package/src/ngtsc/docs/src/constant_extractor.d.ts +1 -1
- package/src/ngtsc/docs/src/decorator_extractor.d.ts +1 -1
- package/src/ngtsc/docs/src/entities.d.ts +10 -1
- package/src/ngtsc/docs/src/enum_extractor.d.ts +1 -1
- package/src/ngtsc/docs/src/extractor.d.ts +5 -2
- package/src/ngtsc/docs/src/filters.d.ts +1 -1
- package/src/ngtsc/docs/src/function_extractor.d.ts +1 -1
- package/src/ngtsc/docs/src/generics_extractor.d.ts +1 -1
- package/src/ngtsc/docs/src/import_extractor.d.ts +14 -0
- package/src/ngtsc/docs/src/initializer_api_function_extractor.d.ts +1 -1
- package/src/ngtsc/docs/src/internal.d.ts +1 -1
- package/src/ngtsc/docs/src/jsdoc_extractor.d.ts +1 -1
- package/src/ngtsc/docs/src/type_alias_extractor.d.ts +1 -1
- package/src/ngtsc/docs/src/type_extractor.d.ts +1 -1
- package/src/ngtsc/entry_point/index.d.ts +1 -1
- package/src/ngtsc/entry_point/src/generator.d.ts +1 -1
- package/src/ngtsc/entry_point/src/logic.d.ts +1 -1
- package/src/ngtsc/entry_point/src/private_export_checker.d.ts +1 -1
- package/src/ngtsc/entry_point/src/reference_graph.d.ts +1 -1
- package/src/ngtsc/file_system/index.d.ts +2 -1
- package/src/ngtsc/file_system/src/compiler_host.d.ts +1 -1
- package/src/ngtsc/file_system/src/invalid_file_system.d.ts +1 -1
- package/src/ngtsc/file_system/src/logical.d.ts +1 -1
- package/src/ngtsc/file_system/src/ts_read_directory.d.ts +21 -0
- package/src/ngtsc/file_system/src/types.d.ts +1 -1
- package/src/ngtsc/file_system/src/util.d.ts +1 -1
- package/src/ngtsc/hmr/index.d.ts +9 -0
- package/src/ngtsc/hmr/src/extract_locals.d.ts +20 -0
- package/src/ngtsc/hmr/src/metadata.d.ts +23 -0
- package/src/ngtsc/hmr/src/update_declaration.d.ts +17 -0
- package/src/ngtsc/imports/index.d.ts +1 -1
- package/src/ngtsc/imports/src/alias.d.ts +1 -1
- package/src/ngtsc/imports/src/core.d.ts +7 -1
- package/src/ngtsc/imports/src/default.d.ts +1 -1
- package/src/ngtsc/imports/src/deferred_symbol_tracker.d.ts +1 -1
- package/src/ngtsc/imports/src/emitter.d.ts +1 -1
- package/src/ngtsc/imports/src/find_export.d.ts +1 -1
- package/src/ngtsc/imports/src/imported_symbols_tracker.d.ts +1 -1
- package/src/ngtsc/imports/src/local_compilation_extra_imports_tracker.d.ts +1 -1
- package/src/ngtsc/imports/src/patch_alias_reference_resolution.d.ts +1 -1
- package/src/ngtsc/imports/src/reexport.d.ts +1 -1
- package/src/ngtsc/imports/src/references.d.ts +1 -1
- package/src/ngtsc/imports/src/resolver.d.ts +1 -1
- package/src/ngtsc/incremental/api.d.ts +1 -1
- package/src/ngtsc/incremental/index.d.ts +1 -1
- package/src/ngtsc/incremental/semantic_graph/index.d.ts +1 -1
- package/src/ngtsc/incremental/semantic_graph/src/graph.d.ts +1 -1
- package/src/ngtsc/incremental/semantic_graph/src/util.d.ts +1 -1
- package/src/ngtsc/incremental/src/dependency_tracking.d.ts +1 -1
- package/src/ngtsc/incremental/src/incremental.d.ts +1 -1
- package/src/ngtsc/incremental/src/noop.d.ts +1 -1
- package/src/ngtsc/incremental/src/state.d.ts +1 -1
- package/src/ngtsc/incremental/src/strategy.d.ts +1 -1
- package/src/ngtsc/indexer/index.d.ts +1 -1
- package/src/ngtsc/indexer/src/api.d.ts +1 -1
- package/src/ngtsc/indexer/src/context.d.ts +1 -1
- package/src/ngtsc/indexer/src/template.d.ts +1 -1
- package/src/ngtsc/indexer/src/transform.d.ts +1 -1
- package/src/ngtsc/logging/index.d.ts +1 -1
- package/src/ngtsc/logging/src/console_logger.d.ts +1 -1
- package/src/ngtsc/logging/src/logger.d.ts +1 -1
- package/src/ngtsc/metadata/index.d.ts +1 -1
- package/src/ngtsc/metadata/src/api.d.ts +5 -1
- package/src/ngtsc/metadata/src/dts.d.ts +1 -1
- package/src/ngtsc/metadata/src/host_directives_resolver.d.ts +1 -1
- package/src/ngtsc/metadata/src/inheritance.d.ts +1 -1
- package/src/ngtsc/metadata/src/ng_module_index.d.ts +1 -1
- package/src/ngtsc/metadata/src/property_mapping.d.ts +1 -1
- package/src/ngtsc/metadata/src/providers.d.ts +1 -1
- package/src/ngtsc/metadata/src/registry.d.ts +1 -1
- package/src/ngtsc/metadata/src/resource_registry.d.ts +1 -1
- package/src/ngtsc/metadata/src/util.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/index.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/builtin.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/diagnostics.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/dynamic.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/interface.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/interpreter.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/result.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/synthetic.d.ts +1 -1
- package/src/ngtsc/perf/index.d.ts +1 -1
- package/src/ngtsc/perf/src/api.d.ts +1 -1
- package/src/ngtsc/perf/src/clock.d.ts +1 -1
- package/src/ngtsc/perf/src/noop.d.ts +1 -1
- package/src/ngtsc/perf/src/recorder.d.ts +1 -1
- package/src/ngtsc/program.d.ts +5 -2
- package/src/ngtsc/program_driver/index.d.ts +1 -1
- package/src/ngtsc/program_driver/src/api.d.ts +1 -1
- package/src/ngtsc/program_driver/src/ts_create_program_driver.d.ts +1 -1
- package/src/ngtsc/reflection/index.d.ts +1 -1
- package/src/ngtsc/reflection/src/host.d.ts +1 -1
- package/src/ngtsc/reflection/src/type_to_value.d.ts +1 -1
- package/src/ngtsc/reflection/src/typescript.d.ts +1 -1
- package/src/ngtsc/reflection/src/util.d.ts +1 -1
- package/src/ngtsc/resource/index.d.ts +1 -1
- package/src/ngtsc/resource/src/loader.d.ts +1 -1
- package/src/ngtsc/scope/index.d.ts +1 -1
- package/src/ngtsc/scope/src/api.d.ts +1 -1
- package/src/ngtsc/scope/src/component_scope.d.ts +1 -1
- package/src/ngtsc/scope/src/dependency.d.ts +1 -1
- package/src/ngtsc/scope/src/local.d.ts +1 -1
- package/src/ngtsc/scope/src/standalone.d.ts +1 -1
- package/src/ngtsc/scope/src/typecheck.d.ts +1 -1
- package/src/ngtsc/scope/src/util.d.ts +1 -1
- package/src/ngtsc/shims/api.d.ts +1 -1
- package/src/ngtsc/shims/index.d.ts +1 -1
- package/src/ngtsc/shims/src/adapter.d.ts +1 -1
- package/src/ngtsc/shims/src/expando.d.ts +1 -1
- package/src/ngtsc/shims/src/reference_tagger.d.ts +1 -1
- package/src/ngtsc/shims/src/util.d.ts +1 -1
- package/src/ngtsc/sourcemaps/index.d.ts +1 -1
- package/src/ngtsc/sourcemaps/src/content_origin.d.ts +1 -1
- package/src/ngtsc/sourcemaps/src/raw_source_map.d.ts +1 -1
- package/src/ngtsc/sourcemaps/src/segment_marker.d.ts +1 -1
- package/src/ngtsc/transform/index.d.ts +1 -1
- package/src/ngtsc/transform/jit/index.d.ts +1 -1
- package/src/ngtsc/transform/jit/src/downlevel_decorators_transform.d.ts +1 -1
- package/src/ngtsc/transform/jit/src/index.d.ts +1 -1
- package/src/ngtsc/transform/jit/src/initializer_api_transforms/input_function.d.ts +1 -1
- package/src/ngtsc/transform/jit/src/initializer_api_transforms/model_function.d.ts +1 -1
- package/src/ngtsc/transform/jit/src/initializer_api_transforms/output_function.d.ts +1 -1
- package/src/ngtsc/transform/jit/src/initializer_api_transforms/query_functions.d.ts +1 -1
- package/src/ngtsc/transform/jit/src/initializer_api_transforms/transform.d.ts +1 -1
- package/src/ngtsc/transform/jit/src/initializer_api_transforms/transform_api.d.ts +1 -1
- package/src/ngtsc/transform/src/alias.d.ts +1 -1
- package/src/ngtsc/transform/src/api.d.ts +5 -1
- package/src/ngtsc/transform/src/compilation.d.ts +2 -1
- package/src/ngtsc/transform/src/declaration.d.ts +1 -1
- package/src/ngtsc/transform/src/trait.d.ts +1 -1
- package/src/ngtsc/transform/src/transform.d.ts +1 -1
- package/src/ngtsc/translator/index.d.ts +1 -1
- package/src/ngtsc/translator/src/api/ast_factory.d.ts +3 -3
- package/src/ngtsc/translator/src/api/import_generator.d.ts +1 -1
- package/src/ngtsc/translator/src/context.d.ts +1 -1
- package/src/ngtsc/translator/src/import_manager/check_unique_identifier_name.d.ts +1 -1
- package/src/ngtsc/translator/src/import_manager/import_manager.d.ts +1 -1
- package/src/ngtsc/translator/src/import_manager/import_typescript_transform.d.ts +1 -1
- package/src/ngtsc/translator/src/import_manager/reuse_generated_imports.d.ts +1 -1
- package/src/ngtsc/translator/src/import_manager/reuse_source_file_imports.d.ts +1 -1
- package/src/ngtsc/translator/src/translator.d.ts +1 -1
- package/src/ngtsc/translator/src/ts_util.d.ts +1 -1
- package/src/ngtsc/translator/src/type_emitter.d.ts +1 -1
- package/src/ngtsc/translator/src/type_translator.d.ts +1 -1
- package/src/ngtsc/translator/src/typescript_ast_factory.d.ts +3 -3
- package/src/ngtsc/translator/src/typescript_translator.d.ts +1 -1
- package/src/ngtsc/tsc_plugin.d.ts +1 -1
- package/src/ngtsc/typecheck/api/api.d.ts +7 -1
- package/src/ngtsc/typecheck/api/checker.d.ts +2 -2
- package/src/ngtsc/typecheck/api/completion.d.ts +1 -1
- package/src/ngtsc/typecheck/api/context.d.ts +1 -1
- package/src/ngtsc/typecheck/api/index.d.ts +1 -1
- package/src/ngtsc/typecheck/api/scope.d.ts +1 -1
- package/src/ngtsc/typecheck/api/symbols.d.ts +1 -1
- package/src/ngtsc/typecheck/diagnostics/index.d.ts +1 -1
- package/src/ngtsc/typecheck/diagnostics/src/diagnostic.d.ts +1 -1
- package/src/ngtsc/typecheck/diagnostics/src/id.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/api/api.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/api/extended_template_checker.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/api/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/missing_ngforof_let/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/skip_hydration_not_static/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/suffix_not_supported/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/text_attribute_not_binding/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/uninvoked_function_in_event_binding/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/unused_let_declaration/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/src/extended_template_checker.d.ts +1 -1
- package/src/ngtsc/typecheck/index.d.ts +1 -1
- package/src/ngtsc/typecheck/src/checker.d.ts +2 -2
- package/src/ngtsc/typecheck/src/comments.d.ts +1 -1
- package/src/ngtsc/typecheck/src/completion.d.ts +1 -1
- package/src/ngtsc/typecheck/src/context.d.ts +1 -1
- package/src/ngtsc/typecheck/src/diagnostics.d.ts +1 -1
- package/src/ngtsc/typecheck/src/dom.d.ts +1 -1
- package/src/ngtsc/typecheck/src/environment.d.ts +1 -1
- package/src/ngtsc/typecheck/src/expression.d.ts +1 -1
- package/src/ngtsc/typecheck/src/line_mappings.d.ts +1 -1
- package/src/ngtsc/typecheck/src/oob.d.ts +1 -1
- package/src/ngtsc/typecheck/src/reference_emit_environment.d.ts +1 -1
- package/src/ngtsc/typecheck/src/shim.d.ts +1 -1
- package/src/ngtsc/typecheck/src/source.d.ts +1 -1
- package/src/ngtsc/typecheck/src/symbol_util.d.ts +1 -1
- package/src/ngtsc/typecheck/src/tcb_util.d.ts +1 -1
- package/src/ngtsc/typecheck/src/template_symbol_builder.d.ts +1 -1
- package/src/ngtsc/typecheck/src/ts_util.d.ts +1 -1
- package/src/ngtsc/typecheck/src/type_check_block.d.ts +1 -1
- package/src/ngtsc/typecheck/src/type_check_file.d.ts +1 -1
- package/src/ngtsc/typecheck/src/type_constructor.d.ts +1 -1
- package/src/ngtsc/typecheck/src/type_parameter_emitter.d.ts +1 -1
- package/src/ngtsc/typecheck/template_semantics/api/api.d.ts +1 -1
- package/src/ngtsc/typecheck/template_semantics/src/template_semantics_checker.d.ts +1 -1
- package/src/ngtsc/util/src/path.d.ts +9 -0
- package/src/ngtsc/util/src/typescript.d.ts +1 -1
- package/src/ngtsc/util/src/visitor.d.ts +1 -1
- package/src/ngtsc/validation/index.d.ts +1 -1
- package/src/ngtsc/validation/src/config.d.ts +12 -0
- package/src/ngtsc/validation/src/rules/api.d.ts +1 -1
- package/src/ngtsc/validation/src/rules/initializer_api_usage_rule.d.ts +1 -1
- package/src/ngtsc/validation/src/rules/unused_standalone_imports_rule.d.ts +29 -0
- package/src/ngtsc/validation/src/source_file_validator.d.ts +3 -2
- package/src/ngtsc/xi18n/index.d.ts +1 -1
- package/src/ngtsc/xi18n/src/context.d.ts +1 -1
- package/src/perform_compile.d.ts +2 -2
- package/src/perform_watch.d.ts +1 -1
- package/src/transformers/api.d.ts +1 -1
- package/src/transformers/compiler_host.d.ts +1 -1
- package/src/transformers/entry_points.d.ts +1 -1
- package/src/transformers/i18n.d.ts +1 -1
- package/src/transformers/program.d.ts +1 -1
- package/src/transformers/util.d.ts +1 -1
- package/src/version.d.ts +1 -1
- package/src/version_helpers.d.ts +1 -1
- package/bundles/chunk-2SSA4Y5F.js.map +0 -6
- package/bundles/chunk-KCKRBU6N.js.map +0 -6
- package/bundles/chunk-QTQ6EDMV.js.map +0 -6
- package/bundles/chunk-TOHNTVMY.js.map +0 -6
- package/bundles/chunk-WYWH4ABE.js.map +0 -6
- /package/bundles/{chunk-QYV344EV.js.map → chunk-3Z25BX6N.js.map} +0 -0
- /package/bundles/{chunk-JA5OGHV4.js.map → chunk-CE344QNW.js.map} +0 -0
- /package/bundles/{chunk-LYJKWJUC.js.map → chunk-RT2QTF73.js.map} +0 -0
- /package/bundles/{chunk-ERN7RQQ7.js.map → chunk-XSNUHRLJ.js.map} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
angularJitApplicationTransform
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WO73PLUB.js";
|
|
8
8
|
import {
|
|
9
9
|
CompilationMode,
|
|
10
10
|
ComponentDecoratorHandler,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
retagAllTsFiles,
|
|
52
52
|
tryParseInitializerApi,
|
|
53
53
|
untagAllTsFiles
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-Q4DA5WRV.js";
|
|
55
55
|
import {
|
|
56
56
|
AbsoluteModuleStrategy,
|
|
57
57
|
AliasStrategy,
|
|
@@ -82,28 +82,30 @@ import {
|
|
|
82
82
|
isNamedClassDeclaration,
|
|
83
83
|
isNonDeclarationTsPath,
|
|
84
84
|
makeDiagnostic,
|
|
85
|
+
makeRelatedInformation,
|
|
85
86
|
ngErrorCode,
|
|
86
87
|
normalizeSeparators,
|
|
87
88
|
relativePathBetween,
|
|
88
89
|
replaceTsWithNgInErrors,
|
|
89
90
|
toUnredirectedSourceFile
|
|
90
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-O2RMLJTP.js";
|
|
91
92
|
import {
|
|
92
93
|
ActivePerfRecorder,
|
|
93
94
|
DelegatingPerfRecorder,
|
|
94
95
|
PerfCheckpoint,
|
|
95
96
|
PerfEvent,
|
|
96
97
|
PerfPhase
|
|
97
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-XSNUHRLJ.js";
|
|
98
99
|
import {
|
|
99
100
|
LogicalFileSystem,
|
|
100
101
|
absoluteFrom,
|
|
101
102
|
absoluteFromSourceFile,
|
|
103
|
+
createFileSystemTsReadDirectoryFn,
|
|
102
104
|
dirname,
|
|
103
105
|
getFileSystem,
|
|
104
106
|
join,
|
|
105
107
|
resolve
|
|
106
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-UJ2J6WV4.js";
|
|
107
109
|
|
|
108
110
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
|
|
109
111
|
var DEFAULT_ERROR_CODE = 100;
|
|
@@ -181,7 +183,7 @@ function isDocEntryWithSourceInfo(entry) {
|
|
|
181
183
|
}
|
|
182
184
|
|
|
183
185
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/extractor.mjs
|
|
184
|
-
import
|
|
186
|
+
import ts11 from "typescript";
|
|
185
187
|
|
|
186
188
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.mjs
|
|
187
189
|
import ts5 from "typescript";
|
|
@@ -380,7 +382,9 @@ var ClassExtractor = class {
|
|
|
380
382
|
generics: extractGenerics(this.declaration),
|
|
381
383
|
description: extractJsDocDescription(this.declaration),
|
|
382
384
|
jsdocTags: extractJsDocTags(this.declaration),
|
|
383
|
-
rawComment: extractRawJsDoc(this.declaration)
|
|
385
|
+
rawComment: extractRawJsDoc(this.declaration),
|
|
386
|
+
extends: this.extractInheritance(this.declaration),
|
|
387
|
+
implements: this.extractInterfaceConformance(this.declaration)
|
|
384
388
|
};
|
|
385
389
|
}
|
|
386
390
|
extractAllClassMembers() {
|
|
@@ -398,7 +402,7 @@ var ClassExtractor = class {
|
|
|
398
402
|
extractClassMember(memberDeclaration) {
|
|
399
403
|
if (this.isMethod(memberDeclaration)) {
|
|
400
404
|
return this.extractMethod(memberDeclaration);
|
|
401
|
-
} else if (this.isProperty(memberDeclaration)) {
|
|
405
|
+
} else if (this.isProperty(memberDeclaration) && !this.hasPrivateComputedProperty(memberDeclaration)) {
|
|
402
406
|
return this.extractClassProperty(memberDeclaration);
|
|
403
407
|
} else if (ts5.isAccessor(memberDeclaration)) {
|
|
404
408
|
return this.extractGetterSetter(memberDeclaration);
|
|
@@ -440,6 +444,26 @@ var ClassExtractor = class {
|
|
|
440
444
|
memberType: ts5.isGetAccessor(accessor) ? MemberType.Getter : MemberType.Setter
|
|
441
445
|
};
|
|
442
446
|
}
|
|
447
|
+
extractInheritance(declaration) {
|
|
448
|
+
if (!declaration.heritageClauses) {
|
|
449
|
+
return void 0;
|
|
450
|
+
}
|
|
451
|
+
for (const clause of declaration.heritageClauses) {
|
|
452
|
+
if (clause.token === ts5.SyntaxKind.ExtendsKeyword) {
|
|
453
|
+
const types = clause.types;
|
|
454
|
+
if (types.length > 0) {
|
|
455
|
+
const baseClass = types[0];
|
|
456
|
+
return baseClass.getText();
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
return void 0;
|
|
461
|
+
}
|
|
462
|
+
extractInterfaceConformance(declaration) {
|
|
463
|
+
var _a, _b;
|
|
464
|
+
const implementClause = (_a = declaration.heritageClauses) == null ? void 0 : _a.find((clause) => clause.token === ts5.SyntaxKind.ImplementsKeyword);
|
|
465
|
+
return (_b = implementClause == null ? void 0 : implementClause.types.map((m) => m.getText())) != null ? _b : [];
|
|
466
|
+
}
|
|
443
467
|
getMemberTags(member) {
|
|
444
468
|
var _a;
|
|
445
469
|
const tags = this.getMemberTagsFromModifiers((_a = member.modifiers) != null ? _a : []);
|
|
@@ -481,9 +505,15 @@ var ClassExtractor = class {
|
|
|
481
505
|
return result;
|
|
482
506
|
}
|
|
483
507
|
filterMethodOverloads(declarations) {
|
|
484
|
-
return declarations.filter((declaration) => {
|
|
508
|
+
return declarations.filter((declaration, index) => {
|
|
509
|
+
var _a;
|
|
485
510
|
if (ts5.isFunctionDeclaration(declaration) || ts5.isMethodDeclaration(declaration)) {
|
|
486
|
-
|
|
511
|
+
if (ts5.getCombinedModifierFlags(declaration) & ts5.ModifierFlags.Abstract) {
|
|
512
|
+
const previousDeclaration = declarations[index - 1];
|
|
513
|
+
const samePreviousAbstractMethod = previousDeclaration && ts5.isMethodDeclaration(previousDeclaration) && ts5.getCombinedModifierFlags(previousDeclaration) & ts5.ModifierFlags.Abstract && previousDeclaration.name.getText() === ((_a = declaration.name) == null ? void 0 : _a.getText());
|
|
514
|
+
return !samePreviousAbstractMethod;
|
|
515
|
+
}
|
|
516
|
+
return !!declaration.body;
|
|
487
517
|
}
|
|
488
518
|
return true;
|
|
489
519
|
});
|
|
@@ -538,6 +568,9 @@ var ClassExtractor = class {
|
|
|
538
568
|
const modifiers = (_a = this.declaration.modifiers) != null ? _a : [];
|
|
539
569
|
return modifiers.some((mod) => mod.kind === ts5.SyntaxKind.AbstractKeyword);
|
|
540
570
|
}
|
|
571
|
+
hasPrivateComputedProperty(property) {
|
|
572
|
+
return ts5.isComputedPropertyName(property.name) && property.name.expression.getText().startsWith("\u0275");
|
|
573
|
+
}
|
|
541
574
|
};
|
|
542
575
|
var DirectiveExtractor = class extends ClassExtractor {
|
|
543
576
|
constructor(declaration, reference, metadata, checker) {
|
|
@@ -914,14 +947,40 @@ function extractTypeAlias(declaration) {
|
|
|
914
947
|
};
|
|
915
948
|
}
|
|
916
949
|
|
|
950
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/import_extractor.mjs
|
|
951
|
+
import ts10 from "typescript";
|
|
952
|
+
function getImportedSymbols(sourceFile) {
|
|
953
|
+
const importSpecifiers = /* @__PURE__ */ new Map();
|
|
954
|
+
function visit(node) {
|
|
955
|
+
var _a;
|
|
956
|
+
if (ts10.isImportDeclaration(node)) {
|
|
957
|
+
let moduleSpecifier = node.moduleSpecifier.getText(sourceFile).replace(/['"]/g, "");
|
|
958
|
+
if (moduleSpecifier.startsWith("@angular/")) {
|
|
959
|
+
const namedBindings = (_a = node.importClause) == null ? void 0 : _a.namedBindings;
|
|
960
|
+
if (namedBindings && ts10.isNamedImports(namedBindings)) {
|
|
961
|
+
namedBindings.elements.forEach((importSpecifier) => {
|
|
962
|
+
const importName = importSpecifier.name.text;
|
|
963
|
+
const importAlias = importSpecifier.propertyName ? importSpecifier.propertyName.text : void 0;
|
|
964
|
+
importSpecifiers.set(importAlias != null ? importAlias : importName, moduleSpecifier);
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
ts10.forEachChild(node, visit);
|
|
970
|
+
}
|
|
971
|
+
visit(sourceFile);
|
|
972
|
+
return importSpecifiers;
|
|
973
|
+
}
|
|
974
|
+
|
|
917
975
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/extractor.mjs
|
|
918
976
|
var DocsExtractor = class {
|
|
919
977
|
constructor(typeChecker, metadataReader) {
|
|
920
978
|
this.typeChecker = typeChecker;
|
|
921
979
|
this.metadataReader = metadataReader;
|
|
922
980
|
}
|
|
923
|
-
extractAll(sourceFile, rootDir) {
|
|
981
|
+
extractAll(sourceFile, rootDir, privateModules) {
|
|
924
982
|
const entries = [];
|
|
983
|
+
const symbols = /* @__PURE__ */ new Map();
|
|
925
984
|
const exportedDeclarations = this.getExportedDeclarations(sourceFile);
|
|
926
985
|
for (const [exportName, node] of exportedDeclarations) {
|
|
927
986
|
if (isAngularPrivateName(exportName)) {
|
|
@@ -930,15 +989,25 @@ var DocsExtractor = class {
|
|
|
930
989
|
const entry = this.extractDeclaration(node);
|
|
931
990
|
if (entry && !isIgnoredDocEntry(entry)) {
|
|
932
991
|
const realSourceFile = node.getSourceFile();
|
|
992
|
+
const importedSymbols = getImportedSymbols(realSourceFile);
|
|
993
|
+
importedSymbols.forEach((moduleName, symbolName) => {
|
|
994
|
+
if (symbolName.startsWith("\u0275") || privateModules.has(moduleName)) {
|
|
995
|
+
return;
|
|
996
|
+
}
|
|
997
|
+
if (symbols.has(symbolName) && symbols.get(symbolName) !== moduleName) {
|
|
998
|
+
throw new Error(`Ambigous symbol \`${symbolName}\` exported by both ${symbols.get(symbolName)} & ${moduleName}`);
|
|
999
|
+
}
|
|
1000
|
+
symbols.set(symbolName, moduleName);
|
|
1001
|
+
});
|
|
933
1002
|
entry.source = {
|
|
934
1003
|
filePath: getRelativeFilePath(realSourceFile, rootDir),
|
|
935
|
-
startLine:
|
|
936
|
-
endLine:
|
|
1004
|
+
startLine: ts11.getLineAndCharacterOfPosition(realSourceFile, node.getStart()).line + 1,
|
|
1005
|
+
endLine: ts11.getLineAndCharacterOfPosition(realSourceFile, node.getEnd()).line + 1
|
|
937
1006
|
};
|
|
938
1007
|
entries.push({ ...entry, name: exportName });
|
|
939
1008
|
}
|
|
940
1009
|
}
|
|
941
|
-
return entries;
|
|
1010
|
+
return { entries, symbols };
|
|
942
1011
|
}
|
|
943
1012
|
extractDeclaration(node) {
|
|
944
1013
|
if (isNamedClassDeclaration(node)) {
|
|
@@ -947,20 +1016,20 @@ var DocsExtractor = class {
|
|
|
947
1016
|
if (isInitializerApiFunction(node, this.typeChecker)) {
|
|
948
1017
|
return extractInitializerApiFunction(node, this.typeChecker);
|
|
949
1018
|
}
|
|
950
|
-
if (
|
|
1019
|
+
if (ts11.isInterfaceDeclaration(node) && !isIgnoredInterface(node)) {
|
|
951
1020
|
return extractInterface(node, this.typeChecker);
|
|
952
1021
|
}
|
|
953
|
-
if (
|
|
1022
|
+
if (ts11.isFunctionDeclaration(node)) {
|
|
954
1023
|
const functionExtractor = new FunctionExtractor(node.name.getText(), node, this.typeChecker);
|
|
955
1024
|
return functionExtractor.extract();
|
|
956
1025
|
}
|
|
957
|
-
if (
|
|
1026
|
+
if (ts11.isVariableDeclaration(node) && !isSyntheticAngularConstant(node)) {
|
|
958
1027
|
return isDecoratorDeclaration(node) ? extractorDecorator(node, this.typeChecker) : extractConstant(node, this.typeChecker);
|
|
959
1028
|
}
|
|
960
|
-
if (
|
|
1029
|
+
if (ts11.isTypeAliasDeclaration(node)) {
|
|
961
1030
|
return extractTypeAlias(node);
|
|
962
1031
|
}
|
|
963
|
-
if (
|
|
1032
|
+
if (ts11.isEnumDeclaration(node)) {
|
|
964
1033
|
return extractEnum(node, this.typeChecker);
|
|
965
1034
|
}
|
|
966
1035
|
return null;
|
|
@@ -991,7 +1060,7 @@ function getRelativeFilePath(sourceFile, rootDir) {
|
|
|
991
1060
|
|
|
992
1061
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
|
|
993
1062
|
import { HtmlParser, MessageBundle } from "@angular/compiler";
|
|
994
|
-
import
|
|
1063
|
+
import ts26 from "typescript";
|
|
995
1064
|
|
|
996
1065
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/i18n.mjs
|
|
997
1066
|
import { Xliff, Xliff2, Xmb } from "@angular/compiler";
|
|
@@ -1045,7 +1114,7 @@ function getPathNormalizer(basePath) {
|
|
|
1045
1114
|
}
|
|
1046
1115
|
|
|
1047
1116
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
1048
|
-
import
|
|
1117
|
+
import ts12 from "typescript";
|
|
1049
1118
|
|
|
1050
1119
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/version_helpers.mjs
|
|
1051
1120
|
function toNumbers(value) {
|
|
@@ -1083,9 +1152,9 @@ function compareVersions(v1, v2) {
|
|
|
1083
1152
|
}
|
|
1084
1153
|
|
|
1085
1154
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
1086
|
-
var MIN_TS_VERSION = "5.
|
|
1087
|
-
var MAX_TS_VERSION = "5.
|
|
1088
|
-
var tsVersion =
|
|
1155
|
+
var MIN_TS_VERSION = "5.5.0";
|
|
1156
|
+
var MAX_TS_VERSION = "5.7.0";
|
|
1157
|
+
var tsVersion = ts12.version;
|
|
1089
1158
|
function checkVersion(version, minVersion, maxVersion) {
|
|
1090
1159
|
if (compareVersions(version, minVersion) < 0 || compareVersions(version, maxVersion) >= 0) {
|
|
1091
1160
|
throw new Error(`The Angular Compiler requires TypeScript >=${minVersion} and <${maxVersion} but ${version} was found instead.`);
|
|
@@ -1097,7 +1166,7 @@ function verifySupportedTypeScriptVersion() {
|
|
|
1097
1166
|
|
|
1098
1167
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
|
|
1099
1168
|
import { R3Identifiers } from "@angular/compiler";
|
|
1100
|
-
import
|
|
1169
|
+
import ts24 from "typescript";
|
|
1101
1170
|
|
|
1102
1171
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
|
|
1103
1172
|
var CycleAnalyzer = class {
|
|
@@ -1171,7 +1240,7 @@ var Cycle = class {
|
|
|
1171
1240
|
};
|
|
1172
1241
|
|
|
1173
1242
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/imports.mjs
|
|
1174
|
-
import
|
|
1243
|
+
import ts13 from "typescript";
|
|
1175
1244
|
var ImportGraph = class {
|
|
1176
1245
|
constructor(checker, perf) {
|
|
1177
1246
|
this.checker = checker;
|
|
@@ -1215,10 +1284,10 @@ var ImportGraph = class {
|
|
|
1215
1284
|
return this.perf.inPhase(PerfPhase.CycleDetection, () => {
|
|
1216
1285
|
const imports = /* @__PURE__ */ new Set();
|
|
1217
1286
|
for (const stmt of sf.statements) {
|
|
1218
|
-
if (!
|
|
1287
|
+
if (!ts13.isImportDeclaration(stmt) && !ts13.isExportDeclaration(stmt) || stmt.moduleSpecifier === void 0) {
|
|
1219
1288
|
continue;
|
|
1220
1289
|
}
|
|
1221
|
-
if (
|
|
1290
|
+
if (ts13.isImportDeclaration(stmt) && stmt.importClause !== void 0 && isTypeOnlyImportClause(stmt.importClause)) {
|
|
1222
1291
|
continue;
|
|
1223
1292
|
}
|
|
1224
1293
|
const symbol = this.checker.getSymbolAtLocation(stmt.moduleSpecifier);
|
|
@@ -1226,7 +1295,7 @@ var ImportGraph = class {
|
|
|
1226
1295
|
continue;
|
|
1227
1296
|
}
|
|
1228
1297
|
const moduleFile = symbol.valueDeclaration;
|
|
1229
|
-
if (
|
|
1298
|
+
if (ts13.isSourceFile(moduleFile) && isLocalFile(moduleFile)) {
|
|
1230
1299
|
imports.add(moduleFile);
|
|
1231
1300
|
}
|
|
1232
1301
|
}
|
|
@@ -1241,7 +1310,7 @@ function isTypeOnlyImportClause(node) {
|
|
|
1241
1310
|
if (node.isTypeOnly) {
|
|
1242
1311
|
return true;
|
|
1243
1312
|
}
|
|
1244
|
-
if (node.namedBindings !== void 0 &&
|
|
1313
|
+
if (node.namedBindings !== void 0 && ts13.isNamedImports(node.namedBindings) && node.namedBindings.elements.every((specifier) => specifier.isTypeOnly)) {
|
|
1245
1314
|
return true;
|
|
1246
1315
|
}
|
|
1247
1316
|
return false;
|
|
@@ -1263,7 +1332,7 @@ var Found = class {
|
|
|
1263
1332
|
};
|
|
1264
1333
|
|
|
1265
1334
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/generator.mjs
|
|
1266
|
-
import
|
|
1335
|
+
import ts14 from "typescript";
|
|
1267
1336
|
var FlatIndexGenerator = class {
|
|
1268
1337
|
constructor(entryPoint, relativeFlatIndexPath, moduleName) {
|
|
1269
1338
|
this.entryPoint = entryPoint;
|
|
@@ -1279,7 +1348,7 @@ var FlatIndexGenerator = class {
|
|
|
1279
1348
|
|
|
1280
1349
|
export * from '${relativeEntryPoint}';
|
|
1281
1350
|
`;
|
|
1282
|
-
const genFile =
|
|
1351
|
+
const genFile = ts14.createSourceFile(this.flatIndexPath, contents, ts14.ScriptTarget.ES2015, true, ts14.ScriptKind.TS);
|
|
1283
1352
|
if (this.moduleName !== null) {
|
|
1284
1353
|
genFile.moduleName = this.moduleName;
|
|
1285
1354
|
}
|
|
@@ -1304,7 +1373,7 @@ function findFlatIndexEntryPoint(rootFiles) {
|
|
|
1304
1373
|
}
|
|
1305
1374
|
|
|
1306
1375
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/private_export_checker.mjs
|
|
1307
|
-
import
|
|
1376
|
+
import ts15 from "typescript";
|
|
1308
1377
|
function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
1309
1378
|
const diagnostics = [];
|
|
1310
1379
|
const topLevelExports = /* @__PURE__ */ new Set();
|
|
@@ -1314,7 +1383,7 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
|
1314
1383
|
}
|
|
1315
1384
|
const exportedSymbols = checker.getExportsOfModule(moduleSymbol);
|
|
1316
1385
|
exportedSymbols.forEach((symbol) => {
|
|
1317
|
-
if (symbol.flags &
|
|
1386
|
+
if (symbol.flags & ts15.SymbolFlags.Alias) {
|
|
1318
1387
|
symbol = checker.getAliasedSymbol(symbol);
|
|
1319
1388
|
}
|
|
1320
1389
|
const decl = symbol.valueDeclaration;
|
|
@@ -1338,7 +1407,7 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
|
1338
1407
|
visibleVia = transitivePath.map((seg) => getNameOfDeclaration(seg)).join(" -> ");
|
|
1339
1408
|
}
|
|
1340
1409
|
const diagnostic = {
|
|
1341
|
-
category:
|
|
1410
|
+
category: ts15.DiagnosticCategory.Error,
|
|
1342
1411
|
code: ngErrorCode(ErrorCode.SYMBOL_NOT_EXPORTED),
|
|
1343
1412
|
file: transitiveReference.getSourceFile(),
|
|
1344
1413
|
...getPosOfDeclaration(transitiveReference),
|
|
@@ -1358,7 +1427,7 @@ function getPosOfDeclaration(decl) {
|
|
|
1358
1427
|
};
|
|
1359
1428
|
}
|
|
1360
1429
|
function getIdentifierOfDeclaration(decl) {
|
|
1361
|
-
if ((
|
|
1430
|
+
if ((ts15.isClassDeclaration(decl) || ts15.isVariableDeclaration(decl) || ts15.isFunctionDeclaration(decl)) && decl.name !== void 0 && ts15.isIdentifier(decl.name)) {
|
|
1362
1431
|
return decl.name;
|
|
1363
1432
|
} else {
|
|
1364
1433
|
return null;
|
|
@@ -1370,13 +1439,13 @@ function getNameOfDeclaration(decl) {
|
|
|
1370
1439
|
}
|
|
1371
1440
|
function getDescriptorOfDeclaration(decl) {
|
|
1372
1441
|
switch (decl.kind) {
|
|
1373
|
-
case
|
|
1442
|
+
case ts15.SyntaxKind.ClassDeclaration:
|
|
1374
1443
|
return "class";
|
|
1375
|
-
case
|
|
1444
|
+
case ts15.SyntaxKind.FunctionDeclaration:
|
|
1376
1445
|
return "function";
|
|
1377
|
-
case
|
|
1446
|
+
case ts15.SyntaxKind.VariableDeclaration:
|
|
1378
1447
|
return "variable";
|
|
1379
|
-
case
|
|
1448
|
+
case ts15.SyntaxKind.EnumDeclaration:
|
|
1380
1449
|
return "enum";
|
|
1381
1450
|
default:
|
|
1382
1451
|
return "declaration";
|
|
@@ -2202,7 +2271,7 @@ var NgModuleIndexImpl = class {
|
|
|
2202
2271
|
};
|
|
2203
2272
|
|
|
2204
2273
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/resource/src/loader.mjs
|
|
2205
|
-
import
|
|
2274
|
+
import ts16 from "typescript";
|
|
2206
2275
|
var CSS_PREPROCESSOR_EXT = /(\.scss|\.sass|\.less|\.styl)$/;
|
|
2207
2276
|
var RESOURCE_MARKER = ".$ngresource$";
|
|
2208
2277
|
var RESOURCE_MARKER_TS = RESOURCE_MARKER + ".ts";
|
|
@@ -2242,7 +2311,8 @@ var AdapterResourceLoader = class {
|
|
|
2242
2311
|
const resourceContext = {
|
|
2243
2312
|
type: "style",
|
|
2244
2313
|
containingFile: context.containingFile,
|
|
2245
|
-
resourceFile: resolvedUrl
|
|
2314
|
+
resourceFile: resolvedUrl,
|
|
2315
|
+
className: context.className
|
|
2246
2316
|
};
|
|
2247
2317
|
result = Promise.resolve(result).then(async (str) => {
|
|
2248
2318
|
const transformResult = await this.adapter.transformResource(str, resourceContext);
|
|
@@ -2268,7 +2338,9 @@ var AdapterResourceLoader = class {
|
|
|
2268
2338
|
const transformResult = await this.adapter.transformResource(data, {
|
|
2269
2339
|
type: "style",
|
|
2270
2340
|
containingFile: context.containingFile,
|
|
2271
|
-
resourceFile: null
|
|
2341
|
+
resourceFile: null,
|
|
2342
|
+
order: context.order,
|
|
2343
|
+
className: context.className
|
|
2272
2344
|
});
|
|
2273
2345
|
if (transformResult === null) {
|
|
2274
2346
|
return data;
|
|
@@ -2316,7 +2388,7 @@ var AdapterResourceLoader = class {
|
|
|
2316
2388
|
return this.adapter.rootDirs.map((rootDir) => join(rootDir, segment));
|
|
2317
2389
|
}
|
|
2318
2390
|
getResolvedCandidateLocations(url, fromFile) {
|
|
2319
|
-
const failedLookup =
|
|
2391
|
+
const failedLookup = ts16.resolveModuleName(url + RESOURCE_MARKER, fromFile, this.options, this.lookupResolutionHost);
|
|
2320
2392
|
if (failedLookup.failedLookupLocations === void 0) {
|
|
2321
2393
|
throw new Error(`Internal error: expected to find failedLookupLocations during resolution of resource '${url}' in context of ${fromFile}`);
|
|
2322
2394
|
}
|
|
@@ -2451,7 +2523,7 @@ var StandaloneComponentScopeReader = class {
|
|
|
2451
2523
|
import { ASTWithSource as ASTWithSource3, BindingType, Interpolation, PropertyRead as PropertyRead2, TmplAstBoundAttribute } from "@angular/compiler";
|
|
2452
2524
|
|
|
2453
2525
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/symbol_util.mjs
|
|
2454
|
-
import
|
|
2526
|
+
import ts17 from "typescript";
|
|
2455
2527
|
var SIGNAL_FNS = /* @__PURE__ */ new Set([
|
|
2456
2528
|
"WritableSignal",
|
|
2457
2529
|
"Signal",
|
|
@@ -2466,7 +2538,7 @@ function isSignalSymbol(symbol) {
|
|
|
2466
2538
|
const declarations = symbol.getDeclarations();
|
|
2467
2539
|
return declarations !== void 0 && declarations.some((decl) => {
|
|
2468
2540
|
const fileName = decl.getSourceFile().fileName;
|
|
2469
|
-
return (
|
|
2541
|
+
return (ts17.isInterfaceDeclaration(decl) || ts17.isTypeAliasDeclaration(decl)) && SIGNAL_FNS.has(decl.name.text) && (fileName.includes("@angular/core") || fileName.includes("angular2/rc/packages/core"));
|
|
2470
2542
|
});
|
|
2471
2543
|
}
|
|
2472
2544
|
|
|
@@ -2548,6 +2620,8 @@ var TemplateVisitor2 = class extends RecursiveAstVisitor2 {
|
|
|
2548
2620
|
this.visitAst(text.value);
|
|
2549
2621
|
}
|
|
2550
2622
|
visitIcu(icu) {
|
|
2623
|
+
Object.keys(icu.vars).forEach((key) => this.visit(icu.vars[key]));
|
|
2624
|
+
Object.keys(icu.placeholders).forEach((key) => this.visit(icu.placeholders[key]));
|
|
2551
2625
|
}
|
|
2552
2626
|
visitDeferredBlock(deferred) {
|
|
2553
2627
|
deferred.visitAll(this);
|
|
@@ -2762,7 +2836,7 @@ var factory4 = {
|
|
|
2762
2836
|
|
|
2763
2837
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.mjs
|
|
2764
2838
|
import { Binary } from "@angular/compiler";
|
|
2765
|
-
import
|
|
2839
|
+
import ts18 from "typescript";
|
|
2766
2840
|
var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
2767
2841
|
constructor() {
|
|
2768
2842
|
super(...arguments);
|
|
@@ -2777,7 +2851,7 @@ var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
|
2777
2851
|
return [];
|
|
2778
2852
|
}
|
|
2779
2853
|
const typeLeft = symbolLeft.tsType;
|
|
2780
|
-
if (typeLeft.flags & (
|
|
2854
|
+
if (typeLeft.flags & (ts18.TypeFlags.Any | ts18.TypeFlags.Unknown)) {
|
|
2781
2855
|
return [];
|
|
2782
2856
|
}
|
|
2783
2857
|
if (typeLeft.getNonNullableType() !== typeLeft)
|
|
@@ -2808,7 +2882,7 @@ var factory5 = {
|
|
|
2808
2882
|
|
|
2809
2883
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable/index.mjs
|
|
2810
2884
|
import { SafeCall, SafeKeyedRead, SafePropertyRead } from "@angular/compiler";
|
|
2811
|
-
import
|
|
2885
|
+
import ts19 from "typescript";
|
|
2812
2886
|
var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
2813
2887
|
constructor() {
|
|
2814
2888
|
super(...arguments);
|
|
@@ -2823,7 +2897,7 @@ var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
|
2823
2897
|
return [];
|
|
2824
2898
|
}
|
|
2825
2899
|
const typeLeft = symbolLeft.tsType;
|
|
2826
|
-
if (typeLeft.flags & (
|
|
2900
|
+
if (typeLeft.flags & (ts19.TypeFlags.Any | ts19.TypeFlags.Unknown)) {
|
|
2827
2901
|
return [];
|
|
2828
2902
|
}
|
|
2829
2903
|
if (typeLeft.getNonNullableType() !== typeLeft)
|
|
@@ -3014,7 +3088,7 @@ var factory10 = {
|
|
|
3014
3088
|
};
|
|
3015
3089
|
|
|
3016
3090
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
|
|
3017
|
-
import
|
|
3091
|
+
import ts20 from "typescript";
|
|
3018
3092
|
|
|
3019
3093
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/api/src/public_options.mjs
|
|
3020
3094
|
var DiagnosticCategoryLabel;
|
|
@@ -3063,9 +3137,9 @@ var ExtendedTemplateCheckerImpl = class {
|
|
|
3063
3137
|
function diagnosticLabelToCategory(label) {
|
|
3064
3138
|
switch (label) {
|
|
3065
3139
|
case DiagnosticCategoryLabel.Warning:
|
|
3066
|
-
return
|
|
3140
|
+
return ts20.DiagnosticCategory.Warning;
|
|
3067
3141
|
case DiagnosticCategoryLabel.Error:
|
|
3068
|
-
return
|
|
3142
|
+
return ts20.DiagnosticCategory.Error;
|
|
3069
3143
|
case DiagnosticCategoryLabel.Suppress:
|
|
3070
3144
|
return null;
|
|
3071
3145
|
default:
|
|
@@ -3092,12 +3166,13 @@ var ALL_DIAGNOSTIC_FACTORIES = [
|
|
|
3092
3166
|
];
|
|
3093
3167
|
var SUPPORTED_DIAGNOSTIC_NAMES = /* @__PURE__ */ new Set([
|
|
3094
3168
|
ExtendedTemplateDiagnosticName.CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION,
|
|
3169
|
+
ExtendedTemplateDiagnosticName.UNUSED_STANDALONE_IMPORTS,
|
|
3095
3170
|
...ALL_DIAGNOSTIC_FACTORIES.map((factory11) => factory11.name)
|
|
3096
3171
|
]);
|
|
3097
3172
|
|
|
3098
3173
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/template_semantics/src/template_semantics_checker.mjs
|
|
3099
3174
|
import { ASTWithSource as ASTWithSource6, ImplicitReceiver as ImplicitReceiver2, ParsedEventType as ParsedEventType2, RecursiveAstVisitor as RecursiveAstVisitor3, TmplAstBoundEvent as TmplAstBoundEvent3, TmplAstLetDeclaration as TmplAstLetDeclaration2, TmplAstRecursiveVisitor as TmplAstRecursiveVisitor2, TmplAstVariable as TmplAstVariable2 } from "@angular/compiler";
|
|
3100
|
-
import
|
|
3175
|
+
import ts21 from "typescript";
|
|
3101
3176
|
var TemplateSemanticsCheckerImpl = class {
|
|
3102
3177
|
constructor(templateTypeChecker) {
|
|
3103
3178
|
this.templateTypeChecker = templateTypeChecker;
|
|
@@ -3172,7 +3247,7 @@ var ExpressionsSemanticsVisitor = class extends RecursiveAstVisitor3 {
|
|
|
3172
3247
|
}
|
|
3173
3248
|
makeIllegalTemplateVarDiagnostic(target, expressionNode, errorMessage) {
|
|
3174
3249
|
const span = target instanceof TmplAstVariable2 ? target.valueSpan || target.sourceSpan : target.sourceSpan;
|
|
3175
|
-
return this.templateTypeChecker.makeTemplateDiagnostic(this.component, expressionNode.handlerSpan,
|
|
3250
|
+
return this.templateTypeChecker.makeTemplateDiagnostic(this.component, expressionNode.handlerSpan, ts21.DiagnosticCategory.Error, ngErrorCode(ErrorCode.WRITE_TO_READ_ONLY_VARIABLE), errorMessage, [
|
|
3176
3251
|
{
|
|
3177
3252
|
text: `'${target.name}' is declared here.`,
|
|
3178
3253
|
start: span.start.offset,
|
|
@@ -3187,7 +3262,7 @@ function unwrapAstWithSource(ast) {
|
|
|
3187
3262
|
}
|
|
3188
3263
|
|
|
3189
3264
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/rules/initializer_api_usage_rule.mjs
|
|
3190
|
-
import
|
|
3265
|
+
import ts22 from "typescript";
|
|
3191
3266
|
var APIS_TO_CHECK = [
|
|
3192
3267
|
INPUT_INITIALIZER_FN,
|
|
3193
3268
|
MODEL_INITIALIZER_FN,
|
|
@@ -3205,13 +3280,13 @@ var InitializerApiUsageRule = class {
|
|
|
3205
3280
|
});
|
|
3206
3281
|
}
|
|
3207
3282
|
checkNode(node) {
|
|
3208
|
-
if (!
|
|
3283
|
+
if (!ts22.isCallExpression(node)) {
|
|
3209
3284
|
return null;
|
|
3210
3285
|
}
|
|
3211
|
-
while (node.parent && (
|
|
3286
|
+
while (node.parent && (ts22.isParenthesizedExpression(node.parent) || ts22.isAsExpression(node.parent))) {
|
|
3212
3287
|
node = node.parent;
|
|
3213
3288
|
}
|
|
3214
|
-
if (!node.parent || !
|
|
3289
|
+
if (!node.parent || !ts22.isCallExpression(node)) {
|
|
3215
3290
|
return null;
|
|
3216
3291
|
}
|
|
3217
3292
|
const identifiedInitializer = tryParseInitializerApi(APIS_TO_CHECK, node, this.reflector, this.importedSymbolsTracker);
|
|
@@ -3219,12 +3294,12 @@ var InitializerApiUsageRule = class {
|
|
|
3219
3294
|
return null;
|
|
3220
3295
|
}
|
|
3221
3296
|
const functionName = identifiedInitializer.api.functionName + (identifiedInitializer.isRequired ? ".required" : "");
|
|
3222
|
-
if (
|
|
3297
|
+
if (ts22.isPropertyDeclaration(node.parent) && node.parent.initializer === node) {
|
|
3223
3298
|
let closestClass = node.parent;
|
|
3224
|
-
while (closestClass && !
|
|
3299
|
+
while (closestClass && !ts22.isClassDeclaration(closestClass)) {
|
|
3225
3300
|
closestClass = closestClass.parent;
|
|
3226
3301
|
}
|
|
3227
|
-
if (closestClass &&
|
|
3302
|
+
if (closestClass && ts22.isClassDeclaration(closestClass)) {
|
|
3228
3303
|
const decorators = this.reflector.getDecoratorsOfDeclaration(closestClass);
|
|
3229
3304
|
const isComponentOrDirective = decorators !== null && decorators.some((decorator) => {
|
|
3230
3305
|
var _a;
|
|
@@ -3237,10 +3312,90 @@ var InitializerApiUsageRule = class {
|
|
|
3237
3312
|
}
|
|
3238
3313
|
};
|
|
3239
3314
|
|
|
3315
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/rules/unused_standalone_imports_rule.mjs
|
|
3316
|
+
import ts23 from "typescript";
|
|
3317
|
+
var UnusedStandaloneImportsRule = class {
|
|
3318
|
+
constructor(templateTypeChecker, typeCheckingConfig, importedSymbolsTracker) {
|
|
3319
|
+
this.templateTypeChecker = templateTypeChecker;
|
|
3320
|
+
this.typeCheckingConfig = typeCheckingConfig;
|
|
3321
|
+
this.importedSymbolsTracker = importedSymbolsTracker;
|
|
3322
|
+
}
|
|
3323
|
+
shouldCheck(sourceFile) {
|
|
3324
|
+
return this.typeCheckingConfig.unusedStandaloneImports !== "suppress" && (this.importedSymbolsTracker.hasNamedImport(sourceFile, "Component", "@angular/core") || this.importedSymbolsTracker.hasNamespaceImport(sourceFile, "@angular/core"));
|
|
3325
|
+
}
|
|
3326
|
+
checkNode(node) {
|
|
3327
|
+
if (!ts23.isClassDeclaration(node)) {
|
|
3328
|
+
return null;
|
|
3329
|
+
}
|
|
3330
|
+
const metadata = this.templateTypeChecker.getDirectiveMetadata(node);
|
|
3331
|
+
if (!metadata || !metadata.isStandalone || metadata.rawImports === null || metadata.imports === null || metadata.imports.length === 0) {
|
|
3332
|
+
return null;
|
|
3333
|
+
}
|
|
3334
|
+
const usedDirectives = this.templateTypeChecker.getUsedDirectives(node);
|
|
3335
|
+
const usedPipes = this.templateTypeChecker.getUsedPipes(node);
|
|
3336
|
+
if (!usedDirectives || !usedPipes) {
|
|
3337
|
+
return null;
|
|
3338
|
+
}
|
|
3339
|
+
const unused = this.getUnusedSymbols(metadata, new Set(usedDirectives.map((dir) => dir.ref.node)), new Set(usedPipes));
|
|
3340
|
+
if (unused === null) {
|
|
3341
|
+
return null;
|
|
3342
|
+
}
|
|
3343
|
+
const category = this.typeCheckingConfig.unusedStandaloneImports === "error" ? ts23.DiagnosticCategory.Error : ts23.DiagnosticCategory.Warning;
|
|
3344
|
+
if (unused.length === metadata.imports.length) {
|
|
3345
|
+
return makeDiagnostic(ErrorCode.UNUSED_STANDALONE_IMPORTS, metadata.rawImports, "All imports are unused", void 0, category);
|
|
3346
|
+
}
|
|
3347
|
+
return makeDiagnostic(ErrorCode.UNUSED_STANDALONE_IMPORTS, metadata.rawImports, "Imports array contains unused imports", unused.map(([ref, type, name]) => makeRelatedInformation(ref.getOriginForDiagnostics(metadata.rawImports), `${type} "${name}" is not used within the template`)), category);
|
|
3348
|
+
}
|
|
3349
|
+
getUnusedSymbols(metadata, usedDirectives, usedPipes) {
|
|
3350
|
+
const { imports, rawImports } = metadata;
|
|
3351
|
+
if (imports === null || rawImports === null) {
|
|
3352
|
+
return null;
|
|
3353
|
+
}
|
|
3354
|
+
let unused = null;
|
|
3355
|
+
for (const current of imports) {
|
|
3356
|
+
const currentNode = current.node;
|
|
3357
|
+
const dirMeta = this.templateTypeChecker.getDirectiveMetadata(currentNode);
|
|
3358
|
+
if (dirMeta !== null) {
|
|
3359
|
+
if (dirMeta.isStandalone && !usedDirectives.has(currentNode) && !this.isPotentialSharedReference(current, rawImports)) {
|
|
3360
|
+
unused != null ? unused : unused = [];
|
|
3361
|
+
unused.push([current, dirMeta.isComponent ? "Component" : "Directive", dirMeta.name]);
|
|
3362
|
+
}
|
|
3363
|
+
continue;
|
|
3364
|
+
}
|
|
3365
|
+
const pipeMeta = this.templateTypeChecker.getPipeMetadata(currentNode);
|
|
3366
|
+
if (pipeMeta !== null && pipeMeta.isStandalone && !usedPipes.has(pipeMeta.name) && !this.isPotentialSharedReference(current, rawImports)) {
|
|
3367
|
+
unused != null ? unused : unused = [];
|
|
3368
|
+
unused.push([current, "Pipe", pipeMeta.ref.node.name.text]);
|
|
3369
|
+
}
|
|
3370
|
+
}
|
|
3371
|
+
return unused;
|
|
3372
|
+
}
|
|
3373
|
+
isPotentialSharedReference(reference, rawImports) {
|
|
3374
|
+
var _a;
|
|
3375
|
+
if (reference.getIdentityInExpression(rawImports) !== null) {
|
|
3376
|
+
return false;
|
|
3377
|
+
}
|
|
3378
|
+
let current = reference.getIdentityIn(rawImports.getSourceFile());
|
|
3379
|
+
while (current !== null) {
|
|
3380
|
+
if (ts23.isVariableStatement(current)) {
|
|
3381
|
+
return !!((_a = current.modifiers) == null ? void 0 : _a.some((m) => m.kind === ts23.SyntaxKind.ExportKeyword));
|
|
3382
|
+
}
|
|
3383
|
+
current = current.parent;
|
|
3384
|
+
}
|
|
3385
|
+
return true;
|
|
3386
|
+
}
|
|
3387
|
+
};
|
|
3388
|
+
|
|
3389
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/config.mjs
|
|
3390
|
+
var UNUSED_STANDALONE_IMPORTS_RULE_ENABLED = true;
|
|
3391
|
+
|
|
3240
3392
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/source_file_validator.mjs
|
|
3241
3393
|
var SourceFileValidator = class {
|
|
3242
|
-
constructor(reflector, importedSymbolsTracker) {
|
|
3394
|
+
constructor(reflector, importedSymbolsTracker, templateTypeChecker, typeCheckingConfig) {
|
|
3243
3395
|
this.rules = [new InitializerApiUsageRule(reflector, importedSymbolsTracker)];
|
|
3396
|
+
if (UNUSED_STANDALONE_IMPORTS_RULE_ENABLED) {
|
|
3397
|
+
this.rules.push(new UnusedStandaloneImportsRule(templateTypeChecker, typeCheckingConfig, importedSymbolsTracker));
|
|
3398
|
+
}
|
|
3244
3399
|
}
|
|
3245
3400
|
getDiagnosticsForFile(sourceFile) {
|
|
3246
3401
|
if (sourceFile.isDeclarationFile || sourceFile.fileName.endsWith(".ngtypecheck.ts")) {
|
|
@@ -3393,11 +3548,12 @@ var NgCompiler = class {
|
|
|
3393
3548
|
this.enableBlockSyntax = (_a = options["_enableBlockSyntax"]) != null ? _a : true;
|
|
3394
3549
|
this.enableLetSyntax = (_b = options["_enableLetSyntax"]) != null ? _b : true;
|
|
3395
3550
|
this.angularCoreVersion = (_c = options["_angularCoreVersion"]) != null ? _c : null;
|
|
3551
|
+
this.enableHmr = !!options["_enableHmr"];
|
|
3396
3552
|
this.constructionDiagnostics.push(...this.adapter.constructionDiagnostics, ...verifyCompatibleTypeCheckOptions(this.options));
|
|
3397
3553
|
this.currentProgram = inputProgram;
|
|
3398
3554
|
this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
|
|
3399
3555
|
this.entryPoint = adapter.entryPoint !== null ? getSourceFileOrNull(inputProgram, adapter.entryPoint) : null;
|
|
3400
|
-
const moduleResolutionCache =
|
|
3556
|
+
const moduleResolutionCache = ts24.createModuleResolutionCache(
|
|
3401
3557
|
this.adapter.getCurrentDirectory(),
|
|
3402
3558
|
this.adapter.getCanonicalFileName.bind(this.adapter)
|
|
3403
3559
|
);
|
|
@@ -3441,7 +3597,7 @@ var NgCompiler = class {
|
|
|
3441
3597
|
}
|
|
3442
3598
|
for (const clazz of classesToUpdate) {
|
|
3443
3599
|
this.compilation.traitCompiler.updateResources(clazz);
|
|
3444
|
-
if (!
|
|
3600
|
+
if (!ts24.isClassDeclaration(clazz)) {
|
|
3445
3601
|
continue;
|
|
3446
3602
|
}
|
|
3447
3603
|
this.compilation.templateTypeChecker.invalidateClass(clazz);
|
|
@@ -3595,12 +3751,12 @@ var NgCompiler = class {
|
|
|
3595
3751
|
if (compilation.supportJitMode && compilation.jitDeclarationRegistry.jitDeclarations.size > 0) {
|
|
3596
3752
|
const { jitDeclarations } = compilation.jitDeclarationRegistry;
|
|
3597
3753
|
const jitDeclarationsArray = Array.from(jitDeclarations);
|
|
3598
|
-
const jitDeclarationOriginalNodes = new Set(jitDeclarationsArray.map((d) =>
|
|
3754
|
+
const jitDeclarationOriginalNodes = new Set(jitDeclarationsArray.map((d) => ts24.getOriginalNode(d)));
|
|
3599
3755
|
const sourceFilesWithJit = new Set(jitDeclarationsArray.map((d) => d.getSourceFile().fileName));
|
|
3600
3756
|
before.push((ctx) => {
|
|
3601
3757
|
const reflectionHost = new TypeScriptReflectionHost(this.inputProgram.getTypeChecker());
|
|
3602
3758
|
const jitTransform = angularJitApplicationTransform(this.inputProgram, compilation.isCore, (node) => {
|
|
3603
|
-
node =
|
|
3759
|
+
node = ts24.getOriginalNode(node, ts24.isClassDeclaration);
|
|
3604
3760
|
return reflectionHost.isClass(node) && jitDeclarationOriginalNodes.has(node);
|
|
3605
3761
|
})(ctx);
|
|
3606
3762
|
return (sourceFile) => {
|
|
@@ -3626,7 +3782,7 @@ var NgCompiler = class {
|
|
|
3626
3782
|
compilation.traitCompiler.index(context);
|
|
3627
3783
|
return generateAnalysis(context);
|
|
3628
3784
|
}
|
|
3629
|
-
getApiDocumentation(entryPoint) {
|
|
3785
|
+
getApiDocumentation(entryPoint, privateModules) {
|
|
3630
3786
|
const compilation = this.ensureAnalyzed();
|
|
3631
3787
|
const checker = this.inputProgram.getTypeChecker();
|
|
3632
3788
|
const docsExtractor = new DocsExtractor(checker, compilation.metaReader);
|
|
@@ -3637,12 +3793,30 @@ var NgCompiler = class {
|
|
|
3637
3793
|
throw new Error(`Entry point "${entryPoint}" not found in program sources.`);
|
|
3638
3794
|
}
|
|
3639
3795
|
const rootDir = this.inputProgram.getCurrentDirectory();
|
|
3640
|
-
return docsExtractor.extractAll(entryPointSourceFile, rootDir);
|
|
3796
|
+
return docsExtractor.extractAll(entryPointSourceFile, rootDir, privateModules);
|
|
3641
3797
|
}
|
|
3642
3798
|
xi18n(ctx) {
|
|
3643
3799
|
const compilation = this.ensureAnalyzed();
|
|
3644
3800
|
compilation.traitCompiler.xi18n(ctx);
|
|
3645
3801
|
}
|
|
3802
|
+
emitHmrUpdateModule(node) {
|
|
3803
|
+
const { traitCompiler, reflector } = this.ensureAnalyzed();
|
|
3804
|
+
if (!reflector.isClass(node)) {
|
|
3805
|
+
return null;
|
|
3806
|
+
}
|
|
3807
|
+
const callback = traitCompiler.compileHmrUpdateCallback(node);
|
|
3808
|
+
if (callback === null) {
|
|
3809
|
+
return null;
|
|
3810
|
+
}
|
|
3811
|
+
const sourceFile = node.getSourceFile();
|
|
3812
|
+
const printer = ts24.createPrinter();
|
|
3813
|
+
const nodeText = printer.printNode(ts24.EmitHint.Unspecified, callback, sourceFile);
|
|
3814
|
+
return ts24.transpileModule(nodeText, {
|
|
3815
|
+
compilerOptions: this.options,
|
|
3816
|
+
fileName: sourceFile.fileName,
|
|
3817
|
+
reportDiagnostics: false
|
|
3818
|
+
}).outputText;
|
|
3819
|
+
}
|
|
3646
3820
|
ensureAnalyzed() {
|
|
3647
3821
|
if (this.compilation === null) {
|
|
3648
3822
|
this.analyzeSync();
|
|
@@ -3674,7 +3848,7 @@ var NgCompiler = class {
|
|
|
3674
3848
|
return strictTemplates || !!this.options.fullTemplateTypeCheck;
|
|
3675
3849
|
}
|
|
3676
3850
|
getTypeCheckingConfig() {
|
|
3677
|
-
var _a, _b, _c, _d, _e;
|
|
3851
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
3678
3852
|
const strictTemplates = !!this.options.strictTemplates;
|
|
3679
3853
|
const useInlineTypeConstructors = this.programDriver.supportsInlineOperations;
|
|
3680
3854
|
let allowSignalsInTwoWayBindings = (_a = coreHasSymbol(this.inputProgram, R3Identifiers.unwrapWritableSignal)) != null ? _a : this.angularCoreVersion === null || coreVersionSupportsFeature(this.angularCoreVersion, ">= 17.2.0-0");
|
|
@@ -3704,6 +3878,7 @@ var NgCompiler = class {
|
|
|
3704
3878
|
useInlineTypeConstructors,
|
|
3705
3879
|
suggestionsForSuboptimalTypeInference: this.enableTemplateTypeChecker && !strictTemplates,
|
|
3706
3880
|
controlFlowPreventingContentProjection: ((_b = this.options.extendedDiagnostics) == null ? void 0 : _b.defaultCategory) || DiagnosticCategoryLabel.Warning,
|
|
3881
|
+
unusedStandaloneImports: ((_c = this.options.extendedDiagnostics) == null ? void 0 : _c.defaultCategory) || DiagnosticCategoryLabel.Warning,
|
|
3707
3882
|
allowSignalsInTwoWayBindings
|
|
3708
3883
|
};
|
|
3709
3884
|
} else {
|
|
@@ -3730,7 +3905,8 @@ var NgCompiler = class {
|
|
|
3730
3905
|
enableTemplateTypeChecker: this.enableTemplateTypeChecker,
|
|
3731
3906
|
useInlineTypeConstructors,
|
|
3732
3907
|
suggestionsForSuboptimalTypeInference: false,
|
|
3733
|
-
controlFlowPreventingContentProjection: ((
|
|
3908
|
+
controlFlowPreventingContentProjection: ((_d = this.options.extendedDiagnostics) == null ? void 0 : _d.defaultCategory) || DiagnosticCategoryLabel.Warning,
|
|
3909
|
+
unusedStandaloneImports: ((_e = this.options.extendedDiagnostics) == null ? void 0 : _e.defaultCategory) || DiagnosticCategoryLabel.Warning,
|
|
3734
3910
|
allowSignalsInTwoWayBindings
|
|
3735
3911
|
};
|
|
3736
3912
|
}
|
|
@@ -3766,9 +3942,12 @@ var NgCompiler = class {
|
|
|
3766
3942
|
if (this.options.strictLiteralTypes !== void 0) {
|
|
3767
3943
|
typeCheckingConfig.strictLiteralTypes = this.options.strictLiteralTypes;
|
|
3768
3944
|
}
|
|
3769
|
-
if (((
|
|
3945
|
+
if (((_g = (_f = this.options.extendedDiagnostics) == null ? void 0 : _f.checks) == null ? void 0 : _g.controlFlowPreventingContentProjection) !== void 0) {
|
|
3770
3946
|
typeCheckingConfig.controlFlowPreventingContentProjection = this.options.extendedDiagnostics.checks.controlFlowPreventingContentProjection;
|
|
3771
3947
|
}
|
|
3948
|
+
if (((_i = (_h = this.options.extendedDiagnostics) == null ? void 0 : _h.checks) == null ? void 0 : _i.unusedStandaloneImports) !== void 0) {
|
|
3949
|
+
typeCheckingConfig.unusedStandaloneImports = this.options.extendedDiagnostics.checks.unusedStandaloneImports;
|
|
3950
|
+
}
|
|
3772
3951
|
return typeCheckingConfig;
|
|
3773
3952
|
}
|
|
3774
3953
|
getTemplateDiagnostics() {
|
|
@@ -3834,7 +4013,7 @@ var NgCompiler = class {
|
|
|
3834
4013
|
return diagnostics;
|
|
3835
4014
|
}
|
|
3836
4015
|
makeCompilation() {
|
|
3837
|
-
var _a, _b, _c, _d;
|
|
4016
|
+
var _a, _b, _c, _d, _e, _f;
|
|
3838
4017
|
const isCore = isAngularCorePackage(this.inputProgram);
|
|
3839
4018
|
let compilationMode = CompilationMode.FULL;
|
|
3840
4019
|
if (!isCore) {
|
|
@@ -3918,6 +4097,7 @@ var NgCompiler = class {
|
|
|
3918
4097
|
const strictCtorDeps = this.options.strictInjectionParameters || false;
|
|
3919
4098
|
const supportJitMode = (_b = this.options["supportJitMode"]) != null ? _b : true;
|
|
3920
4099
|
const supportTestBed = (_c = this.options["supportTestBed"]) != null ? _c : true;
|
|
4100
|
+
const externalRuntimeStyles = (_d = this.options["externalRuntimeStyles"]) != null ? _d : false;
|
|
3921
4101
|
if (supportTestBed === false && compilationMode === CompilationMode.PARTIAL) {
|
|
3922
4102
|
throw new Error('TestBed support ("supportTestBed" option) cannot be disabled in partial compilation mode.');
|
|
3923
4103
|
}
|
|
@@ -3929,21 +4109,22 @@ var NgCompiler = class {
|
|
|
3929
4109
|
}
|
|
3930
4110
|
const jitDeclarationRegistry = new JitDeclarationRegistry();
|
|
3931
4111
|
const handlers = [
|
|
3932
|
-
new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader,
|
|
3933
|
-
new DirectiveDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, importTracker, supportTestBed, compilationMode, jitDeclarationRegistry),
|
|
3934
|
-
new PipeDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, injectableRegistry, isCore, this.delegatingPerfRecorder, supportTestBed, compilationMode, !!this.options.generateExtraImportsInLocalMode),
|
|
4112
|
+
new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader, this.adapter, ngModuleScopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, this.resourceManager, this.adapter.rootDirs, this.options.preserveWhitespaces || false, this.options.i18nUseExternalIds !== false, this.options.enableI18nLegacyMessageIdFormat !== false, this.usePoisonedData, this.options.i18nNormalizeLineEndingsInICUs === true, this.moduleResolver, this.cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, this.incrementalCompilation.depGraph, injectableRegistry, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, hostDirectivesResolver, importTracker, supportTestBed, compilationMode, deferredSymbolsTracker, !!this.options.forbidOrphanComponents, this.enableBlockSyntax, this.enableLetSyntax, externalRuntimeStyles, localCompilationExtraImportsTracker, jitDeclarationRegistry, (_e = this.options.i18nPreserveWhitespaceForLegacyExtraction) != null ? _e : true, !!this.options.strictStandalone, this.enableHmr),
|
|
4113
|
+
new DirectiveDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, importTracker, supportTestBed, compilationMode, jitDeclarationRegistry, !!this.options.strictStandalone),
|
|
4114
|
+
new PipeDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, injectableRegistry, isCore, this.delegatingPerfRecorder, supportTestBed, compilationMode, !!this.options.generateExtraImportsInLocalMode, !!this.options.strictStandalone),
|
|
3935
4115
|
new InjectableDecoratorHandler(reflector, evaluator, isCore, strictCtorDeps, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, compilationMode),
|
|
3936
|
-
new NgModuleDecoratorHandler(reflector, evaluator, metaReader, metaRegistry, ngModuleScopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, this.closureCompilerEnabled, (
|
|
4116
|
+
new NgModuleDecoratorHandler(reflector, evaluator, metaReader, metaRegistry, ngModuleScopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, this.closureCompilerEnabled, (_f = this.options.onlyPublishPublicTypingsForNgModules) != null ? _f : false, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, supportJitMode, compilationMode, localCompilationExtraImportsTracker, jitDeclarationRegistry)
|
|
3937
4117
|
];
|
|
3938
4118
|
const traitCompiler = new TraitCompiler(handlers, reflector, this.delegatingPerfRecorder, this.incrementalCompilation, this.options.compileNonExportedClasses !== false, compilationMode, dtsTransforms, semanticDepGraphUpdater, this.adapter);
|
|
3939
4119
|
const notifyingDriver = new NotifyingProgramDriverWrapper(this.programDriver, (program) => {
|
|
3940
4120
|
this.incrementalStrategy.setIncrementalState(this.incrementalCompilation.state, program);
|
|
3941
4121
|
this.currentProgram = program;
|
|
3942
4122
|
});
|
|
3943
|
-
const
|
|
4123
|
+
const typeCheckingConfig = this.getTypeCheckingConfig();
|
|
4124
|
+
const templateTypeChecker = new TemplateTypeCheckerImpl(this.inputProgram, notifyingDriver, traitCompiler, typeCheckingConfig, refEmitter, reflector, this.adapter, this.incrementalCompilation, metaReader, localMetaReader, ngModuleIndex, scopeReader, typeCheckScopeRegistry, this.delegatingPerfRecorder);
|
|
3944
4125
|
const extendedTemplateChecker = this.constructionDiagnostics.length === 0 ? new ExtendedTemplateCheckerImpl(templateTypeChecker, checker, ALL_DIAGNOSTIC_FACTORIES, this.options) : null;
|
|
3945
4126
|
const templateSemanticsChecker = this.constructionDiagnostics.length === 0 ? new TemplateSemanticsCheckerImpl(templateTypeChecker) : null;
|
|
3946
|
-
const sourceFileValidator = this.constructionDiagnostics.length === 0 ? new SourceFileValidator(reflector, importTracker) : null;
|
|
4127
|
+
const sourceFileValidator = this.constructionDiagnostics.length === 0 ? new SourceFileValidator(reflector, importTracker, templateTypeChecker, typeCheckingConfig) : null;
|
|
3947
4128
|
return {
|
|
3948
4129
|
isCore,
|
|
3949
4130
|
traitCompiler,
|
|
@@ -3972,18 +4153,18 @@ function isAngularCorePackage(program) {
|
|
|
3972
4153
|
return false;
|
|
3973
4154
|
}
|
|
3974
4155
|
return r3Symbols.statements.some((stmt) => {
|
|
3975
|
-
if (!
|
|
4156
|
+
if (!ts24.isVariableStatement(stmt)) {
|
|
3976
4157
|
return false;
|
|
3977
4158
|
}
|
|
3978
|
-
const modifiers =
|
|
3979
|
-
if (modifiers === void 0 || !modifiers.some((mod) => mod.kind ===
|
|
4159
|
+
const modifiers = ts24.getModifiers(stmt);
|
|
4160
|
+
if (modifiers === void 0 || !modifiers.some((mod) => mod.kind === ts24.SyntaxKind.ExportKeyword)) {
|
|
3980
4161
|
return false;
|
|
3981
4162
|
}
|
|
3982
4163
|
return stmt.declarationList.declarations.some((decl) => {
|
|
3983
|
-
if (!
|
|
4164
|
+
if (!ts24.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
|
|
3984
4165
|
return false;
|
|
3985
4166
|
}
|
|
3986
|
-
if (decl.initializer === void 0 || decl.initializer.kind !==
|
|
4167
|
+
if (decl.initializer === void 0 || decl.initializer.kind !== ts24.SyntaxKind.TrueKeyword) {
|
|
3987
4168
|
return false;
|
|
3988
4169
|
}
|
|
3989
4170
|
return true;
|
|
@@ -3997,7 +4178,7 @@ function* verifyCompatibleTypeCheckOptions(options) {
|
|
|
3997
4178
|
var _a, _b, _c;
|
|
3998
4179
|
if (options.fullTemplateTypeCheck === false && options.strictTemplates === true) {
|
|
3999
4180
|
yield makeConfigDiagnostic({
|
|
4000
|
-
category:
|
|
4181
|
+
category: ts24.DiagnosticCategory.Error,
|
|
4001
4182
|
code: ErrorCode.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK,
|
|
4002
4183
|
messageText: `
|
|
4003
4184
|
Angular compiler option "strictTemplates" is enabled, however "fullTemplateTypeCheck" is disabled.
|
|
@@ -4016,7 +4197,7 @@ https://angular.dev/tools/cli/template-typecheck
|
|
|
4016
4197
|
}
|
|
4017
4198
|
if (options.extendedDiagnostics && options.strictTemplates === false) {
|
|
4018
4199
|
yield makeConfigDiagnostic({
|
|
4019
|
-
category:
|
|
4200
|
+
category: ts24.DiagnosticCategory.Error,
|
|
4020
4201
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES,
|
|
4021
4202
|
messageText: `
|
|
4022
4203
|
Angular compiler option "extendedDiagnostics" is configured, however "strictTemplates" is disabled.
|
|
@@ -4033,7 +4214,7 @@ One of the following actions is required:
|
|
|
4033
4214
|
const defaultCategory = (_a = options.extendedDiagnostics) == null ? void 0 : _a.defaultCategory;
|
|
4034
4215
|
if (defaultCategory && !allowedCategoryLabels.includes(defaultCategory)) {
|
|
4035
4216
|
yield makeConfigDiagnostic({
|
|
4036
|
-
category:
|
|
4217
|
+
category: ts24.DiagnosticCategory.Error,
|
|
4037
4218
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
|
|
4038
4219
|
messageText: `
|
|
4039
4220
|
Angular compiler option "extendedDiagnostics.defaultCategory" has an unknown diagnostic category: "${defaultCategory}".
|
|
@@ -4046,7 +4227,7 @@ ${allowedCategoryLabels.join("\n")}
|
|
|
4046
4227
|
for (const [checkName, category] of Object.entries((_c = (_b = options.extendedDiagnostics) == null ? void 0 : _b.checks) != null ? _c : {})) {
|
|
4047
4228
|
if (!SUPPORTED_DIAGNOSTIC_NAMES.has(checkName)) {
|
|
4048
4229
|
yield makeConfigDiagnostic({
|
|
4049
|
-
category:
|
|
4230
|
+
category: ts24.DiagnosticCategory.Error,
|
|
4050
4231
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK,
|
|
4051
4232
|
messageText: `
|
|
4052
4233
|
Angular compiler option "extendedDiagnostics.checks" has an unknown check: "${checkName}".
|
|
@@ -4058,7 +4239,7 @@ ${Array.from(SUPPORTED_DIAGNOSTIC_NAMES).join("\n")}
|
|
|
4058
4239
|
}
|
|
4059
4240
|
if (!allowedCategoryLabels.includes(category)) {
|
|
4060
4241
|
yield makeConfigDiagnostic({
|
|
4061
|
-
category:
|
|
4242
|
+
category: ts24.DiagnosticCategory.Error,
|
|
4062
4243
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
|
|
4063
4244
|
messageText: `
|
|
4064
4245
|
Angular compiler option "extendedDiagnostics.checks['${checkName}']" has an unknown diagnostic category: "${category}".
|
|
@@ -4088,7 +4269,7 @@ var ReferenceGraphAdapter = class {
|
|
|
4088
4269
|
for (const { node } of references) {
|
|
4089
4270
|
let sourceFile = node.getSourceFile();
|
|
4090
4271
|
if (sourceFile === void 0) {
|
|
4091
|
-
sourceFile =
|
|
4272
|
+
sourceFile = ts24.getOriginalNode(node).getSourceFile();
|
|
4092
4273
|
}
|
|
4093
4274
|
if (sourceFile === void 0 || !isDtsPath(sourceFile.fileName)) {
|
|
4094
4275
|
this.graph.add(source, node);
|
|
@@ -4127,7 +4308,7 @@ function versionMapFromProgram(program, driver) {
|
|
|
4127
4308
|
}
|
|
4128
4309
|
|
|
4129
4310
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
|
|
4130
|
-
import
|
|
4311
|
+
import ts25 from "typescript";
|
|
4131
4312
|
var DelegatingCompilerHost = class {
|
|
4132
4313
|
get jsDocParsingMode() {
|
|
4133
4314
|
return this.delegate.jsDocParsingMode;
|
|
@@ -4212,7 +4393,7 @@ var NgCompilerHost = class extends DelegatingCompilerHost {
|
|
|
4212
4393
|
entryPoint = findFlatIndexEntryPoint(normalizedTsInputFiles);
|
|
4213
4394
|
if (entryPoint === null) {
|
|
4214
4395
|
diagnostics.push({
|
|
4215
|
-
category:
|
|
4396
|
+
category: ts25.DiagnosticCategory.Error,
|
|
4216
4397
|
code: ngErrorCode(ErrorCode.CONFIG_FLAT_MODULE_NO_INDEX),
|
|
4217
4398
|
file: void 0,
|
|
4218
4399
|
start: void 0,
|
|
@@ -4255,10 +4436,10 @@ var NgCompilerHost = class extends DelegatingCompilerHost {
|
|
|
4255
4436
|
return this.fileNameToModuleName !== void 0 ? this : null;
|
|
4256
4437
|
}
|
|
4257
4438
|
createCachedResolveModuleNamesFunction() {
|
|
4258
|
-
const moduleResolutionCache =
|
|
4439
|
+
const moduleResolutionCache = ts25.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
|
|
4259
4440
|
return (moduleNames, containingFile, reusedNames, redirectedReference, options) => {
|
|
4260
4441
|
return moduleNames.map((moduleName) => {
|
|
4261
|
-
const module =
|
|
4442
|
+
const module = ts25.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
|
|
4262
4443
|
return module.resolvedModule;
|
|
4263
4444
|
});
|
|
4264
4445
|
};
|
|
@@ -4282,7 +4463,7 @@ var NgtscProgram = class {
|
|
|
4282
4463
|
if (reuseProgram !== void 0) {
|
|
4283
4464
|
retagAllTsFiles(reuseProgram);
|
|
4284
4465
|
}
|
|
4285
|
-
this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () =>
|
|
4466
|
+
this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts26.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
|
|
4286
4467
|
perfRecorder.phase(PerfPhase.Unaccounted);
|
|
4287
4468
|
perfRecorder.memory(PerfCheckpoint.TypeScriptProgramCreate);
|
|
4288
4469
|
this.host.postProgramCreationCleanup();
|
|
@@ -4395,7 +4576,7 @@ var NgtscProgram = class {
|
|
|
4395
4576
|
}
|
|
4396
4577
|
emitXi18n() {
|
|
4397
4578
|
var _a, _b, _c;
|
|
4398
|
-
const ctx = new MessageBundle(new HtmlParser(), [], {}, (_a = this.options.i18nOutLocale) != null ? _a : null);
|
|
4579
|
+
const ctx = new MessageBundle(new HtmlParser(), [], {}, (_a = this.options.i18nOutLocale) != null ? _a : null, this.options.i18nPreserveWhitespaceForLegacyExtraction);
|
|
4399
4580
|
this.compiler.xi18n(ctx);
|
|
4400
4581
|
i18nExtract((_b = this.options.i18nOutFormat) != null ? _b : null, (_c = this.options.i18nOutFile) != null ? _c : null, this.host, this.options, ctx, resolve);
|
|
4401
4582
|
}
|
|
@@ -4471,8 +4652,8 @@ var NgtscProgram = class {
|
|
|
4471
4652
|
getIndexedComponents() {
|
|
4472
4653
|
return this.compiler.getIndexedComponents();
|
|
4473
4654
|
}
|
|
4474
|
-
getApiDocumentation(entryPoint) {
|
|
4475
|
-
return this.compiler.getApiDocumentation(entryPoint);
|
|
4655
|
+
getApiDocumentation(entryPoint, privateModules) {
|
|
4656
|
+
return this.compiler.getApiDocumentation(entryPoint, privateModules);
|
|
4476
4657
|
}
|
|
4477
4658
|
getEmittedSourceFiles() {
|
|
4478
4659
|
throw new Error("Method not implemented.");
|
|
@@ -4497,16 +4678,16 @@ function createProgram({ rootNames, options, host, oldProgram }) {
|
|
|
4497
4678
|
}
|
|
4498
4679
|
|
|
4499
4680
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
|
|
4500
|
-
import
|
|
4681
|
+
import ts28 from "typescript";
|
|
4501
4682
|
|
|
4502
4683
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
|
|
4503
|
-
import
|
|
4684
|
+
import ts27 from "typescript";
|
|
4504
4685
|
function createMessageDiagnostic(messageText) {
|
|
4505
4686
|
return {
|
|
4506
4687
|
file: void 0,
|
|
4507
4688
|
start: void 0,
|
|
4508
4689
|
length: void 0,
|
|
4509
|
-
category:
|
|
4690
|
+
category: ts27.DiagnosticCategory.Message,
|
|
4510
4691
|
messageText,
|
|
4511
4692
|
code: DEFAULT_ERROR_CODE,
|
|
4512
4693
|
source: SOURCE
|
|
@@ -4515,13 +4696,13 @@ function createMessageDiagnostic(messageText) {
|
|
|
4515
4696
|
|
|
4516
4697
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
|
|
4517
4698
|
var defaultFormatHost = {
|
|
4518
|
-
getCurrentDirectory: () =>
|
|
4699
|
+
getCurrentDirectory: () => ts28.sys.getCurrentDirectory(),
|
|
4519
4700
|
getCanonicalFileName: (fileName) => fileName,
|
|
4520
|
-
getNewLine: () =>
|
|
4701
|
+
getNewLine: () => ts28.sys.newLine
|
|
4521
4702
|
};
|
|
4522
4703
|
function formatDiagnostics(diags, host = defaultFormatHost) {
|
|
4523
4704
|
if (diags && diags.length) {
|
|
4524
|
-
return diags.map((diagnostic) => replaceTsWithNgInErrors(
|
|
4705
|
+
return diags.map((diagnostic) => replaceTsWithNgInErrors(ts28.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
|
|
4525
4706
|
} else {
|
|
4526
4707
|
return "";
|
|
4527
4708
|
}
|
|
@@ -4538,7 +4719,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4538
4719
|
var _a;
|
|
4539
4720
|
try {
|
|
4540
4721
|
const fs = getFileSystem();
|
|
4541
|
-
const readConfigFile = (configFile) =>
|
|
4722
|
+
const readConfigFile = (configFile) => ts28.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
|
|
4542
4723
|
const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
|
|
4543
4724
|
const { config: config2, error: error2 } = readConfigFile(configFile);
|
|
4544
4725
|
if (error2) {
|
|
@@ -4573,7 +4754,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4573
4754
|
...existingOptions
|
|
4574
4755
|
};
|
|
4575
4756
|
const parseConfigHost = createParseConfigHost(host, fs);
|
|
4576
|
-
const { options, errors, fileNames: rootNames, projectReferences } =
|
|
4757
|
+
const { options, errors, fileNames: rootNames, projectReferences } = ts28.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
|
|
4577
4758
|
let emitFlags = EmitFlags.Default;
|
|
4578
4759
|
if (!(options["skipMetadataEmit"] || options["flatModuleOutFile"])) {
|
|
4579
4760
|
emitFlags |= EmitFlags.Metadata;
|
|
@@ -4585,7 +4766,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4585
4766
|
} catch (e) {
|
|
4586
4767
|
const errors = [
|
|
4587
4768
|
{
|
|
4588
|
-
category:
|
|
4769
|
+
category: ts28.DiagnosticCategory.Error,
|
|
4589
4770
|
messageText: (_a = e.stack) != null ? _a : e.message,
|
|
4590
4771
|
file: void 0,
|
|
4591
4772
|
start: void 0,
|
|
@@ -4600,7 +4781,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4600
4781
|
function createParseConfigHost(host, fs = getFileSystem()) {
|
|
4601
4782
|
return {
|
|
4602
4783
|
fileExists: host.exists.bind(host),
|
|
4603
|
-
readDirectory:
|
|
4784
|
+
readDirectory: createFileSystemTsReadDirectoryFn(fs),
|
|
4604
4785
|
readFile: host.readFile.bind(host),
|
|
4605
4786
|
useCaseSensitiveFileNames: fs.isCaseSensitive()
|
|
4606
4787
|
};
|
|
@@ -4620,7 +4801,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
|
|
|
4620
4801
|
}
|
|
4621
4802
|
} else {
|
|
4622
4803
|
const parseConfigHost = createParseConfigHost(host, fs);
|
|
4623
|
-
const { resolvedModule } =
|
|
4804
|
+
const { resolvedModule } = ts28.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts28.ModuleResolutionKind.Node10, resolveJsonModule: true }, parseConfigHost);
|
|
4624
4805
|
if (resolvedModule) {
|
|
4625
4806
|
return absoluteFrom(resolvedModule.resolvedFileName);
|
|
4626
4807
|
}
|
|
@@ -4630,7 +4811,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
|
|
|
4630
4811
|
function exitCodeFromResult(diags) {
|
|
4631
4812
|
if (!diags)
|
|
4632
4813
|
return 0;
|
|
4633
|
-
if (diags.every((diag) => diag.category !==
|
|
4814
|
+
if (diags.every((diag) => diag.category !== ts28.DiagnosticCategory.Error)) {
|
|
4634
4815
|
return 0;
|
|
4635
4816
|
}
|
|
4636
4817
|
return diags.some((d) => d.source === "angular" && d.code === UNKNOWN_ERROR_CODE) ? 2 : 1;
|
|
@@ -4669,7 +4850,7 @@ function performCompilation({ rootNames, options, host, oldProgram, emitCallback
|
|
|
4669
4850
|
} catch (e) {
|
|
4670
4851
|
program = void 0;
|
|
4671
4852
|
allDiagnostics.push({
|
|
4672
|
-
category:
|
|
4853
|
+
category: ts28.DiagnosticCategory.Error,
|
|
4673
4854
|
messageText: (_a = e.stack) != null ? _a : e.message,
|
|
4674
4855
|
code: UNKNOWN_ERROR_CODE,
|
|
4675
4856
|
file: void 0,
|
|
@@ -4699,7 +4880,7 @@ function defaultGatherDiagnostics(program) {
|
|
|
4699
4880
|
return allDiagnostics;
|
|
4700
4881
|
}
|
|
4701
4882
|
function hasErrors(diags) {
|
|
4702
|
-
return diags.some((d) => d.category ===
|
|
4883
|
+
return diags.some((d) => d.category === ts28.DiagnosticCategory.Error);
|
|
4703
4884
|
}
|
|
4704
4885
|
|
|
4705
4886
|
export {
|
|
@@ -4735,13 +4916,13 @@ export {
|
|
|
4735
4916
|
* Copyright Google LLC All Rights Reserved.
|
|
4736
4917
|
*
|
|
4737
4918
|
* Use of this source code is governed by an MIT-style license that can be
|
|
4738
|
-
* found in the LICENSE file at https://angular.
|
|
4919
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
4739
4920
|
*/
|
|
4740
4921
|
/**
|
|
4741
4922
|
* @license
|
|
4742
4923
|
* Copyright Google LLC All Rights Reserved.
|
|
4743
4924
|
*
|
|
4744
4925
|
* Use of this source code is governed by an MIT-style license that can be
|
|
4745
|
-
* found in the LICENSE file at https://angular.
|
|
4926
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
4746
4927
|
*/
|
|
4747
|
-
//# sourceMappingURL=chunk-
|
|
4928
|
+
//# sourceMappingURL=chunk-5AXLJZ3D.js.map
|