Skip to content

refactor: restructure zod, testing, mcp, migrate packages to multi-file DDD - #74

Merged
gabrielvfonseca merged 1 commit into
mainfrom
refactor/restructure-packages-ddd
Nov 9, 2026
Merged

gabrielvfonseca merged 1 commit into
mainfrom
refactor/restructure-packages-ddd

Conversation

@gabrielvfonseca

@gabrielvfonseca gabrielvfonseca commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Restructure four packages (@graph-om/zod, @graph-om/testing, @graph-om/mcp, @graph-om/migrate) from single monolithic index.ts files into multi-file domain-driven designs. Each package's index.ts now serves only as a barrel that manually selects and re-exports public API (no export *).

Changes

License cleanup

  • Removed stale package-level LICENSE.md files from all four packages
  • Removed LICENSE.md from each package.json files array
  • Central root LICENSE.md covers all packages

DDD restructure per package

@graph-om/zod — schema/ + validation/ domains
@graph-om/testing — driver/, matchers/, fixtures/, generators/ domains
@graph-om/mcp — config, server/, tools/, resources/ domains
@graph-om/migrate — model/, runner/, schema/, version/, template/ domains

Each domain has its own index.ts barrel with explicit named exports.

Build fix

  • tsup dts: true is incompatible with composite: true + multi-file sources
  • Set dts: false in tsup configs and added tsc --declaration declaration step to build scripts (matches existing SDK pattern)

Verification

  • All package tests pass (zod 15, testing 7, mcp 2, migrate 2)
  • Root test suite passes (4 files, 13 tests)
  • Typecheck clean on all four packages
  • Lint green (ultracite check)
  • Builds produce JS + .d.ts declarations

Test Plan

Run pnpm --filter @graph-om/{zod,testing,mcp,migrate} test — all green.

…le DDD

- Remove stale package-level LICENSE.md files (central root LICENSE.md applies)
- Split each package into domain-based directories with index.ts barrel files
- Replace any export * with explicit named exports in barrels
- Fix tsup dts build for composite tsconfig: dts: false + tsc declaration step
- All tests pass, typechecks clean, lint green across all four packages
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@gabrielvfonseca
gabrielvfonseca merged commit 56e1715 into main Nov 9, 2026
8 of 11 checks passed
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

size-limit report 📦

Path Size
@graph-om/mcp (import) 1.59 KB (+5.52% 🔺)
@graph-om/mcp (require) 1.67 KB (+6.86% 🔺)
@graph-om/migrate (import) 2.35 KB (-3.64% 🔽)
@graph-om/migrate (require) 2.4 KB (-3.73% 🔽)
@graph-om/sdk (import) 234.48 KB (0%)
@graph-om/sdk/schema (import) 2.95 KB (0%)
@graph-om/sdk/client (import) 9.66 KB (0%)
@graph-om/sdk/errors (import) 6.39 KB (0%)
@graph-om/sdk/query (import) 7.24 KB (0%)
@graph-om/sdk/config (import) 987 B (0%)
@graph-om/sdk/driver (import) 10.75 KB (0%)
@graph-om/sdk/driver/neo4j (import) 5.86 KB (0%)
@graph-om/sdk/driver/memgraph (import) 6.12 KB (0%)
@graph-om/sdk/driver/kuzu (import) 5.21 KB (0%)
@graph-om/sdk/driver/falkordb (import) 7.41 KB (0%)
@graph-om/sdk/migration (import) 10.17 KB (0%)
@graph-om/sdk/schema/parser (import) 2.39 KB (0%)
@graph-om/sdk/seed (import) 5.72 KB (0%)
@graph-om/sdk/observability (import) 6.13 KB (0%)
@graph-om/sdk/graphql (import) 7.67 KB (0%)
@graph-om/sdk/visualization (import) 6.18 KB (0%)
@graph-om/sdk/batch (import) 2.67 KB (0%)
@graph-om/sdk/auth (import) 12.38 KB (0%)
@graph-om/sdk/testing (import) 3.3 KB (0%)
@graph-om/sdk/otel (import) 192.84 KB (0%)
@graph-om/sdk/benchmark (import) 10.25 KB (0%)
@graph-om/sdk (require) 235.18 KB (0%)
@graph-om/testing (import) 2.11 KB (+1.89% 🔺)
@graph-om/testing (require) 2.17 KB (+1.93% 🔺)
@graph-om/zod (import) 864 B (+4.99% 🔺)
@graph-om/zod (require) 905 B (+5.48% 🔺)
@graph-om/cli bin (import) 12.41 KB (0%)
@graph-om/cli (require) 12.59 KB (0%)

@gabrielvfonseca
gabrielvfonseca deleted the refactor/restructure-packages-ddd branch November 9, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant