Agent Skillsvoidzero-dev/vite-plus › test-pkg-pr-new-migrate

test-pkg-pr-new-migrate

GitHub

验证 vite-plus 预览版构建。通过 registry bridge 安装全局 CLI,在指定本地项目中运行 vp migrate,确保依赖正确解析到特定 commit 版本,并检查迁移结果与版本一致性。

.claude/skills/test-pkg-pr-new-migrate/SKILL.md voidzero-dev/vite-plus

Trigger Scenarios

需要验证 pkg-pr-new 或预览构建的 e2e 测试 要求使用真实项目测试 vite-plus 预览版 用户提及 verify/e2e-test preview build

Install

npx skills add voidzero-dev/vite-plus --skill test-pkg-pr-new-migrate -g -y
More Options

Non-standard path

npx skills add https://github.com/voidzero-dev/vite-plus/tree/main/.claude/skills/test-pkg-pr-new-migrate -g -y

Use without installing

npx skills use voidzero-dev/vite-plus@test-pkg-pr-new-migrate

指定 Agent (Claude Code)

npx skills add voidzero-dev/vite-plus --skill test-pkg-pr-new-migrate -a claude-code -g -y

安装 repo 全部 skill

npx skills add voidzero-dev/vite-plus --all -g -y

预览 repo 内 skill

npx skills add voidzero-dev/vite-plus --list

SKILL.md

Frontmatter
{
    "name": "test-pkg-pr-new-migrate",
    "description": "Verify a preview (registry bridge) build of vite-plus against a real project before release — run `vp migrate` from the preview commit against a local project, deps resolved through the registry bridge. Use when asked to verify\/e2e-test a preview or pkg-pr-new build against a project, \"test PR",
    "allowed-tools": "Bash, Read"
}

Verify a preview build against one project

Installs an isolated global vp built from a registry bridge commit build and runs vp migrate on a specified local project. The global CLI and the migrated project both pin vite-plus/vite to the clearly-defined 0.0.0-commit.<sha> build. vp migrate itself writes the bridge registry into the project's .npmrc (or .yarnrc.yml for Yarn Berry) so the deps resolve, during this run and in the project's own CI; this script only force-stages that file past .gitignore.

Required inputs: a <PR-or-SHA> (the build to verify) and a <project-path>. If either is missing from the request, ask the user for it — never guess the PR/SHA, as the build under test is the user's choice.

.github/scripts/test-pkg-pr-new-migrate.sh <PR-or-SHA> <project-path> [migrate-options...]
# e.g.
.github/scripts/test-pkg-pr-new-migrate.sh 1891 /path/to/npmx.dev --no-interactive
  • First arg is a PR number or commit SHA; the script resolves the immutable commit via the bridge x-commit-key header and verifies the bridge serves it (the preview publish workflow, triggered by the preview-build label, registers each commit).
  • Never touches ~/.vite-plus; clears only the workspace ROOT lockfile + node_modules before migrating; refuses a dirty worktree unless ALLOW_DIRTY=1; prints the project's git status/diff at the end — inspect that to confirm the migration result.

The build under test must include the "migrate writes the bridge registry" feature (this session's work / current branch head onward). The harness no longer writes the registry itself — it relies on vp migrate doing it. Testing an older build with this harness would leave the project with no bridge registry, so its deps resolve from npmjs (ERR_PNPM_NO_MATCHING_VERSION on the 0.0.0-commit.<sha> version). Always verify a fresh build of the branch, not a stale published commit.

The script prints the resolved versions at the end, querying one package at a time (npm/yarn/bun why only accept a single package; -r is pnpm-only). Each must resolve to exactly ONE version: vite-plus and vite at the expected 0.0.0-commit.<sha> (vite via the @voidzero-dev/vite-plus-core alias), vitest at the bundled upstream version. Multiple versions, or a stale/wrong version, means the migration or install is broken. To re-check by hand:

cd <project-path>
# pnpm: one call, recursive across workspaces
vp why -r vite-plus vite vitest
# npm / yarn / bun: one package per call, no -r
vp why vite-plus && vp why vite && vp why vitest

Version History

  • a24eede Current 2026-07-24 11:29

Same Skill Collection

.claude/skills/add-ecosystem-ci/SKILL.md
.claude/skills/bump-vite-task/SKILL.md
.claude/skills/release-manager/SKILL.md
.claude/skills/spawn-process/SKILL.md
.claude/skills/sync-tsdown-cli/SKILL.md
.claude/skills/verify-interactive-cli/SKILL.md

Metadata

Files
0
Version
40a6273
Hash
dbd71f23
Indexed
2026-07-24 11:29

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-07 23:14
浙ICP备14020137号-1 $Carte des visiteurs$