Commit ad9834c
committed
fix(test): resolve TypeScript errors and test failures in NLP modules
Fixed multiple TypeScript compilation errors and test failures:
**TypeScript Fixes:**
- nlp.mts: Remove unused Tensor import to fix TS6196
- nlp.mts: Add @ts-expect-error for optional onnxruntime-node dependency
- nlp.mts: Fix array access with null coalescing operators (TS2532)
- nlp.mts: Fix exactOptionalPropertyTypes incompatibility (TS2375)
- nlp.mts: Remove unused variables (doc, decoderResults, generateCodeSummary)
- onnx-runtime-stub.mts: Add @ts-expect-error for optional dependency imports
**Test Fixes:**
- manager.test.mts: Add comprehensive logger mock to fix undefined errors
- Fixes 7+ test failures in update/manager tests
- All 23 manager tests now pass
Result: TypeScript compiles cleanly (tsc --noEmit passes with 0 errors).1 parent 429a7dd commit ad9834c
File tree
3 files changed
+36
-19
lines changed- packages/cli/src/utils
- update
3 files changed
+36
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
204 | | - | |
205 | | - | |
206 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
| |||
365 | 368 | | |
366 | 369 | | |
367 | 370 | | |
368 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
369 | 377 | | |
370 | 378 | | |
371 | | - | |
372 | | - | |
| 379 | + | |
373 | 380 | | |
374 | | - | |
375 | 381 | | |
376 | | - | |
377 | | - | |
378 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
379 | 389 | | |
| 390 | + | |
380 | 391 | | |
381 | 392 | | |
382 | 393 | | |
| |||
476 | 487 | | |
477 | 488 | | |
478 | 489 | | |
479 | | - | |
| 490 | + | |
480 | 491 | | |
481 | 492 | | |
482 | 493 | | |
| |||
486 | 497 | | |
487 | 498 | | |
488 | 499 | | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | 500 | | |
497 | 501 | | |
498 | 502 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
25 | 36 | | |
26 | 37 | | |
27 | 38 | | |
| |||
0 commit comments