Conversation
✅ Deploy Preview for viteplus-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| pnpm dlx pkg-pr-new publish --compact --pnpm \ | ||
| './packages/cli/npm/*' \ | ||
| './packages/cli/cli-npm/*' \ | ||
| './packages/cli' \ | ||
| './packages/core' \ | ||
| './packages/test' |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d109e3287
ℹ️ 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".
| if (existsSync(rustCliArtifactsDir)) { | ||
| for (const dir of await readdir(rustCliArtifactsDir)) { |
There was a problem hiding this comment.
Validate Rust CLI artifacts before continuing publish
This new existsSync(rustCliArtifactsDir) guard makes artifact import optional, and the script later only warns/continues when binaries are missing, so a release can now succeed while publishing none of the @voidzero-dev/vite-plus-cli-* packages if artifact download fails or is empty. The previous release.yml logic explicitly failed when no vp* binaries were found; that safety check was effectively removed by moving this logic here without a hard failure path.
Useful? React with 👍 / 👎.
| if (mode !== 'npm' && mode !== 'pkg-pr-new') { | ||
| console.error(`Usage: publish-native-addons.ts --mode <npm|pkg-pr-new>`); | ||
| process.exit(1); | ||
| } |
There was a problem hiding this comment.
Keep publish-native usable without mandatory mode flag
This change makes --mode required and exits otherwise, but packages/cli/package.json still defines "publish-native": "node ./publish-native-addons.ts" with no arguments. As a result, the existing script command now fails immediately with the usage error, which breaks manual or automation paths that relied on the preexisting invocation.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3820a1c69f
ℹ️ 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".
| if: >- | ||
| github.repository == 'voidzero-dev/vite-plus' && | ||
| (github.event_name == 'workflow_dispatch' || | ||
| (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'pkg.pr.new'))) |
There was a problem hiding this comment.
Gate labeled trigger to the pkg.pr.new label
In .github/workflows/publish-to-pkg.pr.new.yml, the workflow listens to pull_request types: [labeled] but the job condition checks contains(github.event.pull_request.labels.*.name, 'pkg.pr.new'); this becomes true for any later label event once pkg.pr.new is already present, so adding unrelated labels will re-run the full build/publish flow and create duplicate preview publishes/comments. Restrict the pull-request branch of this condition to the actual event label (for example github.event.label.name == 'pkg.pr.new') to avoid unintended reruns.
Useful? React with 👍 / 👎.
Adds a labeled-PR workflow that publishes preview packages to pkg.pr.new, and extracts the release build matrix into a reusable workflow shared with the existing npm release flow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pulls the move-binaries / version-stamp / build-test logic out of inline
YAML and into the existing publish-native-addons.ts. Replaces the
SKIP_NPM_PUBLISH env hack with a --mode {npm,pkg-pr-new} flag. Each
publish workflow is now: download artifacts → run script → publish.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
flaky snap tests was fixed in #1528 |
- Add persist-credentials: false to the prepare-job checkout (artipacked).
- Replace ${{ inputs.* }} / ${{ env.* }} interpolation in run blocks with
shell env-var expansion to avoid template-injection.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
publish-to-pkg.pr.new.ymlworkflow: triggered byworkflow_dispatchor by adding thepkg.pr.newlabel on a PR. Computes a snapshot version (0.0.0-pkg-pr-new.<sha>), builds via the reusable workflow, and publishes the CLI/core/test packages plus per-platform NAPI bindings and Rust CLI binary packages to pkg.pr.new.reusable-release-build.yml: extracts the 8-target build matrix (apple-darwin × {x86_64,aarch64}, unknown-linux-{gnu,musl} × {x86_64,aarch64}, pc-windows-msvc × {x86_64,aarch64}) shared betweenrelease.ymland the new pkg.pr.new flow. Takesversionandcache-keyinputs (caller-distinct cache keys avoid cross-workflow pollution).release.yml: build job collapsed to auses:of the reusable workflow.packages/cli/publish-native-addons.ts: gated thenpm publishcalls and thecli-npmcleanup behindSKIP_NPM_PUBLISH=trueso the pkg.pr.new flow can reuse the same prep script and leavepackages/cli/{npm,cli-npm}/*on disk for pkg-pr-new to pick up.