Commit 2ebcaa5
committed
fix(ci): Reorder CI steps and fix implicit any types
PROBLEM:
- TypeCheck failing: Cannot find module '@parseflow/core'
- 3 implicit 'any' type errors in tools/index.ts
ROOT CAUSE:
1. CI runs typecheck BEFORE build
- mcp-server depends on @parseflow/core
- But pdf-parser-core not compiled yet
- No type definitions available
2. Missing type annotations
- map() callback parameters have implicit 'any'
- formatToc() item parameter has implicit 'any'
SOLUTION:
1. Reorder CI steps:
Before: install lint typecheck build test
After: install build lint typecheck test
Why: In monorepo, dependent packages need to be built first
2. Add explicit type annotations:
- Import TOCItem type from @parseflow/core
- Add types to map callback: (r: {page, context}, i: number)
- Add type to formatToc: (items: TOCItem[], level)
3. Auto-fix Prettier formatting
VERIFICATION:
pnpm build: SUCCESS
pnpm typecheck: 0 errors (was 6)
pnpm lint: 0 errors
pnpm test: 5/5 passing
CI should now pass on all platforms.1 parent 236d87d commit 2ebcaa5
2 files changed
+10
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
| |||
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
341 | | - | |
| 344 | + | |
342 | 345 | | |
343 | | - | |
| 346 | + | |
344 | 347 | | |
345 | 348 | | |
346 | 349 | | |
| |||
0 commit comments