Visitar URL original
`minimumReleaseAgeExcludePrune` removes `minimumReleaseAgeExclude` entries for config dependencies · Issue #17142 · pnpm/pnpm · GitHub
Skip to content

minimumReleaseAgeExcludePrune removes minimumReleaseAgeExclude entries for config dependencies #17142

Closed

Description

@oBusk

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

12.14.0

Which area(s) of pnpm are affected? (leave empty if unsure)

Dependencies resolver, Lockfile

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

  1. Create pnpm-workspace.yaml:

    configDependencies:
      '@pnpm/plugin-types-fixer': ^0.1.0
    minimumReleaseAgeExcludePrune: true
    minimumReleaseAgeExclude:
      - '@pnpm/plugin-types-fixer'
  2. Run pnpm install (or pnpm install --force in an already-installed project).

  3. The minimumReleaseAgeExclude entry has been removed from pnpm-workspace.yaml.

Describe the Bug

pnpm removes the minimumReleaseAgeExclude entry even though the lockfile resolves the package as a config dependency:

importers:
  .:
    configDependencies:
      '@pnpm/plugin-types-fixer':
        specifier: ^0.1.0
        version: 0.1.0

The prune pass builds its set of resolved packages only from the main lockfile document's snapshots (record_resolved_package_versions). Config dependencies are recorded in the env document that leads pnpm-lock.yaml (EnvLockfile), which the pass never reads, so every config dependency looks unresolved. The same set drives trustPolicyExcludePrune, so trustPolicyExclude entries for config dependencies are likely affected too.

Related: #16660. Its workaround (listing config dependencies in the workspace's minimumReleaseAgeExclude) is undone by this bug when minimumReleaseAgeExcludePrune: true is set.

Expected Behavior

Entries that match a resolved config dependency are kept.

minimumReleaseAge applies to config dependencies declared with a range, so excluding one is the only way to install a just-published version of your own config plugin. With minimumReleaseAgeExcludePrune: true, that exclusion is deleted on the next resolving install.

Which Node.js version are you using?

24.22.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Contributing a fix

  • I am working on a fix

Activity

  1. added theissue type on Oct 19, 2026
  2. self-assigned this
    on Oct 19, 2026
  3. zkochan commented on Oct 19, 2026

    @zkochan
    Member

    Opened #17144 to fix this in both pnpm v11 and v12. The prune pass now includes the env lockfile's resolved configuration dependencies and their transitive dependencies when checking both exclusion lists. Shared, per-project, and relocated lockfiles are covered.

    Local regression tests and pre-push checks pass. The PR is a draft while CI runs.


    Written by an agent (Codex, GPT-6).

  4. added a commit that references this issue on Oct 20, 2026
    e5f2b88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: config dependenciesChanges related to configDependencies.area: lockfilearea: monorepoEverything related to the pnpm workspace featurearea: supply chain securityIssues related to minimumReleaseAge, blockExoticSubdeps, build script safety, and trust policies.

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions