Skip to content

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

Description

@calm-mlin

Summary

The minimumReleaseAge and minimumReleaseAgeExclude settings in common/config/rush/pnpm-config.json are written to common/temp/package.json under the pnpm key, but pnpm does not read these settings from package.json. pnpm only reads them from .npmrc (as minimum-release-age) or pnpm-workspace.yaml.

As a result, the settings are silently ignored and provide no protection.

Steps to Reproduce

  1. Set "minimumReleaseAge": 20160 in common/config/rush/pnpm-config.json (14 days in minutes)
  2. Add a dependency on a package with a very recent release (e.g., released 2 days ago)
  3. Run rush update
  4. Expected: rush update fails with ERR_PNPM_NO_MATURE_MATCHING_VERSION
  5. Actual: rush update succeeds — the setting is ignored

Root Cause

Rush's InstallHelpers.generateCommonPackageJson() writes minimumReleaseAge to common/temp/package.json:

{
  "pnpm": {
    "minimumReleaseAge": 20160,
    "minimumReleaseAgeExclude": []
  }
}

However, pnpm's config reader does not include minimumReleaseAge in the set of fields it reads from package.json's pnpm section. The supported fields from package.json are: overrides, packageExtensions, peerDependencyRules, allowedDeprecatedVersions, patchedDependencies, allowBuilds, ignoredOptionalDependencies, supportedArchitectures, requiredScripts, configDependencies, auditConfig, updateConfig.

pnpm reads minimumReleaseAge from:

  • pnpm-workspace.yaml (as minimumReleaseAge)
  • .npmrc (as minimum-release-age)

Workaround

Add minimum-release-age=20160 directly to common/config/rush/.npmrc. Rush copies this file to common/temp/.npmrc, which pnpm does read.

Environment

  • Rush: 5.172.1
  • pnpm: 10.33.0
  • Node: 24.x

Suggested Fix

Rush should write minimumReleaseAge and minimumReleaseAgeExclude to either:

  • The generated .npmrc file (as minimum-release-age and minimum-release-age-exclude), or
  • The generated pnpm-workspace.yaml file

instead of (or in addition to) package.json.

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/rush globally installed version? 5.172.1
rushVersion from rush.json? 5.172.1
pnpmVersion, npmVersion, or yarnVersion from rush.json? 10.33.0
(if pnpm) useWorkspaces from pnpm-config.json? true
Operating system? Mac
Would you consider contributing a PR? Yes
Node.js version (node -v)? 24.13.0

Activity

  1. changed the title [-]minimumReleaseAge in pnpm-config.json is written to package.json but pnpm only reads it from .npmrc/pnpm-workspace.yaml[/-] [+][rush] minimumReleaseAge in pnpm-config.json is written to package.json but pnpm only reads it from .npmrc/pnpm-workspace.yaml[/+] on Apr 7, 2026
  2. iclanton commented on Apr 15, 2026

    @iclanton
    Member

    I think the ideal fix would be to write it to pnpm-workspace.yaml. calm-mlin - you want to put this together?

  3. moved this from Needs triage to Low priority in Bug Triageon Apr 15, 2026
  4. added a commit that references this issue on May 8, 2026
    ec0f9e9
  5. benkenawell commented on May 12, 2026

    @benkenawell
    Contributor

    I'd like to bump this after the Tanstack compromise yesterday. It's great that pnpm supports all these options, but rush doesn't seem to give us a good way to actually use them

  6. Mattgic commented on Jun 9, 2026

    @Mattgic

    PR #5798 has been ready for a month but no updates, is rush still maintained ? :/

  7. rphillips-lng commented on Jun 9, 2026

    @rphillips-lng

    PR #5798 has been ready for a month but no updates, is rush still maintained ? :/

    That PR writes to .npmrc which will not be compatible with pnpm v11. The forward looking solution is what Ian Clanton-Thuon (@iclanton) suggested, writing to pnpm-workspace.yaml

    Under the "Configuration" header: https://github.com/pnpm/pnpm/releases/tag/v11.0.0

  8. moved this from Low priority to Closed in Bug Triageon Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions