ttsc 0.21.0 → 0.23.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 (119) hide show
  1. package/cmd/ttscserver/main.go +79 -3
  2. package/cmd/ttscserver/run_lsp_uses_native_plugin_manifest_source_test.go +96 -16
  3. package/driver/lsp.go +4 -0
  4. package/go.mod +1 -1
  5. package/internal/lspserver/lsp_document_diagnostics_omits_cached_project_when_current_result_has_none_test.go +48 -0
  6. package/internal/lspserver/lsp_executable_project_input_change_requests_launcher_restart_test.go +98 -0
  7. package/internal/lspserver/lsp_external_watched_change_retains_program_test.go +53 -0
  8. package/internal/lspserver/lsp_hints_refresh_scheduled_by_editor_events_test.go +9 -0
  9. package/internal/lspserver/lsp_launcher_reload_directory_fingerprint_parity_windows_test.go +94 -0
  10. package/internal/lspserver/lsp_native_plugin_source.go +171 -55
  11. package/internal/lspserver/lsp_native_resident.go +110 -9
  12. package/internal/lspserver/lsp_plugin.go +6 -0
  13. package/internal/lspserver/lsp_project_context_transport_identity_test.go +43 -0
  14. package/internal/lspserver/lsp_project_diagnostics.go +235 -0
  15. package/internal/lspserver/lsp_project_diagnostics_capability_is_independent_test.go +67 -0
  16. package/internal/lspserver/lsp_project_diagnostics_program_input_overlap_refreshes_all_producers_test.go +78 -0
  17. package/internal/lspserver/lsp_project_diagnostics_refresh_accumulates_owner_freshness_test.go +65 -0
  18. package/internal/lspserver/lsp_project_diagnostics_refresh_keeps_each_producer_last_good_test.go +90 -0
  19. package/internal/lspserver/lsp_project_diagnostics_refreshes_only_input_owners_test.go +62 -0
  20. package/internal/lspserver/lsp_project_diagnostics_resident_unsupported_falls_back_test.go +123 -0
  21. package/internal/lspserver/lsp_project_diagnostics_resume_preserves_generation_test.go +52 -0
  22. package/internal/lspserver/lsp_project_diagnostics_translates_relative_client_project_test.go +90 -0
  23. package/internal/lspserver/lsp_project_input_glob_path_other.go +16 -0
  24. package/internal/lspserver/lsp_project_input_glob_path_windows.go +36 -0
  25. package/internal/lspserver/lsp_project_input_ownership_resolves_declared_spellings_test.go +95 -0
  26. package/internal/lspserver/lsp_project_input_path_key_other.go +17 -0
  27. package/internal/lspserver/lsp_project_input_path_key_windows.go +228 -0
  28. package/internal/lspserver/lsp_project_input_path_key_windows_test.go +460 -0
  29. package/internal/lspserver/lsp_project_input_registration.go +504 -0
  30. package/internal/lspserver/lsp_project_input_registration_rechecks_selection_baseline_test.go +71 -0
  31. package/internal/lspserver/lsp_project_input_registration_reconciles_rejected_pending_request_test.go +268 -0
  32. package/internal/lspserver/lsp_project_input_registration_shapes_patterns_test.go +94 -0
  33. package/internal/lspserver/lsp_project_input_watchers_anchor_missing_paths_test.go +48 -0
  34. package/internal/lspserver/lsp_project_inputs.go +1012 -0
  35. package/internal/lspserver/lsp_project_inputs_match_missing_exact_and_glob_test.go +129 -0
  36. package/internal/lspserver/lsp_project_inputs_reject_invalid_and_foreign_snapshots_test.go +110 -0
  37. package/internal/lspserver/lsp_proxy.go +591 -28
  38. package/internal/lspserver/lsp_reload_directories_compare_immediate_topology_test.go +188 -0
  39. package/internal/lspserver/lsp_reload_directories_separate_glob_territory_test.go +181 -0
  40. package/internal/lspserver/lsp_reload_file_fingerprint_preserves_raw_symlink_target_test.go +47 -0
  41. package/internal/lspserver/lsp_resident_falls_back_when_serve_unsupported_test.go +1 -1
  42. package/internal/lspserver/lsp_resident_invalidation_broadcasts_program_input_overlap_test.go +60 -0
  43. package/internal/lspserver/lsp_resident_invalidation_targets_project_input_owners_test.go +51 -0
  44. package/internal/lspserver/lsp_same_transport_entries_are_deduplicated_test.go +66 -0
  45. package/lib/compiler/internal/project/readProjectConfig.d.ts +5 -3
  46. package/lib/compiler/internal/project/readProjectConfig.js +46 -14
  47. package/lib/compiler/internal/project/readProjectConfig.js.map +1 -1
  48. package/lib/compiler/internal/residentCheckProcess.d.ts +46 -0
  49. package/lib/compiler/internal/residentCheckProcess.js +227 -0
  50. package/lib/compiler/internal/residentCheckProcess.js.map +1 -0
  51. package/lib/compiler/internal/resolveEmittedJavaScript.d.ts +2 -1
  52. package/lib/compiler/internal/resolveEmittedJavaScript.js +35 -18
  53. package/lib/compiler/internal/resolveEmittedJavaScript.js.map +1 -1
  54. package/lib/compiler/internal/runBuild.d.ts +64 -1
  55. package/lib/compiler/internal/runBuild.js +484 -7
  56. package/lib/compiler/internal/runBuild.js.map +1 -1
  57. package/lib/compiler/internal/runSingleFileEmit.js +1 -0
  58. package/lib/compiler/internal/runSingleFileEmit.js.map +1 -1
  59. package/lib/flags/parser.js +13 -17
  60. package/lib/flags/parser.js.map +1 -1
  61. package/lib/flags/schema.d.ts +10 -3
  62. package/lib/flags/schema.js +99 -0
  63. package/lib/flags/schema.js.map +1 -1
  64. package/lib/internal/projectInputPathIdentity.d.ts +31 -0
  65. package/lib/internal/projectInputPathIdentity.js +276 -0
  66. package/lib/internal/projectInputPathIdentity.js.map +1 -0
  67. package/lib/internal/windowsDirectoryCaseSensitivity.d.ts +10 -0
  68. package/lib/internal/windowsDirectoryCaseSensitivity.js +34 -0
  69. package/lib/internal/windowsDirectoryCaseSensitivity.js.map +1 -0
  70. package/lib/launcher/internal/runTtsc.d.ts +17 -0
  71. package/lib/launcher/internal/runTtsc.js +126 -88
  72. package/lib/launcher/internal/runTtsc.js.map +1 -1
  73. package/lib/launcher/internal/runTtscserver.d.ts +13 -1
  74. package/lib/launcher/internal/runTtscserver.js +468 -47
  75. package/lib/launcher/internal/runTtscserver.js.map +1 -1
  76. package/lib/launcher/internal/runTtsx.js +61 -7
  77. package/lib/launcher/internal/runTtsx.js.map +1 -1
  78. package/lib/launcher/internal/runtimeHooks.d.ts +6 -5
  79. package/lib/launcher/internal/runtimeHooks.js +7 -15
  80. package/lib/launcher/internal/runtimeHooks.js.map +1 -1
  81. package/lib/launcher/internal/singleFileOutput.d.ts +16 -0
  82. package/lib/launcher/internal/singleFileOutput.js +103 -0
  83. package/lib/launcher/internal/singleFileOutput.js.map +1 -0
  84. package/lib/launcher/internal/watchTopology.d.ts +288 -2
  85. package/lib/launcher/internal/watchTopology.js +1921 -54
  86. package/lib/launcher/internal/watchTopology.js.map +1 -1
  87. package/lib/plugin/internal/descriptorProcessFailure.d.ts +32 -0
  88. package/lib/plugin/internal/descriptorProcessFailure.js +73 -0
  89. package/lib/plugin/internal/descriptorProcessFailure.js.map +1 -0
  90. package/lib/plugin/internal/loadProjectPlugins.d.ts +1 -0
  91. package/lib/plugin/internal/loadProjectPlugins.js +34 -8
  92. package/lib/plugin/internal/loadProjectPlugins.js.map +1 -1
  93. package/lib/structures/ITtscPluginCapabilities.d.ts +31 -0
  94. package/lib/structures/internal/ITtscProjectInputSnapshot.d.ts +29 -0
  95. package/lib/structures/internal/ITtscProjectInputSnapshot.js +3 -0
  96. package/lib/structures/internal/ITtscProjectInputSnapshot.js.map +1 -0
  97. package/lib/structures/internal/TtscSingleFileEmitOptions.d.ts +5 -0
  98. package/package.json +12 -8
  99. package/src/compiler/internal/project/readProjectConfig.ts +62 -8
  100. package/src/compiler/internal/residentCheckProcess.ts +279 -0
  101. package/src/compiler/internal/resolveEmittedJavaScript.ts +43 -21
  102. package/src/compiler/internal/runBuild.ts +728 -12
  103. package/src/compiler/internal/runSingleFileEmit.ts +1 -0
  104. package/src/flags/parser.ts +17 -17
  105. package/src/flags/schema.ts +112 -3
  106. package/src/internal/projectInputPathIdentity.ts +377 -0
  107. package/src/internal/windowsDirectoryCaseSensitivity.ts +33 -0
  108. package/src/launcher/internal/runTtsc.ts +148 -117
  109. package/src/launcher/internal/runTtscserver.ts +633 -56
  110. package/src/launcher/internal/runTtsx.ts +87 -10
  111. package/src/launcher/internal/runtimeHooks.ts +16 -16
  112. package/src/launcher/internal/singleFileOutput.ts +133 -0
  113. package/src/launcher/internal/watchTopology.ts +2494 -74
  114. package/src/plugin/internal/descriptorProcessFailure.ts +100 -0
  115. package/src/plugin/internal/loadProjectPlugins.ts +49 -8
  116. package/src/structures/ITtscPluginCapabilities.ts +34 -0
  117. package/src/structures/internal/ITtscProjectInputSnapshot.ts +29 -0
  118. package/src/structures/internal/TtscSingleFileEmitOptions.ts +5 -0
  119. package/tools/shim_audit/baseline.json +0 -9
