@ttsc/paths 0.37.2 → 0.38.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 (2) hide show
  1. package/driver/paths.go +41 -0
  2. package/package.json +1 -1
package/driver/paths.go CHANGED
@@ -111,6 +111,47 @@ func (plugin) ApplyProgram(prog *driver.Program, _ driver.PluginContext) error {
111
111
  return nil
112
112
  }
113
113
 
114
+ // CheckProgram is ApplyProgram's analysis outcome: the rewrite never fails and
115
+ // reports no diagnostic, so an analysis-only check has nothing to learn from
116
+ // it. Answering without rewriting lets a resident check host keep its Program
117
+ // across watch cycles (samchon/ttsc#1864).
118
+ //
119
+ // Principled implementation:
120
+ //
121
+ // ApplyProgram returns nil for every Program, so nil is its exact outcome.
122
+ //
123
+ // Clear and simple design:
124
+ //
125
+ // One constant answer beside the rewriting hook.
126
+ //
127
+ // Prohibited implementation shortcuts:
128
+ //
129
+ // No rewrite is skipped on an emitting path; only the analysis question is
130
+ // answered without the mutation it does not need.
131
+ //
132
+ // Meaningful documentation:
133
+ //
134
+ // The paragraph states why the answer is exact.
135
+ //
136
+ // OS-neutral implementation:
137
+ //
138
+ // No path or filesystem operation runs.
139
+ //
140
+ // Efficient algorithms:
141
+ //
142
+ // Constant time.
143
+ //
144
+ // Reuse equivalent work:
145
+ //
146
+ // The unmodified Program stays reusable by its host.
147
+ //
148
+ // Bound retention and release resources:
149
+ //
150
+ // Nothing is acquired.
151
+ func (plugin) CheckProgram(*driver.Program, driver.PluginContext) error {
152
+ return nil
153
+ }
154
+
114
155
  // rewriter holds the resolved tsconfig paths configuration used to rewrite
115
156
  // module specifiers across an entire program.
116
157
  type rewriter struct {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttsc/paths",
3
- "version": "0.37.2",
3
+ "version": "0.38.0",
4
4
  "description": "First-party ttsc plugin that rewrites emitted module specifiers from tsconfig paths.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",