diff --git a/.claude/skills/release-manager/SKILL.md b/.claude/skills/release-manager/SKILL.md index b24124326d..8316255027 100644 --- a/.claude/skills/release-manager/SKILL.md +++ b/.claude/skills/release-manager/SKILL.md @@ -390,7 +390,7 @@ Auto-merge being enabled is not a completed merge. Confirm `mergedAt` and the me -q '.[] | "\(.environment.name) can_approve=\(.current_user_can_approve) reviewers=\([.reviewers[]?.reviewer.login] | join(","))"' ``` -4. `Release`: publishes the NAPI bindings (`@voidzero-dev/vite-plus-`) and standalone CLI packages (`@voidzero-dev/vite-plus-cli-`, via `packages/cli/publish-native-addons.ts`), then `@voidzero-dev/vite-plus-core` and `vite-plus` to npm (`--tag latest`). Each dependency tier waits for npm propagation before publication advances. It then creates the `vX.Y.Z` GitHub release (draft, with installer/binary assets, then undrafted). The generated body has only Published Packages and Installation sections. +4. `Release`: publishes the NAPI bindings (`@voidzero-dev/vite-plus-`) and standalone CLI packages (`@voidzero-dev/vite-plus-cli-`, via `packages/cli/publish-native-addons.ts`), then `@voidzero-dev/vite-plus-core`, `vite-plus`, and `create-vite-plus` to npm (`--tag latest`). Each dependency tier waits for npm propagation before publication advances. It then creates the `vX.Y.Z` GitHub release (draft, with installer/binary assets, then undrafted). The generated body has only Published Packages and Installation sections. 5. `publish-docker`: multi-arch toolchain image to `ghcr.io/voidzero-dev/vite-plus`, after npm publish (the image installs vp from npm). 6. `deploy-docs`: deploys the production docs after a stable release is published. It is skipped for prereleases. When a prerelease is published to `latest` and its notes or CLI messages link to docs that production does not serve yet, ask the release manager whether to run `gh workflow run deploy-docs.yml --ref ` once the `Release` job is publishing. Use the `vX.Y.Z` tag, or `main` while it still points at the release commit, and confirm the run's head SHA. The `vp` version that builds the docs does not need to match the release: the site and its install scripts come from the checked-out commit. The job authenticates with the `VOID_TOKEN` repository secret. When that token has expired, the job fails with `` `VOID_TOKEN` is invalid or expired `` and `discord-notify` is skipped. Ask someone with access to rotate the secret, then run `gh run rerun --failed` to rerun the docs deployment and the Discord notification. 7. `discord-notify`: announces to Discord after Docker publishing and docs deployment succeed (docs are skipped for prereleases). @@ -446,6 +446,7 @@ The full package document can update before npm's separately cached installation ```bash npm view vite-plus version # X.Y.Z npm view @voidzero-dev/vite-plus-core version # X.Y.Z + npm view create-vite-plus version # X.Y.Z npm view @voidzero-dev/vite-plus-cli-darwin-arm64 version # X.Y.Z, spot-check a native platform package npm view vite-plus dist-tags.latest # X.Y.Z docker run --rm ghcr.io/voidzero-dev/vite-plus:X.Y.Z vp --version diff --git a/.github/workflows/prepare_release.yml b/.github/workflows/prepare_release.yml index 967d7aaca6..7d1a414f78 100644 --- a/.github/workflows/prepare_release.yml +++ b/.github/workflows/prepare_release.yml @@ -55,6 +55,7 @@ jobs: update_json packages/cli/package.json update_json packages/core/package.json update_json packages/prompts/package.json + update_json packages/create-vite-plus/package.json update_toml packages/cli/binding/Cargo.toml update_toml crates/vp_global_cli/Cargo.toml diff --git a/.github/workflows/publish-preview.yml b/.github/workflows/publish-preview.yml index 265d50ac72..6ef043c78d 100644 --- a/.github/workflows/publish-preview.yml +++ b/.github/workflows/publish-preview.yml @@ -200,6 +200,10 @@ jobs: packages/cli packages/core packages/prompts + packages/create-vite-plus + # Must match the upload step in publish-preview-register.yml, which + # validates the same batch from main. + workspace-packages: vite-plus,create-vite-plus,@voidzero-dev/vite-plus-* - name: Upload packed packages uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f31fab03a9..58cb332724 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -205,6 +205,15 @@ jobs: "vite-plus@${VERSION}" "@voidzero-dev/vite-plus-prompts@${VERSION}" + # create-vite-plus pins vite-plus via workspace:* (rewritten to this exact + # version), so it publishes only after vite-plus is installable. + - name: Publish create-vite-plus + run: >- + node ./.github/scripts/publish-npm-package.ts + "create-vite-plus@${VERSION}" + -- + pnpm publish --filter=./packages/create-vite-plus --tag latest --access public --no-git-checks + - name: Create release body env: REPOSITORY: ${{ github.repository }} @@ -219,6 +228,7 @@ jobs: - \`@voidzero-dev/vite-plus-core@${VERSION}\` - \`vite-plus@${VERSION}\` + - \`create-vite-plus@${VERSION}\` ### Installation @@ -375,6 +385,7 @@ jobs: **Published Packages:** • @voidzero-dev/vite-plus-core@${{ env.VERSION }} • vite-plus@${{ env.VERSION }} + • create-vite-plus@${{ env.VERSION }} **Docker (GHCR):** • `docker pull ${{ env.IMAGE }}:${{ env.VERSION }}` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_next_command_application/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_next_command_application/snapshots.toml index 27c73be16d..4581abc19a 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_next_command_application/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_next_command_application/snapshots.toml @@ -5,6 +5,15 @@ steps = [ { argv = ["vp", "create", "vite:application", "--no-interactive"], comment = "verify next command suggests vp run", continue-on-failure = true }, ] +[[case]] +name = "create_next_command_application_from_package_manager" +vp = "local" +comment = "`npm create vite-plus` stamps npm's user agent: create with npm and run vp through it, since the global CLI may be missing." +env = { npm_config_user_agent = "npm/11.0.0 node/v24.0.0 linux x64 workspaces/false" } +steps = [ + { argv = ["vp", "create", "vite:application", "--no-interactive"], comment = "verify npm is selected and the next command uses npx", continue-on-failure = true }, +] + [[case]] name = "create_git_command_application" vp = "global" diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_next_command_application/snapshots/create_next_command_application_from_package_manager.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_next_command_application/snapshots/create_next_command_application_from_package_manager.md new file mode 100644 index 0000000000..3bc1f29655 --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_next_command_application/snapshots/create_next_command_application_from_package_manager.md @@ -0,0 +1,14 @@ +# create_next_command_application_from_package_manager + +`npm create vite-plus` stamps npm's user agent: create with npm and run vp through it, since the global CLI may be missing. + +## `vp create vite:application --no-interactive` + +verify npm is selected and the next command uses npx + +``` +● Using default package name: vite-plus-application +◇ Scaffolded vite-plus-application with Vite application +• Node npm +→ Next: cd vite-plus-application && npx vp run +``` diff --git a/docs/guide/create.md b/docs/guide/create.md index 202294c691..cf0f7499e4 100644 --- a/docs/guide/create.md +++ b/docs/guide/create.md @@ -20,6 +20,40 @@ vp create