ignore-scripts=true


# Libraries should never have this enabled,
# else we can break consumers
auto-install-peers=false

## Make sure we don't troll ourselves when updating deps
##
verify-deps-before-run=true


## If a dependency is not declared, we do not want to accidentally
## resolve it from the workspace root. This is a common source of
## bugs in monorepos.
##
resolve-peers-from-workspace-root=false

## We use so many similarly grouped peers, we want to make the
## peer-groups easier to distinguish.
## This forces a shorter sha for all groups (vs the default of 1000)
##
peers-suffix-max-length=40
virtual-store-dir-max-length=40

# We don't want to inject *all* dependencies.
# only the ones that are peers. 
inject-workspace-packages=false


## This also means we do not want to hoist them to the root
## As this would both expose them to all other packages AND
## results in them using symlinks instead of hardlinks
##
hoist-workspace-packages=false


## We use the `workspace:*` protocol for all workspace
## packages.
## In theory it would be nice to use `deep` here just in case
## we missed something so that we could tell pnpm to use the
## workspace version of a package if it exists. At any depth.
##
## However, it seems that deep/true result in workspace packages
## that are dependencies being symlinked instead of hardlinked
## more often, even at the top-level of a package, which is not
## what we want.
##
link-workspace-packages=false # deep

## Update injected dependencies when needed
## This will rerun after various "build" scripts
## In our published packages.
##
## Unfortunately, this does not run after scripts in
## the monorepo root, so we have added a special "sync"
## script to handle this.
##
sync-injected-deps-after-scripts[]=build
sync-injected-deps-after-scripts[]=sync


## In keeping with our "no hoisting" and "no auto-peers" and
## "isolated dep trees", we also want to avoid other things
## that lead to reliance on hoisting.
## In general, deduping leads to hoisting. This particular
## setting causes direct-dependencies to resolve from the
## workspace root if already in root. We don't want this.
##
dedupe-direct-deps=false

## We do not want to dedupe peer dependencies as this
## results in hoisting and violates optional peer isolation.
##
dedupe-peer-dependents=false

## We do not want to dedupe injected dependencies as this
## results in hoisting and violates optional peer isolation.
##
dedupe-injected-deps=false
