Skip to content

feat: publish graph-kit as a single consolidated package - #78

Merged
gabrielvfonseca merged 2 commits into
mainfrom
feat/publishable-root-package
Nov 12, 2026
Merged

gabrielvfonseca merged 2 commits into
mainfrom
feat/publishable-root-package

Conversation

@gabrielvfonseca

@gabrielvfonseca gabrielvfonseca commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

Consolidates the monorepo into a single publishable graph-kit package (renamed from graph-om) with all workspace packages bundled inside it.

Details

  • Root package build: tsup (CJS + ESM, treeshaken) produces index/cli/driver/neo4j/memgraph/kuzu/falkordb entry points into dist/; type declarations generated via tsc -p tsconfig.decl.json (SDK source only)
  • Self-contained publishing: added exports map, main/module/types, bin, files, and dependencies/optionalDependencies so the root package is publishable on its own
  • Build/release scripts: switched from turbo to tsup && tsc for build/size/release
  • Workspace packages: marked all @graph-kit/* packages private: true (shipped inside the root bundle, not published separately)
  • Changesets: removed the linked package group; added a changeset for the initial public release as unscoped graph-kit

Verification

  • pnpm build — tsup + tsc succeed; dist/ layout matches the exports map
  • pnpm lint — 0 warnings
  • pnpm test:root — 13/13 pass
  • pnpm typecheck — 30/30 packages pass

Summary by CodeRabbit

  • New Features
    • graph-kit is now available as a public, unscoped package, renamed from graph-om.
    • The package provides its main library and command-line interface, with dedicated entry points for supported graph databases.
  • Chores
    • Related packages are no longer published as part of the same linked release group.

Consolidate the monorepo into a single publishable graph-kit package:

- Build the root package with tsup (CJS + ESM, treeshaken) producing
  index/cli/driver/neo4j/memgraph/kuzu/falkordb entry points into dist/
- Generate type declarations via tsc -p tsconfig.decl.json (SDK source only)
- Add package.json exports map, main/module/types, bin, files, and
  dependencies/optionalDependencies so the root package is self-contained
- Switch build/release scripts from turbo to tsup + tsc
- Mark @graph-kit/* workspace packages as private (shipped inside the
  root bundle rather than published separately)
- Remove the linked package group from changesets config
- Add changeset for the initial public release as unscoped graph-kit
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The root graph-kit package is configured for public publication. Its build produces JavaScript bundles and declarations in dist, and its package metadata defines the published exports. The existing workspace packages are marked private.

Changes: Public distribution

Layer / File(s) Summary
Build and declaration outputs
tsconfig.decl.json, tsup.config.ts, package.json
The build runs Turbo, tsup, and declaration generation. The tsup configuration defines seven entry points and writes CJS and ESM bundles to dist.
Package publication surface
package.json, packages/*/package.json, .changeset/rename-graph-kit.md, .changeset/config.json
The root package defines its exports, executable, dependencies, and published files. Existing workspace packages are marked private. The changeset declares a patch and documents the rename; Changesets no longer links the listed packages.
Release and bundle-size settings
package.json, .size-limit.json
The release script runs the package build before publishing. Bundle-size checks target the root, CLI, driver, and database-adapter outputs in dist.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant pnpm
  participant Turbo
  participant tsup
  participant TypeScript
  participant Changesets
  pnpm->>pnpm: Run release script
  pnpm->>Turbo: Build workspace packages
  pnpm->>tsup: Bundle configured entry points
  pnpm->>TypeScript: Generate declarations
  pnpm->>Changesets: Publish after build
Loading

Suggested reviewers: frontal-labs

Merge Risk: Moderate · up to 194dd

The consolidated graph-kit package has several issues to resolve before release. Projects generated by the CLI reference packages that will not exist. Registering a custom driver through graph-kit/driver does not affect createDriver from the root entry. The release script may not publish the root package at all. Running dist/cli.js directly does nothing.

- [ ] 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

The root tsup build bundles the CLI and SDK sources, but the CLI imports
@graph-kit/sdk and its subpaths. tsup resolves those through @graph-kit/sdk's
package.json exports, which point at dist/ files that don't exist on a clean
checkout, so the root build failed in CI.

