Files
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/exec.npm-lifecycle

JavaScript package lifecycle hook runner

@pnpm/exec.npm-lifecycle is a library for executing packages' lifecycle scripts. It is extracted from npm itself and intended to be fully compatible with the way npm executes individual scripts.

Installation

pnpm add @pnpm/exec.npm-lifecycle

API

lifecycle(pkg, stage, wd, opts): Promise<void>

Runs the stage script of pkg in wd, followed by the .hooks/<stage> hook of opts.dir when there is one.

  • opts.dir - the node_modules directory whose .hooks are run.
  • opts.log - the logger the runner reports to.
  • opts.stdio - the stdio passed to the child process. [0, 1, 2] by default.
  • opts.runConcurrently - Boolean - false by default. If true, lifecycle scripts may run concurrently.
  • opts.extraEnv - Record<string, string> - add some extra env vars to the exec environment of the lifecycle script.
  • opts.extraBinPaths - string[] - directories added to the PATH of the lifecycle script.
  • opts.onSpawn - Function - called with each spawned lifecycle child process.
  • opts.scriptShell - the shell the script runs in. sh by default, cmd on Windows.
  • opts.shellEmulator - Boolean - when scriptShell is unset, run the script in a JavaScript shell emulator instead of a system shell. A configured scriptShell is used even when this is set.
  • opts.scriptsPrependNodePath - Boolean | 'warn-only' - put the directory of the running Node.js binary on the script's PATH.

makeEnv(pkg, opts): Record<string, string>

Builds the environment a lifecycle script of pkg runs with: the current environment without private npm_config_* settings, plus the npm_package_* variables derived from the manifest.

License

Artistic-2.0