# ------------------------------
# Core Workspace Behavior
# ------------------------------

# Always prefer using local workspace packages when available
prefer-workspace-packages = true

# Symlink workspace packages instead of duplicating them
link-workspace-packages = true

# Use a single lockfile across the whole monorepo
shared-workspace-lockfile = true

# Ensure packages added from workspace save using workspace: protocol
save-workspace-protocol = true


# ------------------------------
# Dependency Resolution
# ------------------------------

# Choose the highest compatible version across the workspace
# → reduces fragmentation & node_modules bloat
resolution-mode = highest

# Automatically install peer dependencies instead of forcing every package to declare them
auto-install-peers = true

# Don't break the install if peers are missing
strict-peer-dependencies = false


# ------------------------------
# Performance Optimizations
# ------------------------------

# Use cached artifacts for native modules (sharp, esbuild, etc.)
side-effects-cache = true

# Prefer local cached packages rather than hitting network
prefer-offline = true

# In CI, refuse to modify lockfile (prevents drift)
prefer-frozen-lockfile = true

# Use isolated linker (best compatibility with Node ecosystem tools)
node-linker = isolated

# Hoist commonly used tools to the root to prevent duplicates and speed up resolution
public-hoist-pattern[] = typescript
public-hoist-pattern[] = eslint
public-hoist-pattern[] = *@plane/*
public-hoist-pattern[] = vite
public-hoist-pattern[] = turbo