Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
9ed0f44 to
e5e927a
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c43ffa0b44
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Push release tags | ||
| run: git push origin --tags |
There was a problem hiding this comment.
Push the release commit, not only tags, in CI workflow
vp release --yes creates a local release commit before tagging (see run_release in manager.rs), but this scaffold only executes git push origin --tags. In a branch-based workflow that means version/changelog manifest updates never land on the branch, so the next run plans from stale package.json versions and can produce duplicate or regressive publish versions. Push HEAD (or the release branch) together with tags so branch state stays consistent with the published tags.
Useful? React with 👍 / 👎.
|
NOTE: I temporarily removed the Draft status to try triggering a review with Codex, but it is still a draft. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3c9209675
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let current_version = plan.current_version.to_string(); | ||
| let next_version = plan.next_version.to_string(); | ||
| let mut updated = replace_top_level_string_property( | ||
| &plan.manifest_contents, | ||
| "version", | ||
| ¤t_version, |
There was a problem hiding this comment.
Rewrite package version from manifest content, not computed tag version
When a package keeps "version": "0.0.0" and relies on git tags for the real current version, plan.current_version can be 1.x.y while the manifest still contains 0.0.0. This code uses plan.current_version as the expected old value for replace_top_level_string_property, so the rewrite fails with an "Expected 'version' to be ..." error before publish. That makes subsequent releases fail for the tag-sourced workflow the planner explicitly supports.
Useful? React with 👍 / 👎.
| ensure_first_publish_workflow_template( | ||
| &release.workspace_root_path, | ||
| release.package_manager.client, | ||
| &mut guidance, | ||
| )?; |
There was a problem hiding this comment.
Avoid creating workflow files during dry-run planning
This always calls ensure_first_publish_workflow_template during presentation, even for --dry-run. In a first-release dry-run with no existing publish workflow, it writes .github/workflows/publish.yml, which violates the dry-run contract and dirties the worktree; the same run can then skip native publish preflight because run_dry_run requires a clean tree. Gate this scaffolding behind non-dry-run (or an explicit opt-in) to keep dry-run side-effect free.
Useful? React with 👍 / 👎.
#1169
Note
These implementations are quite comprehensive and large in scope.
Feel free to treat them as reference implementations and narrow down the scope.
Summary
This PR introduces a new
vp releaseworkflow for monorepos and hardens it for real-world publishing.The goal is to make workspace releases understandable, reviewable, and safer by default:
--dry-runWhat Changed
vp releasecommand to version and publish workspace packages.--preidsuch asalpha,beta, andrc.--projects, while preserving user-specified order as a tie-breaker between independent packages.publish.ymltemplate scaffold for first release when no publish/release workflow exists.build,pack,prepack,prepublishOnly,prepare, andvitePlus.release.checkScripts.--otptreated as a legacy fallback.vite_sharedfor conventional commits, git helpers, versioning, and targetedpackage.jsonedits.Design Notes
--skip-publishand--no-git-tagis restricted to--dry-run.vp releasedoes not implicitly run build or custom pre-release scripts. Instead, it reports likely checks and asks for confirmation.workflow_dispatch, and branch/tag automation is left to repository-specific workflow policy.Usage
Scope
This PR is intentionally broad because it introduces the full release surface rather than a thin CLI shim.
It covers:
Follow-ups