mirror of https://github.com/jdx/mise
fix: deprecated attribute in json schema (#3482)
This commit is contained in:
parent
0f80777606
commit
960fbd5ba6
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"$id": "https://mise.jdx.dev/schema/mise.json",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$schema": "http://json-schema.org/2019-09/schema#",
|
||||
"title": "mise",
|
||||
"type": "object",
|
||||
"$defs": {
|
||||
|
@ -148,12 +148,13 @@
|
|||
},
|
||||
"asdf": {
|
||||
"description": "use asdf as a default plugin backend",
|
||||
"deprecated": "Use disable_backends instead.",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"deprecated": true
|
||||
},
|
||||
"asdf_compat": {
|
||||
"description": "set to true to ensure .tool-versions will be compatible with asdf",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"deprecated": true
|
||||
},
|
||||
"cache_prune_age": {
|
||||
"default": "30d",
|
||||
|
@ -172,7 +173,8 @@
|
|||
},
|
||||
"cargo_binstall": {
|
||||
"description": "Use cargo-binstall instead of cargo install if available",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"deprecated": true
|
||||
},
|
||||
"cd": {
|
||||
"description": "Path to change to after launching mise",
|
||||
|
@ -215,8 +217,8 @@
|
|||
},
|
||||
"disable_default_shorthands": {
|
||||
"description": "Disables built-in shorthands to asdf/vfox plugins",
|
||||
"deprecated": "Replaced with `disable_default_registry`",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"deprecated": true
|
||||
},
|
||||
"disable_hints": {
|
||||
"default": [],
|
||||
|
@ -243,7 +245,7 @@
|
|||
}
|
||||
},
|
||||
"env_file": {
|
||||
"description": "Path to a file containing environment variables.",
|
||||
"description": "Path to a file containing environment variables to automatically load.",
|
||||
"type": "string"
|
||||
},
|
||||
"erlang": {
|
||||
|
@ -299,8 +301,8 @@
|
|||
},
|
||||
"go_set_gopath": {
|
||||
"description": "[deprecated] Set to true to set GOPATH=~/.local/share/mise/installs/go/.../packages.",
|
||||
"deprecated": "Use env._go.set_goroot instead.",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"deprecated": true
|
||||
},
|
||||
"go_set_goroot": {
|
||||
"default": true,
|
||||
|
@ -345,14 +347,14 @@
|
|||
"legacy_version_file": {
|
||||
"default": true,
|
||||
"description": "Set to false to disable the idiomatic version files such as .node-version, .ruby-version, etc.",
|
||||
"deprecated": "Use idiomatic_version_file instead.",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"deprecated": true
|
||||
},
|
||||
"legacy_version_file_disable_tools": {
|
||||
"default": [],
|
||||
"description": "Specific tools to disable idiomatic version files for.",
|
||||
"deprecated": "Use idiomatic_version_file_disable_tools instead.",
|
||||
"type": "array",
|
||||
"deprecated": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
|
@ -452,7 +454,8 @@
|
|||
},
|
||||
"profile": {
|
||||
"description": "Profile to use for mise.${MISE_PROFILE}.toml files.",
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"deprecated": true
|
||||
},
|
||||
"python": {
|
||||
"additionalProperties": false,
|
||||
|
@ -492,8 +495,8 @@
|
|||
},
|
||||
"venv_auto_create": {
|
||||
"description": "Automatically create virtualenvs for python tools.",
|
||||
"deprecated": "Use env._python.venv instead.",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"deprecated": true
|
||||
},
|
||||
"venv_stdlib": {
|
||||
"description": "Prefer to use venv from Python's standard library.",
|
||||
|
@ -503,48 +506,48 @@
|
|||
},
|
||||
"python_compile": {
|
||||
"description": "If true, compile python from source. If false, use precompiled binaries. If not set, use precompiled binaries if available.",
|
||||
"deprecated": "Use python.compile instead.",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"deprecated": true
|
||||
},
|
||||
"python_default_packages_file": {
|
||||
"description": "Path to a file containing default python packages to install when installing python.",
|
||||
"deprecated": "Use python.default_packages_file instead.",
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"deprecated": true
|
||||
},
|
||||
"python_patch_url": {
|
||||
"description": "URL to fetch python patches from.",
|
||||
"deprecated": "Use python.patch_url instead.",
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"deprecated": true
|
||||
},
|
||||
"python_patches_directory": {
|
||||
"description": "Directory to fetch python patches from.",
|
||||
"deprecated": "Use python.patch_url instead.",
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"deprecated": true
|
||||
},
|
||||
"python_precompiled_arch": {
|
||||
"description": "Specify the architecture to use for precompiled binaries.",
|
||||
"deprecated": "Use python.precompiled_arch instead.",
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"deprecated": true
|
||||
},
|
||||
"python_precompiled_os": {
|
||||
"description": "Specify the OS to use for precompiled binaries.",
|
||||
"deprecated": "Use python.precompiled_os instead.",
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"deprecated": true
|
||||
},
|
||||
"python_pyenv_repo": {
|
||||
"description": "URL to fetch pyenv from for compiling python.",
|
||||
"deprecated": "Use python.pyenv_repo instead.",
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"deprecated": true
|
||||
},
|
||||
"python_venv_auto_create": {
|
||||
"description": "Automatically create virtualenvs for python tools.",
|
||||
"deprecated": "Use env._python.venv instead.",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"deprecated": true
|
||||
},
|
||||
"python_venv_stdlib": {
|
||||
"description": "Prefer to use venv from Python's standard library.",
|
||||
"deprecated": "Use python.venv_stdlib instead.",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"deprecated": true
|
||||
},
|
||||
"quiet": {
|
||||
"description": "Suppress all output except errors.",
|
||||
|
@ -665,7 +668,8 @@
|
|||
"task_run_auto_install": {
|
||||
"default": true,
|
||||
"description": "Automatically install missing tools when executing tasks.",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"deprecated": true
|
||||
},
|
||||
"task_skip": {
|
||||
"default": [],
|
||||
|
@ -717,8 +721,8 @@
|
|||
},
|
||||
"vfox": {
|
||||
"description": "Use vfox as a default plugin backend instead of asdf.",
|
||||
"deprecated": "Use disable_backends instead.",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"deprecated": true
|
||||
},
|
||||
"windows_default_file_shell_args": {
|
||||
"default": "cmd /c",
|
||||
|
|
|
@ -97,6 +97,7 @@ default to using an asdf plugin for cmake.
|
|||
env = "MISE_ASDF_COMPAT"
|
||||
type = "Bool"
|
||||
hide = true
|
||||
deprecated = "no longer supported"
|
||||
description = "set to true to ensure .tool-versions will be compatible with asdf"
|
||||
docs = """
|
||||
Only output `.tool-versions` files in `mise local|global` which will be usable by asdf.
|
||||
|
@ -139,6 +140,7 @@ mise use -g cargo-binstall
|
|||
[cargo_binstall]
|
||||
type = "Bool"
|
||||
hide = true
|
||||
deprecated = "Use cargo.binstall instead."
|
||||
optional = true
|
||||
description = "Use cargo-binstall instead of cargo install if available"
|
||||
|
||||
|
@ -241,8 +243,7 @@ They will be read in order, with the last one taking precedence.
|
|||
env = "MISE_ENV_FILE"
|
||||
type = "Path"
|
||||
optional = true
|
||||
description = "Path to a file containing environment variables."
|
||||
hide = true
|
||||
description = "Path to a file containing environment variables to automatically load."
|
||||
|
||||
[erlang.compile]
|
||||
env = "MISE_ERLANG_COMPILE"
|
||||
|
@ -576,6 +577,7 @@ env = "MISE_PROFILE"
|
|||
type = "String"
|
||||
description = "Profile to use for mise.${MISE_PROFILE}.toml files."
|
||||
optional = true
|
||||
deprecated = "Use MISE_ENV_FILE instead."
|
||||
hide = true
|
||||
|
||||
[python.compile]
|
||||
|
@ -882,6 +884,7 @@ env = "MISE_TASK_RUN_AUTO_INSTALL"
|
|||
type = "Bool"
|
||||
default = true
|
||||
hide = true
|
||||
deprecated = "Use task_auto_install instead."
|
||||
description = "Automatically install missing tools when executing tasks."
|
||||
|
||||
[task_skip]
|
||||
|
|
|
@ -6,7 +6,7 @@ import { match } from "ts-pattern";
|
|||
type Element = {
|
||||
default: string | number | boolean;
|
||||
description: string;
|
||||
deprecated: boolean;
|
||||
deprecated?: boolean;
|
||||
type: string;
|
||||
enum?: string[];
|
||||
items?: {
|
||||
|
@ -18,7 +18,7 @@ type Props = {
|
|||
type: string;
|
||||
default: string | number | boolean;
|
||||
description: string;
|
||||
deprecated: boolean;
|
||||
deprecated: string;
|
||||
enum?: [string][];
|
||||
};
|
||||
|
||||
|
@ -55,10 +55,12 @@ function buildElement(key: string, props: Props): Element {
|
|||
const ele: Element = {
|
||||
default: props.default,
|
||||
description: props.description,
|
||||
deprecated: props.deprecated,
|
||||
type,
|
||||
};
|
||||
|
||||
if (props.deprecated) {
|
||||
ele.deprecated = true;
|
||||
}
|
||||
if (props.enum) {
|
||||
ele.enum = props.enum.map((e) => e[0]);
|
||||
}
|
||||
|
@ -87,6 +89,9 @@ for (const key in doc) {
|
|||
description: props.description,
|
||||
properties: {},
|
||||
};
|
||||
if (props.deprecated) {
|
||||
settings[key].deprecated = true;
|
||||
}
|
||||
settings[key].properties[subkey] = buildElement(
|
||||
`${key}.${subkey}`,
|
||||
props[subkey],
|
||||
|
|
Loading…
Reference in New Issue