@ttsc/unplugin 0.27.0 → 0.28.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.
@@ -86,8 +86,15 @@ export interface ViteServeMissingInputWatch {
86
86
  * config's `command`, as the adapter does.
87
87
  */
88
88
  serving(): boolean;
89
- /** Register one missing watch input derived for `importer`. */
90
- watch(input: string, importer: string): void;
89
+ /**
90
+ * Register one missing watch input derived for `importer`.
91
+ *
92
+ * `identity` is the filesystem identity the transform generation already
93
+ * resolved for `input`. Resolving it here instead costs a `realpath` and a
94
+ * case-sensitivity directory listing per input per delivery, because a
95
+ * per-call identity context memoizes nothing (samchon/ttsc#1246).
96
+ */
97
+ watch(input: string, importer: string, identity?: string): void;
91
98
  }
92
99
 
93
100
  /** Poll bookkeeping for one registered missing path. */
@@ -125,9 +132,9 @@ export function createViteServeMissingInputWatch(): ViteServeMissingInputWatch {
125
132
  serving() {
126
133
  return server !== undefined;
127
134
  },
128
- watch(input, importer) {
135
+ watch(input, importer, resolved) {
129
136
  const spelling = path.resolve(input);
130
- const identity = pathIdentityKey(spelling);
137
+ const identity = resolved ?? pathIdentityKey(spelling);
131
138
  const existing = entries.get(identity);
132
139
  if (existing !== undefined) {
133
140
  existing.importers.add(path.resolve(importer));