turbo
acbe869b - fix: Retain injected workspace package entries during pnpm lockfile pruning (#12073)

Commit
87 days ago
fix: Retain injected workspace package entries during pnpm lockfile pruning (#12073) ## Summary Fixes #11059 - `turbo prune` now correctly retains `packages` and `snapshots` entries for injected workspace dependencies that use `file:` protocol resolution - Handles both pnpm 10's global `injectWorkspacePackages: true` setting and per-dependency `dependenciesMeta.*.injected: true` - Adds the injected package's transitive dependencies to the pruned lockfile as well ## Why When pnpm injects (hard-links) workspace packages, the lockfile resolves those deps via `file:` protocol instead of `link:`, creating entries in both `packages` and `snapshots` sections. The pruning code only looked at `dependenciesMeta.injected` (missing the global setting), only added to `packages` (missing `snapshots`), and used the wrong key format for V6+ lockfiles. ## Testing - Two new Rust unit tests in `crates/turborepo-lockfiles/src/pnpm/data.rs` exercise both the global setting and per-dependency injection paths with `file:` versions - New `pnpm-10-inject-workspace-packages` fixture in `lockfile-tests/` validates the end-to-end prune + frozen install flow - All 82 existing pnpm lockfile test cases continue to pass
Author
Parents
Loading