Skip to content

docs: Document npm_old_version and npm_new_version environment variables#9389

Merged
owlstronaut merged 1 commit into
release/v11from
backport/v11/9385
May 21, 2026
Merged

docs: Document npm_old_version and npm_new_version environment variables#9389
owlstronaut merged 1 commit into
release/v11from
backport/v11/9385

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Backport of #9385 to release/v11.

…riables (#9385)

npm sets two additional environment variables `npm_old_version` and
`npm_new_version` when running the `preversion`, `version`,
`postversion` scripts, but these aren’t documented anywhere.

Document the variables in the ‘Scripts’ docs, and cross-reference them
from the documentation for the version command (and the libnpmversion
readme).

I've tried to match the existing formatting conventions for each
document. Please let me know if anything needs to change.

(cherry picked from commit d124c08)
@owlstronaut owlstronaut merged commit c5e9d73 into release/v11 May 21, 2026
40 checks passed
@owlstronaut owlstronaut deleted the backport/v11/9385 branch May 21, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants