You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discovered by meta-testing blast+surface against the charter monorepo itself.
blast:
- Resolve directory aliases via src/index.* FIRST (monorepo source layout)
- Fall back to package.json source/types/main for legacy packages
- Follow tsconfig extends chain when loading aliases (baseUrl resolution
is per-file, not global). Charter uses tsconfig.base.json which my
old code never read, so @stackbilt/types was unresolvable.
- Prefer source over types/dist so the dep graph edges point at .ts
files, not compiled .d.ts declarations.
- Add --format, --config to VALUE_FLAGS so global CLI flags don't get
swept into the positional seeds list.
surface:
- Strip block and line comments before scanning for routes. jsdoc
examples in surface's own source were matching as real routes during
meta-testing. Comment stripping preserves line numbers.
- Ignore __tests__, __mocks__, __fixtures__ directories and
*.test.*, *.spec.* files. Test fixtures contain route-like strings
that aren't real routes.
Real-world validation:
- `charter blast packages/types/src/index.ts` on charter now correctly
reports 27 affected files (was 0 before fixes). types.ts shows up in
hot files with 14 importers pointing at .ts source, not .d.ts.
- `charter surface` on charter correctly returns 0 routes (CLI project,
not a Worker) instead of 15 false positives from test fixtures.
- All 341 existing tests still pass. 30 → 33 tests in blast+surface.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments