From a7e5d7711570f072b73f151a1a753b14ffdd9e6a Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Sun, 29 Sep 2024 14:02:52 +0900 Subject: [PATCH 1/2] docs: deprecate `benchmark.outputFile` option --- docs/config/index.md | 9 --------- packages/vitest/src/node/types/benchmark.ts | 3 +-- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/docs/config/index.md b/docs/config/index.md index fa2d2b3d2fc0..8708ea3b4457 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -303,15 +303,6 @@ When defined, Vitest will run all matched files with `import.meta.vitest` inside Custom reporter for output. Can contain one or more built-in report names, reporter instances, and/or paths to custom reporters. -#### benchmark.outputFile - -- **Type:** `string | Record` - -Write benchmark results to a file when the `--reporter=json` option is also specified. -By providing an object instead of a string you can define individual outputs when using multiple reporters. - -To provide object via CLI command, use the following syntax: `--outputFile.json=./path --outputFile.junit=./other-path`. - #### benchmark.outputJson {#benchmark-outputJson} - **Type:** `string | undefined` diff --git a/packages/vitest/src/node/types/benchmark.ts b/packages/vitest/src/node/types/benchmark.ts index 46796b8f4657..8d88ca2cca32 100644 --- a/packages/vitest/src/node/types/benchmark.ts +++ b/packages/vitest/src/node/types/benchmark.ts @@ -33,8 +33,7 @@ export interface BenchmarkUserOptions { reporters?: Arrayable /** - * Write test results to a file when the `--reporter=json` option is also specified. - * Also definable individually per reporter by using an object instead. + * @deprecated Use `benchmark.outputJson` instead */ outputFile?: | string From ba6e05c5b02d9e7c820b7d6054f795a866287dff Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Sun, 29 Sep 2024 14:10:53 +0900 Subject: [PATCH 2/2] docs: tweak --- docs/config/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/config/index.md b/docs/config/index.md index 8708ea3b4457..8a62a620bdd2 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -303,6 +303,10 @@ When defined, Vitest will run all matched files with `import.meta.vitest` inside Custom reporter for output. Can contain one or more built-in report names, reporter instances, and/or paths to custom reporters. +#### benchmark.outputFile + +Deprecated in favor of `benchmark.outputJson`. + #### benchmark.outputJson {#benchmark-outputJson} - **Type:** `string | undefined`