Files
68112bada4 chore(release): 11.28.5, pacquet 12.10.0 (#16637)
* chore(release): 11.28.5, pacquet 12.10.0

* docs(release): curate the 11.28.5 and 12.10.0 release notes

Add a lead paragraph to each page and group the patch entries under
subject headings, with the security fixes first.

- Merge the unpublish path-boundary fix into the unpublish entry, the
  legacy metadata cache prune into the metadata cache entry, the two
  binary size entries, and the two 64 MiB archive limits on the v11 page.
- Drop the manifest-utils saveType entry from the CLI page: the CLI
  only passes saveType values derived from its own flags, so no CLI user
  can reach the fixed path.
- Rewrite mechanism-only entries (PAX header validation, bundled
  dependency symlinks, custom resolutions under name@version keys, proxy
  setting validation) in terms of what the user sees.
- Use one link style for pnpm/pnpm issues.

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-06 02:00:03 +02:00
..
…
…
…

@pnpm/crypto.integrity

Parse and format integrity strings

Utilities for working with single-hash integrity strings in the format algorithm-base64hash (e.g., sha512-abc123...). This is the format used in pnpm lockfiles.

Installation

pnpm add @pnpm/crypto.integrity

Usage

import { parseIntegrity } from '@pnpm/crypto.integrity'

const { algorithm, hexDigest } = parseIntegrity('sha512-9/u6bgY2+JDlb7vzKD5STG+jIErimDgtYkdB0NxmODJuKCxBvl5CVNiCB3LFUYosWowMf37aGVlKfrU5RT4e1w==')

console.log(algorithm)  // 'sha512'
console.log(hexDigest)  // 'f7fbba6e0636f890e56fbbf3283e524c6fa3204ae298382d624741d0dc6638326e282c41be5e4254d8820772c5518a2c5a8c0c7f7eda19594a7eb539453e1ed7'

API

parseIntegrity(integrity: string): ParsedIntegrity

Parses an integrity string and returns the algorithm and hex-encoded digest.

Throws PnpmError with code INVALID_INTEGRITY if:

  • The format is invalid (must be algorithm-base64hash)
  • The base64 hash decodes to an empty digest

formatIntegrity(algorithm: string, hexDigest: string): string

Formats a hex digest into an integrity string.

import { formatIntegrity } from '@pnpm/crypto.integrity'

const integrity = formatIntegrity('sha512', 'f7fbba6e...')
// 'sha512-9/u6bgY2+JDlb7vzKD5STG+...'

License

MIT