- Add an esbuild onResolve plugin to tsup.config.ts that redirects
  @graph-kit/sdk and its subpaths to their TypeScript source files, so the
  root bundle inlines the SDK source instead of resolving through dist/
- Change the root build script to 'turbo run build && tsup && tsc' so the
  workspace packages' dist/ outputs (needed by the SDK benchmark CI script)
  are produced before the root bundle
- Rewrite .size-limit.json to reference the consolidated root dist/ outputs
  (index/cli/driver/neo4j/memgraph/kuzu/falkordb) with limits set above the
  measured gzipped sizes, since the old per-package dist/ paths no longer
  apply

Verified clean: pnpm build (fully clean), pnpm lint (0 warnings),
pnpm typecheck (30/30), pnpm test:ci (12/12), pnpm test:root (13/13),
npx size-limit (all under limit).
@github-actions

Copy link
Copy Markdown

size-limit report 📦

Path Size
@graph-kit/mcp (import) 0 B (-100% 🔽)
@graph-kit/mcp (require) 0 B (-100% 🔽)
@graph-kit/migrate (import) 0 B (-100% 🔽)
@graph-kit/migrate (require) 0 B (-100% 🔽)
@graph-kit/sdk (import) 0 B (-100% 🔽)
@graph-kit/sdk/schema (import) 0 B (-100% 🔽)
@graph-kit/sdk/client (import) 0 B (-100% 🔽)
@graph-kit/sdk/errors (import) 0 B (-100% 🔽)
@graph-kit/sdk/query (import) 0 B (-100% 🔽)
@graph-kit/sdk/config (import) 0 B (-100% 🔽)
@graph-kit/sdk/driver (import) 0 B (-100% 🔽)
@graph-kit/sdk/driver/neo4j (import) 0 B (-100% 🔽)
@graph-kit/sdk/driver/memgraph (import) 0 B (-100% 🔽)
@graph-kit/sdk/driver/kuzu (import) 0 B (-100% 🔽)
@graph-kit/sdk/driver/falkordb (import) 0 B (-100% 🔽)
@graph-kit/sdk/migration (import) 0 B (-100% 🔽)
@graph-kit/sdk/schema/parser (import) 0 B (-100% 🔽)
@graph-kit/sdk/seed (import) 0 B (-100% 🔽)
@graph-kit/sdk/observability (import) 0 B (-100% 🔽)
@graph-kit/sdk/graphql (import) 0 B (-100% 🔽)
@graph-kit/sdk/visualization (import) 0 B (-100% 🔽)
@graph-kit/sdk/batch (import) 0 B (-100% 🔽)
@graph-kit/sdk/auth (import) 0 B (-100% 🔽)
@graph-kit/sdk/testing (import) 0 B (-100% 🔽)
@graph-kit/sdk/otel (import) 0 B (-100% 🔽)
@graph-kit/sdk/benchmark (import) 0 B (-100% 🔽)
@graph-kit/sdk (require) 0 B (-100% 🔽)
@graph-kit/testing (import) 0 B (-100% 🔽)
@graph-kit/testing (require) 0 B (-100% 🔽)
@graph-kit/zod (import) 0 B (-100% 🔽)
@graph-kit/zod (require) 0 B (-100% 🔽)
@graph-kit/cli bin (import) 0 B (-100% 🔽)
@graph-kit/cli (require) 0 B (-100% 🔽)
graph-kit (import) 229.19 KB (+100% 🔺)
graph-kit (require) 229.92 KB (+100% 🔺)
graph-kit/cli (import) 52.38 KB (+100% 🔺)
graph-kit/cli (require) 52.77 KB (+100% 🔺)
graph-kit/driver (import) 7.81 KB (+100% 🔺)
graph-kit/neo4j (import) 2.93 KB (+100% 🔺)
graph-kit/memgraph (import) 3.2 KB (+100% 🔺)
graph-kit/kuzu (import) 2.26 KB (+100% 🔺)
graph-kit/falkordb (import) 4.55 KB (+100% 🔺)

@gabrielvfonseca
gabrielvfonseca merged commit 121a109 into main Nov 12, 2026
10 of 11 checks passed
@gabrielvfonseca
gabrielvfonseca deleted the feat/publishable-root-package branch November 12, 2026 19:52
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