Workspaces and monorepos

Organize members, shared dependencies, tasks, and publishing boundaries in deno.json

Minimal structure

{
  "workspace": ["./apps/api", "./packages/core"],
  "tasks": {
    "check": "deno task --recursive check"
  }
}

Members may have their own deno.json and tasks. A workspace shares the lockfile and root configuration while preserving package boundaries.

repo/
├── deno.json
├── deno.lock
├── apps/api/deno.json
└── packages/core/deno.json

Design principles

  • Root tasks orchestrate; member tasks verify each package.
  • Resolve internal packages through the workspace instead of publishing intermediary versions.
  • Public packages declare exports, licensing, and publish contents.
  • Do not put broad permissions in the root when most members do not need them.

Verify

deno task --recursive check
deno test

Running deno test at the workspace root discovers member tests; deno task --recursive invokes matching member tasks. Filtering and npm workspace interop evolve, so run deno help task and verify the current guide for complex graphs.

Official reference: Workspaces.

Type to search all documentation.