TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ara-home/ara/llms.txt
Use this file to discover all available pages before exploring further.
workspace: protocol is how you express a dependency on a sibling package inside the same monorepo. Instead of resolving a name against the npm registry, Ara looks up the matching workspace member, validates that it exists, and installs it as a live symlink. No tarball, no network request, no version mismatch — the symlink always points at the member’s actual source directory, so every change is visible immediately to all consumers. Ara’s workspace: protocol is directly inspired by pnpm’s implementation of the same feature.
The three forms
You can writeworkspace: versions three different ways, each with a distinct semantic:
| Form | Meaning |
|---|---|
workspace:* | Always resolves to the local workspace member, regardless of the member’s version field |
workspace:^ | Resolves to the member during development; replaced with ^<member-version> when the package is published |
workspace:1.2.3 | Pins to an exact version — Ara validates that the member’s version field matches 1.2.3 |
How Ara parses workspace: versions
When Ara reads apackage.json dependency entry whose version string starts with workspace:, it strips that prefix and records source = "workspace" on the resolved entry internally. The suffix (*, ^, or a version string) is preserved as the version constraint:
workspace: prefix is treated as an npm registry dependency, regardless of its name.
Example: root package.json mixing workspace: and npm deps
The10-protocol-package-json fixture shows the canonical pattern — a private root package that pulls in one workspace member alongside a regular npm package:
ara install runs:
lib-ais resolved topackages/lib-a— no registry lookup occurs.node_modules/lib-abecomes a symlink pointing to../../packages/lib-a.zodis fetched from the npm registry as normal.
Example: member depending on a sibling
Any workspace member can reference other members using the same protocol. Here,pkg-c (a package.json-based member) depends on pkg-b (an ara.toml-based member):
- pkg-c/package.json
- pkg-b/ara.toml
- pkg-a/ara.toml
pkg-c’s package.json and pkg-b’s ara.toml can reference each other without any special configuration.
In
ara.toml, a workspace cross-reference is written as { source = "workspace" } with no version suffix. This is equivalent to workspace:* in package.json — it always resolves to the local member.Live symlinks — no reinstall needed
When Ara installs a workspace dependency it creates a symlink, not a copy:packages/lib-a is immediately visible to anything that requires or imports lib-a. You do not need to re-run ara install after editing member source files.
Lockfile treatment
Theara.lock file distinguishes workspace dependencies from registry dependencies using the source field. This prevents Ara from making unnecessary network requests when workspace members have not changed:
package_hash or integrity field because their content is not stored in Ara’s content-addressable store — they live on disk as-is.
Comparison with pnpm
Ara’sworkspace: protocol is intentionally compatible with pnpm’s at the syntax level. The three forms (*, ^, exact version) mean the same thing in both tools. The primary differences are operational:
| Behaviour | pnpm | Ara |
|---|---|---|
| Resolution strategy | Symlinking from a shared store | Direct symlink to source directory |
| Publish replacement | ^<version> on pnpm publish | Planned for ara publish (not yet released) |
| Cross-manifest support | npm manifests only | package.json and ara.toml interchangeably |
| Security scanning | Not performed | Scanned on every ara install |
The publish-time version replacement behaviour (turning
workspace:^ into ^0.2.0 in the published tarball) is part of the planned ara publish command. It is not yet available in the current release.