@@ -1,13 +1,28 @@
1
+ import { type ProjectInputPathIdentityContext } from "../../internal/projectInputPathIdentity";
2
+ import type { ITtscProjectInputSnapshot } from "../../structures/internal/ITtscProjectInputSnapshot";
1
3
  import type { TtscBuildOptions } from "../../structures/internal/TtscBuildOptions";
2
- type WatchTopologyOptions = Pick<TtscBuildOptions, "binary" | "env" | "outDir" | "passthrough" | "projectRoot" | "tsconfig"> & {
4
+ type WatchTopologyOptions = Pick<TtscBuildOptions, "binary" | "emit" | "env" | "outDir" | "passthrough" | "projectRoot" | "tsconfig"> & {
3
5
  cwd: string;
4
6
  files: readonly string[];
5
7
  };
6
8
  type WatchTopologyCallbacks = {
7
9
  onError(location: string, error: unknown): void;
8
- onInputChange(): void;
10
+ onInputChange(change: WatchInputChange): void;
11
+ onProjectInputWatchUnavailable?(roots: readonly string[]): void;
12
+ onProjectInputWatchRoots?(roots: readonly string[]): void;
9
13
  onTopologyChange(): void;
10
14
  };
15
+ export type WatchInputChange = {
16
+ /** Keep the resident process but cold-load its compiler Program. */
17
+ invalidate?: boolean;
18
+ kind: "compiler" | "config" | "plugin" | "project";
19
+ path?: string;
20
+ };
21
+ export type CompilerDirectoryWatchEventPlan = {
22
+ changes: string[];
23
+ rearm: string[];
24
+ refresh: boolean;
25
+ };
11
26
  /**
12
27
  * Keeps the launcher watch set aligned with the compiler's current program.
13
28
  *
@@ -19,25 +34,296 @@ type WatchTopologyCallbacks = {
19
34
  export declare class WatchTopology {
20
35
  private readonly options;
21
36
  private readonly callbacks;
37
+ private analysisOnly;
38
+ private closed;
39
+ private compilerPostRegistrationMembershipRefresh;
40
+ private compilerPostRegistrationReconciliationScheduled;
41
+ private compilerPostRegistrationSkipUnobservedProjectInputWatchRoots;
22
42
  private directories;
23
43
  private directoryWatchers;
24
44
  private extraInputs;
25
45
  private extraWatchers;
46
+ private compilerFileSnapshots;
26
47
  private files;
27
48
  private fileWatchers;
28
49
  private observedDirectories;
50
+ private outputFiles;
29
51
  private outputs;
52
+ private projectInputFingerprints;
53
+ private projectInputMatches;
54
+ private projectInputs;
55
+ private declaredProjectInputs;
56
+ private projectInputRecoveryScheduled;
57
+ private projectInputPostRegistrationReconciliationScheduled;
58
+ private projectInputRejectedWatchRoots;
59
+ private projectInputRequiredWatchRoots;
60
+ private projectInputUnobservedWatchRoots;
61
+ private projectInputWatchRoots;
62
+ private projectInputWatchers;
63
+ private projectInputLinkWatchers;
64
+ private projectInputCompilerOutputOverlaps;
65
+ private projectInputCompilerAcknowledgements;
66
+ private reloadFiles;
30
67
  constructor(options: WatchTopologyOptions, callbacks: WatchTopologyCallbacks);
31
68
  /** Re-resolve compiler inputs and notify only when their membership changed. */
32
69
  refresh(notify: boolean): void;
70
+ private refreshCompilerInputs;
71
+ /**
72
+ * Hand one Program-membership transition from the compiler lane to the
73
+ * overlapping project-input lane.
74
+ *
75
+ * Windows can deliver the compiler membership refresh before the recursive
76
+ * project watcher names the same creation. The rebuild scheduled here already
77
+ * consumes the current project bytes, so publishing their strong fingerprints
78
+ * keeps the later parent event from rediscovering the same population delta.
79
+ * A newly tracked compiler file also remembers that fingerprint until its
80
+ * first named content delivery; identical bytes are the delayed creation,
81
+ * while different bytes are a real later edit and remain observable even
82
+ * inside filesystem timestamp resolution.
83
+ */
84
+ private acknowledgeProjectInputCompilerMembership;
33
85
  /** Add Go plugin source trees discovered by the real build lane. */
34
86
  setExtraInputs(inputs: readonly string[]): void;
87
+ /**
88
+ * Reconcile project-rule dependencies, retaining absent files and empty glob
89
+ * populations as live topology.
90
+ */
91
+ setProjectInputs(inputs: ITtscProjectInputSnapshot): void;
35
92
  /** Close every watcher so SIGINT/SIGTERM can drain the event loop. */
36
93
  close(): void;
37
94
  private syncFileWatchers;
95
+ /** Compare a tracked file's content and physical owner with its snapshot. */
96
+ private compilerFileMovement;
38
97
  private syncDirectoryWatchers;
98
+ /**
99
+ * Reconcile tracked compiler files after a newly registered watcher returns.
100
+ *
101
+ * A file or directory watcher can be returned before its backend is ready to
102
+ * deliver the first event. The compiler-file stamps were captured before
103
+ * registration, so one coalesced microtask can recover a change in that
104
+ * handoff window. A real event updates the same stamp first and makes this
105
+ * bounded scan a no-op.
106
+ */
107
+ private scheduleCompilerPostRegistrationReconciliation;
108
+ /**
109
+ * Narrow a plan's changes to the tracked files that actually moved.
110
+ *
111
+ * A backend that cannot name what changed forces the plan to nominate every
112
+ * tracked file under the watched directory, which is the only safe answer it
113
+ * can give from an event carrying no filename. macOS delivers such events for
114
+ * ordinary activity elsewhere in the project, so the compiler lane would wake
115
+ * for sources nobody touched. Only a content notification passes through: it
116
+ * is the one event that claims the bytes moved. A rename claims the directory
117
+ * entry was rewritten and an unnamed event claims nothing, so both are
118
+ * decided from the bytes, which is the question neither of them answered.
119
+ */
120
+ private compilerChangesToReport;
121
+ private recordCompilerFileSnapshot;
122
+ private rearmFileWatchers;
39
123
  private syncExtraWatchers;
124
+ private syncProjectInputWatchers;
125
+ /**
126
+ * Watch the directory that holds a declaration which is itself a link.
127
+ *
128
+ * A recursive watcher cannot report the link being replaced. The backend that
129
+ * keys its handles by path skips an entry it already knows, and the handle it
130
+ * put on the entry followed the link to the target's inode, which unlinking
131
+ * and recreating the link never touches. A plain directory watch has neither
132
+ * property: it reports the entry by name the moment it moves. These are kept
133
+ * apart from the recursive roots because they are not roots — they observe
134
+ * one directory, they are never reported as watch roots, and an ancestor
135
+ * covering them does not make them redundant.
136
+ */
137
+ private syncProjectInputLinkWatchers;
138
+ /** Drop the watcher that just reported a directory replacement. */
139
+ private retireProjectInputWatcher;
140
+ private retainProjectInputWatchRoot;
141
+ /**
142
+ * Retry a failed root on the next reconciliation instead of retiring it for
143
+ * the session.
144
+ *
145
+ * This immediate recovery pass still honors the rejected root so it can
146
+ * install a safe ancestor where one exists. Only the recovery fixpoint
147
+ * reports a genuinely uncovered lane; transient gaps between fallback
148
+ * candidates are not user-visible. The rejection then expires. A later
149
+ * compiler refresh or an unchanged project-input republication can retry the
150
+ * original root, while a permanently failing backend costs at most one
151
+ * attempt per sync.
152
+ */
153
+ private scheduleProjectInputWatcherRecovery;
154
+ /**
155
+ * Reconcile the snapshot-to-watcher handoff after the caller's current turn.
156
+ *
157
+ * A recursive watcher can return before its backend is ready to deliver the
158
+ * first event. The publication baseline is necessarily captured before that
159
+ * watcher exists, so an input materialized synchronously after
160
+ * `setProjectInputs()` would otherwise depend entirely on that startup event.
161
+ * The ordinary fingerprint update makes this scan and a real backend event
162
+ * race safely: whichever arrives first records the new population and the
163
+ * other becomes a no-op.
164
+ */
165
+ private scheduleProjectInputPostRegistrationReconciliation;
166
+ /**
167
+ * Re-resolve declarations after watcher registration.
168
+ *
169
+ * A missing path can become a symlink before the handoff scan. The retained
170
+ * normalized snapshot still names the pre-link spelling in that case, so a
171
+ * scan can find the first target file without installing the physical owner
172
+ * that must observe later target changes.
173
+ */
174
+ private refreshPublishedProjectInputIdentities;
175
+ /** Drop retained owner choices for declarations no longer published. */
176
+ private pruneProjectInputWatchRoots;
177
+ /** Report only newly uncovered project-input roots as an observation loss. */
178
+ private reportUnobservedProjectInputWatchRoots;
179
+ /**
180
+ * One snapshot holding every spelling of every declaration.
181
+ *
182
+ * Consumers that decide from a population rather than from a single path have
183
+ * to see both, or half of them answer from the file a link pointed at when
184
+ * the snapshot was published while the event they are judging resolved to the
185
+ * file it points at now.
186
+ */
187
+ private projectInputPopulation;
188
+ /**
189
+ * Every spelling of one declaration that has to be anchored separately.
190
+ *
191
+ * The retained snapshot is normalized to physical identities, which is what
192
+ * every comparison needs but not what every watcher needs: a declaration
193
+ * reached through a symlink resolves to its target's directory, so anchoring
194
+ * the normalized form alone watches the bytes and never the link. Retargeting
195
+ * or replacing the link then goes unobserved, even though it is exactly what
196
+ * decides which bytes the declaration names next. Both spellings are planned
197
+ * through the same root selection, so the project-root hoist and the
198
+ * nearest-existing-ancestor boundary still bound each of them, and the active
199
+ * set drops one again whenever they coincide or share an ancestor.
200
+ */
201
+ private projectInputDeclarations;
202
+ private projectInputWatchRoot;
203
+ private refreshProjectInputs;
204
+ private collectProjectInputMatches;
40
205
  private refreshFromDirectory;
41
206
  private isCompilerOutputDirectory;
207
+ private isCompilerOutput;
208
+ private isProjectInputCompilerOutputDirectory;
209
+ private isProjectInputCompilerOutput;
210
+ private isProjectInputDirectory;
211
+ private classifyCompilerInput;
212
+ private isPluginInput;
42
213
  }
