@ttsc/paths 0.26.2 → 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.
- package/driver/paths.go +9 -0
- package/package.json +1 -1
package/driver/paths.go
CHANGED
|
@@ -22,6 +22,15 @@ type plugin struct{}
|
|
|
22
22
|
|
|
23
23
|
// ApplyProgram rewrites tsconfig paths aliases to relative import specifiers
|
|
24
24
|
// across every source file in the program.
|
|
25
|
+
//
|
|
26
|
+
// It deliberately declares no dependency completeness, unlike its sibling
|
|
27
|
+
// utility plugins. Two of its inputs are outside the file it rewrites: which
|
|
28
|
+
// source files the program contains, since a specifier is rewritten only when a
|
|
29
|
+
// pattern target names one (resolveSource), and the checker, which decides
|
|
30
|
+
// whether a bare `require` is the module loader or a binding some ambient
|
|
31
|
+
// declaration introduced (isModuleLoader). A complete declaration would have to
|
|
32
|
+
// name those, and the second of them is exactly the global-scope set the
|
|
33
|
+
// declaration drops, so silence keeps the sound host-owned bound (samchon/ttsc#1263).
|
|
25
34
|
func (plugin) ApplyProgram(prog *driver.Program, _ driver.PluginContext) error {
|
|
26
35
|
rewriter := newRewriter(prog)
|
|
27
36
|
for _, file := range prog.SourceFiles() {
|