Files
pnpm/pnpr/client
6b5b8ac53a chore(release): 11.28.9, pacquet 12.16.0, pnpr 0.1.0-alpha.17, get-pnpm 0.0.10 (#17406)
* chore(release): 11.28.9, pacquet 12.16.0, pnpr 0.1.0-alpha.17, get-pnpm 0.0.10

* docs(release): curate the 11.28.9, 12.16.0, and pnpr alpha.17 release notes

- Add a lead line to each page and group the patch entries by what the
  reader was doing, with security fixes first.
- Merge the duplicate strictSsl/localAddress entries and the repeat-install
  setting entries into one list per page.
- pnpr: split the removals into commands, flag aliases, and camelCase
  config keys, and say that pnpr no longer serves PUT /-/pnpm/v1/publish,
  so batch publishing needs pnpm 11.28.9 or 12.16.0.
- Drop the "Updated dependencies: get-pnpm" line from the pnpm v12 page
  and list the get-pnpm credential fix first.

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

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 00:08:12 +01:00
..

@pnpm/pnpr.client

Client library for the pnpr server. pnpm uses it when the pnprServer setting is set. It covers two pnpr protocols:

  • Install acceleration. Sends POST /-/pnpr/v0/resolve with the projects and the existing lockfile, and returns the resolved lockfile for pnpm's headless install, which fetches the tarballs itself. See Install acceleration.
  • Shared side-effects cache. Looks up, verifies, restores, and publishes signed build artifacts through the /-/pnpr/v0/artifacts endpoints. See Shared side-effects cache.

Usage

import { resolveViaPnprServer } from '@pnpm/pnpr.client'

const { lockfile, stats } = await resolveViaPnprServer({
  registryUrl: 'http://localhost:7677',
  dependencies: { react: '^19.0.0' },
})

console.log(`Resolved ${stats.totalPackages} packages`)
// lockfile is ready for headless install

Configuration

Add to pnpm-workspace.yaml to offload resolution during pnpm install:

pnprServer: http://localhost:7677

The shared side-effects cache is configured under sideEffectsCache.remote. The workspace names the organization and the eligible packages; the trust material comes from the global config file or the environment:

pnprServer: http://localhost:7677
sideEffectsCache:
  remote:
    org: acme
    packages:
      - native-addon

The server side of both protocols, including the artifacts.orgs access rules, the signed-envelope format, and the platform compatibility tags, is documented with pnpr.

License

MIT