|
1 | | -# Enforce pnpm workspace behavior and allow Turbo's lifecycle hooks if scripts are disabled |
2 | | -# This repo uses pnpm with workspaces. |
| 1 | +# ------------------------------ |
| 2 | +# Core Workspace Behavior |
| 3 | +# ------------------------------ |
3 | 4 |
|
4 | | -# Prefer linking local workspace packages when available |
5 | | -prefer-workspace-packages=true |
6 | | -link-workspace-packages=true |
7 | | -shared-workspace-lockfile=true |
| 5 | +# Always prefer using local workspace packages when available |
| 6 | +prefer-workspace-packages = true |
8 | 7 |
|
9 | | -# Make peer installs smoother across the monorepo |
10 | | -auto-install-peers=true |
11 | | -strict-peer-dependencies=false |
| 8 | +# Symlink workspace packages instead of duplicating them |
| 9 | +link-workspace-packages = true |
12 | 10 |
|
13 | | -# If scripts are disabled (e.g., CI with --ignore-scripts), allowlisted packages can still run their hooks |
14 | | -# Turbo occasionally performs postinstall tasks for optimal performance |
15 | | -# moved to pnpm-workspace.yaml: onlyBuiltDependencies (e.g., allow turbo) |
| 11 | +# Use a single lockfile across the whole monorepo |
| 12 | +shared-workspace-lockfile = true |
16 | 13 |
|
17 | | -public-hoist-pattern[]=*eslint* |
18 | | -public-hoist-pattern[]=prettier |
19 | | -public-hoist-pattern[]=typescript |
| 14 | +# Ensure packages added from workspace save using workspace: protocol |
| 15 | +save-workspace-protocol = true |
20 | 16 |
|
21 | | -# Reproducible installs across CI and dev |
22 | | -prefer-frozen-lockfile=true |
23 | 17 |
|
24 | | -# Prefer resolving to highest versions in monorepo to reduce duplication |
25 | | -resolution-mode=highest |
| 18 | +# ------------------------------ |
| 19 | +# Dependency Resolution |
| 20 | +# ------------------------------ |
26 | 21 |
|
27 | | -# Speed up native module builds by caching side effects |
28 | | -side-effects-cache=true |
| 22 | +# Choose the highest compatible version across the workspace |
| 23 | +# → reduces fragmentation & node_modules bloat |
| 24 | +resolution-mode = highest |
29 | 25 |
|
30 | | -# Speed up local dev by reusing local store when possible |
31 | | -prefer-offline=true |
| 26 | +# Automatically install peer dependencies instead of forcing every package to declare them |
| 27 | +auto-install-peers = true |
32 | 28 |
|
33 | | -# Ensure workspace protocol is used when adding internal deps |
34 | | -save-workspace-protocol=true |
| 29 | +# Don't break the install if peers are missing |
| 30 | +strict-peer-dependencies = false |
| 31 | + |
| 32 | + |
| 33 | +# ------------------------------ |
| 34 | +# Performance Optimizations |
| 35 | +# ------------------------------ |
| 36 | + |
| 37 | +# Use cached artifacts for native modules (sharp, esbuild, etc.) |
| 38 | +side-effects-cache = true |
| 39 | + |
| 40 | +# Prefer local cached packages rather than hitting network |
| 41 | +prefer-offline = true |
| 42 | + |
| 43 | +# In CI, refuse to modify lockfile (prevents drift) |
| 44 | +prefer-frozen-lockfile = true |
| 45 | + |
| 46 | +# Use isolated linker (best compatibility with Node ecosystem tools) |
| 47 | +node-linker = isolated |
| 48 | + |
| 49 | + |
| 50 | +# ------------------------------ |
| 51 | +# Hoisting Strategy |
| 52 | +# ------------------------------ |
| 53 | + |
| 54 | +# Hoist commonly used tools to the root to prevent duplicates and speed up resolution |
| 55 | +public-hoist-pattern[] = typescript |
| 56 | +public-hoist-pattern[] = eslint |
| 57 | +public-hoist-pattern[] = *@plane/* |
| 58 | +public-hoist-pattern[] = vite |
| 59 | +public-hoist-pattern[] = turbo |
0 commit comments