From 28dd92896251d02a912651aa56a2c81e47c107ee Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Wed, 18 Sep 2024 22:38:09 +0200 Subject: [PATCH] fix: update nodeModulesDir config JSON schema (#25653) Ref https://github.com/denoland/deno/issues/25380 --- cli/schemas/config-file.v1.json | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/cli/schemas/config-file.v1.json b/cli/schemas/config-file.v1.json index adbddafd61..ab0f4997cb 100644 --- a/cli/schemas/config-file.v1.json +++ b/cli/schemas/config-file.v1.json @@ -1,6 +1,6 @@ { "$id": "https://deno.land/x/deno/cli/schemas/config-file.v1.json", - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "A JSON representation of a Deno configuration file.", "required": [], "title": "Deno configuration file Schema", @@ -405,8 +405,18 @@ } }, "nodeModulesDir": { - "description": "Enables or disables the use of a local node_modules folder for npm packages. Alternatively, use the `--node-modules-dir` flag or override the config via `--node-modules-dir=false`. Requires Deno 1.34 or later.", - "type": "boolean" + "oneOf": [ + { + "description": "Sets the node_modules management mode for npm packages. Alternatively, use the `--node-modules-dir=` flag. Requires Deno 2.0-rc.1 or later.", + "default": "none", + "enum": ["auto", "manual", "none"] + }, + { + "description": "Enables or disables the use of a local node_modules folder for npm packages. Alternatively, use the `--node-modules-dir` flag or override the config via `--node-modules-dir=false`. Requires Deno 1.34 or later.", + "type": "boolean", + "deprecated": false + } + ] }, "vendor": { "description": "Enables or disables the use of a local vendor folder as a local cache for remote modules and node_modules folder for npm packages. Alternatively, use the `--vendor` flag or override the config via `--vendor=false`. Requires Deno 1.36.1 or later.",