You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: pack local dirs for the registry bridge instead of pkg.pr.new (#2038)
Moves the PR preview publish fully onto the registry bridge and drops
pkg.pr.new.
- Bumps the bridge action to its local-pack version
(voidzero-dev/pkg-pr-registry-bridge#56, merged as `711e22a2`, pinned
here): it packs the built package directories with `pnpm pack` and
uploads them, instead of downloading them back from pkg.pr.new.
- Removes the `pkg-pr-new publish` step. Nothing in the PR-build install
path uses pkg.pr.new anymore: install.sh, `vp migrate`, and the Docker
preview all resolve commit builds through the bridge. Direct
`https://pkg.pr.new/...` URL installs stop existing for new builds.
- The bridge step now fails the job on error instead of
continue-on-error: a silently missing ref would only surface later as a
broken install.
- The published set now also includes `packages/cli/cli-npm/*`, so
`@voidzero-dev/vite-plus-cli-*` gets real bridge-served tarballs with
integrity (previously they 302'd to pkg.pr.new with empty integrity).
- Renames the workflow file to `publish-preview.yml` (display name
"Publish preview build"; older runs stay under the previous workflow
entry) and the trigger label to `preview-build` (the repo label was
renamed in place, so labeled PRs keep it). The rust cache-key keeps its
name to keep warm caches.
- Updates docs/comments that described pkg.pr.new as the publish
destination (MAINTENANCE.md, upgrade guide, Dockerfile, install scripts,
migrate test harness).
Note: both labels exist during the transition: `pkg.pr.new` still
triggers main's current workflow on other PRs until this merges, and
`preview-build` triggers this PR's workflow. Delete the `pkg.pr.new`
label after the merge.
Verified per head along the way, most recently: publish run green with
no pkg.pr.new step, 19 packages packed locally and served from R2 with
byte-verified integrity, `VP_PR_VERSION=2038` resolving and installing
entirely through the bridge, and the Docker preview building from the
bridge build.
Copy file name to clipboardExpand all lines: .claude/skills/test-pkg-pr-new-migrate/SKILL.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
2
name: test-pkg-pr-new-migrate
3
-
description: Verify a pkg.pr.new build of vite-plus against a real project before release — run `vp migrate` from the pkg.pr.new commit against a local project, deps resolved through the registry bridge. Use when asked to verify/e2e-test a pkg.pr.new build against a project, "test PR #<N> on <project>", or check a prerelease against a repo.
3
+
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 #<N> on <project>", or check a prerelease against a repo.
4
4
allowed-tools: Bash, Read
5
5
---
6
6
7
-
# Verify a pkg.pr.new build against one project
7
+
# Verify a preview build against one project
8
8
9
9
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`.
10
10
@@ -16,7 +16,7 @@ Required inputs: a `<PR-or-SHA>` (the build to verify) and a `<project-path>`. I
- 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 pkg.pr.new publish workflow registers each commit).
19
+
- 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).
20
20
- 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.
21
21
22
22
**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 locally built directories to pack and publish. (This is also
158
+
# the action's default, passed explicitly so the published set is
159
+
# reviewable here.)
160
+
packages: |
161
+
packages/cli/npm/*
162
+
packages/cli/cli-npm/*
163
+
packages/cli
164
+
packages/core
165
+
packages/prompts
162
166
# Surfaced by the bridge's /-/refs so a registered ref links back to its
163
167
# PR. Always present here (this workflow only runs on pull_request).
164
168
pr-url: ${{ github.event.pull_request.html_url }}
165
169
166
170
# Once the bridge has the commit build, post (or update) a sticky PR comment
167
171
# with the resolved npm versions and per-package-manager registry config, so
168
-
# reviewers can install the build directly. Gated on the bridge step's real
169
-
#outcome (it is continue-on-error) and skipped for fork PRs.
172
+
# reviewers can install the build directly. The outcome gate skips this on
173
+
#fork PRs, where the bridge step itself is skipped.
170
174
- name: Comment bridge version on the PR
171
175
if: steps.bridge.outcome == 'success'
172
176
continue-on-error: true
@@ -189,7 +193,7 @@ jobs:
189
193
'',
190
194
`### Registry bridge build (\`${shortSha}\`)`,
191
195
'',
192
-
'This commit is published to pkg.pr.new and registered with the [registry bridge](https://github.com/voidzero-dev/pkg-pr-registry-bridge), which serves these as ordinary npm versions (every other package proxies to npmjs):',
196
+
'This commit build is published to the [registry bridge](https://github.com/voidzero-dev/pkg-pr-registry-bridge), which serves these as ordinary npm versions (every other package proxies to npmjs):',
193
197
'',
194
198
'| Package | Version |',
195
199
'| --- | --- |',
@@ -253,13 +257,13 @@ jobs:
253
257
});
254
258
}
255
259
256
-
# Build and push a preview Docker image from the pkg.pr.new build so the image
257
-
# can be verified before a real release. Tagged `pr-<number>`; never `latest`.
258
-
# See docker/Dockerfile and docs/guide/docker.md.
260
+
# Build and push a preview Docker image from the registry bridge build so the
261
+
#image can be verified before a real release. Tagged `pr-<number>`; never
262
+
#`latest`. See docker/Dockerfile and docs/guide/docker.md.
Copy file name to clipboardExpand all lines: docs/guide/upgrade.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ Then set the `vitest` override to that exact version, or rerun `vp migrate` to u
62
62
63
63
Some Vite+ pull requests publish temporary packages for testing before an npm release. Treat these as nightly or bleeding-edge builds: they are useful when you want to verify a specific fix, test a fresh upstream dependency bump, or confirm a change before the next release. For day-to-day work, prefer the published `latest` release.
64
64
65
-
Each commit on an eligible pull request is published to [pkg.pr.new](https://pkg.pr.new) and registered with the [registry bridge](https://registry-bridge.viteplus.dev/). The bridge serves these builds as ordinary npm versions of the form `0.0.0-commit.<sha>` and proxies every other package to the npm registry. That means you install a preview with normal version specs instead of mutable URLs, and the same versions resolve in CI.
65
+
Each commit on an eligible pull request is published to the [registry bridge](https://registry-bridge.viteplus.dev/). The bridge serves these builds as ordinary npm versions of the form `0.0.0-commit.<sha>` and proxies every other package to the npm registry. That means you install a preview with normal version specs instead of mutable URLs, and the same versions resolve in CI.
66
66
67
67
Both `vite-plus` and `@voidzero-dev/vite-plus-core` publish under the same `0.0.0-commit.<sha>` version. Each pull request carries a comment listing the exact version for its latest commit, along with ready-to-copy install steps.
0 commit comments