Skip to content

Commit e72af74

Browse files
authored
Move pkg json settings and rename settings to camelCase (#656)
* docs: move settings from package.json file page to settings page * docs: rename kebab case settings to camel case * fix mistakes * rename settings
1 parent 12e843c commit e72af74

14 files changed

+594
-713
lines changed

docs/cli/config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Aliases: `c`
77

88
Manage the configuration files.
99

10-
The configuration files are in `INI` format.
10+
The configuration files are in `init` (the global) and `YAML` (the local) formats.
1111

12-
The local configuration file is located in the root of the project and is named `.npmrc`.
12+
The local configuration file is located in the root of the project and is named `pnpm-workspace.yaml`.
1313

1414
The global configuration file is located at one of the following locations:
1515

docs/cli/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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](../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)
180+
Filter currently does not work properly with v8 default config, you have to implicitly set [dedupePeerDependents](../settings.md#dedupePeerDependents) 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/publish.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ When publishing packages that require two-factor authentication, this option can
103103

104104
## Configuration
105105

106-
You can also set `git-checks`, `publish-branch` options in the `.npmrc` file.
106+
You can also set `gitChecks`, `publishBranch` options in the `pnpm-workspace.yaml` file.
107107

108108
For example:
109109

110-
```ini title=".npmrc"
111-
git-checks=false
112-
publish-branch=production
110+
```yaml title="pnpm-workspace.yaml"
111+
gitChecks: false
112+
publishBranch: production
113113
```
114114
115115
## Life Cycle Scripts

docs/cli/recursive.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ when used with the following commands:
2525
* `test`
2626
* `add`
2727

28-
If you want the root project be included even when running scripts, set the [include-workspace-root] setting to `true`.
28+
If you want the root project be included even when running scripts, set the [includeWorkspaceRoot] setting to `true`.
2929

3030
Usage example:
3131

@@ -46,11 +46,11 @@ similar to `yarn workspaces`.
4646

4747
When this is set to deep, local packages can also be linked to subdependencies.
4848

49-
Be advised that it is encouraged instead to use [npmrc] for this setting, to
49+
Be advised that it is encouraged instead to use [`pnpm-workspace.yaml`] for this setting, to
5050
enforce the same behaviour in all environments. This option exists solely so you
5151
may override that if necessary.
5252

53-
[npmrc]: ../workspaces.md#link-workspace-packages
53+
[`pnpm-workspace.yaml`]: ../settings.md#linkWorkspacePackages
5454

5555
### --workspace-concurrency
5656

@@ -106,4 +106,4 @@ pnpm -r --reverse run clean
106106

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

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

docs/cli/run.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,17 @@ Hide workspace prefix from output from child processes that are run in parallel,
152152

153153
[Read more about filtering.](../filtering.md)
154154

155-
## .npmrc settings
155+
## pnpm-workspace.yaml settings
156156

157-
### enable-pre-post-scripts
157+
### enablePrePostScripts
158158

159159
* Default: **true**
160160
* Type: **Boolean**
161161

162162
When `true`, pnpm will run any pre/post scripts automatically. So running `pnpm foo`
163163
will be like running `pnpm prefoo && pnpm foo && pnpm postfoo`.
164164

165-
### script-shell
165+
### scriptShell
166166

167167
* Default: **null**
168168
* Type: **path**
@@ -172,10 +172,10 @@ The shell to use for scripts run with the `pnpm run` command.
172172
For instance, to force usage of Git Bash on Windows:
173173

174174
```
175-
pnpm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"
175+
pnpm config set scriptShell "C:\\Program Files\\git\\bin\\bash.exe"
176176
```
177177

178-
### shell-emulator
178+
### shellEmulator
179179

180180
* Default: **false**
181181
* Type: **Boolean**
@@ -192,7 +192,7 @@ next script will fail on non-POSIX-compliant systems:
192192
}
193193
```
194194

195-
But if the `shell-emulator` setting is set to `true`, it will work on all
195+
But if the `shellEmulator` setting is set to `true`, it will work on all
196196
platforms.
197197

198198
[bash-like shell]: https://www.npmjs.com/package/@yarnpkg/shell

docs/docker.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,9 @@ You want to save only necessary dependencies for each package, `pnpm deploy` sho
9090
```yaml title="pnpm-workspace.yaml"
9191
packages:
9292
- 'packages/*'
93-
```
94-
95-
```ini title=".npmrc"
96-
sync-injected-deps-after-scripts[]=build
97-
inject-workspace-packages=true
93+
syncInjectedDepsAfterScripts:
94+
- build
95+
injectWorkspacePackages: true
9896
```
9997
10098
```text title=".dockerignore"

docs/faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ workarounds to make the buggy packages work.
112112

113113
### Solution 1
114114

115-
In case there are issues, you can use the [`node-linker=hoisted`] setting.
115+
In case there are issues, you can use the [`nodeLinker: hoisted`] setting.
116116
This creates a flat `node_modules` structure similar to the one created by `npm`.
117117

118-
[`node-linker=hoisted`]: npmrc#node-linker
118+
[`nodeLinker: hoisted`]: settings#nodeLinker
119119

120120
### Solution 2
121121

docs/git_branch_lockfiles.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Git branch lockfiles allows you to totally avoid lockfile merge conflicts and so
77

88
## Use git branch lockfiles
99

10-
You can turn on this feature by configuring the `.npmrc` file.
10+
You can turn on this feature by configuring the `pnpm-workspace.yaml` file.
1111

12-
```ini
13-
git-branch-lockfile=true
12+
```yaml
13+
gitBranchLockfile: true
1414
```
1515
1616
By doing this, lockfile name will be generated based on the current branch name.
@@ -45,10 +45,11 @@ After that, all git branch lockfiles will be merged into one `pnpm-lock.yaml`
4545
4646
pnpm allows you to specify `--merge-git-branch-lockfiles` by matching the current branch name.
4747
48-
For instance, by the following setting in `.npmrc` file, `pnpm install` will merge all git branch lockfiles when
48+
For instance, by the following setting in `pnpm-workspace.yaml` file, `pnpm install` will merge all git branch lockfiles when
4949
running in the `main` branch and the branch name starts with `release`.
5050
51-
```ini
52-
merge-git-branch-lockfiles-branch-pattern[]=main
53-
merge-git-branch-lockfiles-branch-pattern[]=release*
51+
```yaml
52+
mergeGitBranchLockfilesBranchPattern:
53+
- main
54+
- release*
5455
```

docs/motivation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ creates and why it works fine with the Node.js ecosystem, read:
5555

5656
:::tip
5757

58-
If your tooling doesn't work well with symlinks, you may still use pnpm and set the [node-linker](npmrc#node-linker) setting to `hoisted`. This will instruct pnpm to create a node_modules directory that is similar to those created by npm and Yarn Classic.
58+
If your tooling doesn't work well with symlinks, you may still use pnpm and set the [nodeLinker](settings#nodeLinker) setting to `hoisted`. This will instruct pnpm to create a node_modules directory that is similar to those created by npm and Yarn Classic.
5959

6060
:::

0 commit comments

Comments
 (0)