Files
pnpm/.changeset/plain-streets-flash.md
nozaq d458ab318c fix: incorrect depPath format used in time pruning (#10907)
* fix: depPath format used in time pruning

The local `refToRelative` helper in `lockfileFormatConverters.ts` produced
dependency paths with a leading slash (e.g. `/foo@1.0.0`), while the keys
stored in the `time` field do not have one (e.g. `foo@1.0.0`).

Because of this mismatch, `rootDepPaths.has(depPath)` always returned false
inside `pruneTimeInLockfile`, so `pickBy` filtered out every entry and the
entire `time` field was cleared on every install.

Fix by replacing the local helper with `refToRelative` from
`@pnpm/dependency-path`, which produces the correct format.

* chore: add pnpm to changeset

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 13:01:08 +01:00

251 B

@pnpm/lockfile.fs, pnpm
@pnpm/lockfile.fs pnpm
patch patch

Fixed the time field in pnpm-lock.yaml being entirely wiped on every install. An incorrect dependency path format was used when matching entries to prune, causing all entries to always be removed.