Migrate to Vite+.#1697
Conversation
|
agents
@cloudflare/ai-chat
@cloudflare/codemode
create-think
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
de9e591 to
a2064dc
Compare
|
Updated all GitHub Actions to use pinned actions for security. |
24ddb43 to
3f8f3d7
Compare
|
Rebased and resolved conflicts. |
7bf82ad to
091d475
Compare
|
LGTM 👍 |
2bff637 to
81d5ba9
Compare
threepointone
left a comment
There was a problem hiding this comment.
some questions for my understanding
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 |
There was a problem hiding this comment.
why are we pinning these versions? is that better? won't we miss updates?
There was a problem hiding this comment.
Security.
We did this for all VoidZero projects to avoid hacked actions from taking over our projects. We should frequently update actions (manually, or through renovate), but keep them pinned.
| // This is a workaround until this is handled automatically by `changeset version`. | ||
| // See https://github.com/changesets/changesets/issues/421. | ||
| execSync("pnpm exec changeset version", { | ||
| execSync("vp exec changeset version", { |
There was a problem hiding this comment.
is theree a vpx command? could be nice.
| { default: tailwindcss }, | ||
| { default: react }, | ||
| { think } | ||
| ] = await Promise.all([ |
There was a problem hiding this comment.
With Vite+, vite.config.ts is loaded in many workflows such as vp lint or vp fmt. Some plugins take a lot of time to load, making all tool invocations slower. We added support for "lazy plugins" so we don't have to wait on the ecosystem to optimize their plugin init times.
There was a problem hiding this comment.
Ideally, plugins would be an async function but the Vite team thought it wasn't worth adding that API surface at this time.
| "build": "vite build", | ||
| "deploy": "vite build && wrangler deploy", | ||
| "start": "vp dev", | ||
| "build": "vp run build:vite", |
There was a problem hiding this comment.
we don't have a build:vite command here? why is this not vp build?
There was a problem hiding this comment.
oh I see it's in the vite config. but then should it be vp run? not vp?
| "packageManager": "pnpm@11.5.2" | ||
| "packageManager": "pnpm@11.5.2", | ||
| "overrides": { | ||
| "esbuild": "^0.25.1" |
There was a problem hiding this comment.
Removed. Sorry that was a leftover.
This PR moves the agents repo to Vite+. Please see https://viteplus.dev/ for how to set up Vite+.
vp install, using pnpm under the hood.vite.config.ts, and should be used viavp check --fix.vite-plus/packinstead oftsdown.vite-plus/testinstead ofvitest.In a follow-up I'd like to also add type checking to
vp checkto simplify further.