ttsc 0.33.0 → 0.34.0
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/README.md +2 -0
- package/cmd/ttsc/api_compile.go +3 -2
- package/cmd/ttsc/api_transform.go +1 -1
- package/cmd/ttsc/build.go +5 -4
- package/cmd/ttsc-cache/account.go +16 -0
- package/cmd/ttsc-cache/account_test.go +91 -0
- package/cmd/ttsc-cache/main.go +1 -1
- package/cmd/ttsc-cache/protocol_test.go +2 -2
- package/cmd/ttsc-cache/publisher_seal_test.go +1 -1
- package/cmd/ttsc-cache/stock_go_failure_test.go +1 -1
- package/cmd/ttsc-cache/stock_go_test.go +2 -2
- package/cmd/ttsc-cache/store.go +5 -0
- package/cmd/ttsc-cache/tuple.go +6 -2
- package/cmd/ttsc-cache/tuple_test.go +1 -1
- package/cmd/ttscgraph/main.go +6 -1
- package/cmd/ttscgraph/run_help_version_and_bad_flags_exit_codes_test.go +6 -1
- package/cmd/ttscgraph/serve.go +22 -20
- package/cmd/ttscgraph/serve_alternative_members_and_reads_refresh_test.go +95 -0
- package/cmd/ttscgraph/serve_shards.go +26 -15
- package/cmd/ttscgraph/serve_shards_abandoned_generation_converges_on_retry_test.go +2 -2
- package/cmd/ttscgraph/serve_shards_delete_removed_source_test.go +3 -3
- package/cmd/ttscgraph/serve_shards_prune_unreferenced_external_endpoints_test.go +1 -1
- package/cmd/ttscgraph/serve_shards_publish_created_source_test.go +3 -3
- package/cmd/ttscgraph/serve_shards_refresh_cross_file_implementation_test.go +2 -2
- package/cmd/ttscgraph/serve_shards_refresh_dependent_diagnostics_test.go +3 -3
- package/cmd/ttscgraph/serve_shards_rename_moves_source_identity_test.go +5 -5
- package/cmd/ttscgraph/serve_shards_reuse_unaffected_sources_test.go +8 -8
- package/cmd/ttscgraph/serve_source_encoding_test.go +2 -2
- package/driver/build_information_uses_selected_output_identity_test.go +5 -4
- package/driver/check_observations.go +1 -1
- package/driver/config_discovery.go +5 -1
- package/driver/declaration_shape.go +15 -21
- package/driver/diagnostics_preamble.go +2 -2
- package/driver/emit_containment.go +11 -14
- package/driver/emit_plugin.go +51 -43
- package/driver/emit_plugin_output.go +6 -5
- package/driver/emit_provenance.go +12 -15
- package/driver/graph.go +8 -8
- package/driver/host.go +15 -5
- package/driver/input_observation.go +22 -21
- package/driver/input_observation_test.go +11 -10
- package/driver/overlay.go +11 -11
- package/driver/program.go +102 -51
- package/driver/resolution_candidates.go +50 -32
- package/driver/resolution_candidates_test.go +18 -5
- package/driver/rewrite.go +11 -13
- package/driver/session.go +13 -7
- package/driver/target_ts70.go +85 -0
- package/driver/target_ts71.go +97 -0
- package/driver/transform_dependencies.go +1 -1
- package/driver/transform_source_map.go +21 -20
- package/go.mod +3 -3
- package/go.sum +4 -4
- package/internal/graph/alternative_member_declarations_resolve_uses_test.go +145 -0
- package/internal/graph/assigned_implementations_of_declaration_file_symbols_leave_no_edge_source_test.go +2 -2
- package/internal/graph/assigned_implementations_of_node_modules_symbols_leave_no_edge_source_test.go +2 -2
- package/internal/graph/build.go +75 -33
- package/internal/graph/build_files_reuses_committed_cross_file_endpoints_test.go +4 -4
- package/internal/graph/build_records_a_node_per_top_level_declaration_test.go +1 -1
- package/internal/graph/declaration_members.go +143 -0
- package/internal/graph/decorators_capture_name_and_literal_arguments_test.go +3 -3
- package/internal/graph/doc_tags.go +2 -2
- package/internal/graph/dump_paths.go +6 -5
- package/internal/graph/duplicate_variable_object_members_keep_first_declaration_test.go +1 -1
- package/internal/graph/edges.go +151 -68
- package/internal/graph/edges_cover_class_level_references_test.go +5 -5
- package/internal/graph/enum_initializer_calls_are_edges_test.go +2 -2
- package/internal/graph/enum_members_carry_their_names_on_the_enum_node_test.go +6 -6
- package/internal/graph/exports.go +6 -6
- package/internal/graph/file_diagnostics_match_tsgo_code_and_location_test.go +2 -2
- package/internal/graph/file_diagnostics_report_code_column_and_message_test.go +1 -1
- package/internal/graph/function_locals_do_not_collide_test.go +3 -3
- package/internal/graph/heritage_edges_cover_implements_and_interface_extends_test.go +5 -5
- package/internal/graph/heritage_edges_keep_extends_and_implements_to_same_base_test.go +2 -2
- package/internal/graph/heritage_edges_record_extends_versus_implements_origin_test.go +3 -3
- package/internal/graph/heritage_edges_traverse_barrels_and_stop_at_external_leaves_test.go +3 -3
- package/internal/graph/literals.go +3 -3
- package/internal/graph/literals_are_absent_when_the_type_admits_more_than_it_can_name_test.go +2 -2
- package/internal/graph/literals_cover_enum_members_the_graph_has_no_nodes_for_test.go +4 -4
- package/internal/graph/literals_do_not_depend_on_declaration_line_wrapping_test.go +2 -2
- package/internal/graph/literals_render_every_value_in_typescript_source_form_test.go +1 -1
- package/internal/graph/literals_resolve_through_alias_indirection_test.go +3 -3
- package/internal/graph/member_relation_edges_follow_checker_validity_test.go +7 -7
- package/internal/graph/member_relation_edges_preserve_checker_boundaries_test.go +19 -19
- package/internal/graph/member_relation_edges_reject_checker_invalid_pairs_test.go +11 -11
- package/internal/graph/namespace_dotted_form_qualifies_deeply_test.go +2 -2
- package/internal/graph/namespace_members_become_qualified_nodes_and_edges_test.go +7 -7
- package/internal/graph/namespace_private_declarations_keep_lexical_identity_test.go +85 -0
- package/internal/graph/nodes_are_marked_exported_through_the_export_table_test.go +2 -2
- package/internal/graph/object_literal_declarations_resolve_calls_test.go +9 -9
- package/internal/graph/object_literal_members_ride_on_the_snapshot_test.go +1 -1
- package/internal/graph/overload_implementation_replaces_signature_test.go +2 -2
- package/internal/graph/property_member_edges_remain_owner_visible_test.go +6 -6
- package/internal/graph/resolve.go +37 -12
- package/internal/graph/resolve_unwraps_barrel_reexport_to_real_declaration_test.go +6 -6
- package/internal/graph/source.go +1 -1
- package/internal/graph/type_ref_edges_cover_typeof_as_satisfies_test.go +7 -7
- package/internal/graph/type_ref_edges_resolve_named_types_across_files_test.go +2 -2
- package/internal/graph/value_access_edges_cover_properties_test.go +5 -5
- package/internal/graph/value_call_edges_attribute_function_assignments_to_members_test.go +3 -3
- package/internal/graph/value_call_edges_cover_jsx_components_test.go +2 -2
- package/internal/graph/value_call_edges_cover_methods_and_constructors_test.go +3 -3
- package/internal/graph/value_call_edges_cover_variable_bound_callables_test.go +2 -2
- package/internal/graph/value_call_edges_do_not_double_record_invoked_member_access_test.go +4 -4
- package/internal/graph/value_call_edges_record_construct_versus_call_origin_test.go +3 -3
- package/internal/graph/value_call_edges_resolve_across_files_and_dedupe_test.go +2 -2
- package/internal/graph/value_call_edges_skip_self_and_unresolved_test.go +4 -4
- package/internal/graph/value_reads_cover_expression_positions_test.go +88 -0
- package/lib/compiler/internal/buildNativeCompiler.d.ts +5 -2
- package/lib/compiler/internal/buildNativeCompiler.js +12 -4
- package/lib/compiler/internal/buildNativeCompiler.js.map +1 -1
- package/lib/flags/COMPILER_ENUM_WHITESPACE.js +1 -1
- package/lib/flags/COMPILER_ENUM_WHITESPACE.js.map +1 -1
- package/lib/flags/COMPILER_OPTIONS.js +1079 -149
- package/lib/flags/COMPILER_OPTIONS.js.map +1 -1
- package/lib/flags/COMPILER_OPTION_ASCII_FOLDS.js +1 -1
- package/lib/flags/COMPILER_OPTION_ASCII_FOLDS.js.map +1 -1
- package/lib/flags/COMPILER_OPTION_KINDS.js +1 -1
- package/lib/flags/COMPILER_OPTION_KINDS.js.map +1 -1
- package/lib/flags/CompilerOptionSpec.d.ts +9 -2
- package/lib/internal/pluginSource.d.ts +1 -0
- package/lib/internal/pluginSource.js +1 -0
- package/lib/internal/pluginSource.js.map +1 -1
- package/lib/launcher/internal/TypeScriptSyncApi.d.ts +140 -0
- package/lib/launcher/internal/TypeScriptSyncApi.js +99 -0
- package/lib/launcher/internal/TypeScriptSyncApi.js.map +1 -0
- package/lib/launcher/internal/buildSingleRootInMemory.d.ts +80 -0
- package/lib/launcher/internal/buildSingleRootInMemory.js +253 -0
- package/lib/launcher/internal/buildSingleRootInMemory.js.map +1 -0
- package/lib/launcher/internal/buildSingleRootProject.d.ts +22 -18
- package/lib/launcher/internal/buildSingleRootProject.js +27 -18
- package/lib/launcher/internal/buildSingleRootProject.js.map +1 -1
- package/lib/launcher/internal/compilerArgsAsConfigOptions.d.ts +39 -0
- package/lib/launcher/internal/compilerArgsAsConfigOptions.js +115 -0
- package/lib/launcher/internal/compilerArgsAsConfigOptions.js.map +1 -0
- package/lib/plugin/CapabilityPluginResolver.js +3 -0
- package/lib/plugin/CapabilityPluginResolver.js.map +1 -1
- package/lib/plugin/internal/load/loadProjectPlugins.js +6 -2
- package/lib/plugin/internal/load/loadProjectPlugins.js.map +1 -1
- package/lib/plugin/internal/source/CompilerTarget.d.ts +127 -0
- package/lib/plugin/internal/source/CompilerTarget.js +231 -0
- package/lib/plugin/internal/source/CompilerTarget.js.map +1 -0
- package/lib/plugin/internal/source/NativeSourcePackages.js +6 -5
- package/lib/plugin/internal/source/NativeSourcePackages.js.map +1 -1
- package/lib/plugin/internal/source/SourcePluginAdmission.d.ts +18 -1
- package/lib/plugin/internal/source/SourcePluginAdmission.js +24 -2
- package/lib/plugin/internal/source/SourcePluginAdmission.js.map +1 -1
- package/lib/plugin/internal/source/SourcePluginWorkspace.d.ts +6 -3
- package/lib/plugin/internal/source/SourcePluginWorkspace.js +31 -13
- package/lib/plugin/internal/source/SourcePluginWorkspace.js.map +1 -1
- package/lib/plugin/internal/source/buildSourcePlugin.js +3 -1
- package/lib/plugin/internal/source/buildSourcePlugin.js.map +1 -1
- package/lib/plugin/internal/source/hashPluginBuildEnvironment.d.ts +1 -1
- package/lib/plugin/internal/source/hashPluginBuildEnvironment.js +9 -1
- package/lib/plugin/internal/source/hashPluginBuildEnvironment.js.map +1 -1
- package/package.json +14 -9
- package/shim/ast/enums_gen.go +1 -0
- package/shim/ast/go.mod +2 -2
- package/shim/ast/go.sum +4 -4
- package/shim/ast/neutral.go +141 -0
- package/shim/astnav/go.mod +2 -2
- package/shim/astnav/go.sum +4 -4
- package/shim/bundled/go.mod +2 -2
- package/shim/bundled/go.sum +4 -4
- package/shim/checker/go.mod +2 -2
- package/shim/checker/go.sum +4 -4
- package/shim/compiler/go.mod +2 -2
- package/shim/compiler/go.sum +4 -4
- package/shim/compiler/neutral.go +213 -0
- package/shim/core/go.mod +2 -2
- package/shim/core/go.sum +4 -4
- package/shim/diagnosticwriter/go.mod +2 -2
- package/shim/diagnosticwriter/go.sum +4 -4
- package/shim/lsp/go.mod +2 -2
- package/shim/lsp/go.sum +4 -4
- package/shim/parser/go.mod +2 -2
- package/shim/parser/go.sum +4 -4
- package/shim/printer/go.mod +2 -2
- package/shim/printer/go.sum +4 -4
- package/shim/scanner/go.mod +2 -2
- package/shim/scanner/go.sum +4 -4
- package/shim/stringutil/go.mod +1 -1
- package/shim/stringutil/go.sum +2 -2
- package/shim/stringutil/shim.go +15 -0
- package/shim/transformers/go.mod +2 -2
- package/shim/transformers/go.sum +4 -4
- package/shim/tsoptions/go.mod +2 -2
- package/shim/tsoptions/go.sum +4 -4
- package/shim/tsoptions/neutral.go +56 -0
- package/shim/tspath/go.mod +1 -1
- package/shim/tspath/go.sum +2 -2
- package/shim/tspath/neutral.go +150 -0
- package/shim/tspath/typed_paths.go +266 -0
- package/shim/vfs/cachedvfs/go.mod +2 -2
- package/shim/vfs/cachedvfs/go.sum +4 -4
- package/shim/vfs/go.mod +2 -2
- package/shim/vfs/go.sum +4 -4
- package/shim/vfs/neutral.go +20 -0
- package/shim/vfs/osvfs/go.mod +2 -2
- package/shim/vfs/osvfs/go.sum +4 -4
- package/src/compiler/internal/buildNativeCompiler.ts +13 -4
- package/src/flags/COMPILER_ENUM_WHITESPACE.ts +1 -1
- package/src/flags/COMPILER_OPTIONS.ts +1080 -150
- package/src/flags/COMPILER_OPTION_ASCII_FOLDS.ts +1 -1
- package/src/flags/COMPILER_OPTION_KINDS.ts +1 -1
- package/src/flags/CompilerOptionSpec.ts +11 -2
- package/src/internal/pluginSource.ts +1 -0
- package/src/launcher/internal/TypeScriptSyncApi.ts +186 -0
- package/src/launcher/internal/buildSingleRootInMemory.ts +319 -0
- package/src/launcher/internal/buildSingleRootProject.ts +26 -18
- package/src/launcher/internal/compilerArgsAsConfigOptions.ts +112 -0
- package/src/plugin/CapabilityPluginResolver.ts +4 -1
- package/src/plugin/internal/load/loadProjectPlugins.ts +12 -2
- package/src/plugin/internal/source/CompilerTarget.ts +249 -0
- package/src/plugin/internal/source/NativeSourcePackages.ts +10 -4
- package/src/plugin/internal/source/SourcePluginAdmission.ts +28 -2
- package/src/plugin/internal/source/SourcePluginWorkspace.ts +45 -19
- package/src/plugin/internal/source/buildSourcePlugin.ts +3 -1
- package/src/plugin/internal/source/hashPluginBuildEnvironment.ts +9 -1
- package/targets/7.1/bridge/ast/enums_gen.go +174 -0
- package/targets/7.1/bridge/ast/extra-shim.json +4 -0
- package/targets/7.1/bridge/ast/go.mod +14 -0
- package/targets/7.1/bridge/ast/go.sum +20 -0
- package/targets/7.1/bridge/ast/lint.go +1412 -0
- package/targets/7.1/bridge/ast/neutral.go +141 -0
- package/targets/7.1/bridge/ast/parent.go +60 -0
- package/targets/7.1/bridge/ast/safe_text.go +108 -0
- package/targets/7.1/bridge/ast/shim.go +1656 -0
- package/targets/7.1/bridge/ast/surface.go +686 -0
- package/targets/7.1/bridge/ast/test/next_jsdoc_comment_location_reaches_variable_statement_test.go +51 -0
- package/targets/7.1/bridge/ast/test/node_text_joins_multi_hop_qualified_name_test.go +47 -0
- package/targets/7.1/bridge/ast/test/node_text_joins_one_hop_qualified_name_test.go +35 -0
- package/targets/7.1/bridge/ast/test/node_text_returns_empty_for_nil_test.go +31 -0
- package/targets/7.1/bridge/ast/test/node_text_returns_identifier_text_test.go +34 -0
- package/targets/7.1/bridge/ast/test/node_text_skips_empty_qualified_left_test.go +60 -0
- package/targets/7.1/bridge/astnav/go.mod +14 -0
- package/targets/7.1/bridge/astnav/go.sum +22 -0
- package/targets/7.1/bridge/astnav/shim.go +24 -0
- package/targets/7.1/bridge/bundled/extra-shim.json +1 -0
- package/targets/7.1/bridge/bundled/go.mod +10 -0
- package/targets/7.1/bridge/bundled/go.sum +10 -0
- package/targets/7.1/bridge/bundled/shim.go +24 -0
- package/targets/7.1/bridge/checker/enums_gen.go +150 -0
- package/targets/7.1/bridge/checker/extra-shim.json +37 -0
- package/targets/7.1/bridge/checker/go.mod +15 -0
- package/targets/7.1/bridge/checker/go.sum +24 -0
- package/targets/7.1/bridge/checker/node_builder_fields_gen.go +19 -0
- package/targets/7.1/bridge/checker/shim.go +1390 -0
- package/targets/7.1/bridge/compiler/contentmapper_process.go +70 -0
- package/targets/7.1/bridge/compiler/emit_sourcemap.go +296 -0
- package/targets/7.1/bridge/compiler/emitassemble.go +81 -0
- package/targets/7.1/bridge/compiler/emithook.go +44 -0
- package/targets/7.1/bridge/compiler/extra-shim.json +4 -0
- package/targets/7.1/bridge/compiler/go.mod +15 -0
- package/targets/7.1/bridge/compiler/go.sum +24 -0
- package/targets/7.1/bridge/compiler/incremental.go +185 -0
- package/targets/7.1/bridge/compiler/neutral.go +256 -0
- package/targets/7.1/bridge/compiler/resolution.go +571 -0
- package/targets/7.1/bridge/compiler/shim.go +70 -0
- package/targets/7.1/bridge/core/enums_gen.go +15 -0
- package/targets/7.1/bridge/core/extra-shim.json +4 -0
- package/targets/7.1/bridge/core/go.mod +7 -0
- package/targets/7.1/bridge/core/go.sum +8 -0
- package/targets/7.1/bridge/core/modulekind.go +19 -0
- package/targets/7.1/bridge/core/shim.go +272 -0
- package/targets/7.1/bridge/diagnosticwriter/go.mod +14 -0
- package/targets/7.1/bridge/diagnosticwriter/go.sum +20 -0
- package/targets/7.1/bridge/diagnosticwriter/lint.go +411 -0
- package/targets/7.1/bridge/diagnosticwriter/shim.go +56 -0
- package/targets/7.1/bridge/lsp/extra-shim.json +4 -0
- package/targets/7.1/bridge/lsp/go.mod +16 -0
- package/targets/7.1/bridge/lsp/go.sum +26 -0
- package/targets/7.1/bridge/lsp/shim.go +112 -0
- package/targets/7.1/bridge/parser/extra-shim.json +4 -0
- package/targets/7.1/bridge/parser/go.mod +14 -0
- package/targets/7.1/bridge/parser/go.sum +24 -0
- package/targets/7.1/bridge/parser/shim.go +61 -0
- package/targets/7.1/bridge/printer/emithost.go +69 -0
- package/targets/7.1/bridge/printer/go.mod +15 -0
- package/targets/7.1/bridge/printer/go.sum +24 -0
- package/targets/7.1/bridge/printer/shim.go +168 -0
- package/targets/7.1/bridge/printer/sourcemap.go +49 -0
- package/targets/7.1/bridge/scanner/extra-shim.json +4 -0
- package/targets/7.1/bridge/scanner/go.mod +14 -0
- package/targets/7.1/bridge/scanner/go.sum +20 -0
- package/targets/7.1/bridge/scanner/regexp.go +42 -0
- package/targets/7.1/bridge/scanner/shim.go +137 -0
- package/targets/7.1/bridge/stringutil/extra-shim.json +1 -0
- package/targets/7.1/bridge/stringutil/go.mod +5 -0
- package/targets/7.1/bridge/stringutil/go.sum +2 -0
- package/targets/7.1/bridge/stringutil/shim.go +131 -0
- package/targets/7.1/bridge/transformers/go.mod +15 -0
- package/targets/7.1/bridge/transformers/go.sum +24 -0
- package/targets/7.1/bridge/transformers/shim.go +24 -0
- package/targets/7.1/bridge/tsoptions/command_line_raw.go +44 -0
- package/targets/7.1/bridge/tsoptions/extra-shim.json +4 -0
- package/targets/7.1/bridge/tsoptions/go.mod +15 -0
- package/targets/7.1/bridge/tsoptions/go.sum +24 -0
- package/targets/7.1/bridge/tsoptions/neutral.go +47 -0
- package/targets/7.1/bridge/tsoptions/shim.go +193 -0
- package/targets/7.1/bridge/tspath/extra-shim.json +4 -0
- package/targets/7.1/bridge/tspath/go.mod +5 -0
- package/targets/7.1/bridge/tspath/go.sum +6 -0
- package/targets/7.1/bridge/tspath/neutral.go +142 -0
- package/targets/7.1/bridge/tspath/shim.go +382 -0
- package/targets/7.1/bridge/vfs/cachedvfs/extra-shim.json +4 -0
- package/targets/7.1/bridge/vfs/cachedvfs/go.mod +5 -0
- package/targets/7.1/bridge/vfs/cachedvfs/go.sum +10 -0
- package/targets/7.1/bridge/vfs/cachedvfs/shim.go +12 -0
- package/targets/7.1/bridge/vfs/decode.go +26 -0
- package/targets/7.1/bridge/vfs/decode_test.go +42 -0
- package/targets/7.1/bridge/vfs/extra-shim.json +4 -0
- package/targets/7.1/bridge/vfs/go.mod +10 -0
- package/targets/7.1/bridge/vfs/go.sum +10 -0
- package/targets/7.1/bridge/vfs/neutral.go +23 -0
- package/targets/7.1/bridge/vfs/osvfs/extra-shim.json +4 -0
- package/targets/7.1/bridge/vfs/osvfs/go.mod +10 -0
- package/targets/7.1/bridge/vfs/osvfs/go.sum +10 -0
- package/targets/7.1/bridge/vfs/osvfs/shim.go +14 -0
- package/targets/7.1/bridge/vfs/shim.go +27 -0
- package/targets/7.1/facade/ast/facade_gen.go +2691 -0
- package/targets/7.1/facade/ast/go.mod +20 -0
- package/targets/7.1/facade/ast/go.sum +20 -0
- package/targets/7.1/facade/astnav/facade_gen.go +15 -0
- package/targets/7.1/facade/astnav/go.mod +22 -0
- package/targets/7.1/facade/astnav/go.sum +22 -0
- package/targets/7.1/facade/bundled/facade_gen.go +32 -0
- package/targets/7.1/facade/bundled/go.mod +21 -0
- package/targets/7.1/facade/bundled/go.sum +10 -0
- package/targets/7.1/facade/checker/facade_gen.go +563 -0
- package/targets/7.1/facade/checker/go.mod +26 -0
- package/targets/7.1/facade/checker/go.sum +24 -0
- package/targets/7.1/facade/compiler/facade_gen.go +198 -0
- package/targets/7.1/facade/compiler/go.mod +41 -0
- package/targets/7.1/facade/compiler/go.sum +24 -0
- package/targets/7.1/facade/core/facade_gen.go +130 -0
- package/targets/7.1/facade/core/go.mod +12 -0
- package/targets/7.1/facade/core/go.sum +8 -0
- package/targets/7.1/facade/diagnosticwriter/facade_gen.go +36 -0
- package/targets/7.1/facade/diagnosticwriter/go.mod +22 -0
- package/targets/7.1/facade/diagnosticwriter/go.sum +20 -0
- package/targets/7.1/facade/lsp/facade_gen.go +31 -0
- package/targets/7.1/facade/lsp/go.mod +19 -0
- package/targets/7.1/facade/lsp/go.sum +26 -0
- package/targets/7.1/facade/parser/facade_gen.go +102 -0
- package/targets/7.1/facade/parser/go.mod +25 -0
- package/targets/7.1/facade/parser/go.sum +24 -0
- package/targets/7.1/facade/printer/facade_gen.go +74 -0
- package/targets/7.1/facade/printer/go.mod +26 -0
- package/targets/7.1/facade/printer/go.sum +24 -0
- package/targets/7.1/facade/scanner/facade_gen.go +191 -0
- package/targets/7.1/facade/scanner/go.mod +25 -0
- package/targets/7.1/facade/scanner/go.sum +20 -0
- package/targets/7.1/facade/stringutil/facade_gen.go +176 -0
- package/targets/7.1/facade/stringutil/go.mod +9 -0
- package/targets/7.1/facade/stringutil/go.sum +2 -0
- package/targets/7.1/facade/transformers/facade_gen.go +12 -0
- package/targets/7.1/facade/transformers/go.mod +18 -0
- package/targets/7.1/facade/transformers/go.sum +24 -0
- package/targets/7.1/facade/tsoptions/facade_gen.go +274 -0
- package/targets/7.1/facade/tsoptions/go.mod +32 -0
- package/targets/7.1/facade/tsoptions/go.sum +24 -0
- package/targets/7.1/facade/tspath/facade_gen.go +550 -0
- package/targets/7.1/facade/tspath/go.mod +9 -0
- package/targets/7.1/facade/tspath/go.sum +6 -0
- package/targets/7.1/facade/vfs/cachedvfs/facade_gen.go +17 -0
- package/targets/7.1/facade/vfs/cachedvfs/go.mod +18 -0
- package/targets/7.1/facade/vfs/cachedvfs/go.sum +10 -0
- package/targets/7.1/facade/vfs/facade_gen.go +47 -0
- package/targets/7.1/facade/vfs/go.mod +18 -0
- package/targets/7.1/facade/vfs/go.sum +10 -0
- package/targets/7.1/facade/vfs/osvfs/facade_gen.go +20 -0
- package/targets/7.1/facade/vfs/osvfs/go.mod +21 -0
- package/targets/7.1/facade/vfs/osvfs/go.sum +10 -0
- package/tools/gen_facade/committed_facades_match_their_bridges_test.go +57 -0
- package/tools/gen_facade/facade_manifest_points_into_the_bridge_root_test.go +75 -0
- package/tools/gen_facade/facade_spells_internal_types_through_bridge_aliases_test.go +75 -0
- package/tools/gen_facade/facade_types_are_their_bridge_types_test.go +99 -0
- package/tools/gen_facade/go.mod +10 -0
- package/tools/gen_facade/go.sum +8 -0
- package/tools/gen_facade/main.go +734 -0
- package/tools/gen_shims/go.mod +4 -4
- package/tools/gen_shims/go.sum +6 -6
- package/tools/gen_shims/main.go +124 -66
- package/tools/gen_shims/mirror_structs_terminate_on_unexported_cycles_test.go +101 -0
- package/tools/shim_audit/baseline-7.1.json +720 -0
- package/tools/shim_audit/baseline.json +5 -4
- package/tools/shim_audit/go.mod +4 -4
- package/tools/shim_audit/go.sum +6 -6
- package/tools/shim_audit/linkname_signatures.go +178 -0
- package/tools/shim_audit/linkname_signatures_match_their_targets_test.go +64 -0
- package/tools/shim_audit/linkname_targets_follow_the_audited_compiler_test.go +38 -0
- package/tools/shim_audit/main.go +29 -4
- package/tools/shim_audit/neutral_api.go +160 -0
- package/tools/shim_audit/neutral_api_must_match_across_targets_test.go +74 -0
- package/utility/host.go +5 -4
- package/utility/preamble_output.go +15 -15
- package/utility/serve.go +1 -1
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
// Code generated by packages/ttsc/tools/gen_shims. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
package tspath
|
|
4
|
+
|
|
5
|
+
import "github.com/microsoft/TypeScript/tsc/internal/tspath"
|
|
6
|
+
import _ "unsafe"
|
|
7
|
+
|
|
8
|
+
var AllSupportedExtensions = tspath.AllSupportedExtensions
|
|
9
|
+
var AllSupportedExtensionsWithJson = tspath.AllSupportedExtensionsWithJson
|
|
10
|
+
|
|
11
|
+
const CaseInsensitive = tspath.CaseInsensitive
|
|
12
|
+
const CaseSensitive = tspath.CaseSensitive
|
|
13
|
+
|
|
14
|
+
type CaseSensitivity = tspath.CaseSensitivity
|
|
15
|
+
|
|
16
|
+
//go:linkname ChangeAnyExtension github.com/microsoft/TypeScript/tsc/internal/tspath.ChangeAnyExtension
|
|
17
|
+
func ChangeAnyExtension(path string, ext string, extensions []string, caseSensitivity tspath.CaseSensitivity) string
|
|
18
|
+
|
|
19
|
+
//go:linkname ChangeExtension github.com/microsoft/TypeScript/tsc/internal/tspath.ChangeExtension
|
|
20
|
+
func ChangeExtension(path string, newExtension string) string
|
|
21
|
+
|
|
22
|
+
//go:linkname ChangeFullExtension github.com/microsoft/TypeScript/tsc/internal/tspath.ChangeFullExtension
|
|
23
|
+
func ChangeFullExtension(path string, newExtension string) string
|
|
24
|
+
|
|
25
|
+
//go:linkname CombinePaths github.com/microsoft/TypeScript/tsc/internal/tspath.CombinePaths
|
|
26
|
+
func CombinePaths(firstPath string, paths ...string) string
|
|
27
|
+
|
|
28
|
+
//go:linkname CompareNumberOfDirectorySeparators github.com/microsoft/TypeScript/tsc/internal/tspath.CompareNumberOfDirectorySeparators
|
|
29
|
+
func CompareNumberOfDirectorySeparators(path1 string, path2 string) int
|
|
30
|
+
|
|
31
|
+
//go:linkname ComparePaths github.com/microsoft/TypeScript/tsc/internal/tspath.ComparePaths
|
|
32
|
+
func ComparePaths(a string, b string, caseSensitivity tspath.CaseSensitivity) int
|
|
33
|
+
|
|
34
|
+
//go:linkname ComparePathsRelativeTo github.com/microsoft/TypeScript/tsc/internal/tspath.ComparePathsRelativeTo
|
|
35
|
+
func ComparePathsRelativeTo(a string, b string, currentDirectory tspath.RootedDirectoryPath, caseSensitivity tspath.CaseSensitivity) int
|
|
36
|
+
|
|
37
|
+
//go:linkname ContainsIgnoredDirectory github.com/microsoft/TypeScript/tsc/internal/tspath.ContainsIgnoredDirectory
|
|
38
|
+
func ContainsIgnoredDirectory(directory tspath.RootedDirectoryPath) bool
|
|
39
|
+
|
|
40
|
+
//go:linkname ContainsIgnoredPath github.com/microsoft/TypeScript/tsc/internal/tspath.ContainsIgnoredPath
|
|
41
|
+
func ContainsIgnoredPath(path tspath.RootedPath) bool
|
|
42
|
+
|
|
43
|
+
//go:linkname ContainsIgnoredPathKey github.com/microsoft/TypeScript/tsc/internal/tspath.ContainsIgnoredPathKey
|
|
44
|
+
func ContainsIgnoredPathKey(path tspath.PathKey) bool
|
|
45
|
+
|
|
46
|
+
//go:linkname ContainsPath github.com/microsoft/TypeScript/tsc/internal/tspath.ContainsPath
|
|
47
|
+
func ContainsPath(parent string, child string, caseSensitivity tspath.CaseSensitivity) bool
|
|
48
|
+
|
|
49
|
+
//go:linkname ConvertToRelativePath github.com/microsoft/TypeScript/tsc/internal/tspath.ConvertToRelativePath
|
|
50
|
+
func ConvertToRelativePath(absoluteOrRelativePath string, currentDirectory tspath.RootedDirectoryPath, caseSensitivity tspath.CaseSensitivity) string
|
|
51
|
+
|
|
52
|
+
//go:linkname DecodeDynamicURINoPath github.com/microsoft/TypeScript/tsc/internal/tspath.DecodeDynamicURINoPath
|
|
53
|
+
func DecodeDynamicURINoPath(path string) (string, bool)
|
|
54
|
+
|
|
55
|
+
//go:linkname DecodeDynamicURIPath github.com/microsoft/TypeScript/tsc/internal/tspath.DecodeDynamicURIPath
|
|
56
|
+
func DecodeDynamicURIPath(path string) string
|
|
57
|
+
|
|
58
|
+
//go:linkname DecodeDynamicURIPathForDisk github.com/microsoft/TypeScript/tsc/internal/tspath.DecodeDynamicURIPathForDisk
|
|
59
|
+
func DecodeDynamicURIPathForDisk(path string) (string, bool)
|
|
60
|
+
|
|
61
|
+
//go:linkname DecodeDynamicURIPathSegment github.com/microsoft/TypeScript/tsc/internal/tspath.DecodeDynamicURIPathSegment
|
|
62
|
+
func DecodeDynamicURIPathSegment(segment string) string
|
|
63
|
+
|
|
64
|
+
const DirectorySeparator = tspath.DirectorySeparator
|
|
65
|
+
const DynamicURIFileNamePrefix = tspath.DynamicURIFileNamePrefix
|
|
66
|
+
|
|
67
|
+
//go:linkname DynamicURIPathToModuleSpecifier github.com/microsoft/TypeScript/tsc/internal/tspath.DynamicURIPathToModuleSpecifier
|
|
68
|
+
func DynamicURIPathToModuleSpecifier(path string) string
|
|
69
|
+
|
|
70
|
+
//go:linkname EncodeDynamicDirectorySpecifier github.com/microsoft/TypeScript/tsc/internal/tspath.EncodeDynamicDirectorySpecifier
|
|
71
|
+
func EncodeDynamicDirectorySpecifier(specifier string) string
|
|
72
|
+
|
|
73
|
+
//go:linkname EncodeDynamicLogicalModuleSpecifier github.com/microsoft/TypeScript/tsc/internal/tspath.EncodeDynamicLogicalModuleSpecifier
|
|
74
|
+
func EncodeDynamicLogicalModuleSpecifier(specifier string) string
|
|
75
|
+
|
|
76
|
+
//go:linkname EncodeDynamicModuleSpecifier github.com/microsoft/TypeScript/tsc/internal/tspath.EncodeDynamicModuleSpecifier
|
|
77
|
+
func EncodeDynamicModuleSpecifier(specifier string) string
|
|
78
|
+
|
|
79
|
+
//go:linkname EncodeDynamicRelativeURIDirectoryPath github.com/microsoft/TypeScript/tsc/internal/tspath.EncodeDynamicRelativeURIDirectoryPath
|
|
80
|
+
func EncodeDynamicRelativeURIDirectoryPath(path string) string
|
|
81
|
+
|
|
82
|
+
//go:linkname EncodeDynamicRelativeURIPath github.com/microsoft/TypeScript/tsc/internal/tspath.EncodeDynamicRelativeURIPath
|
|
83
|
+
func EncodeDynamicRelativeURIPath(path string) string
|
|
84
|
+
|
|
85
|
+
//go:linkname EncodeDynamicURIDirectoryPath github.com/microsoft/TypeScript/tsc/internal/tspath.EncodeDynamicURIDirectoryPath
|
|
86
|
+
func EncodeDynamicURIDirectoryPath(path string) string
|
|
87
|
+
|
|
88
|
+
//go:linkname EncodeDynamicURINoPath github.com/microsoft/TypeScript/tsc/internal/tspath.EncodeDynamicURINoPath
|
|
89
|
+
func EncodeDynamicURINoPath(suffix string) string
|
|
90
|
+
|
|
91
|
+
//go:linkname EncodeDynamicURIPath github.com/microsoft/TypeScript/tsc/internal/tspath.EncodeDynamicURIPath
|
|
92
|
+
func EncodeDynamicURIPath(path string) string
|
|
93
|
+
|
|
94
|
+
//go:linkname EncodeDynamicURIPathWithSuffix github.com/microsoft/TypeScript/tsc/internal/tspath.EncodeDynamicURIPathWithSuffix
|
|
95
|
+
func EncodeDynamicURIPathWithSuffix(path string, suffix string) string
|
|
96
|
+
|
|
97
|
+
//go:linkname EnsurePathIsNonModuleName github.com/microsoft/TypeScript/tsc/internal/tspath.EnsurePathIsNonModuleName
|
|
98
|
+
func EnsurePathIsNonModuleName(path string) string
|
|
99
|
+
|
|
100
|
+
//go:linkname EnsureTrailingDirectorySeparator github.com/microsoft/TypeScript/tsc/internal/tspath.EnsureTrailingDirectorySeparator
|
|
101
|
+
func EnsureTrailingDirectorySeparator(path string) string
|
|
102
|
+
|
|
103
|
+
const ExtensionCjs = tspath.ExtensionCjs
|
|
104
|
+
const ExtensionCts = tspath.ExtensionCts
|
|
105
|
+
const ExtensionDcts = tspath.ExtensionDcts
|
|
106
|
+
const ExtensionDmts = tspath.ExtensionDmts
|
|
107
|
+
const ExtensionDts = tspath.ExtensionDts
|
|
108
|
+
|
|
109
|
+
//go:linkname ExtensionIsOneOf github.com/microsoft/TypeScript/tsc/internal/tspath.ExtensionIsOneOf
|
|
110
|
+
func ExtensionIsOneOf(ext string, extensions []string) bool
|
|
111
|
+
|
|
112
|
+
//go:linkname ExtensionIsTs github.com/microsoft/TypeScript/tsc/internal/tspath.ExtensionIsTs
|
|
113
|
+
func ExtensionIsTs(ext string) bool
|
|
114
|
+
|
|
115
|
+
const ExtensionJs = tspath.ExtensionJs
|
|
116
|
+
const ExtensionJson = tspath.ExtensionJson
|
|
117
|
+
const ExtensionJsx = tspath.ExtensionJsx
|
|
118
|
+
const ExtensionMjs = tspath.ExtensionMjs
|
|
119
|
+
const ExtensionMts = tspath.ExtensionMts
|
|
120
|
+
|
|
121
|
+
type ExtensionRewrite = tspath.ExtensionRewrite
|
|
122
|
+
|
|
123
|
+
const ExtensionTs = tspath.ExtensionTs
|
|
124
|
+
const ExtensionTsBuildInfo = tspath.ExtensionTsBuildInfo
|
|
125
|
+
const ExtensionTsx = tspath.ExtensionTsx
|
|
126
|
+
|
|
127
|
+
var ExtensionsNotSupportingExtensionlessResolution = tspath.ExtensionsNotSupportingExtensionlessResolution
|
|
128
|
+
|
|
129
|
+
//go:linkname FileExtensionIs github.com/microsoft/TypeScript/tsc/internal/tspath.FileExtensionIs
|
|
130
|
+
func FileExtensionIs(path string, extension string) bool
|
|
131
|
+
|
|
132
|
+
//go:linkname FileExtensionIsOneOf github.com/microsoft/TypeScript/tsc/internal/tspath.FileExtensionIsOneOf
|
|
133
|
+
func FileExtensionIsOneOf(path string, extensions []string) bool
|
|
134
|
+
|
|
135
|
+
type FileNameStem = tspath.FileNameStem
|
|
136
|
+
type FileSpec = tspath.FileSpec
|
|
137
|
+
|
|
138
|
+
//go:linkname ForceEncodeDynamicURIPathSegment github.com/microsoft/TypeScript/tsc/internal/tspath.ForceEncodeDynamicURIPathSegment
|
|
139
|
+
func ForceEncodeDynamicURIPathSegment(segment string, preserveExtension bool) string
|
|
140
|
+
|
|
141
|
+
//go:linkname GetAnyExtensionFromPath github.com/microsoft/TypeScript/tsc/internal/tspath.GetAnyExtensionFromPath
|
|
142
|
+
func GetAnyExtensionFromPath(path string, extensions []string, caseSensitivity tspath.CaseSensitivity) string
|
|
143
|
+
|
|
144
|
+
//go:linkname GetBaseFileName github.com/microsoft/TypeScript/tsc/internal/tspath.GetBaseFileName
|
|
145
|
+
func GetBaseFileName(path string) string
|
|
146
|
+
|
|
147
|
+
//go:linkname GetCommonParentDirectories github.com/microsoft/TypeScript/tsc/internal/tspath.GetCommonParentDirectories
|
|
148
|
+
func GetCommonParentDirectories(directories []tspath.RootedDirectoryPath, minComponents int, getComponents func(tspath.RootedDirectoryPath) []string, caseSensitivity tspath.CaseSensitivity) (parents []tspath.RootedDirectoryPath, ignored map[tspath.RootedDirectoryPath]struct{})
|
|
149
|
+
|
|
150
|
+
//go:linkname GetDeclarationEmitExtensionForPath github.com/microsoft/TypeScript/tsc/internal/tspath.GetDeclarationEmitExtensionForPath
|
|
151
|
+
func GetDeclarationEmitExtensionForPath(path string) string
|
|
152
|
+
|
|
153
|
+
//go:linkname GetDeclarationFileExtension github.com/microsoft/TypeScript/tsc/internal/tspath.GetDeclarationFileExtension
|
|
154
|
+
func GetDeclarationFileExtension(fileName string) string
|
|
155
|
+
|
|
156
|
+
//go:linkname GetDirectoryPath github.com/microsoft/TypeScript/tsc/internal/tspath.GetDirectoryPath
|
|
157
|
+
func GetDirectoryPath(path string) string
|
|
158
|
+
|
|
159
|
+
//go:linkname GetEncodedRootLength github.com/microsoft/TypeScript/tsc/internal/tspath.GetEncodedRootLength
|
|
160
|
+
func GetEncodedRootLength(path string) int
|
|
161
|
+
|
|
162
|
+
//go:linkname GetLongestExtensionFromPath github.com/microsoft/TypeScript/tsc/internal/tspath.GetLongestExtensionFromPath
|
|
163
|
+
func GetLongestExtensionFromPath(path string, extensions []string, caseSensitivity tspath.CaseSensitivity) string
|
|
164
|
+
|
|
165
|
+
//go:linkname GetNormalizedAbsolutePath github.com/microsoft/TypeScript/tsc/internal/tspath.GetNormalizedAbsolutePath
|
|
166
|
+
func GetNormalizedAbsolutePath(fileName string, currentDirectory tspath.RootedDirectoryPath) string
|
|
167
|
+
|
|
168
|
+
//go:linkname GetNormalizedPathComponents github.com/microsoft/TypeScript/tsc/internal/tspath.GetNormalizedPathComponents
|
|
169
|
+
func GetNormalizedPathComponents(path string, currentDirectory string) []string
|
|
170
|
+
|
|
171
|
+
//go:linkname GetPathComponents github.com/microsoft/TypeScript/tsc/internal/tspath.GetPathComponents
|
|
172
|
+
func GetPathComponents(path string) []string
|
|
173
|
+
|
|
174
|
+
//go:linkname GetPathComponentsRelativeTo github.com/microsoft/TypeScript/tsc/internal/tspath.GetPathComponentsRelativeTo
|
|
175
|
+
func GetPathComponentsRelativeTo(from string, to string, caseSensitivity tspath.CaseSensitivity) []string
|
|
176
|
+
|
|
177
|
+
//go:linkname GetPathFromPathComponents github.com/microsoft/TypeScript/tsc/internal/tspath.GetPathFromPathComponents
|
|
178
|
+
func GetPathFromPathComponents(pathComponents []string) string
|
|
179
|
+
|
|
180
|
+
//go:linkname GetPossibleOriginalInputExtensionForExtension github.com/microsoft/TypeScript/tsc/internal/tspath.GetPossibleOriginalInputExtensionForExtension
|
|
181
|
+
func GetPossibleOriginalInputExtensionForExtension(path string) []string
|
|
182
|
+
|
|
183
|
+
//go:linkname GetRelativePathFromDirectory github.com/microsoft/TypeScript/tsc/internal/tspath.GetRelativePathFromDirectory
|
|
184
|
+
func GetRelativePathFromDirectory(fromDirectory string, to string, caseSensitivity tspath.CaseSensitivity) string
|
|
185
|
+
|
|
186
|
+
//go:linkname GetRelativePathFromFile github.com/microsoft/TypeScript/tsc/internal/tspath.GetRelativePathFromFile
|
|
187
|
+
func GetRelativePathFromFile(from string, to string, caseSensitivity tspath.CaseSensitivity) string
|
|
188
|
+
|
|
189
|
+
//go:linkname GetRelativePathToDirectoryOrUrl github.com/microsoft/TypeScript/tsc/internal/tspath.GetRelativePathToDirectoryOrUrl
|
|
190
|
+
func GetRelativePathToDirectoryOrUrl(directoryPathOrUrl string, relativeOrAbsolutePath string, isAbsolutePathAnUrl bool, caseSensitivity tspath.CaseSensitivity) string
|
|
191
|
+
|
|
192
|
+
//go:linkname GetRootLength github.com/microsoft/TypeScript/tsc/internal/tspath.GetRootLength
|
|
193
|
+
func GetRootLength(path string) int
|
|
194
|
+
|
|
195
|
+
//go:linkname HasExtension github.com/microsoft/TypeScript/tsc/internal/tspath.HasExtension
|
|
196
|
+
func HasExtension(fileName string) bool
|
|
197
|
+
|
|
198
|
+
//go:linkname HasImplementationTSFileExtension github.com/microsoft/TypeScript/tsc/internal/tspath.HasImplementationTSFileExtension
|
|
199
|
+
func HasImplementationTSFileExtension(path string) bool
|
|
200
|
+
|
|
201
|
+
//go:linkname HasJSFileExtension github.com/microsoft/TypeScript/tsc/internal/tspath.HasJSFileExtension
|
|
202
|
+
func HasJSFileExtension(path string) bool
|
|
203
|
+
|
|
204
|
+
//go:linkname HasJSONFileExtension github.com/microsoft/TypeScript/tsc/internal/tspath.HasJSONFileExtension
|
|
205
|
+
func HasJSONFileExtension(path string) bool
|
|
206
|
+
|
|
207
|
+
//go:linkname HasTSFileExtension github.com/microsoft/TypeScript/tsc/internal/tspath.HasTSFileExtension
|
|
208
|
+
func HasTSFileExtension(path string) bool
|
|
209
|
+
|
|
210
|
+
//go:linkname HasTrailingDirectorySeparator github.com/microsoft/TypeScript/tsc/internal/tspath.HasTrailingDirectorySeparator
|
|
211
|
+
func HasTrailingDirectorySeparator(path string) bool
|
|
212
|
+
|
|
213
|
+
//go:linkname IsDeclarationFileName github.com/microsoft/TypeScript/tsc/internal/tspath.IsDeclarationFileName
|
|
214
|
+
func IsDeclarationFileName(fileName string) bool
|
|
215
|
+
|
|
216
|
+
//go:linkname IsDynamicFileName github.com/microsoft/TypeScript/tsc/internal/tspath.IsDynamicFileName
|
|
217
|
+
func IsDynamicFileName(fileName string) bool
|
|
218
|
+
|
|
219
|
+
//go:linkname IsEncodedDynamicFileName github.com/microsoft/TypeScript/tsc/internal/tspath.IsEncodedDynamicFileName
|
|
220
|
+
func IsEncodedDynamicFileName(path string) bool
|
|
221
|
+
|
|
222
|
+
//go:linkname IsExternalModuleNameRelative github.com/microsoft/TypeScript/tsc/internal/tspath.IsExternalModuleNameRelative
|
|
223
|
+
func IsExternalModuleNameRelative(moduleName string) bool
|
|
224
|
+
|
|
225
|
+
//go:linkname IsRootedDiskPath github.com/microsoft/TypeScript/tsc/internal/tspath.IsRootedDiskPath
|
|
226
|
+
func IsRootedDiskPath(path string) bool
|
|
227
|
+
|
|
228
|
+
//go:linkname IsUrl github.com/microsoft/TypeScript/tsc/internal/tspath.IsUrl
|
|
229
|
+
func IsUrl(path string) bool
|
|
230
|
+
|
|
231
|
+
//go:linkname IsVolumeCharacter github.com/microsoft/TypeScript/tsc/internal/tspath.IsVolumeCharacter
|
|
232
|
+
func IsVolumeCharacter(char byte) bool
|
|
233
|
+
|
|
234
|
+
type ModuleSpecifier = tspath.ModuleSpecifier
|
|
235
|
+
|
|
236
|
+
//go:linkname NormalizePath github.com/microsoft/TypeScript/tsc/internal/tspath.NormalizePath
|
|
237
|
+
func NormalizePath(path string) string
|
|
238
|
+
|
|
239
|
+
//go:linkname NormalizeSlashes github.com/microsoft/TypeScript/tsc/internal/tspath.NormalizeSlashes
|
|
240
|
+
func NormalizeSlashes(path string) string
|
|
241
|
+
|
|
242
|
+
//go:linkname PathIsAbsolute github.com/microsoft/TypeScript/tsc/internal/tspath.PathIsAbsolute
|
|
243
|
+
func PathIsAbsolute(path string) bool
|
|
244
|
+
|
|
245
|
+
//go:linkname PathIsRelative github.com/microsoft/TypeScript/tsc/internal/tspath.PathIsRelative
|
|
246
|
+
func PathIsRelative(path string) bool
|
|
247
|
+
|
|
248
|
+
type PathKey = tspath.PathKey
|
|
249
|
+
|
|
250
|
+
//go:linkname PathKeyFromCanonical github.com/microsoft/TypeScript/tsc/internal/tspath.PathKeyFromCanonical
|
|
251
|
+
func PathKeyFromCanonical(path string) tspath.PathKey
|
|
252
|
+
|
|
253
|
+
type PathPattern = tspath.PathPattern
|
|
254
|
+
type RelativePath = tspath.RelativePath
|
|
255
|
+
|
|
256
|
+
//go:linkname RelativePathFromNormalized github.com/microsoft/TypeScript/tsc/internal/tspath.RelativePathFromNormalized
|
|
257
|
+
func RelativePathFromNormalized(path string) tspath.RelativePath
|
|
258
|
+
|
|
259
|
+
//go:linkname RemoveAnyFileExtension github.com/microsoft/TypeScript/tsc/internal/tspath.RemoveAnyFileExtension
|
|
260
|
+
func RemoveAnyFileExtension(path string) string
|
|
261
|
+
|
|
262
|
+
//go:linkname RemoveExtension github.com/microsoft/TypeScript/tsc/internal/tspath.RemoveExtension
|
|
263
|
+
func RemoveExtension(path string, extension string) string
|
|
264
|
+
|
|
265
|
+
//go:linkname RemoveFileExtension github.com/microsoft/TypeScript/tsc/internal/tspath.RemoveFileExtension
|
|
266
|
+
func RemoveFileExtension(path string) string
|
|
267
|
+
|
|
268
|
+
//go:linkname RemoveTrailingDirectorySeparator github.com/microsoft/TypeScript/tsc/internal/tspath.RemoveTrailingDirectorySeparator
|
|
269
|
+
func RemoveTrailingDirectorySeparator(path string) string
|
|
270
|
+
|
|
271
|
+
//go:linkname ResolvePath github.com/microsoft/TypeScript/tsc/internal/tspath.ResolvePath
|
|
272
|
+
func ResolvePath(path string, paths ...string) string
|
|
273
|
+
|
|
274
|
+
//go:linkname ResolvePathWithoutTrailingDirectorySeparator github.com/microsoft/TypeScript/tsc/internal/tspath.ResolvePathWithoutTrailingDirectorySeparator
|
|
275
|
+
func ResolvePathWithoutTrailingDirectorySeparator(path string, paths ...string) string
|
|
276
|
+
|
|
277
|
+
//go:linkname ResolveRelativePathFromDirectory github.com/microsoft/TypeScript/tsc/internal/tspath.ResolveRelativePathFromDirectory
|
|
278
|
+
func ResolveRelativePathFromDirectory(fromDirectory string, to string, currentDirectory tspath.RootedDirectoryPath, caseSensitivity tspath.CaseSensitivity) string
|
|
279
|
+
|
|
280
|
+
//go:linkname ResolveRelativePathToDirectoryOrUrl github.com/microsoft/TypeScript/tsc/internal/tspath.ResolveRelativePathToDirectoryOrUrl
|
|
281
|
+
func ResolveRelativePathToDirectoryOrUrl(directoryPathOrUrl string, relativeOrAbsolutePath string, isAbsolutePathAnUrl bool, currentDirectory tspath.RootedDirectoryPath, caseSensitivity tspath.CaseSensitivity) string
|
|
282
|
+
|
|
283
|
+
type RootedDirectoryPath = tspath.RootedDirectoryPath
|
|
284
|
+
|
|
285
|
+
//go:linkname RootedDirectoryPathFromAbsolute github.com/microsoft/TypeScript/tsc/internal/tspath.RootedDirectoryPathFromAbsolute
|
|
286
|
+
func RootedDirectoryPathFromAbsolute(directory string) tspath.RootedDirectoryPath
|
|
287
|
+
|
|
288
|
+
//go:linkname RootedDirectoryPathFromNormalized github.com/microsoft/TypeScript/tsc/internal/tspath.RootedDirectoryPathFromNormalized
|
|
289
|
+
func RootedDirectoryPathFromNormalized(directory string) tspath.RootedDirectoryPath
|
|
290
|
+
|
|
291
|
+
//go:linkname RootedDirectoryPathFromPath github.com/microsoft/TypeScript/tsc/internal/tspath.RootedDirectoryPathFromPath
|
|
292
|
+
func RootedDirectoryPathFromPath(path tspath.RootedPath) tspath.RootedDirectoryPath
|
|
293
|
+
|
|
294
|
+
type RootedFilePath = tspath.RootedFilePath
|
|
295
|
+
|
|
296
|
+
//go:linkname RootedFilePathFromAbsolute github.com/microsoft/TypeScript/tsc/internal/tspath.RootedFilePathFromAbsolute
|
|
297
|
+
func RootedFilePathFromAbsolute(fileName string) tspath.RootedFilePath
|
|
298
|
+
|
|
299
|
+
//go:linkname RootedFilePathFromNormalized github.com/microsoft/TypeScript/tsc/internal/tspath.RootedFilePathFromNormalized
|
|
300
|
+
func RootedFilePathFromNormalized(fileName string) tspath.RootedFilePath
|
|
301
|
+
|
|
302
|
+
//go:linkname RootedFilePathFromPath github.com/microsoft/TypeScript/tsc/internal/tspath.RootedFilePathFromPath
|
|
303
|
+
func RootedFilePathFromPath(path tspath.RootedPath) tspath.RootedFilePath
|
|
304
|
+
|
|
305
|
+
type RootedPath = tspath.RootedPath
|
|
306
|
+
|
|
307
|
+
//go:linkname RootedPathFromAbsolute github.com/microsoft/TypeScript/tsc/internal/tspath.RootedPathFromAbsolute
|
|
308
|
+
func RootedPathFromAbsolute(path string) tspath.RootedPath
|
|
309
|
+
|
|
310
|
+
//go:linkname RootedPathFromNormalized github.com/microsoft/TypeScript/tsc/internal/tspath.RootedPathFromNormalized
|
|
311
|
+
func RootedPathFromNormalized(path string) tspath.RootedPath
|
|
312
|
+
|
|
313
|
+
type SourceMapLocation = tspath.SourceMapLocation
|
|
314
|
+
|
|
315
|
+
//go:linkname SplitVolumePath github.com/microsoft/TypeScript/tsc/internal/tspath.SplitVolumePath
|
|
316
|
+
func SplitVolumePath(path string) (volume string, rest string, ok bool)
|
|
317
|
+
|
|
318
|
+
//go:linkname StartsWithDirectory github.com/microsoft/TypeScript/tsc/internal/tspath.StartsWithDirectory
|
|
319
|
+
func StartsWithDirectory(fileName string, directoryName string, caseSensitivity tspath.CaseSensitivity) bool
|
|
320
|
+
|
|
321
|
+
var SupportedDeclarationExtensions = tspath.SupportedDeclarationExtensions
|
|
322
|
+
var SupportedJSExtensions = tspath.SupportedJSExtensions
|
|
323
|
+
var SupportedJSExtensionsFlat = tspath.SupportedJSExtensionsFlat
|
|
324
|
+
var SupportedTSExtensions = tspath.SupportedTSExtensions
|
|
325
|
+
var SupportedTSExtensionsFlat = tspath.SupportedTSExtensionsFlat
|
|
326
|
+
var SupportedTSExtensionsWithJson = tspath.SupportedTSExtensionsWithJson
|
|
327
|
+
var SupportedTSExtensionsWithJsonFlat = tspath.SupportedTSExtensionsWithJsonFlat
|
|
328
|
+
var SupportedTSImplementationExtensions = tspath.SupportedTSImplementationExtensions
|
|
329
|
+
|
|
330
|
+
//go:linkname ToFileNameLowerCase github.com/microsoft/TypeScript/tsc/internal/tspath.ToFileNameLowerCase
|
|
331
|
+
func ToFileNameLowerCase(fileName string) string
|
|
332
|
+
|
|
333
|
+
//go:linkname ToFileSpec github.com/microsoft/TypeScript/tsc/internal/tspath.ToFileSpec
|
|
334
|
+
func ToFileSpec(value string) tspath.FileSpec
|
|
335
|
+
|
|
336
|
+
//go:linkname ToModuleSpecifier github.com/microsoft/TypeScript/tsc/internal/tspath.ToModuleSpecifier
|
|
337
|
+
func ToModuleSpecifier(specifier string) tspath.ModuleSpecifier
|
|
338
|
+
|
|
339
|
+
//go:linkname ToPathPattern github.com/microsoft/TypeScript/tsc/internal/tspath.ToPathPattern
|
|
340
|
+
func ToPathPattern(value string) tspath.PathPattern
|
|
341
|
+
|
|
342
|
+
//go:linkname ToRelativePath github.com/microsoft/TypeScript/tsc/internal/tspath.ToRelativePath
|
|
343
|
+
func ToRelativePath(path string) tspath.RelativePath
|
|
344
|
+
|
|
345
|
+
//go:linkname ToRootedDirectoryPath github.com/microsoft/TypeScript/tsc/internal/tspath.ToRootedDirectoryPath
|
|
346
|
+
func ToRootedDirectoryPath(directory string, currentDirectory tspath.RootedDirectoryPath) tspath.RootedDirectoryPath
|
|
347
|
+
|
|
348
|
+
//go:linkname ToRootedFilePath github.com/microsoft/TypeScript/tsc/internal/tspath.ToRootedFilePath
|
|
349
|
+
func ToRootedFilePath(fileName string, currentDirectory tspath.RootedDirectoryPath) tspath.RootedFilePath
|
|
350
|
+
|
|
351
|
+
//go:linkname ToRootedPath github.com/microsoft/TypeScript/tsc/internal/tspath.ToRootedPath
|
|
352
|
+
func ToRootedPath(path string, currentDirectory tspath.RootedDirectoryPath) tspath.RootedPath
|
|
353
|
+
|
|
354
|
+
//go:linkname ToSourceMapLocation github.com/microsoft/TypeScript/tsc/internal/tspath.ToSourceMapLocation
|
|
355
|
+
func ToSourceMapLocation(path string) tspath.SourceMapLocation
|
|
356
|
+
|
|
357
|
+
//go:linkname TryDecodeDynamicURIPath github.com/microsoft/TypeScript/tsc/internal/tspath.TryDecodeDynamicURIPath
|
|
358
|
+
func TryDecodeDynamicURIPath(path string) (string, bool)
|
|
359
|
+
|
|
360
|
+
//go:linkname TryDecodeDynamicURIPathSegment github.com/microsoft/TypeScript/tsc/internal/tspath.TryDecodeDynamicURIPathSegment
|
|
361
|
+
func TryDecodeDynamicURIPathSegment(segment string) (string, bool)
|
|
362
|
+
|
|
363
|
+
//go:linkname TryExtractTSExtension github.com/microsoft/TypeScript/tsc/internal/tspath.TryExtractTSExtension
|
|
364
|
+
func TryExtractTSExtension(fileName string) string
|
|
365
|
+
|
|
366
|
+
//go:linkname TryGetExtensionFromPath github.com/microsoft/TypeScript/tsc/internal/tspath.TryGetExtensionFromPath
|
|
367
|
+
func TryGetExtensionFromPath(p string) string
|
|
368
|
+
|
|
369
|
+
//go:linkname TryPathKeyFromCanonical github.com/microsoft/TypeScript/tsc/internal/tspath.TryPathKeyFromCanonical
|
|
370
|
+
func TryPathKeyFromCanonical(path string) (tspath.PathKey, bool)
|
|
371
|
+
|
|
372
|
+
//go:linkname TryRootedFilePathFromAbsolute github.com/microsoft/TypeScript/tsc/internal/tspath.TryRootedFilePathFromAbsolute
|
|
373
|
+
func TryRootedFilePathFromAbsolute(fileName string) (tspath.RootedFilePath, bool)
|
|
374
|
+
|
|
375
|
+
//go:linkname TryRootedFilePathFromNormalized github.com/microsoft/TypeScript/tsc/internal/tspath.TryRootedFilePathFromNormalized
|
|
376
|
+
func TryRootedFilePathFromNormalized(fileName string) (tspath.RootedFilePath, bool)
|
|
377
|
+
|
|
378
|
+
//go:linkname TryRootedPathFromAbsolute github.com/microsoft/TypeScript/tsc/internal/tspath.TryRootedPathFromAbsolute
|
|
379
|
+
func TryRootedPathFromAbsolute(path string) (tspath.RootedPath, bool)
|
|
380
|
+
|
|
381
|
+
//go:linkname TryRootedPathFromNormalized github.com/microsoft/TypeScript/tsc/internal/tspath.TryRootedPathFromNormalized
|
|
382
|
+
func TryRootedPathFromNormalized(path string) (tspath.RootedPath, bool)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
|
2
|
+
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
|
3
|
+
github.com/microsoft/TypeScript/tsc v0.0.0-20261019224239-28534d760906 h1:Wn+Kp4ORyay6jJwvOng7G8pTD6HOP+Fwx8si66Wq7Bk=
|
|
4
|
+
github.com/microsoft/TypeScript/tsc v0.0.0-20261019224239-28534d760906/go.mod h1:28hWKaTYwRARPm0T9Y0XvdvYpU2HtjONzsMqAdYLucY=
|
|
5
|
+
golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk=
|
|
6
|
+
golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
|
|
7
|
+
golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo=
|
|
8
|
+
golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
|
|
9
|
+
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
|
|
10
|
+
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Code generated by packages/ttsc/tools/gen_shims. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
package cachedvfs
|
|
4
|
+
|
|
5
|
+
import "github.com/microsoft/TypeScript/tsc/internal/vfs"
|
|
6
|
+
import "github.com/microsoft/TypeScript/tsc/internal/vfs/cachedvfs"
|
|
7
|
+
import _ "unsafe"
|
|
8
|
+
|
|
9
|
+
type FS = cachedvfs.FS
|
|
10
|
+
|
|
11
|
+
//go:linkname From github.com/microsoft/TypeScript/tsc/internal/vfs/cachedvfs.From
|
|
12
|
+
func From(fs vfs.FS) *cachedvfs.FS
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
package vfs
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
_ "github.com/microsoft/TypeScript/tsc/internal/vfs/osvfs"
|
|
5
|
+
_ "unsafe"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
// DecodeBytes applies the pinned compiler filesystem's BOM and UTF-16 decoding
|
|
9
|
+
// to one immutable byte string. Callers can hash the same captured bytes without
|
|
10
|
+
// another filesystem read; the returned text is suitable for compiler overlays.
|
|
11
|
+
// UTF-8 BOMs are removed; UTF-16 BOMs select byte order and upstream code-unit
|
|
12
|
+
// decoding. Other bytes pass through unchanged without UTF-8 validation. The
|
|
13
|
+
// pinned helper returns ok=true in every branch, so that flag does not certify
|
|
14
|
+
// well-formed encoding or successful file acquisition.
|
|
15
|
+
//
|
|
16
|
+
// @evidence contracts/common.md#principled-implementation The exact pinned filesystem decoder receives the caller's captured byte string so raw hashes and decoded text can share one immutable read.
|
|
17
|
+
// @evidence contracts/common.md#clear-and-simple-design One thin linkname bridge exposes upstream decoding without another filesystem abstraction or copied algorithm.
|
|
18
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts This declaration links the actual upstream helper, retaining BOM, endian and malformed-code-unit behavior rather than approximating the decoder locally.
|
|
19
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose states captured-input ownership, BOM selection, unchanged non-BOM bytes and the pinned ok flag's lack of encoding or file-read certification.
|
|
20
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources DecodeBytes declares a signature only; the implementation owns acquisition and release of resources.
|
|
21
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms DecodeBytes declares a signature only; the implementation owns the processing strategy.
|
|
22
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work DecodeBytes declares a signature only; the implementation owns any shared work.
|
|
23
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation DecodeBytes is a signature without a body here; path and platform behavior belongs to the implementation that supplies it.
|
|
24
|
+
//
|
|
25
|
+
//go:linkname DecodeBytes github.com/microsoft/TypeScript/tsc/internal/vfs/internal.decodeBytes
|
|
26
|
+
func DecodeBytes(s string) (contents string, ok bool)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
package vfs
|
|
2
|
+
|
|
3
|
+
import "testing"
|
|
4
|
+
|
|
5
|
+
// TestDecodeBytesUsesCompilerFilesystemSemantics verifies the real pinned
|
|
6
|
+
// decoder bridge against literal byte/text pairs, including endian, empty,
|
|
7
|
+
// truncated-code-unit and surrogate boundaries.
|
|
8
|
+
//
|
|
9
|
+
// The bridge must call upstream code so filesystem and overlay decoding cannot
|
|
10
|
+
// drift. No copied decoder or filesystem substitute runs in this test.
|
|
11
|
+
//
|
|
12
|
+
// 1. Supply literal byte inputs for each decoding boundary.
|
|
13
|
+
// 2. Call the linked compiler decoder in the test process.
|
|
14
|
+
// 3. Collect each independently specified Unicode text and success assertion.
|
|
15
|
+
//
|
|
16
|
+
// @evidence contracts/testing.md#behavioral-verification DecodeBytes links and calls the real pinned compiler filesystem decoder for every byte/text pair.
|
|
17
|
+
// @evidence contracts/testing.md#independent-expectations Literal bytes and Unicode text specify expected decoding independently of the linked implementation.
|
|
18
|
+
// @evidence contracts/testing.md#distinguishing-cases Plain newline spellings contrast UTF-8 BOM, both UTF-16 byte orders, empty inputs, odd trailing bytes, paired and unpaired surrogates.
|
|
19
|
+
// @evidence contracts/testing.md#execution-ownership TestDecodeBytesUsesCompilerFilesystemSemantics is a Go source unit executed through the actual shim module dependency from the owning compiler module, without an installed consumer or native product process.
|
|
20
|
+
func TestDecodeBytesUsesCompilerFilesystemSemantics(t *testing.T) {
|
|
21
|
+
for _, input := range []struct{ name, bytes, text string }{
|
|
22
|
+
{"plain", "a\r\nb\u2028c\u2029", "a\r\nb\u2028c\u2029"},
|
|
23
|
+
{"utf8", "\xef\xbb\xbfhello", "hello"},
|
|
24
|
+
{"little", "\xff\xfeh\x00i\x00", "hi"},
|
|
25
|
+
{"big", "\xfe\xff\x00h\x00i", "hi"},
|
|
26
|
+
{"empty", "", ""},
|
|
27
|
+
{"empty little", "\xff\xfe", ""},
|
|
28
|
+
{"empty big", "\xfe\xff", ""},
|
|
29
|
+
{"odd little", "\xff\xfea\x00b", "a"},
|
|
30
|
+
{"odd big", "\xfe\xff\x00ab", "a"},
|
|
31
|
+
{"surrogate little", "\xff\xfe\x3d\xd8\x00\xde", "\U0001f600"},
|
|
32
|
+
{"surrogate big", "\xfe\xff\xd8\x3d\xde\x00", "\U0001f600"},
|
|
33
|
+
{"unpaired little", "\xff\xfe\x3d\xd8", "\ufffd"},
|
|
34
|
+
} {
|
|
35
|
+
t.Run(input.name, func(t *testing.T) {
|
|
36
|
+
text, ok := DecodeBytes(input.bytes)
|
|
37
|
+
if !ok || text != input.text {
|
|
38
|
+
t.Errorf("DecodeBytes = %q, %v; want %q, true", text, ok, input.text)
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
|
2
|
+
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
|
3
|
+
github.com/microsoft/TypeScript/tsc v0.0.0-20261019224239-28534d760906 h1:Wn+Kp4ORyay6jJwvOng7G8pTD6HOP+Fwx8si66Wq7Bk=
|
|
4
|
+
github.com/microsoft/TypeScript/tsc v0.0.0-20261019224239-28534d760906/go.mod h1:28hWKaTYwRARPm0T9Y0XvdvYpU2HtjONzsMqAdYLucY=
|
|
5
|
+
golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk=
|
|
6
|
+
golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
|
|
7
|
+
golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo=
|
|
8
|
+
golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
|
|
9
|
+
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
|
|
10
|
+
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
package vfs
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
innertspath "github.com/microsoft/TypeScript/tsc/internal/tspath"
|
|
5
|
+
innervfs "github.com/microsoft/TypeScript/tsc/internal/vfs"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
// CaseSensitivityOf reports the case policy the filesystem compares names
|
|
9
|
+
// with. TypeScript 7.0 spells it UseCaseSensitiveFileNames and TypeScript 7.1
|
|
10
|
+
// spells it CaseSensitivity; code that must compile on both compiler targets
|
|
11
|
+
// calls this function, which the 7.0 shim declares with the same signature.
|
|
12
|
+
//
|
|
13
|
+
// @evidence contracts/common.md#principled-implementation Returns FS.CaseSensitivity.
|
|
14
|
+
// @evidence contracts/common.md#clear-and-simple-design One method call keeps the target difference inside the shim.
|
|
15
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The policy is the filesystem's own answer, not inferred from the OS name.
|
|
16
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose states the two spellings and the shared signature.
|
|
17
|
+
// @evidence contracts/portability.md#os-neutral-implementation The filesystem implementation owns how it learns its case policy; this function adds no OS assumption.
|
|
18
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms The filesystem returns its stored policy.
|
|
19
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work The function coordinates no shared work.
|
|
20
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The function retains nothing.
|
|
21
|
+
func CaseSensitivityOf(fs innervfs.FS) innertspath.CaseSensitivity {
|
|
22
|
+
return fs.CaseSensitivity()
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
|
2
|
+
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
|
3
|
+
github.com/microsoft/TypeScript/tsc v0.0.0-20261019224239-28534d760906 h1:Wn+Kp4ORyay6jJwvOng7G8pTD6HOP+Fwx8si66Wq7Bk=
|
|
4
|
+
github.com/microsoft/TypeScript/tsc v0.0.0-20261019224239-28534d760906/go.mod h1:28hWKaTYwRARPm0T9Y0XvdvYpU2HtjONzsMqAdYLucY=
|
|
5
|
+
golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk=
|
|
6
|
+
golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
|
|
7
|
+
golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo=
|
|
8
|
+
golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
|
|
9
|
+
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
|
|
10
|
+
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Code generated by packages/ttsc/tools/gen_shims. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
package osvfs
|
|
4
|
+
|
|
5
|
+
import "github.com/microsoft/TypeScript/tsc/internal/tspath"
|
|
6
|
+
import "github.com/microsoft/TypeScript/tsc/internal/vfs"
|
|
7
|
+
import _ "github.com/microsoft/TypeScript/tsc/internal/vfs/osvfs"
|
|
8
|
+
import _ "unsafe"
|
|
9
|
+
|
|
10
|
+
//go:linkname FS github.com/microsoft/TypeScript/tsc/internal/vfs/osvfs.FS
|
|
11
|
+
func FS() vfs.FS
|
|
12
|
+
|
|
13
|
+
//go:linkname GetGlobalTypingsCacheLocation github.com/microsoft/TypeScript/tsc/internal/vfs/osvfs.GetGlobalTypingsCacheLocation
|
|
14
|
+
func GetGlobalTypingsCacheLocation() tspath.RootedDirectoryPath
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Code generated by packages/ttsc/tools/gen_shims. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
package vfs
|
|
4
|
+
|
|
5
|
+
import "github.com/microsoft/TypeScript/tsc/internal/tspath"
|
|
6
|
+
import "github.com/microsoft/TypeScript/tsc/internal/vfs"
|
|
7
|
+
import _ "unsafe"
|
|
8
|
+
|
|
9
|
+
type DirEntry = vfs.DirEntry
|
|
10
|
+
type Entries = vfs.Entries
|
|
11
|
+
|
|
12
|
+
var ErrClosed = vfs.ErrClosed
|
|
13
|
+
var ErrExist = vfs.ErrExist
|
|
14
|
+
var ErrInvalid = vfs.ErrInvalid
|
|
15
|
+
var ErrNotExist = vfs.ErrNotExist
|
|
16
|
+
var ErrPermission = vfs.ErrPermission
|
|
17
|
+
|
|
18
|
+
type FS = vfs.FS
|
|
19
|
+
type FileInfo = vfs.FileInfo
|
|
20
|
+
|
|
21
|
+
var SkipAll = vfs.SkipAll
|
|
22
|
+
var SkipDir = vfs.SkipDir
|
|
23
|
+
|
|
24
|
+
//go:linkname WalkDir github.com/microsoft/TypeScript/tsc/internal/vfs.WalkDir
|
|
25
|
+
func WalkDir(fileSystem vfs.FS, root tspath.RootedPath, walkFn vfs.WalkDirFunc) error
|
|
26
|
+
|
|
27
|
+
type WalkDirFunc = vfs.WalkDirFunc
|