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/docs
diff options
context:
space:
mode:
authorPelle Wessman <pelle@kodfabrik.se>2021-10-15 13:51:41 +0300
committerLuke Karrys <luke@lukekarrys.com>2021-10-27 19:37:40 +0300
commitcb9f43551f46bf27095cd7bd6c1885a441004cd2 (patch)
tree41ffb54786a257a63874181df1f7522908c07745 /docs
parent62c731545e83f3c7f890d6b4feb6f7544884bd3c (diff)
fix: allow `--lockfile-version` config to be string and coerce to number
As all CLI input is considered to be string, eg. a "npm install --lockfile-version 3" would fail with the error messages: ``` npm WARN invalid config lockfile-version="3" set in command line options npm WARN invalid config Must be one of: null, 1, 2, 3 ``` Until we have a config system that supports setting type and possible values of configs, we have to specify all string and number values for the `lockfile-version`, but we coerce all values to numbers in the flattener. Co-authored-by: @voxpelli Co-authored-by: @isaacs PR-URL: https://github.com/npm/cli/pull/3949 Credit: @lukekarrys Close: #3949 Reviewed-by: @isaacs
Diffstat (limited to 'docs')
-rw-r--r--docs/content/using-npm/config.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md
index ddabe01d7..a5017e61d 100644
--- a/docs/content/using-npm/config.md
+++ b/docs/content/using-npm/config.md
@@ -987,7 +987,7 @@ When passed to `npm config` this refers to which config file to use.
* Default: Version 2 if no lockfile or current lockfile version less than or
equal to 2, otherwise maintain current lockfile version
-* Type: null, 1, 2, or 3
+* Type: null, 1, 2, 3, "1", "2", or "3"
Set the lockfile format version to be used in package-lock.json and
npm-shrinkwrap-json files. Possible options are: