ttsc 0.31.5 → 0.32.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.
Files changed (123) hide show
  1. package/cmd/ttsc/compiler_argument_cwd_test.go +38 -38
  2. package/cmd/ttscserver/main.go +2 -12
  3. package/cmd/ttscserver/resolve_launch_uses_native_flag_authority_test.go +7 -7
  4. package/driver/lsp.go +4 -43
  5. package/driver/rewrite.go +1 -1
  6. package/internal/e2etrace/completion_hints.go +3 -3
  7. package/internal/e2etrace/completion_hints_test.go +26 -12
  8. package/internal/graph/build.go +5 -6
  9. package/internal/graph/graph.go +3 -3
  10. package/internal/graph/line_model.go +2 -35
  11. package/internal/lspserver/lsp_clean_didopen_refreshes_compiler_state_test.go +13 -36
  12. package/internal/lspserver/lsp_hints_refresh_ignores_a_superseded_generation_test.go +9 -3
  13. package/internal/lspserver/lsp_plugin.go +19 -0
  14. package/internal/lspserver/lsp_proxy.go +9 -129
  15. package/internal/lspserver/lsp_server.go +0 -8
  16. package/internal/lspserver/lsp_watched_file_changes_reach_compiler_caches_test.go +6 -36
  17. package/internal/sourceprocess/windows_target_owns_suspended_admission_test.go +5 -5
  18. package/lib/compiler/internal/build/BuildExecution.js +1 -1
  19. package/lib/compiler/internal/build/BuildExecution.js.map +1 -1
  20. package/lib/compiler/internal/build/TsgoArguments.js.map +1 -1
  21. package/lib/compiler/internal/project/CompilerProjectSelection.d.ts +9 -8
  22. package/lib/compiler/internal/project/CompilerProjectSelection.js +11 -9
  23. package/lib/compiler/internal/project/CompilerProjectSelection.js.map +1 -1
  24. package/lib/compiler/internal/project/resolveOwningProjectConfig.d.ts +20 -8
  25. package/lib/compiler/internal/project/resolveOwningProjectConfig.js +21 -12
  26. package/lib/compiler/internal/project/resolveOwningProjectConfig.js.map +1 -1
  27. package/lib/compiler/internal/runSingleFileEmit.d.ts +5 -4
  28. package/lib/compiler/internal/runSingleFileEmit.js +5 -4
  29. package/lib/compiler/internal/runSingleFileEmit.js.map +1 -1
  30. package/lib/flags/ParseOptions.d.ts +2 -2
  31. package/lib/internal/E2ETrace.js.map +1 -1
  32. package/lib/internal/OwnedNativeProcess.d.ts +2 -2
  33. package/lib/internal/OwnedNativeProcess.js +2 -2
  34. package/lib/internal/SourceNativeRetirement.d.ts +8 -7
  35. package/lib/internal/SourceNativeRetirement.js +19 -10
  36. package/lib/internal/SourceNativeRetirement.js.map +1 -1
  37. package/lib/internal/TtsxNodeOptions.d.ts +79 -0
  38. package/lib/internal/TtsxNodeOptions.js +121 -0
  39. package/lib/internal/TtsxNodeOptions.js.map +1 -0
  40. package/lib/internal/javascriptRuntimeCapabilities.js +4 -1
  41. package/lib/internal/javascriptRuntimeCapabilities.js.map +1 -1
  42. package/lib/internal/parseWindowsDirectoryCaseSensitivity.d.ts +5 -5
  43. package/lib/internal/parseWindowsDirectoryCaseSensitivity.js +5 -5
  44. package/lib/internal/pathIdentity/createCaseSensitivityObservations.d.ts +35 -0
  45. package/lib/internal/pathIdentity/createCaseSensitivityObservations.js +209 -0
  46. package/lib/internal/pathIdentity/createCaseSensitivityObservations.js.map +1 -0
  47. package/lib/internal/pathIdentity/createFilesystemPathIdentityContext.js +2 -143
  48. package/lib/internal/pathIdentity/createFilesystemPathIdentityContext.js.map +1 -1
  49. package/lib/internal/projectInputPathIdentity.d.ts +1 -0
  50. package/lib/internal/projectInputPathIdentity.js +1 -0
  51. package/lib/internal/projectInputPathIdentity.js.map +1 -1
  52. package/lib/launcher/internal/parseTtsxCLI.d.ts +5 -4
  53. package/lib/launcher/internal/parseTtsxCLI.js +5 -4
  54. package/lib/launcher/internal/parseTtsxCLI.js.map +1 -1
  55. package/lib/launcher/internal/prepareExecution.js.map +1 -1
  56. package/lib/launcher/internal/resolveSingleFileOutput.d.ts +8 -9
  57. package/lib/launcher/internal/resolveSingleFileOutput.js +8 -9
  58. package/lib/launcher/internal/resolveSingleFileOutput.js.map +1 -1
  59. package/lib/launcher/internal/runTtsc.js +5 -5
  60. package/lib/launcher/internal/runTtsx.js +5 -2
  61. package/lib/launcher/internal/runTtsx.js.map +1 -1
  62. package/lib/launcher/internal/runtime/RuntimeEntrySources.d.ts +40 -0
  63. package/lib/launcher/internal/runtime/RuntimeEntrySources.js +57 -0
  64. package/lib/launcher/internal/runtime/RuntimeEntrySources.js.map +1 -0
  65. package/lib/launcher/internal/runtime/RuntimeProjectOwnership.d.ts +5 -4
  66. package/lib/launcher/internal/runtime/RuntimeProjectOwnership.js +8 -6
  67. package/lib/launcher/internal/runtime/RuntimeProjectOwnership.js.map +1 -1
  68. package/lib/launcher/internal/runtime/commonJsExportNames.d.ts +2 -1
  69. package/lib/launcher/internal/runtime/commonJsExportNames.js +2 -1
  70. package/lib/launcher/internal/runtime/commonJsExportNames.js.map +1 -1
  71. package/lib/launcher/internal/runtime/installRuntimeHooks.js +35 -9
  72. package/lib/launcher/internal/runtime/installRuntimeHooks.js.map +1 -1
  73. package/lib/launcher/internal/runtime/resolveRuntimeCleanTargets.js +3 -1
  74. package/lib/launcher/internal/runtime/resolveRuntimeCleanTargets.js.map +1 -1
  75. package/lib/launcher/internal/watch/WatchTopology.d.ts +74 -12
  76. package/lib/launcher/internal/watch/WatchTopology.js +301 -92
  77. package/lib/launcher/internal/watch/WatchTopology.js.map +1 -1
  78. package/lib/launcher/internal/watch/projectInputReloadEventShouldNotify.d.ts +4 -1
  79. package/lib/launcher/internal/watch/projectInputReloadEventShouldNotify.js +3 -2
  80. package/lib/launcher/internal/watch/projectInputReloadEventShouldNotify.js.map +1 -1
  81. package/lib/plugin/internal/load/loadProjectPlugins.js +13 -7
  82. package/lib/plugin/internal/load/loadProjectPlugins.js.map +1 -1
  83. package/lib/plugin/internal/load/resolveNativeSource.js +2 -3
  84. package/lib/plugin/internal/load/resolveNativeSource.js.map +1 -1
  85. package/lib/plugin/internal/source/pluginModuleReplaceDirectories.d.ts +4 -1
  86. package/lib/plugin/internal/source/pluginModuleReplaceDirectories.js +9 -2
  87. package/lib/plugin/internal/source/pluginModuleReplaceDirectories.js.map +1 -1
  88. package/lib/structures/internal/TtscCommonOptions.d.ts +2 -2
  89. package/package.json +9 -9
  90. package/src/compiler/internal/build/BuildExecution.ts +5 -2
  91. package/src/compiler/internal/build/TsgoArguments.ts +4 -1
  92. package/src/compiler/internal/project/CompilerProjectSelection.ts +14 -14
  93. package/src/compiler/internal/project/resolveOwningProjectConfig.ts +29 -14
  94. package/src/compiler/internal/runSingleFileEmit.ts +11 -7
  95. package/src/flags/ParseOptions.ts +2 -2
  96. package/src/internal/E2ETrace.ts +3 -1
  97. package/src/internal/OwnedNativeProcess.ts +2 -2
  98. package/src/internal/SourceNativeRetirement.ts +42 -19
  99. package/src/internal/TtsxNodeOptions.ts +124 -0
  100. package/src/internal/javascriptRuntimeCapabilities.ts +6 -1
  101. package/src/internal/parseWindowsDirectoryCaseSensitivity.ts +5 -5
  102. package/src/internal/pathIdentity/createCaseSensitivityObservations.ts +242 -0
  103. package/src/internal/pathIdentity/createFilesystemPathIdentityContext.ts +2 -169
  104. package/src/internal/projectInputPathIdentity.ts +1 -0
  105. package/src/launcher/internal/parseTtsxCLI.ts +5 -4
  106. package/src/launcher/internal/prepareExecution.ts +4 -1
  107. package/src/launcher/internal/resolveSingleFileOutput.ts +8 -9
  108. package/src/launcher/internal/runTtsc.ts +5 -5
  109. package/src/launcher/internal/runTtsx.ts +17 -8
  110. package/src/launcher/internal/runtime/RuntimeEntrySources.ts +57 -0
  111. package/src/launcher/internal/runtime/RuntimeProjectOwnership.ts +23 -10
  112. package/src/launcher/internal/runtime/commonJsExportNames.ts +11 -4
  113. package/src/launcher/internal/runtime/installRuntimeHooks.ts +55 -13
  114. package/src/launcher/internal/runtime/resolveRuntimeCleanTargets.ts +17 -5
  115. package/src/launcher/internal/watch/WatchTopology.ts +387 -99
  116. package/src/launcher/internal/watch/projectInputReloadEventShouldNotify.ts +14 -9
  117. package/src/plugin/internal/load/loadProjectPlugins.ts +13 -1
  118. package/src/plugin/internal/load/resolveNativeSource.ts +10 -4
  119. package/src/plugin/internal/source/pluginModuleReplaceDirectories.ts +10 -1
  120. package/src/structures/internal/TtscCommonOptions.ts +2 -2
  121. package/internal/graphsymbols/position_helpers_follow_ecma_line_terminators_test.go +0 -78
  122. package/internal/graphsymbols/provider.go +0 -650
  123. package/internal/lspserver/lsp_symbols.go +0 -212
