An Effect-TS library for monorepo workspace tooling. Discover workspaces, analyze dependency graphs, detect changes, parse lockfiles, and check publishability across npm, pnpm, yarn Berry, and Bun through composable Effect services with typed errors and platform independence.
- Workspace discovery across all four major package managers with automatic detection
- Dependency graph analysis with topological sorting for correct build ordering
- Git-based change detection to find affected packages from file changes
- Lockfile parsing for pnpm, npm, yarn, and bun with integrity verification
- Platform independent -- runs on Node.js or Bun via
@effect/platformabstractions
effect and @effect/platform are peer dependencies -- install them alongside the platform adapter for your runtime:
# For Node.js npm install workspaces-effect effect @effect/platform @effect/platform-node # For Bun bun add workspaces-effect effect @effect/platform @effect/platform-bunimport { Effect } from "effect"; import { NodeContext } from "@effect/platform-node"; import { DependencyGraph, WorkspacesLive } from "workspaces-effect"; const program = Effect.gen(function* () { const graph = yield* DependencyGraph; const deps = yield* graph.dependenciesOf("my-package"); console.log("Dependencies:", deps); }); Effect.runPromise( program.pipe( Effect.provide(WorkspacesLive), Effect.provide(NodeContext.layer), ), );Two composite layers cover most use cases:
WorkspacesLive-- all services except git-dependent ones (requiresFileSystem+Path)WorkspacesFullLive-- all services including change detection (additionally requiresCommandExecutor)
For architecture details, API reference, and advanced usage, see docs.
MIT