Files
Zoltan Kochanandgithub-actions[bot] 91774e72a0 chore(release): 11.28.7, pacquet 12.15.0, pnpr 0.1.0-alpha.16 (#17187)
* chore(release): 11.28.7, pacquet 12.15.0, pnpr 0.1.0-alpha.16

* docs(release): curate 11.28.7, pacquet 12.15.0, and pnpr 0.1.0-alpha.16 release notes

Add lead paragraphs and group the patch entries by what the reader was
doing, with security fixes first on each page.

- v11: lead with the registry metadata name check, pinned pnpm
  trustPolicy check, maxTarballUnpackedSize, and the removal of registry
  revisions; merge overlapping entries for minimumReleaseAge metadata
  revalidation, frozen-lockfile directory dependency checks,
  syncInjectedDepsAfterScripts, verifyDepsBeforeRun, pnpm sbom, and
  unreadable config settings.
- v12: order minor highlights from config includes and
  lockfile.integrityTarget down to interactive update styling; drop the
  pnpr-only distribution note from the CLI changelog; merge overlapping
  entries for workspace and pnpr install speedups, minimumReleaseAge and
  If-Modified-Since revalidation, frozen-lockfile and injected package
  checks, verifyDepsBeforeRun, pnpm prune, pnpm pack, pnpm licenses
  list, pnpm self-update, pinned pnpm flag forwarding, and WebContainer
  fixes.
- pnpr: lead the minor section with the breaking ecosystem URL prefix,
  hosted storage layout, artifacts.orgs, and strict config schema
  changes; fold dist.pnpr tarball metadata into one entry and drop the
  redundant /metrics note; lead the patch section with reserved-username
  and auth security fixes.
- Use one issue-link label style across the release pages.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-21 12:15:12 +02:00
..

@pnpm/exec.lifecycle

Package lifecycle hook runner

npm version

Installation

pnpm add @pnpm/logger @pnpm/exec.lifecycle

Usage

import { readFile } from 'node:fs/promises'
import path from 'node:path'
import { runLifecycleHook, runPostinstallHooks } from '@pnpm/exec.lifecycle'

const targetPkgRoot = path.resolve('node_modules/target-pkg')
const pkg = JSON.parse(await readFile(path.join(targetPkgRoot, 'package.json'), 'utf8'))

// Run a specific hook
await runLifecycleHook('preinstall', pkg, {
  depPath: 'target-pkg@1.0.0',
  pkgRoot: targetPkgRoot,
  rootModulesDir: path.resolve('node_modules'),
  unsafePerm: true,
})

// Run all install hooks
await runPostinstallHooks({
  depPath: 'target-pkg@1.0.0',
  pkgRoot: targetPkgRoot,
  rootModulesDir: path.resolve('node_modules'),
  unsafePerm: true,
})

API

runLifecycleHook(stage, packageManifest, opts): Promise<boolean>

runPostinstallHooks(opts): Promise<boolean>

License

MIT