Skip to content

Commit 40c823c

Browse files
authoredJun 2, 2022
fix: undeprecate and remove warnings for --global, -g, --local (#4982)
1 parent 4ee12d0 commit 40c823c

16 files changed

+34
-67
lines changed
 

‎docs/content/commands/npm-bin.md

-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ Print the folder where npm will install executables.
3434

3535
* Default: false
3636
* Type: Boolean
37-
* DEPRECATED: `--global`, `--local` are deprecated. Use `--location=global`
38-
instead.
3937

4038
Operates in "global" mode, so that packages are installed into the `prefix`
4139
folder instead of the current working directory. See

‎docs/content/commands/npm-config.md

-2
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ Not supported by all npm commands.
124124
125125
* Default: false
126126
* Type: Boolean
127-
* DEPRECATED: `--global`, `--local` are deprecated. Use `--location=global`
128-
instead.
129127
130128
Operates in "global" mode, so that packages are installed into the `prefix`
131129
folder instead of the current working directory. See

‎docs/content/commands/npm-diff.md

-2
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,6 @@ Treat all files as text in `npm diff`.
248248
249249
* Default: false
250250
* Type: Boolean
251-
* DEPRECATED: `--global`, `--local` are deprecated. Use `--location=global`
252-
instead.
253251
254252
Operates in "global" mode, so that packages are installed into the `prefix`
255253
folder instead of the current working directory. See

‎docs/content/commands/npm-install-test.md

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ rather than using npm's default semver range operator.
7070

7171
* Default: false
7272
* Type: Boolean
73-
* DEPRECATED: `--global`, `--local` are deprecated. Use `--location=global`
74-
instead.
7573

7674
Operates in "global" mode, so that packages are installed into the `prefix`
7775
folder instead of the current working directory. See

‎docs/content/commands/npm-install.md

-2
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,6 @@ rather than using npm's default semver range operator.
460460
461461
* Default: false
462462
* Type: Boolean
463-
* DEPRECATED: `--global`, `--local` are deprecated. Use `--location=global`
464-
instead.
465463
466464
Operates in "global" mode, so that packages are installed into the `prefix`
467465
folder instead of the current working directory. See

‎docs/content/commands/npm-link.md

-2
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ rather than using npm's default semver range operator.
153153

154154
* Default: false
155155
* Type: Boolean
156-
* DEPRECATED: `--global`, `--local` are deprecated. Use `--location=global`
157-
instead.
158156

159157
Operates in "global" mode, so that packages are installed into the `prefix`
160158
folder instead of the current working directory. See

‎docs/content/commands/npm-ls.md

-2
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ Output parseable results from commands that write to standard output. For
137137

138138
* Default: false
139139
* Type: Boolean
140-
* DEPRECATED: `--global`, `--local` are deprecated. Use `--location=global`
141-
instead.
142140

143141
Operates in "global" mode, so that packages are installed into the `prefix`
144142
folder instead of the current working directory. See

‎docs/content/commands/npm-outdated.md

-2
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,6 @@ Output parseable results from commands that write to standard output. For
150150

151151
* Default: false
152152
* Type: Boolean
153-
* DEPRECATED: `--global`, `--local` are deprecated. Use `--location=global`
154-
instead.
155153

156154
Operates in "global" mode, so that packages are installed into the `prefix`
157155
folder instead of the current working directory. See

‎docs/content/commands/npm-prefix.md

-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ npm prefix -g
5151

5252
* Default: false
5353
* Type: Boolean
54-
* DEPRECATED: `--global`, `--local` are deprecated. Use `--location=global`
55-
instead.
5654

5755
Operates in "global" mode, so that packages are installed into the `prefix`
5856
folder instead of the current working directory. See

‎docs/content/commands/npm-rebuild.md

-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ will be rebuilt.
4242

4343
* Default: false
4444
* Type: Boolean
45-
* DEPRECATED: `--global`, `--local` are deprecated. Use `--location=global`
46-
instead.
4745

4846
Operates in "global" mode, so that packages are installed into the `prefix`
4947
folder instead of the current working directory. See

‎docs/content/commands/npm-root.md

-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ echo "Global packages installed in: ${global_node_modules}"
4141

4242
* Default: false
4343
* Type: Boolean
44-
* DEPRECATED: `--global`, `--local` are deprecated. Use `--location=global`
45-
instead.
4644

4745
Operates in "global" mode, so that packages are installed into the `prefix`
4846
folder instead of the current working directory. See

‎docs/content/commands/npm-update.md

-2
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ Will also prevent writing to `package-lock.json` if set to `false`.
188188

189189
* Default: false
190190
* Type: Boolean
191-
* DEPRECATED: `--global`, `--local` are deprecated. Use `--location=global`
192-
instead.
193191

194192
Operates in "global" mode, so that packages are installed into the `prefix`
195193
folder instead of the current working directory. See

‎docs/content/using-npm/config.md

+17-19
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,23 @@ results in no commit being made at all.
687687
<!-- automatically generated, do not edit manually -->
688688
<!-- see lib/utils/config/definitions.js -->
689689

690+
#### `global`
691+
692+
* Default: false
693+
* Type: Boolean
694+
695+
Operates in "global" mode, so that packages are installed into the `prefix`
696+
folder instead of the current working directory. See
697+
[folders](/configuring-npm/folders) for more on the differences in behavior.
698+
699+
* packages are installed into the `{prefix}/lib/node_modules` folder, instead
700+
of the current working directory.
701+
* bin files are linked to `{prefix}/bin`
702+
* man pages are linked to `{prefix}/share/man`
703+
704+
<!-- automatically generated, do not edit manually -->
705+
<!-- see lib/utils/config/definitions.js -->
706+
690707
#### `global-style`
691708

692709
* Default: false
@@ -1935,25 +1952,6 @@ Alias for `--include=dev`.
19351952
<!-- automatically generated, do not edit manually -->
19361953
<!-- see lib/utils/config/definitions.js -->
19371954

1938-
#### `global`
1939-
1940-
* Default: false
1941-
* Type: Boolean
1942-
* DEPRECATED: `--global`, `--local` are deprecated. Use `--location=global`
1943-
instead.
1944-
1945-
Operates in "global" mode, so that packages are installed into the `prefix`
1946-
folder instead of the current working directory. See
1947-
[folders](/configuring-npm/folders) for more on the differences in behavior.
1948-
1949-
* packages are installed into the `{prefix}/lib/node_modules` folder, instead
1950-
of the current working directory.
1951-
* bin files are linked to `{prefix}/bin`
1952-
* man pages are linked to `{prefix}/share/man`
1953-
1954-
<!-- automatically generated, do not edit manually -->
1955-
<!-- see lib/utils/config/definitions.js -->
1956-
19571955
#### `init.author.email`
19581956

19591957
* Default: ""

‎lib/utils/config/definitions.js

-3
Original file line numberDiff line numberDiff line change
@@ -813,9 +813,6 @@ define('global', {
813813
default: false,
814814
type: Boolean,
815815
short: 'g',
816-
deprecated: `
817-
\`--global\`, \`--local\` are deprecated. Use \`--location=global\` instead.
818-
`,
819816
description: `
820817
Operates in "global" mode, so that packages are installed into the
821818
\`prefix\` folder instead of the current working directory. See

‎tap-snapshots/test/lib/utils/config/definitions.js.test.cjs

-2
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,6 @@ exports[`test/lib/utils/config/definitions.js TAP > config description for globa
733733
734734
* Default: false
735735
* Type: Boolean
736-
* DEPRECATED: \`--global\`, \`--local\` are deprecated. Use \`--location=global\`
737-
instead.
738736
739737
Operates in "global" mode, so that packages are installed into the \`prefix\`
740738
folder instead of the current working directory. See

‎tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs

+17-19
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,23 @@ results in no commit being made at all.
560560
<!-- automatically generated, do not edit manually -->
561561
<!-- see lib/utils/config/definitions.js -->
562562
563+
#### \`global\`
564+
565+
* Default: false
566+
* Type: Boolean
567+
568+
Operates in "global" mode, so that packages are installed into the \`prefix\`
569+
folder instead of the current working directory. See
570+
[folders](/configuring-npm/folders) for more on the differences in behavior.
571+
572+
* packages are installed into the \`{prefix}/lib/node_modules\` folder, instead
573+
of the current working directory.
574+
* bin files are linked to \`{prefix}/bin\`
575+
* man pages are linked to \`{prefix}/share/man\`
576+
577+
<!-- automatically generated, do not edit manually -->
578+
<!-- see lib/utils/config/definitions.js -->
579+
563580
#### \`global-style\`
564581
565582
* Default: false
@@ -1808,25 +1825,6 @@ Alias for \`--include=dev\`.
18081825
<!-- automatically generated, do not edit manually -->
18091826
<!-- see lib/utils/config/definitions.js -->
18101827
1811-
#### \`global\`
1812-
1813-
* Default: false
1814-
* Type: Boolean
1815-
* DEPRECATED: \`--global\`, \`--local\` are deprecated. Use \`--location=global\`
1816-
instead.
1817-
1818-
Operates in "global" mode, so that packages are installed into the \`prefix\`
1819-
folder instead of the current working directory. See
1820-
[folders](/configuring-npm/folders) for more on the differences in behavior.
1821-
1822-
* packages are installed into the \`{prefix}/lib/node_modules\` folder, instead
1823-
of the current working directory.
1824-
* bin files are linked to \`{prefix}/bin\`
1825-
* man pages are linked to \`{prefix}/share/man\`
1826-
1827-
<!-- automatically generated, do not edit manually -->
1828-
<!-- see lib/utils/config/definitions.js -->
1829-
18301828
#### \`init.author.email\`
18311829
18321830
* Default: ""

0 commit comments

Comments
 (0)
Please sign in to comment.