Skip to content

Commit 12e843c

Browse files
authored
docs: update docs about settings (#651)
* docs: update docs about settings * add more details * add redirect * fix links to settings page
1 parent 9ded2c0 commit 12e843c

File tree

8 files changed

+32
-23
lines changed

8 files changed

+32
-23
lines changed

docs/cli/install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ the installation progress.
141141

142142
If you want to change what type of information is printed, use the [loglevel] setting.
143143

144-
[loglevel]: ../npmrc.md#loglevel
144+
[loglevel]: ../settings.md#loglevel
145145

146146
### --use-store-server
147147

@@ -177,7 +177,7 @@ dependencies.
177177

178178
:::warning
179179

180-
Filter currently does not work properly with v8 default config, you have to implicitly set [dedupe-peer-dependents](../npmrc.md#dedupe-peer-dependents) to `false` to have that work. For more info and progress please refer to [#6300](https://github.com/pnpm/pnpm/issues/6300)
180+
Filter currently does not work properly with v8 default config, you have to implicitly set [dedupe-peer-dependents](../settings.md#dedupe-peer-dependents) to `false` to have that work. For more info and progress please refer to [#6300](https://github.com/pnpm/pnpm/issues/6300)
181181

182182
:::
183183

docs/cli/recursive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,4 @@ pnpm -r --reverse run clean
106106

107107
[Read more about filtering.](../filtering.md)
108108

109-
[include-workspace-root]: ../npmrc.md#include-workspace-root
109+
[include-workspace-root]: ../settings.md#include-workspace-root

docs/package_json.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ You can specify the version of Node and pnpm that your software works on:
2828
During local development, pnpm will always fail with an error message
2929
if its version does not match the one specified in the `engines` field.
3030

31-
Unless the user has set the `engine-strict` config flag (see [.npmrc]), this
31+
Unless the user has set the `engine-strict` config flag (see [settings]), this
3232
field is advisory only and will only produce warnings when your package is
3333
installed as a dependency.
3434

35-
[.npmrc]: ./npmrc.md#engine-strict
35+
[settings]: ./settings.md#engine-strict
3636

3737
## dependenciesMeta
3838

docs/npmrc.md renamed to docs/settings.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
2-
id: npmrc
3-
title: "Settings (.npmrc)"
2+
id: settings
3+
title: "Settings (pnpm-workspace.yaml)"
44
---
55

6-
pnpm gets its configuration from the command line, environment variables, and
6+
pnpm gets its configuration from the command line, environment variables, `pnpm-workspace.yaml`, and
77
`.npmrc` files.
88

9-
The `pnpm config` command can be used to update and edit the contents of the
10-
user and global `.npmrc` files.
9+
The `pnpm config` command can be used to read and edit the contents of the project and global configuration files.
1110

12-
The four relevant files are:
11+
The relevant configuration files are:
1312

14-
* per-project configuration file (`/path/to/my/project/.npmrc`)
15-
* per-workspace configuration file (the directory that contains the
16-
`pnpm-workspace.yaml` file)
17-
* per-user configuration file (`~/.npmrc`)
18-
* global configuration file (`/etc/npmrc`)
13+
* Per-project configuration file: `/path/to/my/project/pnpm-workspace.yaml`
14+
* Global configuration file: `~/.config/pnpm/rc` (an [INI-formatted] list of `key = value` parameters)
1915

20-
All `.npmrc` files are an [INI-formatted] list of `key = value` parameters.
16+
:::note
17+
18+
Authorization-related settings are handled by npm's configuration system. So, `pnpm config set registry=<value>` will actually save the setting to npm's global configuration file.
19+
20+
:::
2121

22-
Values in the `.npmrc` files may contain env variables using the `${NAME}` syntax. The env variables may also be specified with default values. Using `${NAME-fallback}` will return `fallback` if `NAME` isn't set. `${NAME:-fallback}` will return `fallback` if `NAME` isn't set, or is an empty string.
22+
Values in the configuration files may contain env variables using the `${NAME}` syntax. The env variables may also be specified with default values. Using `${NAME-fallback}` will return `fallback` if `NAME` isn't set. `${NAME:-fallback}` will return `fallback` if `NAME` isn't set, or is an empty string.
2323

2424
[INI-formatted]: https://en.wikipedia.org/wiki/INI_file
2525

docs/workspaces.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ multi-project repositories, or monolithic repositories). You can create a
88
workspace to unite multiple projects inside a single repository.
99

1010
A workspace must have a [`pnpm-workspace.yaml`] file in its
11-
root. A workspace also may have an [`.npmrc`] in its root.
11+
root.
1212

1313
[`pnpm-workspace.yaml`]: pnpm-workspace_yaml.md
14-
[`.npmrc`]: npmrc.md
1514

1615
:::tip
1716

@@ -41,7 +40,7 @@ This protocol is especially useful when the [link-workspace-packages] option is
4140
set to `false`. In that case, pnpm will only link packages from the workspace if
4241
the `workspace:` protocol is used.
4342

44-
[link-workspace-packages]: npmrc.md#link-workspace-packages
43+
[link-workspace-packages]: settings.md#link-workspace-packages
4544

4645
### Referencing workspace packages through aliases
4746

sidebars.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
],
103103
"Configuration": [
104104
"package_json",
105-
"npmrc",
105+
"settings",
106106
"pnpm-workspace_yaml",
107107
"pnpmfile"
108108
],

vercel.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626
"destination": "/:splat*",
2727
"permanent": false
2828
},
29+
{
30+
"source": "/npmrc",
31+
"destination": "/settings",
32+
"permanent": true
33+
},
34+
{
35+
"source": "/next/npmrc",
36+
"destination": "/next/settings",
37+
"permanent": true
38+
},
2939
{
3040
"source": "/en/:splat*",
3141
"destination": "/:splat*",

versioned_sidebars/version-10.x-sidebars.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@
307307
},
308308
{
309309
"type": "doc",
310-
"id": "npmrc"
310+
"id": "settings"
311311
},
312312
{
313313
"type": "doc",

0 commit comments

Comments
 (0)