Skip to content

Conversation

@g-chao
Copy link
Contributor

@g-chao g-chao commented Oct 3, 2023

Summary

PNPM8 changes the default value for auto-install-peers setting. It is default to true in
PNPM8

In this PR, we want to provide a option inside pnpm-config.json to let user overwrite auto-install-peers setting easily.

Details

If user set auto-install-peers in pnpm-config.json only, use the value in pnpm-config.json
If user set auto-install-peers in pnpm-config.json and .npmrc, use the value in pnpm-config.json, and output a warning message
If user set auto-install-peers in .npmrc only, do nothing, let pnpm handle it
If user does not set auto-install-peers in both pnpm-config.json and .npmrc, rush will default it to false

How it was tested

Manually tested on rush-example repo.

Impacted documentation

N/A

@octogonz
Copy link
Collaborator

octogonz commented Oct 3, 2023

If user does not set auto-install-peers in pnpm-config.json and .npmrc, do nothing, let pnpm handle it

@iclanton @D4N14L @dmichon-msft Should Rush instead default to false? A couple considerations:

  1. As with our reasoning regarding resolutionMode, a monorepo owner who is not following the latest PNPM news may innocently update pnpmVersion and be surprised to learn that installation semantics are suddenly very different from the past.
  2. Is auto-install-peers=true an unwise choice for a large scale professional development? (The early discussions seemed to conclude that, but maybe opinions have changed?) We generally aim for Rush's out-of-box defaults to be the best choices for a large monorepo, even if that means diverging from the native defaults of PNPM.

@octogonz octogonz merged commit c677b60 into microsoft:main Oct 6, 2023
@octogonz
Copy link
Collaborator

octogonz commented Oct 7, 2023

🚀 This feature was released with Rush 5.109.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants