Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/utils
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@github.com>2022-05-10 20:00:36 +0300
committerNathan Fritz <fritzy@github.com>2022-05-19 01:13:47 +0300
commit8898710220a3d84b0a9ea2a6d9cf880e50b94c9e (patch)
tree73f78c5c87498417ebdc2014481b7155006c1100 /lib/utils
parent8a49e3ab6499c6196c5d7a0f6dad3b345944b992 (diff)
feat: deprecated set-script, birthday, --global, and --local
Diffstat (limited to 'lib/utils')
-rw-r--r--lib/utils/config/definitions.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js
index c4be3a658..92fbbd1e6 100644
--- a/lib/utils/config/definitions.js
+++ b/lib/utils/config/definitions.js
@@ -811,6 +811,9 @@ define('global', {
default: false,
type: Boolean,
short: 'g',
+ deprecated: `
+ \`--global\`, \`--local\` are deprecated. Use \`--location=global\` instead.
+ `,
description: `
Operates in "global" mode, so that packages are installed into the
\`prefix\` folder instead of the current working directory. See
@@ -1179,12 +1182,24 @@ define('location', {
`,
description: `
When passed to \`npm config\` this refers to which config file to use.
+
+ When set to "global" mode, packages are installed into the \`prefix\` folder
+ instead of the current working directory. See
+ [folders](/configuring-npm/folders) for more on the differences in behavior.
+
+ * packages are installed into the \`{prefix}/lib/node_modules\` folder,
+ instead of the current working directory.
+ * bin files are linked to \`{prefix}/bin\`
+ * man pages are linked to \`{prefix}/share/man\`
`,
flatten: (key, obj, flatOptions) => {
flatten(key, obj, flatOptions)
if (flatOptions.global) {
flatOptions.location = 'global'
}
+ if (obj.location === 'global') {
+ flatOptions.global = true
+ }
},
})