mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
BREAKING: remove deprecated files config (#25535)
The long form "files" config has been flattened into the parent. Old: ```json { "test": { "files": { "include": ["**/*.ts"], "exclude": ["ignore.ts"] } } } ``` New: ```json { "test": { "include": ["**/*.ts"], "exclude": ["ignore.ts"] } } ``` This was deprecated some time ago, but we're removing it now in Deno 2.0. Closes #25415
This commit is contained in:
parent
3daab54612
commit
1e0ac609b5
11 changed files with 8 additions and 142 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -1375,9 +1375,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "deno_config"
|
||||
version = "0.33.2"
|
||||
version = "0.34.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "84d90b5eacfd6ee4ec978a11739c71eaeb19a575889f8c2b473430df84078fe2"
|
||||
checksum = "353595ebd9d19602f4cc0bb5613ae8bf036fb23ce1e6638eec594a63b1f8d48a"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"deno_package_json",
|
||||
|
|
|
@ -65,7 +65,7 @@ winres.workspace = true
|
|||
[dependencies]
|
||||
deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "proposal", "react", "sourcemap", "transforms", "typescript", "view", "visit"] }
|
||||
deno_cache_dir = { workspace = true }
|
||||
deno_config = { version = "=0.33.2", features = ["workspace", "sync"] }
|
||||
deno_config = { version = "=0.34.0", features = ["workspace", "sync"] }
|
||||
deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
|
||||
deno_doc = { version = "0.148.0", features = ["html", "syntect"] }
|
||||
deno_graph = { version = "=0.82.1" }
|
||||
|
|
|
@ -279,25 +279,6 @@
|
|||
"type": "string"
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"include": {
|
||||
"type": "array",
|
||||
"description": "List of files, directories or globs that will be linted.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"exclude": {
|
||||
"type": "array",
|
||||
"description": "List of files, directories or globs that will not be linted.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -355,25 +336,6 @@
|
|||
"type": "string"
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"include": {
|
||||
"type": "array",
|
||||
"description": "List of files, directories or globs that will be formatted.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"exclude": {
|
||||
"type": "array",
|
||||
"description": "List of files, directories or globs that will not be formatted.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"useTabs": {
|
||||
"description": "Whether to use tabs (true) or spaces (false) for indentation.",
|
||||
"type": "boolean",
|
||||
|
@ -477,25 +439,6 @@
|
|||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"include": {
|
||||
"type": "array",
|
||||
"description": "List of files, directories or globs that will be searched for tests.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"exclude": {
|
||||
"type": "array",
|
||||
"description": "List of files, directories or globs that will not be searched for tests.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -536,25 +479,6 @@
|
|||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"include": {
|
||||
"type": "array",
|
||||
"description": "List of files, directories or globs that will be searched for benchmarks.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"exclude": {
|
||||
"type": "array",
|
||||
"description": "List of files, directories or globs that will not be searched for benchmarks.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -291,12 +291,6 @@ itest!(fmt_with_config {
|
|||
output: "fmt/fmt_with_config.out",
|
||||
});
|
||||
|
||||
itest!(fmt_with_deprecated_config {
|
||||
args:
|
||||
"fmt --config fmt/with_config/deno.deprecated.jsonc fmt/with_config/subdir",
|
||||
output: "fmt/fmt_with_deprecated_config.out",
|
||||
});
|
||||
|
||||
itest!(fmt_with_config_default {
|
||||
args: "fmt fmt/with_config/subdir",
|
||||
output: "fmt/fmt_with_config.out",
|
||||
|
|
|
@ -10269,9 +10269,7 @@ fn lsp_format_exclude_with_config() {
|
|||
"deno.fmt.jsonc",
|
||||
r#"{
|
||||
"fmt": {
|
||||
"files": {
|
||||
"exclude": ["ignored.ts"]
|
||||
},
|
||||
"exclude": ["ignored.ts"],
|
||||
"options": {
|
||||
"useTabs": true,
|
||||
"lineWidth": 40,
|
||||
|
@ -10322,9 +10320,7 @@ fn lsp_format_exclude_default_config() {
|
|||
"deno.fmt.jsonc",
|
||||
r#"{
|
||||
"fmt": {
|
||||
"files": {
|
||||
"exclude": ["ignored.ts"]
|
||||
},
|
||||
"exclude": ["ignored.ts"],
|
||||
"options": {
|
||||
"useTabs": true,
|
||||
"lineWidth": 40,
|
||||
|
@ -11707,9 +11703,7 @@ fn lsp_lint_exclude_with_config() {
|
|||
"deno.lint.jsonc",
|
||||
r#"{
|
||||
"lint": {
|
||||
"files": {
|
||||
"exclude": ["ignored.ts"]
|
||||
},
|
||||
"exclude": ["ignored.ts"],
|
||||
"rules": {
|
||||
"exclude": ["camelcase"],
|
||||
"include": ["ban-untagged-todo"],
|
||||
|
|
|
@ -124,12 +124,6 @@ itest!(test_with_config2 {
|
|||
output: "test/collect2.out",
|
||||
});
|
||||
|
||||
itest!(test_with_deprecated_config {
|
||||
args: "test --config test/collect/deno.deprecated.jsonc test/collect",
|
||||
exit_code: 0,
|
||||
output: "test/collect.deprecated.out",
|
||||
});
|
||||
|
||||
itest!(test_with_malformed_config {
|
||||
args: "test --config test/collect/deno.malformed.jsonc",
|
||||
exit_code: 1,
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
Warning: "options" configuration is deprecated. Please use "flat" options instead.
|
||||
Warning: "files" configuration is deprecated. Please use "include" and "exclude" instead.
|
||||
Checked 2 files
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"fmt": {
|
||||
"files": {
|
||||
"include": [
|
||||
"./subdir/"
|
||||
],
|
||||
"exclude": [
|
||||
"./subdir/b.ts"
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"useTabs": true,
|
||||
"lineWidth": 40,
|
||||
"indentWidth": 8,
|
||||
"singleQuote": true,
|
||||
"proseWrap": "always",
|
||||
"semiColons": false
|
||||
}
|
||||
}
|
||||
}
|
10
tests/testdata/test/collect.deprecated.out
vendored
10
tests/testdata/test/collect.deprecated.out
vendored
|
@ -1,10 +0,0 @@
|
|||
Warning: "files" configuration is deprecated. Please use "include" and "exclude" instead.
|
||||
Check [WILDCARD]/test/collect/include/2_test.ts
|
||||
Check [WILDCARD]/test/collect/include/test.ts
|
||||
Check [WILDCARD]/test/collect/test.ts
|
||||
running 0 tests from [WILDCARD]/test/collect/include/2_test.ts
|
||||
running 0 tests from [WILDCARD]/test/collect/include/test.ts
|
||||
running 0 tests from [WILDCARD]/test/collect/test.ts
|
||||
|
||||
ok | 0 passed | 0 failed ([WILDCARD])
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"test": {
|
||||
"files": {
|
||||
"exclude": ["./ignore"]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -203,7 +203,7 @@ async function ensureNoNewITests() {
|
|||
"coverage_tests.rs": 0,
|
||||
"eval_tests.rs": 0,
|
||||
"flags_tests.rs": 0,
|
||||
"fmt_tests.rs": 17,
|
||||
"fmt_tests.rs": 16,
|
||||
"info_tests.rs": 18,
|
||||
"init_tests.rs": 0,
|
||||
"inspector_tests.rs": 0,
|
||||
|
@ -223,7 +223,7 @@ async function ensureNoNewITests() {
|
|||
"run_tests.rs": 348,
|
||||
"shared_library_tests.rs": 0,
|
||||
"task_tests.rs": 30,
|
||||
"test_tests.rs": 75,
|
||||
"test_tests.rs": 74,
|
||||
"upgrade_tests.rs": 0,
|
||||
"vendor_tests.rs": 1,
|
||||
"watcher_tests.rs": 0,
|
||||
|
|
Loading…
Reference in a new issue