214
+ export declare function reloadInputsForFailedTopologyRefresh(reloadFiles: Iterable<string>, changed?: string): string[];
215
+ type SynchronizedWatcher = {
216
+ close(): void;
217
+ on(event: "error", listener: (error: Error) => void): unknown;
218
+ };
219
+ export declare function syncWatchers<T extends SynchronizedWatcher>(watchers: Map<string, T>, desired: ReadonlyMap<string, string>, create: (location: string, key: string) => T, onError: (location: string, error: unknown) => void, shouldContinue?: () => boolean): boolean;
220
+ export declare function literalGlobRoot(pattern: string): string;
221
+ /**
222
+ * Chooses the one stable recursive watcher root owned by a project-input
223
+ * declaration.
224
+ *
225
+ * Inputs inside the project share its physical root so directory replacement
226
+ * cannot strand a child handle. External inputs use the nearest existing
227
+ * ancestor of their declared parent, which is the explicit boundary for
228
+ * observing a currently missing external tree without polling every file --
229
+ * except that the boundary never rises to a directory holding the project,
230
+ * since such a root outranks the project's own in the active merge and leaves
231
+ * one handle over a shared system directory to carry everything. An external
232
+ * declaration that can only be owned that way falls back to its own tree, and
233
+ * is left unwatched when even that would contain the project.
234
+ */
235
+ export declare function projectInputWatchDirectories(target: string, projectRoot: string): string[];
236
+ /**
237
+ * Removes recursive roots already covered by an ancestor without rewriting the
238
+ * declaration-specific roots retained by WatchTopology.
239
+ */
240
+ export declare function projectInputActiveWatchDirectories(directories: Iterable<string>, identities?: import("../../internal/projectInputPathIdentity").FilesystemPathIdentityContext): string[];
241
+ export declare function projectInputAvailableWatchDirectory(location: string, rejected: ReadonlySet<string>, identities?: ProjectInputPathIdentityContext, projectRoot?: string): string | undefined;
242
+ /**
243
+ * Whether a replacement at this path leaves a recursive watcher bound to the
244
+ * object that was replaced.
245
+ *
246
+ * Only one backend needs the answer. Node routes a recursive watch to its own
247
+ * per-directory implementation when the platform is neither macOS nor Windows,
248
+ * and that implementation keys its handles by path: the handle for a directory
249
+ * renamed away stays bound to the object that left, and any child whose name
250
+ * survives the swap is skipped as already known. The native subtree backends
251
+ * both other platforms use follow the path, so retiring their watcher would buy
252
+ * nothing and would open a window in which no events are delivered.
253
+ *
254
+ * The answer is deliberately narrower than the rescan rule, because
255
+ * reinstalling a root costs one watch descriptor per entry beneath it, which an
256
+ * install storm would pay thousands of times. A directory appearing inside a
257
+ * glob root deserves a rescan but replaces nothing a root stands on, and a
258
+ * reload directory anchors the directory that contains it rather than itself,
259
+ * since its fingerprint is a digest of its own immediate entries and nothing
260
+ * below it can reach the declared corpus.
261
+ */
262
+ export declare function projectInputReplacementStrandsWatchers(snapshot: ITtscProjectInputSnapshot, location: string, identities?: import("../../internal/projectInputPathIdentity").FilesystemPathIdentityContext, platform?: NodeJS.Platform): boolean;
263
+ /**
264
+ * Decide whether an event that named no declared input can still have moved
265
+ * one.
266
+ *
267
+ * The admitted set is the only bound on how often a watch session re-reads and
268
+ * re-hashes its declared corpus, and both directions cost: too narrow drops an
269
+ * atomic replacement, too wide re-fingerprints on every entry an install
270
+ * creates. Exported so that boundary is pinned directly instead of being
271
+ * inferred from a rebuild that a silent rescan and a skipped rescan produce
272
+ * identically.
273
+ */
274
+ export declare function projectInputTopologyMayAffect(snapshot: ITtscProjectInputSnapshot, location: string, previous: ReadonlyMap<string, string>, identities?: import("../../internal/projectInputPathIdentity").FilesystemPathIdentityContext): boolean;
275
+ export declare function projectInputEventShouldNotify(input: {
276
+ contentChanged: boolean;
277
+ directlyMatched: boolean;
278
+ membershipChanged: boolean;
279
+ }): boolean;
280
+ /**
281
+ * Classify an exact execution-selection input ahead of ordinary project data.
282
+ *
283
+ * `changedInputs` carries fingerprint or membership deltas, so a filename-less
284
+ * event can still select the cold lane. A named exact event selects the cold
285
+ * lane only after the surrounding change detector admits the event; unchanged
286
+ * bytes remain quiet before this classifier is observed.
287
+ */
288
+ export declare function projectInputReloadEventShouldNotify(input: {
289
+ causedBy?: readonly string[];
290
+ changed?: string;
291
+ changedInputs: readonly string[];
292
+ reloadDirectories?: readonly string[];
293
+ reloadFiles: readonly string[];
294
+ globs?: readonly string[];
295
+ }): boolean;
296
+ /**
297
+ * Return whether a project-input population transition can reshape a Program.
298
+ *
299
+ * JSON is data to a ProjectRule but may simultaneously be a `resolveJsonModule`
300
+ * source. TypeScript and JavaScript paths can likewise overlap a project-input
301
+ * declaration. Their creation or deletion therefore requires a cold Program
302
+ * inside the existing resident process. A filename-less event cannot identify
303
+ * the changed member and is conservatively invalidating whenever the population
304
+ * moved.
305
+ */
306
+ export declare function projectInputMembershipInvalidatesProgram(input: {
307
+ changed?: string;
308
+ changedInputs?: readonly string[];
309
+ contentChanged?: boolean;
310
+ next: ReadonlyMap<string, string>;
311
+ previous: ReadonlyMap<string, string>;
312
+ }): boolean;
313
+ /**
314
+ * Plan one compiler-directory event without relying on backend timing.
315
+ *
316
+ * POSIX file watchers own ordinary content changes. A named rename re-arms the
317
+ * replaced file; an unnamed event conservatively re-arms and reports every
318
+ * surviving tracked input below the watch root. Windows has no per-file
319
+ * watchers here, so both named and unnamed directory events report inputs.
320
+ */
321
+ export declare function planCompilerDirectoryWatchEvent(input: {
322
+ changed?: string;
323
+ event: string;
324
+ exists(location: string): boolean;
325
+ location: string;
326
+ platform: NodeJS.Platform;
327
+ trackedFiles: ReadonlyMap<string, string>;
328
+ }): CompilerDirectoryWatchEventPlan;
43
329
  export {};