From 1e0ac609b57b9efdafd54de4cb56f98c507c032f Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 9 Sep 2024 12:33:09 -0400 Subject: 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 --- tests/integration/fmt_tests.rs | 6 ------ tests/integration/lsp_tests.rs | 12 +++--------- tests/integration/test_tests.rs | 6 ------ tests/testdata/fmt/fmt_with_deprecated_config.out | 3 --- tests/testdata/fmt/with_config/deno.deprecated.jsonc | 20 -------------------- tests/testdata/test/collect.deprecated.out | 10 ---------- tests/testdata/test/collect/deno.deprecated.jsonc | 7 ------- 7 files changed, 3 insertions(+), 61 deletions(-) delete mode 100644 tests/testdata/fmt/fmt_with_deprecated_config.out delete mode 100644 tests/testdata/fmt/with_config/deno.deprecated.jsonc delete mode 100644 tests/testdata/test/collect.deprecated.out delete mode 100644 tests/testdata/test/collect/deno.deprecated.jsonc (limited to 'tests') diff --git a/tests/integration/fmt_tests.rs b/tests/integration/fmt_tests.rs index c2d38f0d8..b890b3b72 100644 --- a/tests/integration/fmt_tests.rs +++ b/tests/integration/fmt_tests.rs @@ -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", diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs index 78e526085..981dcc01d 100644 --- a/tests/integration/lsp_tests.rs +++ b/tests/integration/lsp_tests.rs @@ -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"], diff --git a/tests/integration/test_tests.rs b/tests/integration/test_tests.rs index d3c9f0009..f6c48654d 100644 --- a/tests/integration/test_tests.rs +++ b/tests/integration/test_tests.rs @@ -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, diff --git a/tests/testdata/fmt/fmt_with_deprecated_config.out b/tests/testdata/fmt/fmt_with_deprecated_config.out deleted file mode 100644 index 793fac1bc..000000000 --- a/tests/testdata/fmt/fmt_with_deprecated_config.out +++ /dev/null @@ -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 diff --git a/tests/testdata/fmt/with_config/deno.deprecated.jsonc b/tests/testdata/fmt/with_config/deno.deprecated.jsonc deleted file mode 100644 index e053233fd..000000000 --- a/tests/testdata/fmt/with_config/deno.deprecated.jsonc +++ /dev/null @@ -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 - } - } -} diff --git a/tests/testdata/test/collect.deprecated.out b/tests/testdata/test/collect.deprecated.out deleted file mode 100644 index 7db2f276c..000000000 --- a/tests/testdata/test/collect.deprecated.out +++ /dev/null @@ -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]) - diff --git a/tests/testdata/test/collect/deno.deprecated.jsonc b/tests/testdata/test/collect/deno.deprecated.jsonc deleted file mode 100644 index b8acda27d..000000000 --- a/tests/testdata/test/collect/deno.deprecated.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "test": { - "files": { - "exclude": ["./ignore"] - } - } -} -- cgit v1.2.3