Skip to content

script-utils/npm-publish

Contains utility functions for NPM publish.

FunctionDescription
publishPublish to NPM. Authentication is intentionally not handled here. The publish is expected to run from a CI job configured as a trusted publisher on npmjs.com, where the npm CLI exchanges the job’s short-lived OIDC token for a publish grant on its own. No NPM token is read, written, or stored, and the published package gets provenance for free. Requires npm 11.5.1 or later.