Skip to content

Commit

Permalink
fix: fixes based on PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
g-chao committed Oct 4, 2023
1 parent 701f9a0 commit 65d948a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"changes": [
{
"packageName": "@microsoft/rush",
"comment": "Add a new setting `autoInstallPeers` in pnpm-config.json",
"comment": "(IMPORTANT) Add a new setting `autoInstallPeers` in pnpm-config.json; be aware that Rush changes PNPM's default if you are using PNPM 8 or newer",
"type": "none"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,21 @@
/*[LINE "DEMO"]*/ "resolutionMode": "time-based",

/**
* When true, any missing non-optional peer dependencies are automatically installed.
*
* This setting determines whether PNPM will automatically install (non-optional)
* missing peer dependencies instead of reporting an error. Doing so conveniently
* avoids the need to specify peer versions in package.json, but in a large monorepo
* this often creates worse problems. The reason is that peer dependency behavior
* is inherently complicated, and it is easier to troubleshoot consequences of an explicit
* version than an invisible heuristic. The original NPM RFC discussion pointed out
* some other problems with this feature: https://github.com/npm/rfcs/pull/43
* IMPORTANT: Without Rush, the setting defaults to true for PNPM 8 and newer; however,
* as of Rush version 5.109.0 the default is always false unless `autoInstallPeers`
* is specified in pnpm-config.json or .npmrc, regardless of your PNPM version.
* PNPM documentation: https://pnpm.io/npmrc#auto-install-peers
*
* The default is `false`.
* The default value is false.
*/
/*[LINE "DEMO"]*/ "autoInstallPeers": false,

Expand Down
2 changes: 1 addition & 1 deletion libraries/rush-lib/src/schemas/pnpm-config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
},

"autoInstallPeers": {
"description": "This option overrides the auto-install-peers in PNPM. Use it if you want to change the default resolution behavior when installing dependencies. Defaults to \"highest\".\n\nPNPM documentation: https://pnpm.io/npmrc#auto-install-peers.",
"description": "This setting determines whether PNPM will automatically install (non-optional) missing peer dependencies instead of reporting an error. With Rush, the default value is always false.\n\nPNPM documentation: https://pnpm.io/npmrc#auto-install-peers",
"type": "boolean"
}
}
Expand Down

0 comments on commit 65d948a

Please sign in to comment.