[rush] Support pnpm `configDependencies` and `updateConfig` in pnpmfile

Open
#5,776 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
typescript

Research direction

Start by reading common/config/rush/pnpm-config.json and common/config/rush/.pnpmfile.cs, then compare the linked pnpm configDependencies and updateConfig documentation with Rush's existing pnpm configuration flow. Done means the supported configuration shape and hook behavior are defined, implemented, and covered by appropriate tests.

Written by the indexing model from the issue text.

Description

Feature Request: Support pnpm 10's configDependencies and updateConfig in pnpmfile

Summary

Rush currently does not provide a supported mechanism to declare pnpm configDependencies such as globalConfigDependencies.

pnpm supports configuration plugins via configDependencies and the new updateConfig hook in pnpmfile:
https://pnpm.io/config-dependencies
https://pnpm.io/pnpmfile#hooksupdateconfigconfig-config--promiseconfig

These are required for enabling pnpm plugins such as @pnpm/plugin-esm-node-path, which are used in pnpm’s global virtual store mode:
https://pnpm.io/11.x/global-virtual-store

Because Rush does not support these features, pnpm’s configuration plugin system cannot be used cleanly in Rush-managed repositories.


Problem

There is no Rush-supported way to:

  • declare configDependencies
  • use pnpmfile updateConfig hook in a supported way

As a result:

  • pnpm configDependencies cannot be installed in a structured way
  • global virtual store setups requiring pnpm plugins are blocked or require workarounds (packageExtensions)

Proposed Solution

1. Support globalConfigDependencies

Introduce a Rush-level configuration field (e.g. in common/config/rush/pnpm-config.json):

{
  "globalConfigDependencies": {
    "@pnpm/plugin-esm-node-path": "0.1.2"
  }
}

Or rush-pnpm add --config @pnpm/plugin-esm-node-path should add @pnpm/plugin-esm-node-path under configDependencies in common/temp/pnpm-workspace.yaml

2. Support updateConfig hook in common/config/rush/.pnpmfile.cs
module.exports = {
  hooks: {
    readPackage,
    updateConifg, // new hook
  }
};
Dominant language
TypeScript
Stars
6.5k
Forks
708
Avg merge
5d 19h
Merged PRs (30d)
48

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/rushstack

All issues in microsoft/rushstack

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.