Files
pnpm/lockfile
Truffle f20ad8f1d2 fix: keep the path of git-hosted tarball resolutions in the lockfile (#12344)
* fix: keep the path of git-hosted tarball resolutions in the lockfile

* test(lockfile): cover git-hosted tarball path preservation in to_lockfile_form

Adds regression tests guarding that to_lockfile_form keeps the
TarballResolution.path of git-hosted subdirectory tarballs in both the
default and include_tarball_url branches, mirroring the TypeScript
toLockfileResolution tests added for pnpm/pnpm#12304.

* refactor(lockfile): simplify toLockfileResolution to a single kept-URL return

Invert the branching so the canonical-registry case is the early return and
the kept-URL resolution (integrity + tarball + optional gitHosted/path) is the
single fall-through. This removes the keepTarballUrl closure and the
preservingGitHosted helper; the URL-reconstruction check moves into
isCanonicalRegistryTarballUrl. No behavior change.

* refactor(lockfile): mirror the single kept-URL return in to_lockfile_form

Apply the same inversion as the TypeScript toLockfileResolution: the
canonical-registry case becomes the early return and the kept-URL resolution
is the single fall-through, removing the keep_url closure. The URL-match check
moves into is_canonical_registry_tarball_url. No behavior change; the three
to_lockfile_form tests still pass.

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2026-06-13 12:35:12 +02:00
..
2026-06-12 00:53:15 +02:00
2026-06-10 12:40:29 +02:00
2026-06-10 12:40:29 +02:00
2026-06-10 12:40:29 +02:00
2026-06-10 12:40:29 +02:00
2026-06-10 12:40:29 +02:00
2026-06-10 12:40:29 +02:00