From 531a2f97d16150670edb5b3db06dd840d13f052a Mon Sep 17 00:00:00 2001 From: NoiseFan Date: Wed, 17 Dec 2025 11:13:04 +0800 Subject: [PATCH] Revert "chroe: update netlify node version (#878)" This reverts commit 1287b5bdac29cd9775e654e641b22071fd629342. --- api/expect-typeof.md | 20 -------------------- config/experimental.md | 12 ------------ config/onstacktrace.md | 2 +- guide/open-telemetry.md | 6 ++---- guide/ui.md | 4 ---- netlify.toml | 2 +- 6 files changed, 4 insertions(+), 42 deletions(-) diff --git a/api/expect-typeof.md b/api/expect-typeof.md index 7e5b85f1..5c0ddb93 100644 --- a/api/expect-typeof.md +++ b/api/expect-typeof.md @@ -552,23 +552,3 @@ expectTypeOf(obj).toHaveProperty('a').toBeNumber() expectTypeOf(obj).toHaveProperty('b').toBeString() expectTypeOf(obj).toHaveProperty('a').not.toBeString() ``` - -## branded - -- **Type:** `ExpectTypeOf` - -You can use `.branded` to allow type assertions to succeed for types that are semantically equivalent but differ in representation. - -```ts -import { expectTypeOf } from 'vitest' - -// Without .branded, this fails even though the types are effectively the same -expectTypeOf<{ a: { b: 1 } & { c: 1 } }>().toEqualTypeOf<{ a: { b: 1; c: 1 } }>() - -// With .branded, the assertion succeeds -expectTypeOf<{ a: { b: 1 } & { c: 1 } }>().branded.toEqualTypeOf<{ a: { b: 1; c: 1 } }>() -``` - -::: warning -This helper comes at a performance cost and can cause the TypeScript compiler to 'give up' if used with excessively deep types. Use it sparingly and only when necessary. -::: diff --git a/config/experimental.md b/config/experimental.md index 32b17c21..984763a8 100644 --- a/config/experimental.md +++ b/config/experimental.md @@ -7,10 +7,6 @@ outline: deep ## experimental.fsModuleCache 4.0.11 {#experimental-fsmodulecache} -::: tip 功能反馈 -请将关于此功能反馈提交至 [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions/9221)。 -::: - - **Type:** `boolean` - **Default:** `false` @@ -107,10 +103,6 @@ At the moment, Vitest ignores the [test.cache.dir](/config/cache) or [cacheDir]( ## experimental.openTelemetry 4.0.11 {#experimental-opentelemetry} -::: tip 功能反馈 -请将关于此功能反馈提交至 [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions/9222)。 -::: - - **Type:** ```ts @@ -176,10 +168,6 @@ It's important that Node can process `sdkPath` content because it is not transfo ## experimental.printImportBreakdown 4.0.15 {#experimental-printimportbreakdown} -::: tip 功能反馈 -请将关于此功能反馈提交至 [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions/9224)。 -::: - - **Type:** `boolean` - **Default:** `false` diff --git a/config/onstacktrace.md b/config/onstacktrace.md index 3c970589..920284a0 100644 --- a/config/onstacktrace.md +++ b/config/onstacktrace.md @@ -7,7 +7,7 @@ outline: deep - **Type**: `(error: Error, frame: ParsedStack) => boolean | void` -Apply a filtering function to each frame of each stack trace when handling errors. This does not apply to stack traces printed by [`printConsoleTrace`](/config/printconsoletrace#printconsoletrace). The first argument, `error`, is a `TestError`. +Apply a filtering function to each frame of each stack trace when handling errors. This does not apply to stack traces printed by [`printConsoleTrace`](#printConsoleTrace). The first argument, `error`, is a `TestError`. Can be useful for filtering out stack trace frames from third-party libraries. diff --git a/guide/open-telemetry.md b/guide/open-telemetry.md index 64ee85f1..46397042 100644 --- a/guide/open-telemetry.md +++ b/guide/open-telemetry.md @@ -1,11 +1,9 @@ # Open Telemetry Support {#open-telemetry-support} -::: tip 功能反馈 -请将关于此功能反馈提交至 [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions/9222)。 -::: +::: tip Example Project -::: tip 示例项目 [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/opentelemetry) + ::: [OpenTelemetry](https://opentelemetry.io/) traces can be a useful tool to debug the performance and behavior of your application inside tests. diff --git a/guide/ui.md b/guide/ui.md index 0df9ad75..a597e790 100644 --- a/guide/ui.md +++ b/guide/ui.md @@ -129,10 +129,6 @@ npx vite preview --outDir ./html ### 导入耗时分析 {#import-breakdown} -::: tip 功能反馈 -请将关于此功能反馈提交至 [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions/9224)。 -::: - 模块图选项卡还会提供导入耗时分析功能,默认显示加载时间最长的10个模块(点击"显示更多"可追加10个),按总耗时排序。 Import breakdown with a list of top 10 modules that take the longest time to load diff --git a/netlify.toml b/netlify.toml index 014a9e7b..301583b9 100644 --- a/netlify.toml +++ b/netlify.toml @@ -3,7 +3,7 @@ publish = ".vitepress/dist" command = "npx pnpm i --ignore-scripts && pnpm run build" [build.environment] -NODE_VERSION = "24" +NODE_VERSION = "20" [[redirects]] from = "https://cn-vitest.netlify.app/*"