@@ -67,13 +67,22 @@ export function resolveRuntimeCleanTargets(cacheRoot: string): {
67
67
  const removable: string[] = [];
68
68
  for (const entry of entries) {
69
69
  const directory = path.join(physicalRuns, entry);
70
- const observe = E2ETrace.runtimeCleanup(directory, runtime, "runtime-clean-selection");
70
+ const observe = E2ETrace.runtimeCleanup(
71
+ directory,
72
+ runtime,
73
+ "runtime-clean-selection",
74
+ );
71
75
  observe?.("selection-started");
72
76
  let ownership: ReturnType<typeof ProcessOwnedDirectory.ownership>;
73
77
  try {
74
- ownership = ProcessOwnedDirectory.ownership(directory, false,
75
- observe === undefined ? undefined : (observation) =>
76
- observe("owner-observation", undefined, undefined, observation));
78
+ ownership = ProcessOwnedDirectory.ownership(
79
+ directory,
80
+ false,
81
+ observe === undefined
82
+ ? undefined
83
+ : (observation) =>
84
+ observe("owner-observation", undefined, undefined, observation),
85
+ );
77
86
  } catch (cause) {
78
87
  observe?.("selection-failed", undefined, cause);
79
88
  throw cause;
@@ -81,7 +90,10 @@ export function resolveRuntimeCleanTargets(cacheRoot: string): {
81
90
  observe?.("ownership", ownership);
82
91
  if (ownership !== "abandoned") kept.push(directory);
83
92
  else removable.push(directory);
84
- observe?.(ownership === "abandoned" ? "removal-selected" : "retention-selected", ownership);
93
+ observe?.(
94
+ ownership === "abandoned" ? "removal-selected" : "retention-selected",
95
+ ownership,
96
+ );
85
97
  }
86
98
  return {
87
99
  kept,