vue-go-tsc 0.2.0 → 0.2.2

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/bin/vue-go-tsc CHANGED
@@ -1,15 +1,296 @@
1
- #!/usr/bin/env node
2
-
3
- const { spawnSync } = require('child_process');
4
- const { join } = require('path');
5
-
6
- const BINARY_NAME = process.platform === 'win32' ? 'tsgo.exe' : 'tsgo';
7
- const BIN_PATH = join(__dirname, BINARY_NAME);
8
-
9
- // Forward all arguments to the binary
10
- const result = spawnSync(BIN_PATH, process.argv.slice(2), {
11
- stdio: 'inherit',
12
- shell: false,
13
- });
14
-
15
- process.exit(result.status || 0);
1
+ #!/usr/bin/env node
2
+
3
+ const { spawn } = require('child_process');
4
+ const fs = require('fs');
5
+ const { join } = require('path');
6
+ const os = require('os');
7
+
8
+ const GiB = 1024 ** 3;
9
+
10
+ // Fraction of the CPU cores a lone tsgo run may use. The Go runtime defaults
11
+ // GOMAXPROCS to every core, and tsgo parses/binds with one goroutine per file,
12
+ // so an unbounded run pins the whole machine at 100% CPU. Half of the cores
13
+ // keeps a lone typecheck fast while leaving the machine responsive.
14
+ const DEFAULT_CPU_FRACTION = 0.5;
15
+
16
+ // Fraction of total RAM used as the soft Go heap ceiling of a lone run. Half
17
+ // of RAM leaves ample headroom for the OS, Node, and other jobs.
18
+ const DEFAULT_MEM_FRACTION = 0.5;
19
+
20
+ // Fraction of total RAM shared by all concurrent runs. GOMEMLIMIT is
21
+ // per-process: without sharing, N concurrent runs would each claim 50% of RAM,
22
+ // overcommit it, and spend their time in the GC as the machine fills up.
23
+ const SHARED_MEM_FRACTION = 0.75;
24
+
25
+ // Fraction of the currently available RAM a run may claim. The rest is left as
26
+ // headroom for whatever else is running and may still grow.
27
+ const AVAILABLE_MEM_FRACTION = 0.8;
28
+
29
+ // A busy machine never squeezes a run below this fraction of the cores: the
30
+ // idle measurement is a short snapshot, and a momentary spike elsewhere must
31
+ // not cripple a typecheck for its whole duration. The kernel scheduler shares
32
+ // the cores fairly beyond that.
33
+ const MIN_CPU_FRACTION = 0.125;
34
+
35
+ // How long the launcher samples CPU activity before starting tsgo.
36
+ const CPU_SAMPLE_MS = 200;
37
+
38
+ // Never set a heap ceiling below this: a limit under a project's live heap
39
+ // makes the Go GC run continuously instead of making progress.
40
+ const MIN_MEM_LIMIT = 1 * GiB;
41
+
42
+ // Registry entries older than this are treated as stale even if their PID is
43
+ // alive again (PID reuse after a crash that skipped cleanup).
44
+ const STALE_ENTRY_MS = 24 * 60 * 60 * 1000;
45
+
46
+ const REGISTRY_DIR = join(os.tmpdir(), 'vue-go-tsc-instances');
47
+
48
+ // Compute GOMAXPROCS for one of `instances` concurrent runs on a machine with
49
+ // `cpus` cores of which `idleCpus` are currently idle.
50
+ //
51
+ // The run takes the smallest of: half of the cores, its fair share when
52
+ // several runs are active, and the cores other work leaves idle. It is never
53
+ // squeezed below MIN_CPU_FRACTION of the cores (and at least one core).
54
+ // `idleCpus` is optional: when unknown, only the first two bounds apply.
55
+ //
56
+ // Returns null when the core count is unknown (leave Go's default).
57
+ function computeGoMaxProcs(cpus, instances = 1, idleCpus) {
58
+ if (!Number.isFinite(cpus) || cpus <= 0) {
59
+ return null;
60
+ }
61
+ const n = Math.max(1, Math.floor(instances) || 1);
62
+ const cap = Math.max(1, Math.min(Math.floor(cpus * DEFAULT_CPU_FRACTION), Math.floor(cpus / n)));
63
+ if (!Number.isFinite(idleCpus) || idleCpus < 0) {
64
+ return cap;
65
+ }
66
+ const floor = Math.min(cap, Math.max(1, Math.floor(cpus * MIN_CPU_FRACTION)));
67
+ return Math.max(floor, Math.min(cap, Math.floor(idleCpus)));
68
+ }
69
+
70
+ // Number of idle cores between two `os.cpus()` snapshots, scaled to the
71
+ // `cpus` usable by this process. Returns undefined when nothing was measured.
72
+ function measureIdleCpus(before, after, cpus) {
73
+ let idle = 0;
74
+ let total = 0;
75
+ for (let i = 0; i < Math.min(before.length, after.length); i++) {
76
+ const a = before[i].times;
77
+ const b = after[i].times;
78
+ const idleDelta = b.idle - a.idle;
79
+ const totalDelta = b.user + b.nice + b.sys + b.idle + b.irq - (a.user + a.nice + a.sys + a.idle + a.irq);
80
+ idle += Math.max(0, idleDelta);
81
+ total += Math.max(0, totalDelta);
82
+ }
83
+ if (total <= 0) {
84
+ return undefined;
85
+ }
86
+ return (idle / total) * cpus;
87
+ }
88
+
89
+ // Compute a soft Go heap ceiling (in bytes) for one of `instances` concurrent
90
+ // runs based on total RAM.
91
+ //
92
+ // tsgo is the typescript-go native binary; its Go runtime defaults to GOGC=100,
93
+ // which lets the heap roughly double before the GC runs. On a large Nuxt
94
+ // project that transient spike can exceed physical RAM and get the process
95
+ // OOM-killed by the kernel. Setting GOMEMLIMIT makes the GC increasingly
96
+ // aggressive as the heap approaches the limit, trading CPU for staying under
97
+ // the ceiling. It is a *soft* limit — swap absorbs any remaining overshoot
98
+ // instead of a hard kill, and it can be raised via the GOMEMLIMIT env var when
99
+ // a project's live heap genuinely needs more.
100
+ //
101
+ // A lone run gets at most half of RAM; concurrent runs split a shared pool so
102
+ // their combined ceilings stay below physical RAM. The run also never claims
103
+ // more than AVAILABLE_MEM_FRACTION of the RAM currently available
104
+ // (`availableBytes`, optional), so memory held by other programs is left
105
+ // alone. The fair-share bound still matters on top of that: other runs that
106
+ // just started have not grown their heap yet.
107
+ //
108
+ // Returns null when total RAM is unknown/implausible (leave Go's default).
109
+ function computeGoMemLimit(totalBytes, instances = 1, availableBytes) {
110
+ if (!Number.isFinite(totalBytes) || totalBytes <= 0) {
111
+ return null;
112
+ }
113
+ const n = Math.max(1, Math.floor(instances) || 1);
114
+ let share = Math.min(totalBytes * DEFAULT_MEM_FRACTION, (totalBytes * SHARED_MEM_FRACTION) / n);
115
+ if (Number.isFinite(availableBytes) && availableBytes >= 0) {
116
+ share = Math.min(share, availableBytes * AVAILABLE_MEM_FRACTION);
117
+ }
118
+ return Math.floor(Math.max(Math.min(MIN_MEM_LIMIT, totalBytes * DEFAULT_MEM_FRACTION), share));
119
+ }
120
+
121
+ // Return a copy of `env` with GOMAXPROCS and GOMEMLIMIT defaulted from the
122
+ // machine resources, what is currently free, and the number of concurrent
123
+ // runs. Explicit values are always respected (never overridden).
124
+ function resolveEnv(env, { cpus, totalMem, instances = 1, idleCpus, availableMem }) {
125
+ const out = { ...env };
126
+ if (!out.GOMAXPROCS) {
127
+ const procs = computeGoMaxProcs(cpus, instances, idleCpus);
128
+ if (procs) {
129
+ out.GOMAXPROCS = String(procs);
130
+ }
131
+ }
132
+ if (!out.GOMEMLIMIT) {
133
+ const limit = computeGoMemLimit(totalMem, instances, availableMem);
134
+ if (limit) {
135
+ // A bare integer is interpreted by the Go runtime as a byte count.
136
+ out.GOMEMLIMIT = String(limit);
137
+ }
138
+ }
139
+ return out;
140
+ }
141
+
142
+ function isProcessAlive(pid) {
143
+ try {
144
+ process.kill(pid, 0);
145
+ return true;
146
+ } catch (err) {
147
+ // EPERM: the process exists but belongs to another user.
148
+ return err.code === 'EPERM';
149
+ }
150
+ }
151
+
152
+ // Register this run in the shared instance registry and return the number of
153
+ // live runs (including this one) plus a function that unregisters it.
154
+ //
155
+ // Each run owns one `<pid>` file in `dir`. Entries whose process is gone (a
156
+ // run killed before it could clean up) are pruned on the way. Registering
157
+ // before counting means two runs starting at the same moment see each other.
158
+ // Any filesystem failure degrades to "alone" rather than blocking the check.
159
+ function registerInstance(dir = REGISTRY_DIR, pid = process.pid, now = Date.now()) {
160
+ const self = join(dir, String(pid));
161
+ try {
162
+ fs.mkdirSync(dir, { recursive: true });
163
+ fs.writeFileSync(self, String(now));
164
+ } catch {
165
+ return { instances: 1, unregister: () => {} };
166
+ }
167
+
168
+ let instances = 1;
169
+ try {
170
+ for (const name of fs.readdirSync(dir)) {
171
+ const other = Number(name);
172
+ if (!Number.isInteger(other) || other <= 0 || other === pid) {
173
+ continue;
174
+ }
175
+ const entry = join(dir, name);
176
+ let startedAt = NaN;
177
+ try {
178
+ startedAt = Number(fs.readFileSync(entry, 'utf8'));
179
+ } catch {
180
+ continue;
181
+ }
182
+ if (isProcessAlive(other) && now - startedAt < STALE_ENTRY_MS) {
183
+ instances++;
184
+ } else {
185
+ try {
186
+ fs.unlinkSync(entry);
187
+ } catch {}
188
+ }
189
+ }
190
+ } catch {}
191
+
192
+ return {
193
+ instances,
194
+ unregister: () => {
195
+ try {
196
+ fs.unlinkSync(self);
197
+ } catch {}
198
+ },
199
+ };
200
+ }
201
+
202
+ // Usable core count: honors CPU affinity (taskset, container cpusets).
203
+ function availableCpus() {
204
+ return typeof os.availableParallelism === 'function' ? os.availableParallelism() : os.cpus().length;
205
+ }
206
+
207
+ // Usable RAM: honors a cgroup memory limit (containers) when it is tighter
208
+ // than physical RAM.
209
+ function totalMemory() {
210
+ const total = os.totalmem();
211
+ const constrained = typeof process.constrainedMemory === 'function' ? process.constrainedMemory() : 0;
212
+ return constrained > 0 && constrained < total ? constrained : total;
213
+ }
214
+
215
+ // RAM currently available to this process (MemAvailable on Linux, bounded by
216
+ // the cgroup limit when there is one).
217
+ function freeMemory() {
218
+ return typeof process.availableMemory === 'function' ? process.availableMemory() : os.freemem();
219
+ }
220
+
221
+ // Idle cores right now, sampled over CPU_SAMPLE_MS.
222
+ function sampleIdleCpus(cpus) {
223
+ const before = os.cpus();
224
+ return new Promise((resolve) => {
225
+ setTimeout(() => resolve(measureIdleCpus(before, os.cpus(), cpus)), CPU_SAMPLE_MS);
226
+ });
227
+ }
228
+
229
+ async function main() {
230
+ const BINARY_NAME = process.platform === 'win32' ? 'tsgo.exe' : 'tsgo';
231
+ const BIN_PATH = join(__dirname, BINARY_NAME);
232
+
233
+ const { instances, unregister } = registerInstance();
234
+ process.on('exit', unregister);
235
+
236
+ const cpus = availableCpus();
237
+ // Sampling costs CPU_SAMPLE_MS of startup; skip it when it cannot matter.
238
+ const idleCpus = process.env.GOMAXPROCS ? undefined : await sampleIdleCpus(cpus);
239
+
240
+ const env = resolveEnv(process.env, {
241
+ cpus,
242
+ totalMem: totalMemory(),
243
+ instances,
244
+ idleCpus,
245
+ availableMem: freeMemory(),
246
+ });
247
+
248
+ // Forward all arguments to the binary
249
+ const child = spawn(BIN_PATH, process.argv.slice(2), {
250
+ stdio: 'inherit',
251
+ shell: false,
252
+ env,
253
+ });
254
+
255
+ // Keep the launcher alive until tsgo exits so the registry entry stays
256
+ // accurate; tsgo receives terminal signals directly from the process group,
257
+ // and signals sent to the launcher alone are forwarded.
258
+ for (const signal of ['SIGINT', 'SIGTERM', 'SIGHUP']) {
259
+ process.on(signal, () => {
260
+ child.kill(signal);
261
+ });
262
+ }
263
+
264
+ child.on('error', (err) => {
265
+ console.error(`vue-go-tsc: failed to start ${BIN_PATH}: ${err.message}`);
266
+ process.exit(1);
267
+ });
268
+
269
+ child.on('exit', (code, signal) => {
270
+ if (signal) {
271
+ // Report a killed tsgo (e.g. OOM killer) as a failure, not a success.
272
+ const signum = os.constants.signals[signal];
273
+ process.exit(signum ? 128 + signum : 1);
274
+ }
275
+ process.exit(code ?? 1);
276
+ });
277
+ }
278
+
279
+ if (require.main === module) {
280
+ main();
281
+ }
282
+
283
+ module.exports = {
284
+ computeGoMaxProcs,
285
+ computeGoMemLimit,
286
+ measureIdleCpus,
287
+ resolveEnv,
288
+ registerInstance,
289
+ GiB,
290
+ DEFAULT_CPU_FRACTION,
291
+ DEFAULT_MEM_FRACTION,
292
+ SHARED_MEM_FRACTION,
293
+ MIN_MEM_LIMIT,
294
+ AVAILABLE_MEM_FRACTION,
295
+ MIN_CPU_FRACTION,
296
+ };
@@ -0,0 +1,188 @@
1
+ // Run with: node --test cli/bin/vue-go-tsc.test.js
2
+ const { test } = require('node:test');
3
+ const assert = require('node:assert');
4
+ const fs = require('node:fs');
5
+ const os = require('node:os');
6
+ const path = require('node:path');
7
+
8
+ const {
9
+ computeGoMaxProcs,
10
+ computeGoMemLimit,
11
+ measureIdleCpus,
12
+ resolveEnv,
13
+ registerInstance,
14
+ GiB,
15
+ DEFAULT_MEM_FRACTION,
16
+ MIN_MEM_LIMIT,
17
+ AVAILABLE_MEM_FRACTION,
18
+ } = require('./vue-go-tsc');
19
+
20
+ const machine = { cpus: 16, totalMem: 8 * GiB };
21
+
22
+ test('computeGoMaxProcs defaults to half of the cores when alone', () => {
23
+ assert.strictEqual(computeGoMaxProcs(16), 8);
24
+ assert.strictEqual(computeGoMaxProcs(16, 1), 8);
25
+ assert.strictEqual(computeGoMaxProcs(4), 2);
26
+ });
27
+
28
+ test('computeGoMaxProcs shares the cores between concurrent runs', () => {
29
+ assert.strictEqual(computeGoMaxProcs(16, 2), 8);
30
+ assert.strictEqual(computeGoMaxProcs(16, 3), 5);
31
+ assert.strictEqual(computeGoMaxProcs(16, 4), 4);
32
+ assert.strictEqual(computeGoMaxProcs(16, 8), 2);
33
+ });
34
+
35
+ test('computeGoMaxProcs never goes below one core', () => {
36
+ assert.strictEqual(computeGoMaxProcs(1), 1);
37
+ assert.strictEqual(computeGoMaxProcs(2, 5), 1);
38
+ assert.strictEqual(computeGoMaxProcs(16, 100), 1);
39
+ });
40
+
41
+ test('computeGoMaxProcs returns null for unknown core counts', () => {
42
+ assert.strictEqual(computeGoMaxProcs(0), null);
43
+ assert.strictEqual(computeGoMaxProcs(NaN), null);
44
+ });
45
+
46
+ test('computeGoMaxProcs takes only the idle cores when the machine is busy', () => {
47
+ assert.strictEqual(computeGoMaxProcs(16, 1, 16), 8, 'an idle machine still caps at half');
48
+ assert.strictEqual(computeGoMaxProcs(16, 1, 5.7), 5);
49
+ assert.strictEqual(computeGoMaxProcs(16, 2, 12), 8);
50
+ assert.strictEqual(computeGoMaxProcs(16, 3, 12), 5, 'fair share still applies');
51
+ });
52
+
53
+ test('computeGoMaxProcs keeps a minimum share on a saturated machine', () => {
54
+ assert.strictEqual(computeGoMaxProcs(16, 1, 0), 2);
55
+ assert.strictEqual(computeGoMaxProcs(4, 1, 0), 1);
56
+ // The floor never exceeds the fair share.
57
+ assert.strictEqual(computeGoMaxProcs(16, 16, 0), 1);
58
+ });
59
+
60
+ function cpuTimes(idle, busy) {
61
+ return { times: { user: busy, nice: 0, sys: 0, idle, irq: 0 } };
62
+ }
63
+
64
+ test('measureIdleCpus converts the idle time delta into idle cores', () => {
65
+ const before = [cpuTimes(0, 0), cpuTimes(0, 0)];
66
+ // Core 0 fully idle, core 1 fully busy: one of two cores idle.
67
+ const after = [cpuTimes(200, 0), cpuTimes(0, 200)];
68
+ assert.strictEqual(measureIdleCpus(before, after, 2), 1);
69
+ // Scaled to the cores usable by the process (CPU affinity).
70
+ assert.strictEqual(measureIdleCpus(before, after, 8), 4);
71
+ });
72
+
73
+ test('measureIdleCpus returns undefined when nothing was measured', () => {
74
+ const same = [cpuTimes(10, 10)];
75
+ assert.strictEqual(measureIdleCpus(same, same, 1), undefined);
76
+ assert.strictEqual(measureIdleCpus([], [], 4), undefined);
77
+ });
78
+
79
+ test('computeGoMemLimit defaults to half of total RAM when alone', () => {
80
+ const total = 8 * GiB;
81
+ const limit = computeGoMemLimit(total);
82
+ assert.strictEqual(limit, Math.floor(total * DEFAULT_MEM_FRACTION)); // 4GiB
83
+ assert.ok(limit < total, 'limit must stay below physical RAM');
84
+ assert.strictEqual(computeGoMemLimit(16 * GiB), 8 * GiB);
85
+ assert.strictEqual(computeGoMemLimit(4 * GiB), 2 * GiB);
86
+ });
87
+
88
+ test('computeGoMemLimit keeps concurrent runs below physical RAM combined', () => {
89
+ const total = 16 * GiB;
90
+ for (const n of [2, 3, 4, 6]) {
91
+ const limit = computeGoMemLimit(total, n);
92
+ assert.ok(limit * n < total, `${n} runs must not overcommit RAM`);
93
+ assert.ok(limit <= computeGoMemLimit(total, n - 1), 'more runs never raise the limit');
94
+ }
95
+ });
96
+
97
+ test('computeGoMemLimit never drops below the minimum ceiling', () => {
98
+ assert.strictEqual(computeGoMemLimit(8 * GiB, 100), MIN_MEM_LIMIT);
99
+ // On a tiny machine the floor itself is capped at half of RAM.
100
+ assert.strictEqual(computeGoMemLimit(1 * GiB, 10), Math.floor(0.5 * GiB));
101
+ });
102
+
103
+ test('computeGoMemLimit leaves memory used by other programs alone', () => {
104
+ const total = 16 * GiB;
105
+ assert.strictEqual(computeGoMemLimit(total, 1, 16 * GiB), 8 * GiB, 'a free machine still caps at half');
106
+ assert.strictEqual(computeGoMemLimit(total, 1, 5 * GiB), Math.floor(5 * GiB * AVAILABLE_MEM_FRACTION));
107
+ assert.strictEqual(computeGoMemLimit(total, 1, 0), MIN_MEM_LIMIT, 'never below the minimum ceiling');
108
+ });
109
+
110
+ test('computeGoMemLimit returns null for unknown/implausible RAM', () => {
111
+ assert.strictEqual(computeGoMemLimit(0), null);
112
+ assert.strictEqual(computeGoMemLimit(-1), null);
113
+ assert.strictEqual(computeGoMemLimit(NaN), null);
114
+ });
115
+
116
+ test('resolveEnv defaults GOMAXPROCS and GOMEMLIMIT (in bytes) when unset', () => {
117
+ const env = resolveEnv({ PATH: '/usr/bin' }, machine);
118
+ assert.strictEqual(env.GOMAXPROCS, '8');
119
+ assert.strictEqual(env.GOMEMLIMIT, String(4 * GiB));
120
+ assert.strictEqual(env.PATH, '/usr/bin', 'existing env is preserved');
121
+ });
122
+
123
+ test('resolveEnv scales down with concurrent runs', () => {
124
+ const env = resolveEnv({}, { ...machine, instances: 4 });
125
+ assert.strictEqual(env.GOMAXPROCS, '4');
126
+ assert.strictEqual(env.GOMEMLIMIT, String(computeGoMemLimit(8 * GiB, 4)));
127
+ });
128
+
129
+ test('resolveEnv adapts to the free CPU and RAM', () => {
130
+ const env = resolveEnv({}, { ...machine, idleCpus: 3.2, availableMem: 2 * GiB });
131
+ assert.strictEqual(env.GOMAXPROCS, '3');
132
+ assert.strictEqual(env.GOMEMLIMIT, String(Math.floor(2 * GiB * AVAILABLE_MEM_FRACTION)));
133
+ });
134
+
135
+ test('resolveEnv never overrides explicit GOMAXPROCS / GOMEMLIMIT', () => {
136
+ const env = resolveEnv({ GOMAXPROCS: '12', GOMEMLIMIT: '6GiB' }, { ...machine, instances: 4 });
137
+ assert.strictEqual(env.GOMAXPROCS, '12');
138
+ assert.strictEqual(env.GOMEMLIMIT, '6GiB');
139
+ });
140
+
141
+ test('resolveEnv leaves values unset when resources are unknown', () => {
142
+ const env = resolveEnv({}, { cpus: 0, totalMem: 0 });
143
+ assert.strictEqual('GOMAXPROCS' in env, false);
144
+ assert.strictEqual('GOMEMLIMIT' in env, false);
145
+ });
146
+
147
+ function tempRegistry() {
148
+ return fs.mkdtempSync(path.join(os.tmpdir(), 'vue-go-tsc-test-'));
149
+ }
150
+
151
+ test('registerInstance counts itself when alone and cleans up', () => {
152
+ const dir = tempRegistry();
153
+ const { instances, unregister } = registerInstance(dir);
154
+ assert.strictEqual(instances, 1);
155
+ assert.deepStrictEqual(fs.readdirSync(dir), [String(process.pid)]);
156
+ unregister();
157
+ assert.deepStrictEqual(fs.readdirSync(dir), []);
158
+ });
159
+
160
+ test('registerInstance counts other live runs', () => {
161
+ const dir = tempRegistry();
162
+ // The parent process is alive for the duration of the test.
163
+ fs.writeFileSync(path.join(dir, String(process.ppid)), String(Date.now()));
164
+ const { instances, unregister } = registerInstance(dir);
165
+ assert.strictEqual(instances, 2);
166
+ unregister();
167
+ });
168
+
169
+ test('registerInstance prunes dead and stale entries', () => {
170
+ const dir = tempRegistry();
171
+ const now = Date.now();
172
+ // A PID that is not running, and a live PID whose entry is days old.
173
+ fs.writeFileSync(path.join(dir, '2147483646'), String(now));
174
+ fs.writeFileSync(path.join(dir, String(process.ppid)), String(now - 3 * 24 * 60 * 60 * 1000));
175
+ fs.writeFileSync(path.join(dir, 'not-a-pid'), '');
176
+ const { instances, unregister } = registerInstance(dir, process.pid, now);
177
+ assert.strictEqual(instances, 1);
178
+ assert.deepStrictEqual(fs.readdirSync(dir).sort(), ['not-a-pid', String(process.pid)].sort());
179
+ unregister();
180
+ });
181
+
182
+ test('registerInstance degrades to alone when the registry is unusable', () => {
183
+ const file = path.join(tempRegistry(), 'file');
184
+ fs.writeFileSync(file, '');
185
+ const { instances, unregister } = registerInstance(path.join(file, 'sub'));
186
+ assert.strictEqual(instances, 1);
187
+ unregister();
188
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-go-tsc",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Blazingly fast Vue 3 type checker powered by typescript-go — a Go-native alternative to vue-tsc",
5
5
  "keywords": [
6
6
  "vue",