You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
- Fixes `turbo prune` dropping `file:` protocol dependencies from the
pruned `yarn.lock`, causing `yarn install --frozen-lockfile` to fail on
pruned output
- Adds a `yarn1-file-dep` check-lockfiles fixture that reproduces the
bug
## Problem
Yarn v1 creates lockfile entries for `file:` protocol dependencies (e.g.
`"@repo/eslint-config@file:./packages/eslint-config"`). During pruning,
the dependency splitter correctly classifies these as internal workspace
dependencies — but that means they never get added to the set of
lockfile keys passed to `Yarn1Lockfile::subgraph()`. The pruned lockfile
is then missing these entries entirely, which breaks frozen installs.
## Fix
`Yarn1Lockfile::subgraph` now scans the original lockfile for `file:`
protocol entries whose paths match included workspace packages, and
includes them in the pruned output. This is scoped to `subgraph` rather
than changing the dependency splitter because the classification as
"internal" is correct for the package graph — it's only the lockfile
serialization that needs the extra entries.
## Testing
To verify the fix manually on the new fixture:
```sh
cargo build --bin turbo
cd lockfile-tests/fixtures/yarn1-file-dep
git init && git add . && git commit -m init
turbo prune web
grep "file:" out/yarn.lock # should show the @repo/eslint-config entry
cd out && yarn install --frozen-lockfile --ignore-scripts # should succeed
```
Closes#4105
0 commit comments