From b701a3722149e37d3c4a61d61124a63374fcaf0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0?= Date: Wed, 4 Jun 2025 17:58:45 +0900 Subject: [PATCH 1/2] docs: correct environment api stabilization note in /docs/changes (#20153) --- changes/hotupdate-hook.md | 2 +- changes/per-environment-apis.md | 2 +- changes/this-environment-in-hooks.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/changes/hotupdate-hook.md b/changes/hotupdate-hook.md index ce3283f0..445709db 100644 --- a/changes/hotupdate-hook.md +++ b/changes/hotupdate-hook.md @@ -9,7 +9,7 @@ We're planning to deprecate the `handleHotUpdate` plugin hook in favor of [`hotU Affected scope: `Vite Plugin Authors` ::: warning Future Deprecation -`hotUpdate` was first introduced in `v6.0`. The deprecation of `handleHotUpdate` is planned for `v7.0`. We don't yet recommend moving away from `handleHotUpdate` yet. If you want to experiment and give us feedback, you can use the `future.removePluginHookHandleHotUpdate` to `"warn"` in your vite config. +`hotUpdate` was first introduced in `v6.0`. The deprecation of `handleHotUpdate` is planned for a future major. We don't yet recommend moving away from `handleHotUpdate` yet. If you want to experiment and give us feedback, you can use the `future.removePluginHookHandleHotUpdate` to `"warn"` in your vite config. ::: ## Motivation diff --git a/changes/per-environment-apis.md b/changes/per-environment-apis.md index d44da296..2db269e2 100644 --- a/changes/per-environment-apis.md +++ b/changes/per-environment-apis.md @@ -9,7 +9,7 @@ Multiple APIs from `ViteDevServer` related to module graph and modules transform Affect scope: `Vite Plugin Authors` ::: warning Future Deprecation -The `Environment` instance was first introduced at `v6.0`. The deprecation of `server.moduleGraph` and other methods that are now in environments is planned for `v7.0`. We don't recommend moving away from server methods yet. To identify your usage, set these in your vite config. +The `Environment` instance was first introduced at `v6.0`. The deprecation of `server.moduleGraph` and other methods that are now in environments is planned for a future major. We don't recommend moving away from server methods yet. To identify your usage, set these in your vite config. ```ts future: { diff --git a/changes/this-environment-in-hooks.md b/changes/this-environment-in-hooks.md index d1e61aea..8df7d60d 100644 --- a/changes/this-environment-in-hooks.md +++ b/changes/this-environment-in-hooks.md @@ -9,7 +9,7 @@ Before Vite 6, only two environments were available: `client` and `ssr`. A singl Affect scope: `Vite Plugin Authors` ::: warning Future Deprecation -`this.environment` was introduced in `v6.0`. The deprecation of `options.ssr` is planned for `v7.0`. At that point we'll start recommending migrating your plugins to use the new API. To identify your usage, set `future.removePluginHookSsrArgument` to `"warn"` in your vite config. +`this.environment` was introduced in `v6.0`. The deprecation of `options.ssr` is planned for a future major. At that point we'll start recommending migrating your plugins to use the new API. To identify your usage, set `future.removePluginHookSsrArgument` to `"warn"` in your vite config. ::: ## Motivation From ac5df76f29dad91d3644bd1d66b9049bf1764ddc Mon Sep 17 00:00:00 2001 From: thinkasany <480968828@qq.com> Date: Thu, 5 Jun 2025 09:47:45 +0800 Subject: [PATCH 2/2] fix: resolved conflict --- changes/hotupdate-hook.md | 7 +------ changes/per-environment-apis.md | 7 +------ changes/this-environment-in-hooks.md | 7 +------ 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/changes/hotupdate-hook.md b/changes/hotupdate-hook.md index 2f96da4e..509bc435 100644 --- a/changes/hotupdate-hook.md +++ b/changes/hotupdate-hook.md @@ -8,13 +8,8 @@ 影响范围:`Vite 插件作者` -<<<<<<< HEAD ::: warning 即将废弃 -`hotUpdate` 钩子最初在 `v6.0` 版本中引入。我们计划在 `v7.0` 版本中废弃 `handleHotUpdate` 钩子。我们目前还不建议你停止使用 `handleHotUpdate`。如果你想尝试并向我们提供反馈,你可以在你的 vite 配置文件中将 `future.removePluginHookHandleHotUpdate` 设置为 `"warn"`。 -======= -::: warning Future Deprecation -`hotUpdate` was first introduced in `v6.0`. The deprecation of `handleHotUpdate` is planned for a future major. We don't yet recommend moving away from `handleHotUpdate` yet. If you want to experiment and give us feedback, you can use the `future.removePluginHookHandleHotUpdate` to `"warn"` in your vite config. ->>>>>>> b701a3722149e37d3c4a61d61124a63374fcaf0a +`hotUpdate` 钩子最初在 `v6.0` 版本中引入。我们计划在未来的 major 版本中废弃 `handleHotUpdate` 钩子。我们目前还不建议你停止使用 `handleHotUpdate`。如果你想尝试并向我们提供反馈,你可以在你的 vite 配置文件中将 `future.removePluginHookHandleHotUpdate` 设置为 `"warn"`。 ::: ## 动机 {#motivation} diff --git a/changes/per-environment-apis.md b/changes/per-environment-apis.md index 82a0c661..ca33316a 100644 --- a/changes/per-environment-apis.md +++ b/changes/per-environment-apis.md @@ -8,13 +8,8 @@ 影响范围:`Vite 插件作者` -<<<<<<< HEAD ::: warning 即将废弃 -`环境`实例首次在 `v6.0` 中引入。计划在 `v7.0` 中废弃现在的 `server.moduleGraph` 和其他方法。我们不建议你现在就放弃 server 方法。要识别你的使用情况,请在你的 vite 配置中设置以下。 -======= -::: warning Future Deprecation -The `Environment` instance was first introduced at `v6.0`. The deprecation of `server.moduleGraph` and other methods that are now in environments is planned for a future major. We don't recommend moving away from server methods yet. To identify your usage, set these in your vite config. ->>>>>>> b701a3722149e37d3c4a61d61124a63374fcaf0a +`环境`实例首次在 `v6.0` 中引入。计划在未来的 major 版本中废弃现在的 `server.moduleGraph` 和其他方法。我们不建议你现在就放弃 server 方法。要识别你的使用情况,请在你的 vite 配置中设置以下。 ```ts future: { diff --git a/changes/this-environment-in-hooks.md b/changes/this-environment-in-hooks.md index a0ed6fab..efcdba83 100644 --- a/changes/this-environment-in-hooks.md +++ b/changes/this-environment-in-hooks.md @@ -8,13 +8,8 @@ 影响范围:`Vite 插件作者` -<<<<<<< HEAD ::: warning 即将废弃 -`this.environment` 最初在 `v6.0` 版本中被引入。我们计划在 `v7.0` 版本中废弃 `options.ssr`。到那时,我们会开始建议你将你的插件迁移到新的 API。如果想识别你的使用情况,可以在你的 vite 配置文件中将 `future.removePluginHookSsrArgument` 设置为 `"warn"`。 -======= -::: warning Future Deprecation -`this.environment` was introduced in `v6.0`. The deprecation of `options.ssr` is planned for a future major. At that point we'll start recommending migrating your plugins to use the new API. To identify your usage, set `future.removePluginHookSsrArgument` to `"warn"` in your vite config. ->>>>>>> b701a3722149e37d3c4a61d61124a63374fcaf0a +`this.environment` 最初在 `v6.0` 版本中被引入。我们计划在未来的 major 版本中废弃 `options.ssr`。到那时,我们会开始建议你将你的插件迁移到新的 API。如果想识别你的使用情况,可以在你的 vite 配置文件中将 `future.removePluginHookSsrArgument` 设置为 `"warn"`。 ::: ## 动机 {#motivation}