Skip to content

spencerbeggs/workspaces-effect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

workspaces-effect

npm version License: MIT TypeScript

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.

Features

  • 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/platform abstractions

Installation

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-bun

Quick Start

import { 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 (requires FileSystem + Path)
  • WorkspacesFullLive -- all services including change detection (additionally requires CommandExecutor)

Documentation

For architecture details, API reference, and advanced usage, see docs.

License

MIT

About

Effect-based library for working with npm, pnpm, yarn and Bun workspace protocols

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors