Skip to content

Commit 5331262

Browse files
committed
docs: document pkg.pr.new preview builds
1 parent f3a3374 commit 5331262

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

docs/guide/upgrade.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,66 @@ vp --version
7777
```
7878

7979
Then set the `vitest` override to that exact version, or rerun `vp migrate` to update the pin for you.
80+
81+
## Preview Builds
82+
83+
Some Vite+ pull requests publish temporary packages through `pkg.pr.new`. 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 npm release. For day-to-day work, prefer the published `latest` release.
84+
85+
You can find preview builds in pull requests that automatically update upstream dependencies. For examples, search the merged pull requests for [upstream dependency updates](https://github.com/voidzero-dev/vite-plus/pulls?q=is%3Apr+is%3Amerged+upgrade+upstream+dependencies).
86+
87+
Preview builds are addressed by pull request number or commit SHA. They are not a stable version range, and you should avoid leaving them in long-lived branches unless a maintainer asks you to.
88+
89+
### Global `vp` Preview
90+
91+
Install a preview build of the global CLI by passing `VP_PR_VERSION` to the installer:
92+
93+
```bash
94+
curl -fsSL https://vite.plus | VP_PR_VERSION=<pr-or-sha> bash
95+
```
96+
97+
On Windows:
98+
99+
```powershell
100+
$env:VP_PR_VERSION = "<pr-or-sha>"
101+
irm https://vite.plus/ps1 | iex
102+
Remove-Item Env:\VP_PR_VERSION
103+
```
104+
105+
Run `vp --version` afterward to confirm which build and bundled tool versions are active. When you are done testing, return to the published release with `vp upgrade --force` or by running the installer again without `VP_PR_VERSION`.
106+
107+
### Local `vite-plus` Preview
108+
109+
To test an unreleased local package in a project, install the matching preview package:
110+
111+
```bash
112+
vp add -D https://pkg.pr.new/voidzero-dev/vite-plus@<pr-or-sha>
113+
vp install
114+
```
115+
116+
The preview `vite-plus` package points its own Vite+ workspace dependencies at matching `pkg.pr.new` packages. If your project also has a direct `@voidzero-dev/vite-plus-core` dependency or a `vite` override that still points at `npm:@voidzero-dev/vite-plus-core@latest`, update that entry to the matching core preview while you test:
117+
118+
```json
119+
{
120+
"overrides": {
121+
"vite": "https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-core@<pr-or-sha>"
122+
}
123+
}
124+
```
125+
126+
For pnpm workspaces, make the same temporary change in `pnpm-workspace.yaml` if that is where your Vite+ overrides live:
127+
128+
```yaml
129+
overrides:
130+
vite: "https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-core@<pr-or-sha>"
131+
```
132+
133+
After installing a preview, check the bundled versions with `vp --version`. If the preview includes a newer bundled Vitest, update your `vitest` override to that exact version so `vp test` and project imports keep using the same Vitest copy.
134+
135+
When testing is complete, replace the preview package with the published release again:
136+
137+
```bash
138+
vp add -D vite-plus@latest
139+
vp install
140+
```
141+
142+
Then restore any temporary `vite` / `@voidzero-dev/vite-plus-core` override to `npm:@voidzero-dev/vite-plus-core@latest`.

0 commit comments

Comments
 (0)