vite-plus
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVite+
Vite+
Move the repository toward one coherent Vite+ toolchain without replacing
product, release, or runtime behavior Vite+ does not own.
将仓库迁移至统一的Vite+工具链,无需替换Vite+不负责的产品、发布或运行时行为。
Establish Live Authority
确立实时权威
Vite+ is pre-1.0 and changes quickly. Before editing:
- Install the repository's locked dependencies.
- Record and, when available,
pnpm exec vp --version.pnpm exec vp toolchain --json - Read the relevant packaged documentation under
and any shipped
node_modules/vite-plus/docs/.AGENTS.md - When changing the pinned release, read the intervening upstream release notes and run that exact target's migrator.
The installed CLI and packaged docs override memorized command, config, action,
hook, and dependency shapes. Carry a workaround only when it reproduces on the
installed version and has a named removal condition.
Vite+目前处于1.0版本前的快速迭代阶段。编辑前请执行以下步骤:
- 安装仓库锁定版本的依赖。
- 记录的输出,若可用同时记录
pnpm exec vp --version的输出。pnpm exec vp toolchain --json - 阅读下的相关打包文档及随附的
node_modules/vite-plus/docs/。AGENTS.md - 变更固定版本时,阅读上游中间版本的发布说明,并运行目标版本的迁移工具。
已安装的CLI及打包文档优先级高于记忆中的命令、配置、操作、钩子及依赖形态。仅当问题在已安装版本上可复现且有明确移除条件时,才采用临时解决方案。
Target Contract
目标约定
- The repository owns Vite+ and package-manager versions; no global is required.
vp - Interactive commands use the repository-local CLI. Package scripts and CI
may use bare when their environment provides it.
vp - owns Vite+, test, lint, format, pack, staged, and task config supported by the selected release. Remove parallel configs only after migration proves their settings were preserved.
vite.config.ts - Tests use the public Vite+ test imports exposed by the installed release.
- CI uses the official setup surface when it fits and reads repo-owned runtime and tool versions instead of copying literals.
- Existing release, deploy, SDK generation, native packaging, and consumer checks remain when Vite+ does not replace them.
- Contributor and agent guidance changes with the commands it documents.
- 仓库管理Vite+及包管理器版本;无需全局安装。
vp - 交互式命令使用仓库本地CLI。包脚本与CI流程可在环境支持时直接使用。
vp - 管理所选版本支持的Vite+、测试、 lint、格式化、打包、暂存及任务配置。仅在迁移验证设置已保留后,才可移除并行配置。
vite.config.ts - 测试使用已安装版本暴露的公开Vite+测试导入。
- CI流程在适用时使用官方配置界面,并读取仓库自有运行时及工具版本,而非复制字面量。
- 现有发布、部署、SDK生成、原生打包及消费者检查流程在Vite+未替代时保持不变。
- 贡献者与Agent指引随其文档的命令同步更新。
Workflow
工作流程
- Audit manifests, lockfiles, runtime/package-manager owners, workspace shape, scripts, configs, tests, hooks, CI, packaging, and release/deploy paths.
- Read bootstrap for creation, first migration, or target-version upgrades.
- Read exactly one shape reference: packages for a standalone package or monorepos for a workspace.
- Run the selected release's migrator before hand-editing generated config. Reconcile its result with repository-specific boundaries.
- Read commands before changing invocation or task wiring, testing when tests change, and hooks only when hook policy changes.
- Read CI before workflow edits. Keep secret-bearing release and deploy jobs fresh and cache-isolated.
- Load known issues only after unexpected behavior reproduces or during an affected upgrade.
- For new config, task-graph, packaging, or CI code, open the closest maintained example after selecting the repository shape. Adapt it to the installed Vite+ release; do not copy its pins.
- 审核清单、锁定文件、运行时/包管理器所有者、工作区结构、脚本、配置、测试、钩子、CI、打包及发布/部署路径。
- 阅读bootstrap以了解创建、首次迁移或目标版本升级的方法。
- 阅读对应形态的参考文档:独立包请查看packages,工作区请查看monorepos。
- 在手动编辑生成的配置前,运行所选版本的迁移工具。将结果与仓库特定边界进行协调。
- 修改调用或任务连接前阅读commands,测试变更时阅读testing,仅在钩子策略变更时阅读hooks。
- 编辑工作流前阅读CI。包含敏感信息的发布与部署任务需保持更新并隔离缓存。
- 仅在意外行为可复现或受影响版本升级时,查看known issues。
- 编写新的配置、任务图、打包或CI代码时,在确定仓库形态后打开最近的maintained example。根据已安装的Vite+版本进行适配,请勿复制其固定版本。
Version Ownership
版本所有权
Preserve one checked-in owner for each layer:
| Layer | Owner |
|---|---|
| runtime | existing version file, tool manager, or manifest declaration |
| package manager | |
| Vite+ | dependency, catalog, or lockfile selected by migration |
| bundled Vite/Vitest/Oxc | migrator-managed alias or override verified through the installed toolchain |
| Actions | immutable action pin plus repository update policy |
Do not duplicate project versions in workflows when an action can read the
existing owner. Do not hand-maintain a static bundled-version table.
为每个层级保留一个已提交的所有者:
| 层级 | 所有者 |
|---|---|
| 运行时 | 现有版本文件、工具管理器或清单声明 |
| 包管理器 | |
| Vite+ | 迁移选择的依赖、目录或锁定文件 |
| 捆绑的Vite/Vitest/Oxc | 迁移工具管理的别名或通过已安装工具链验证的覆盖配置 |
| Actions | 不可变的Action固定版本加仓库更新策略 |
当Action可读取现有所有者时,请勿在工作流中重复项目版本。请勿手动维护静态捆绑版本表。
Verification
验证
Use the installed release's documented equivalents of:
- frozen dependency install after the lockfile is final
- combined format, lint, and type checks
- test and configured coverage paths
- build or pack plus downstream consumer proof
- preview, browser, staged, hook, or workspace-task checks only when changed
Inspect manifests, consolidated config, and lockfile importers after migration.
Report retained legacy wiring with the reproduced incompatibility and removal
condition. Do not call a migration complete from generated files alone.
使用已安装版本文档中对应的验证步骤:
- 锁定文件最终确定后执行冻结依赖安装
- 组合格式化、lint及类型检查
- 测试及配置的覆盖率路径
- 构建或打包加下游消费者验证
- 仅在变更时执行预览、浏览器、暂存、钩子或工作区任务检查
迁移后检查清单、整合配置及锁定文件导入项。记录保留的遗留连接,并附上可复现的不兼容问题及移除条件。仅根据生成文件不能判定迁移完成。