Package Dependency Graph

How packages and peer dependencies relate.

#How the packages relate

@void-snippets/core
  — no runtime dependencies
  — published as its own package
  — used by: client, react, and your app directly

@void-snippets/client
  — depends on: core (for types), axios (peer)
  — works in any JavaScript environment (Node, browser, Deno)
  — used by: react, and your app directly

@void-snippets/react
  — depends on: core, client
  — peer deps: react, @tanstack/react-query, socket.io-client (optional), react-router (optional)
  — used by: your React app only

@void-snippets/angular
  — depends on: core
  — peer deps: @angular/core, @angular/common, rxjs, @tanstack/angular-query-experimental
  — used by: your Angular app only — does not depend on client (HttpClient replaces axios)

@void-snippets/nestjs
  — depends on: core
  — peer deps: @nestjs/common, plus typeorm+@nestjs/typeorm OR mongoose+@nestjs/mongoose
  — used by: your NestJS backend only — never imports either ORM from its main entry;
    TypeORM and Mongoose support each live behind their own subpath

#Why separate packages?

Progressive adoption. A Vue or Svelte project can use core (and client, if it needs HTTP) without pulling in any framework-specific code. An Angular project never installs React's peer dependencies, or vice versa. A NestJS backend using Mongoose never installs TypeORM.

Smaller bundles. If your app only needs HTTP types without the hook factories, install just core and client.

Independent versioning. core stays at 0.3.0 while react ships 0.6.0, angular ships 0.1.0, and nestjs ships 0.1.0 — a change to one framework package does not force a version bump on the foundation types or any other framework's package.