Skip to content

Fix minimumReleaseAge and minimumReleaseAgeExclude for PNPM by moving…#5859

Open
aaronmaxlevy wants to merge 3 commits into
microsoft:mainfrom
aaronmaxlevy:aaron_fix_pnpm_minimum_release_age
Open

Fix minimumReleaseAge and minimumReleaseAgeExclude for PNPM by moving…#5859
aaronmaxlevy wants to merge 3 commits into
microsoft:mainfrom
aaronmaxlevy:aaron_fix_pnpm_minimum_release_age

Conversation

@aaronmaxlevy

Copy link
Copy Markdown

… to pnpm-workspace.yaml

Summary

Fixes #5752

Details

This fixes support for PNPM minimumReleaseAge and minimumReleaseAgeExclude by writing them to pnpm-workspace.yaml instead. There is an existing PR open for this #5798 , however that PR moves it to .npmrc instead, whereas according to @iclanton in #5798 (comment) it is preferable to put it in pnpm-workspace.yaml instead (which I agree with). It has been two weeks since that comment was left on #5798 and it hasn't been addressed there, so I figured I'd file my own PR, given that there are real security implications to this setting not working currently. Apologies if this is undesired.

How it was tested

Ran the Rush test suite and validated outputs.

Impacted documentation

N/A

@aaronmaxlevy

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Reve AI"

workspaceYaml.allowBuilds = this._allowBuilds;
}

if (this._minimumReleaseAge !== undefined) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if this is set to undefined? Is the field omitted from the output YAML in that case? If it is, we don't need this check.

Same question about minimumReleaseAgeExclude. Can that just be set to an empty array? Would that cause any issues?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point — I just pushed a new commit which removes these unnecessary guards, both for minimumReleaseAge and minimumReleaseAgeExclude since js-yaml will just omit it if its value is undefined.

For minimumReleaseAgeExclude, setting it to an empty array should be fine, since that is effectively what the default is with PNPM anyhow, though with the current code in this PR, that would only occur if minimumReleaseAgeExclude is explicitly set to an empty array in pnpm-config.json.

@aaronmaxlevy aaronmaxlevy force-pushed the aaron_fix_pnpm_minimum_release_age branch from 326ae7b to 1ef521e Compare July 14, 2026 21:27
aaronmaxlevy and others added 3 commits July 14, 2026 15:16
@aaronmaxlevy aaronmaxlevy force-pushed the aaron_fix_pnpm_minimum_release_age branch from 1ef521e to 663534e Compare July 14, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

[rush] minimumReleaseAge in pnpm-config.json is written to package.json but pnpm only reads it from .npmrc/pnpm-workspace.yaml

2 participants