void 0.10.5 → 0.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents-Bmr5tFFb.mjs +1454 -0
- package/dist/{auth-cmd-UoCwfDQv.mjs → auth-cmd-DlgNwByu.mjs} +10 -10
- package/dist/{better-auth-shared-D0Mbmx5V.mjs → better-auth-shared-BQooDxbw.mjs} +1 -1
- package/dist/{better-auth-shared-jkksALri.d.mts → better-auth-shared-BvnM9px6.d.mts} +2 -2
- package/dist/{build-cmd-CVyuBHjP.mjs → build-cmd-Br8qL0rA.mjs} +15 -17
- package/dist/{cache-ACORQCIq.mjs → cache-wH-mP8UE.mjs} +10 -12
- package/dist/{cancel-deploy-Gi8zmoZC.mjs → cancel-deploy-BEBOEgtu.mjs} +16 -18
- package/dist/cli/cli.mjs +47 -49
- package/dist/{client-BlbnA92X.mjs → client-Cj96iiBH.mjs} +74 -8
- package/dist/{config-8dLIngKW.mjs → config-1twldYCW.mjs} +10 -10
- package/dist/{config-CbJS4Krx.mjs → config-BdUctCZD.mjs} +4 -4
- package/dist/{create-project-LjvkYziS.mjs → create-project-DD9n8Ho-.mjs} +28 -23
- package/dist/{db-C00yjN01.mjs → db-DjKE2-A-.mjs} +147 -149
- package/dist/{delete-CplfvTgU.mjs → delete-D2kr3Kmk.mjs} +13 -15
- package/dist/{deploy-CISNL5uK.mjs → deploy-C4PbkFyE.mjs} +97 -100
- package/dist/{discover-ZWuBvt22.mjs → discover-BuVVSAum.mjs} +3 -3
- package/dist/{dist-5cGIJHQQ.mjs → dist-BuiRJkTd.mjs} +59 -27
- package/dist/{domain-B4HpcgNG.mjs → domain-_luIsM_B.mjs} +14 -16
- package/dist/{env-DNMJpeVF.mjs → env-CO5XAS9t.mjs} +23 -25
- package/dist/{env-helpers-B_ks681T.d.mts → env-helpers-z4stu8uc.d.mts} +1 -1
- package/dist/{env-types-BS8cZead.mjs → env-types-D51bnR-c.mjs} +3 -3
- package/dist/{env-validation-BxbtBbjh.mjs → env-validation-CeC2FL66.mjs} +4 -4
- package/dist/{fetch-error-C6qffTl2.mjs → fetch-error-Dj3crt0e.mjs} +3 -3
- package/dist/{gen-C0pV2gRQ.mjs → gen-Cf79J4aw.mjs} +42 -44
- package/dist/{github-cmd-CwtLD1yI.mjs → github-cmd-DnqxyOsb.mjs} +88 -90
- package/dist/{handler-B7rCOy21.d.mts → handler-imD0UVDT.d.mts} +4 -5
- package/dist/{headers-BNWymgnH.mjs → headers-BwvFGhkx.mjs} +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +102 -83
- package/dist/{init-D58GxCtt.mjs → init-KirOzVDs.mjs} +132 -134
- package/dist/link-CUmiosyb.mjs +45 -0
- package/dist/{list-CbNNjXTm.mjs → list-3GEw7b6m.mjs} +10 -12
- package/dist/{login-CvxxF_9z.mjs → login-DJReaT_Q.mjs} +14 -15
- package/dist/{logs-BDZ9AuhM.mjs → logs-D-rQ56Lq.mjs} +9 -11
- package/dist/{magic-string.es-C1Fb0uxq.mjs → magic-string.es-ZQjdJFFn.mjs} +3 -3
- package/dist/{mcp-C8BjRt_z.mjs → mcp-D7yc0dXY.mjs} +2 -3
- package/dist/{node-B07cZs0d.mjs → node-yFFk626c.mjs} +6 -6
- package/dist/{package-json-Bg_GJdJB.mjs → package-json-B0NuUWGd.mjs} +1 -1
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +2 -1
- package/dist/pages/head-client.d.mts +1 -1
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +3 -3
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +5 -2
- package/dist/{plugin-inference-D04iL1mW.mjs → plugin-inference-CJxi_fWI.mjs} +3 -3
- package/dist/{prepare-DUo9q8cM.mjs → prepare-C_cVurhP.mjs} +15 -18
- package/dist/{preset-D0My64KQ.mjs → preset-CVvwCeIy.mjs} +4 -4
- package/dist/{project-cmd-Dd1gNRdd.mjs → project-cmd-DnU7u9QF.mjs} +13 -14
- package/dist/{project-paths-CCMrHYQm.mjs → project-paths-tpdR1mJR.mjs} +2 -2
- package/dist/{project-tsconfig-DMBV55K2.mjs → project-tsconfig-D9uSVVpA.mjs} +2 -2
- package/dist/{protocol-6UZCowS1.d.mts → protocol-6hTJ04T1.d.mts} +3 -3
- package/dist/{resolve-project-D4O1_fZz.mjs → resolve-project-D2HI3TrG.mjs} +2 -2
- package/dist/{rollback-DzmCCrFg.mjs → rollback-Yh7bCKob.mjs} +21 -23
- package/dist/{route-types-BpSJEW20.mjs → route-types-CfKfhbIg.mjs} +234 -3
- package/dist/{runner-BQyKUqAL.mjs → runner-h272wcPj.mjs} +4 -5
- package/dist/{runner-pg-EuhrFW3D.mjs → runner-pg-waxJOnBb.mjs} +1 -1
- package/dist/runtime/ai.mjs +2 -2
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +3 -3
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +2 -2
- package/dist/runtime/client-react.d.mts +2 -2
- package/dist/runtime/client-react.mjs +1 -1
- package/dist/runtime/client-solid.d.mts +2 -2
- package/dist/runtime/client-solid.mjs +1 -1
- package/dist/runtime/client-svelte.d.mts +2 -2
- package/dist/runtime/client-svelte.mjs +1 -1
- package/dist/runtime/client-vue.d.mts +2 -2
- package/dist/runtime/client-vue.mjs +1 -1
- package/dist/runtime/client.d.mts +2 -2
- package/dist/runtime/client.mjs +1 -1
- package/dist/runtime/db-pg.d.mts +1 -1
- package/dist/runtime/env-helpers.d.mts +1 -1
- package/dist/runtime/env-public-client.d.mts +1 -1
- package/dist/runtime/env-public-client.mjs +2 -0
- package/dist/runtime/env-public.d.mts +3 -4
- package/dist/runtime/env-public.mjs +3 -1
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +2 -2
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/live-server.mjs +2 -0
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/live.mjs +3 -1
- package/dist/runtime/migration-handler-pg.mjs +1 -1
- package/dist/runtime/migration-handler.mjs +1 -1
- package/dist/runtime/remote/index.mjs +11 -1
- package/dist/runtime/sandbox.d.mts +1 -4
- package/dist/runtime/sandbox.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws-server.mjs +2 -0
- package/dist/runtime/ws.d.mts +3 -3
- package/dist/runtime/ws.mjs +2 -0
- package/dist/{scan-VCAM1oh3.mjs → scan-Dp_Gyzs3.mjs} +3 -3
- package/dist/{scan---8wfN58.mjs → scan-i7Yz54fv.mjs} +26 -8
- package/dist/{secret-CMLYWkE-.mjs → secret-u7FRvg8d.mjs} +22 -24
- package/dist/{skills-Dl3u05da.mjs → skills-DsdNDtX3.mjs} +6 -7
- package/dist/{subcommand-prompt-B8ng0FTS.mjs → subcommand-prompt-DtES-oP6.mjs} +34 -35
- package/dist/sveltekit.mjs +1 -1
- package/dist/validate-DT7nFMlf.mjs +504 -0
- package/dist/{yarn-pnp-WLW2IHUY.mjs → yarn-pnp-CW8LB6g_.mjs} +1 -1
- package/package.json +19 -19
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/CHANGELOG.md +94 -0
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/README.md +32 -11
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/sandbox/README.md +45 -0
- package/skills/void/docs/node_modules/void/node_modules/@electric-sql/pglite/README.md +5 -5
- package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-exit/README.md +4 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-attrs/README.md +29 -12
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/AGENTS.md +1 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/README.md +18 -6
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/build.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/check.md +35 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/create.md +70 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/fmt.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/index.md +11 -7
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/lint.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/pack.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/run.md +141 -26
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/staged.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/test.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +145 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/cache.md +16 -28
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/check.md +16 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ci.md +15 -17
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/commit-hooks.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/create.md +255 -2
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/docker.md +175 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/env.md +70 -5
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/github-actions-cache.md +165 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ide-integration.md +2 -2
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/index.md +9 -3
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/install.md +63 -11
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate-rules.md +347 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate.md +27 -3
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/monorepo.md +176 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/pack.md +8 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/run.md +36 -4
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/troubleshooting.md +11 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/upgrade.md +65 -13
- package/skills/void/docs/node_modules/void/node_modules/es-module-lexer/README.md +403 -390
- package/skills/void/docs/node_modules/void/node_modules/pg/README.md +2 -1
- package/skills/void/docs/node_modules/void/node_modules/tinyglobby/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/AGENTS.md +1 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/README.md +18 -6
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/build.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/check.md +35 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/create.md +70 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/fmt.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/index.md +11 -7
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/lint.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/pack.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/run.md +141 -26
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/staged.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/test.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +145 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/cache.md +16 -28
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/check.md +16 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ci.md +15 -17
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/commit-hooks.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/create.md +255 -2
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/docker.md +175 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/env.md +70 -5
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/github-actions-cache.md +165 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ide-integration.md +2 -2
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/index.md +9 -3
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/install.md +63 -11
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate-rules.md +347 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate.md +27 -3
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/monorepo.md +176 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/pack.md +8 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/run.md +36 -4
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/troubleshooting.md +11 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/upgrade.md +65 -13
- package/skills/void/docs/reference/cli.md +5 -1
- package/dist/agents-MhSzNMiC.mjs +0 -151
- package/dist/collect-9rO3JFNM.mjs +0 -55
- package/dist/config-hhMYPVRT.mjs +0 -21
- package/dist/dist-abzUneor.mjs +0 -1287
- package/dist/drizzle-DqstQTGq.mjs +0 -232
- package/dist/link-ZFmboqY3.mjs +0 -47
- package/dist/output-DeiS4oEX.mjs +0 -139
- package/dist/plan-aD3wRDqF.mjs +0 -271
- package/dist/project-CH9pdo16.mjs +0 -72
- package/dist/project-slug-rX3kTOfY.mjs +0 -10
- package/dist/validate-CNWm-PsL.mjs +0 -186
- /package/dist/{auth-migrations-BP-hMzYl.mjs → auth-migrations-BTZ-ATvQ.mjs} +0 -0
- /package/dist/{auth-Dz2CCn4T.d.mts → auth-qgMlYp7Z.d.mts} +0 -0
- /package/dist/{canonical-json-CEyQaVDa.mjs → canonical-json-DuDiiUsQ.mjs} +0 -0
- /package/dist/{cf-access-DKDsgwOU.mjs → cf-access-Bqw81xAf.mjs} +0 -0
- /package/dist/{defer-C-bdSM_b.mjs → defer-YsYDUoii.mjs} +0 -0
- /package/dist/{dotenv-lS94ymhM.mjs → dotenv-D_UbC_vc.mjs} +0 -0
- /package/dist/{env-raw-Dtj1UAoK.mjs → env-raw-CoS20LHP.mjs} +0 -0
- /package/dist/{fetch-error-B6RaJ-eZ.d.mts → fetch-error-Sp1R4mZv.d.mts} +0 -0
- /package/dist/{git-metadata-Ce0AtSZL.mjs → git-metadata-CBKaL0v5.mjs} +0 -0
- /package/dist/{head-eOUCWUNy.d.mts → head-nmvOgFjd.d.mts} +0 -0
- /package/dist/{log-BdD_Fpms.mjs → log-ChfPKsVd.mjs} +0 -0
- /package/dist/{pathe.M-eThtNZ-BrPhGF_K.mjs → pathe.M-eThtNZ-CQzLbt4c.mjs} +0 -0
- /package/dist/{pg-CempqvEJ.mjs → pg-J2HbZIkX.mjs} +0 -0
- /package/dist/{providers-BJIoduK9.d.mts → providers-BNKRacMr.d.mts} +0 -0
- /package/dist/{providers-BwPbdHdi.mjs → providers-CJlNS3kT.mjs} +0 -0
- /package/dist/{proxy-M3pxItg2.mjs → proxy-D-3_D-Gl.mjs} +0 -0
- /package/dist/{chunk-DJd-R1mw.mjs → rolldown-runtime-DJK8HYOj.mjs} +0 -0
- /package/dist/{standard-schema-Cy0lfeWv.d.mts → standard-schema-DJ0HW7QP.d.mts} +0 -0
- /package/dist/{types-BodZGegX.d.mts → types-lLjNE9Qp.d.mts} +0 -0
|
@@ -18,6 +18,7 @@ $ npm install pg
|
|
|
18
18
|
|
|
19
19
|
### Features
|
|
20
20
|
|
|
21
|
+
- [Fastest PostgreSQL client for Node.js](https://github.com/nigrosimone/postgres-benchmarks)
|
|
21
22
|
- Pure JavaScript client and native libpq bindings share _the same API_
|
|
22
23
|
- Connection pooling
|
|
23
24
|
- Extensible JS ↔ PostgreSQL data-type coercion
|
|
@@ -42,7 +43,7 @@ When you open an issue please provide:
|
|
|
42
43
|
- version of Postgres
|
|
43
44
|
- smallest possible snippet of code to reproduce the problem
|
|
44
45
|
|
|
45
|
-
You can also follow me [@
|
|
46
|
+
You can also follow me [@brianc](https://bsky.app/profile/brianc.bsky.social) on bluesky if that's your thing for updates on node-postgres with nearly zero non node-postgres content. My old twitter/x account is no longer used.
|
|
46
47
|
|
|
47
48
|
## Sponsorship :two_hearts:
|
|
48
49
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# tinyglobby
|
|
2
2
|
|
|
3
3
|
[](https://npmjs.com/package/tinyglobby)
|
|
4
|
-
[](https://npmjs.com/package/tinyglobby)
|
|
5
5
|
|
|
6
6
|
A fast and minimal alternative to globby and fast-glob, meant to behave the same way.
|
|
7
7
|
|
|
@@ -11,5 +11,6 @@ Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.de
|
|
|
11
11
|
- [ ] Run `vp install` after pulling remote changes and before getting started.
|
|
12
12
|
- [ ] Run `vp check` and `vp test` to format, lint, type check and test changes.
|
|
13
13
|
- [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts necessary for validation, run via `vp run <script>`.
|
|
14
|
+
- [ ] If setup, runtime, or package-manager behavior looks wrong, run `vp env doctor` and include its output when asking for help.
|
|
14
15
|
|
|
15
16
|
<!--VITE PLUS END-->
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**The Unified Toolchain for the Web**
|
|
4
4
|
_runtime and package management, create, dev, check, test, build, pack, and monorepo task caching in a single dependency_
|
|
5
5
|
|
|
6
|
-
This package provides the project-local version of Vite+. The global `
|
|
6
|
+
This package provides the project-local version of Vite+. The global `vp` command automatically delegates to this package for all project-specific tasks.
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -111,6 +111,7 @@ Use `vp migrate` to migrate to Vite+. It merges tool-specific config files such
|
|
|
111
111
|
|
|
112
112
|
- **run** - Run monorepo tasks
|
|
113
113
|
- **exec** - Execute a command from local `node_modules/.bin`
|
|
114
|
+
- **node** - Run a Node.js script with the resolved Vite+ environment
|
|
114
115
|
- **dlx** - Execute a package binary without installing it as a dependency
|
|
115
116
|
- **cache** - Manage the task cache
|
|
116
117
|
|
|
@@ -122,7 +123,7 @@ Use `vp migrate` to migrate to Vite+. It merges tool-specific config files such
|
|
|
122
123
|
|
|
123
124
|
#### Manage Dependencies
|
|
124
125
|
|
|
125
|
-
Vite+ automatically wraps your package manager (pnpm, npm, or
|
|
126
|
+
Vite+ automatically wraps your package manager (pnpm, npm, Yarn, or Bun) based on `packageManager` and lockfiles:
|
|
126
127
|
|
|
127
128
|
- **add** - Add packages to dependencies
|
|
128
129
|
- **remove** (`rm`, `un`, `uninstall`) - Remove packages from dependencies
|
|
@@ -133,6 +134,7 @@ Vite+ automatically wraps your package manager (pnpm, npm, or Yarn) based on `pa
|
|
|
133
134
|
- **why** (`explain`) - Show why a package is installed
|
|
134
135
|
- **info** (`view`, `show`) - View package metadata from the registry
|
|
135
136
|
- **link** (`ln`) / **unlink** - Manage local package links
|
|
137
|
+
- **rebuild** - Rebuild native modules
|
|
136
138
|
- **pm** - Forward a command to the package manager
|
|
137
139
|
|
|
138
140
|
#### Maintain
|
|
@@ -150,6 +152,16 @@ vp create
|
|
|
150
152
|
|
|
151
153
|
You can run `vp create` inside of a project to add new apps or libraries to your project.
|
|
152
154
|
|
|
155
|
+
Organizations can expose a curated set of templates under their npm scope by
|
|
156
|
+
publishing `@org/create` with a `createConfig.templates` manifest in its `package.json`.
|
|
157
|
+
Once published, `vp create @org` opens an interactive picker over those
|
|
158
|
+
templates, and setting `create: { defaultTemplate: '@org' }` in
|
|
159
|
+
`vite.config.ts` makes it the default for bare `vp create`. See the
|
|
160
|
+
[Organization Templates guide](https://viteplus.dev/guide/create#organization-templates)
|
|
161
|
+
for the authoring workflow and
|
|
162
|
+
[`create.defaultTemplate`](https://viteplus.dev/config/create) for the
|
|
163
|
+
config reference.
|
|
164
|
+
|
|
153
165
|
### Migrating an existing project
|
|
154
166
|
|
|
155
167
|
You can migrate an existing project to Vite+:
|
|
@@ -177,12 +189,12 @@ If you are manually migrating a project to Vite+, install these dev dependencies
|
|
|
177
189
|
npm install -D vite-plus @voidzero-dev/vite-plus-core@latest
|
|
178
190
|
```
|
|
179
191
|
|
|
180
|
-
You need to add overrides to your package manager
|
|
192
|
+
You need to add overrides to your package manager so that other packages resolve the Vite+ versions: alias `vite` to `@voidzero-dev/vite-plus-core`, and pin `vitest` to the version Vite+ bundles (run `vp --version`) so the whole project shares a single Vitest copy with `vp test`. Without the `vitest` pin, a dependency or workspace package can pull a different Vitest than the bundled runner, splitting Vitest's internals (mocks, `expect`, runner state):
|
|
181
193
|
|
|
182
194
|
```json
|
|
183
195
|
"overrides": {
|
|
184
196
|
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
|
185
|
-
"vitest": "
|
|
197
|
+
"vitest": "4.1.9"
|
|
186
198
|
}
|
|
187
199
|
```
|
|
188
200
|
|
|
@@ -191,7 +203,7 @@ If you are using `pnpm`, add this to your `pnpm-workspace.yaml`:
|
|
|
191
203
|
```yaml
|
|
192
204
|
overrides:
|
|
193
205
|
vite: npm:@voidzero-dev/vite-plus-core@latest
|
|
194
|
-
vitest:
|
|
206
|
+
vitest: 4.1.9
|
|
195
207
|
```
|
|
196
208
|
|
|
197
209
|
Or, if you are using Yarn:
|
|
@@ -199,7 +211,7 @@ Or, if you are using Yarn:
|
|
|
199
211
|
```json
|
|
200
212
|
"resolutions": {
|
|
201
213
|
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
|
202
|
-
"vitest": "
|
|
214
|
+
"vitest": "4.1.9"
|
|
203
215
|
}
|
|
204
216
|
```
|
|
205
217
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Check Config
|
|
2
|
+
|
|
3
|
+
`vp check` runs format, lint, and type checks together. The `check` block in `vite.config.ts` sets defaults for the composite command, mirroring the `--no-fmt` and `--no-lint` CLI flags.
|
|
4
|
+
|
|
5
|
+
This is useful when a project wants to keep most of the toolchain but skip one step by default. For example, a team that lints but does not format can disable `check.fmt` so a plain `vp check` (the command agents and contributors run most) only lints, without anyone needing to remember `--no-fmt`.
|
|
6
|
+
|
|
7
|
+
## Example
|
|
8
|
+
|
|
9
|
+
```ts [vite.config.ts]
|
|
10
|
+
import { defineConfig } from 'vite-plus';
|
|
11
|
+
|
|
12
|
+
export default defineConfig({
|
|
13
|
+
check: {
|
|
14
|
+
// Skip the format step in `vp check`. Defaults to true.
|
|
15
|
+
fmt: false,
|
|
16
|
+
// Skip lint rules in `vp check`. Type-check still runs when both
|
|
17
|
+
// `lint.options.typeAware` and `lint.options.typeCheck` are enabled.
|
|
18
|
+
// Defaults to true.
|
|
19
|
+
lint: true,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
When a step is disabled here, `vp check` prints a short `note:` line so it is clear why the step did not run. With the `check.fmt: false` config above:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
$ vp check
|
|
28
|
+
note: Format skipped (check.fmt: false in vite.config.ts)
|
|
29
|
+
pass: Found no warnings or lint errors in 1 file (12ms, 8 threads)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Scope and precedence
|
|
33
|
+
|
|
34
|
+
- These options only affect the composite `vp check`. Standalone [`vp fmt`](/config/fmt) and [`vp lint`](/config/lint) are unaffected, so you can still run a disabled tool directly when you need it once. Note that any `vp check` invocation honors these defaults, including one run from a pre-commit hook: if your [`staged`](/config/staged) tasks call `vp check`, that step is skipped there too.
|
|
35
|
+
- A step is skipped if the config disables it **or** the matching CLI flag is passed. There is no flag to re-enable a step disabled in config; run `vp fmt` or `vp lint` directly instead.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Create Config
|
|
2
|
+
|
|
3
|
+
`vp create` reads the `create` block in `vite.config.ts` to set per-repo defaults. See the [Creating a Project guide](/guide/create#organization-templates) for the full `@org` template workflow.
|
|
4
|
+
|
|
5
|
+
## `create.defaultTemplate`
|
|
6
|
+
|
|
7
|
+
When `vp create` is invoked with no `TEMPLATE` argument, Vite+ uses this value as if the user had typed it. Typically set to an npm scope whose `@scope/create` package publishes a `createConfig.templates` manifest — so bare `vp create` drops into the org picker.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { defineConfig } from 'vite-plus';
|
|
11
|
+
|
|
12
|
+
export default defineConfig({
|
|
13
|
+
create: {
|
|
14
|
+
defaultTemplate: '@your-org',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Any value accepted by `vp create` as a first argument works here: `@your-org` for an org picker, `@your-org:web` for a direct manifest entry, `vite:application` for a built-in, or the `name` of a local `create.templates` entry (see below).
|
|
20
|
+
|
|
21
|
+
## `create.templates`
|
|
22
|
+
|
|
23
|
+
Declare local templates available to `vp create` inside a monorepo. Each entry is listed in the `vp create` picker, and selecting it (or passing its `name` as the template argument) runs the resolved `template`.
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import { defineConfig } from 'vite-plus';
|
|
27
|
+
|
|
28
|
+
export default defineConfig({
|
|
29
|
+
create: {
|
|
30
|
+
templates: [
|
|
31
|
+
{
|
|
32
|
+
name: 'component',
|
|
33
|
+
description: 'Internal UI component',
|
|
34
|
+
template: './tools/create-component',
|
|
35
|
+
},
|
|
36
|
+
{ name: 'service', description: 'Backend service', template: 'service-generator' },
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Each entry has:
|
|
43
|
+
|
|
44
|
+
| Field | Required | Notes |
|
|
45
|
+
| ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
46
|
+
| `name` | yes | Identifier shown in the picker and accepted as `vp create <name>`. Must be unique within the array. The `vite:` prefix is reserved for built-in templates. |
|
|
47
|
+
| `description` | yes | One-line description shown in the picker. |
|
|
48
|
+
| `template` | yes | A workspace package name, a relative `./path` to a local package's directory (resolved against the workspace root), a `vite:*` built-in, a GitHub URL, or a full npm package name (e.g. `create-foo`). It is run as-is (not shorthand-expanded). |
|
|
49
|
+
|
|
50
|
+
`create.templates` is the source of truth for local templates: only entries listed here appear in the picker. Vite+ does not infer templates from package.json keywords. A `create.templates` entry whose `template` does not match any workspace package, or resolves to a local package without a `bin`, is reported as an error rather than falling through to an unrelated npm package.
|
|
51
|
+
|
|
52
|
+
[`vp create vite:generator`](/guide/create#code-generators) adds an entry here automatically (idempotently, preserving `defaultTemplate`); you can also edit the list by hand.
|
|
53
|
+
|
|
54
|
+
`create.defaultTemplate` can name a local entry, so bare `vp create` opens it directly.
|
|
55
|
+
|
|
56
|
+
## Precedence
|
|
57
|
+
|
|
58
|
+
CLI argument > `create.defaultTemplate` > the standard built-in picker.
|
|
59
|
+
|
|
60
|
+
Explicit specifiers always win, so scripts and CI can bypass the configured default:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Uses create.defaultTemplate
|
|
64
|
+
vp create
|
|
65
|
+
|
|
66
|
+
# Explicitly ignores the default
|
|
67
|
+
vp create vite:library
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The org picker also appends a trailing "Vite+ built-in templates" entry — selecting it routes to the `vite:monorepo` / `vite:application` / `vite:library` / `vite:generator` flow, so built-ins stay reachable interactively even when a default is configured.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Example
|
|
6
6
|
|
|
7
|
-
```ts
|
|
7
|
+
```ts [vite.config.ts]
|
|
8
8
|
import { defineConfig } from 'vite-plus';
|
|
9
9
|
|
|
10
10
|
export default defineConfig({
|
|
@@ -16,3 +16,5 @@ export default defineConfig({
|
|
|
16
16
|
},
|
|
17
17
|
});
|
|
18
18
|
```
|
|
19
|
+
|
|
20
|
+
For package-specific formatting settings in a workspace, use [`fmt.overrides`](/guide/monorepo#format-overrides) from the root `vite.config.ts`.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Vite+ keeps project configuration in one place: `vite.config.ts`, allowing you to consolidate many top-level configuration files in a single file. You can keep using your Vite configuration such as `server` or `build`, and add Vite+ blocks for the rest of your workflow:
|
|
4
4
|
|
|
5
|
-
```ts
|
|
5
|
+
```ts [vite.config.ts]
|
|
6
6
|
import { defineConfig } from 'vite-plus';
|
|
7
7
|
|
|
8
8
|
export default defineConfig({
|
|
@@ -10,10 +10,12 @@ export default defineConfig({
|
|
|
10
10
|
build: {},
|
|
11
11
|
preview: {},
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
lint: {},
|
|
15
|
-
fmt: {},
|
|
13
|
+
create: {},
|
|
16
14
|
run: {},
|
|
15
|
+
fmt: {},
|
|
16
|
+
lint: {},
|
|
17
|
+
check: {},
|
|
18
|
+
test: {},
|
|
17
19
|
pack: {},
|
|
18
20
|
staged: {},
|
|
19
21
|
});
|
|
@@ -23,9 +25,11 @@ export default defineConfig({
|
|
|
23
25
|
|
|
24
26
|
Vite+ extends the basic Vite configuration with these additions:
|
|
25
27
|
|
|
26
|
-
- [`
|
|
28
|
+
- [`create`](/config/create) for project and template scaffolding defaults
|
|
29
|
+
- [`run`](/config/run) for Vite Task
|
|
27
30
|
- [`fmt`](/config/fmt) for Oxfmt
|
|
31
|
+
- [`lint`](/config/lint) for Oxlint
|
|
32
|
+
- [`check`](/config/check) for `vp check` defaults
|
|
28
33
|
- [`test`](/config/test) for Vitest
|
|
29
|
-
- [`run`](/config/run) for Vite Task
|
|
30
34
|
- [`pack`](/config/pack) for tsdown
|
|
31
|
-
- [`staged`](/config/staged) for staged-file checks
|
|
35
|
+
- [`staged`](/config/staged) for staged-file checks
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Example
|
|
6
6
|
|
|
7
|
-
```ts
|
|
7
|
+
```ts [vite.config.ts]
|
|
8
8
|
import { defineConfig } from 'vite-plus';
|
|
9
9
|
|
|
10
10
|
export default defineConfig({
|
|
@@ -22,3 +22,5 @@ export default defineConfig({
|
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
We recommend enabling both `options.typeAware` and `options.typeCheck` so `vp lint` and `vp check` can use the full type-aware path.
|
|
25
|
+
|
|
26
|
+
For package-specific lint rules in a workspace, use [`lint.overrides`](/guide/monorepo#root-config-with-overrides) from the root `vite.config.ts`.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
You can configure Vite Task under the `run` field in `vite.config.ts`. Check out [`vp run`](/guide/run) to learn more about running scripts and tasks with Vite+.
|
|
4
4
|
|
|
5
|
-
```ts
|
|
5
|
+
```ts [vite.config.ts]
|
|
6
6
|
import { defineConfig } from 'vite-plus';
|
|
7
7
|
|
|
8
8
|
export default defineConfig({
|
|
@@ -27,7 +27,7 @@ Whether to automatically run `preX`/`postX` package.json scripts as lifecycle ho
|
|
|
27
27
|
|
|
28
28
|
When enabled (the default), running a script like `test` will automatically run `pretest` before it and `posttest` after it, if they exist in `package.json`.
|
|
29
29
|
|
|
30
|
-
```ts
|
|
30
|
+
```ts [vite.config.ts]
|
|
31
31
|
export default defineConfig({
|
|
32
32
|
run: {
|
|
33
33
|
enablePrePostScripts: false, // Disable pre/post lifecycle hooks
|
|
@@ -46,7 +46,7 @@ This option can only be set in the workspace root's `vite.config.ts`. Setting it
|
|
|
46
46
|
|
|
47
47
|
Controls whether task results are cached and replayed on subsequent runs.
|
|
48
48
|
|
|
49
|
-
```ts
|
|
49
|
+
```ts [vite.config.ts]
|
|
50
50
|
export default defineConfig({
|
|
51
51
|
run: {
|
|
52
52
|
cache: {
|
|
@@ -61,17 +61,37 @@ export default defineConfig({
|
|
|
61
61
|
|
|
62
62
|
## `run.tasks`
|
|
63
63
|
|
|
64
|
-
- **Type:** `Record<string,
|
|
64
|
+
- **Type:** `Record<string, Task | string | string[]>`
|
|
65
65
|
|
|
66
66
|
Defines tasks that can be run with `vp run <task>`.
|
|
67
67
|
|
|
68
|
+
As a shorthand, a task value can be a command string or an array of command strings directly:
|
|
69
|
+
|
|
70
|
+
```ts [vite.config.ts]
|
|
71
|
+
tasks: {
|
|
72
|
+
build: 'vp build',
|
|
73
|
+
check: ['vp lint', 'vp build'],
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
These are equivalent to setting only `command` on a task config:
|
|
78
|
+
|
|
79
|
+
```ts [vite.config.ts]
|
|
80
|
+
tasks: {
|
|
81
|
+
build: { command: 'vp build' },
|
|
82
|
+
check: { command: ['vp lint', 'vp build'] },
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Use the object form when a task needs other fields like `cache`, `dependsOn`, `env`, or `input`.
|
|
87
|
+
|
|
68
88
|
### `command`
|
|
69
89
|
|
|
70
|
-
- **Type:** `string`
|
|
90
|
+
- **Type:** `string | string[]`
|
|
71
91
|
|
|
72
|
-
Defines the shell command to run for the task.
|
|
92
|
+
Defines the shell command to run for the task. The string is interpreted by a shell, so spaces, quoting, `&&`, pipes, and redirects all work as written on the command line.
|
|
73
93
|
|
|
74
|
-
```ts
|
|
94
|
+
```ts [vite.config.ts]
|
|
75
95
|
tasks: {
|
|
76
96
|
build: {
|
|
77
97
|
command: 'vp build',
|
|
@@ -79,18 +99,35 @@ tasks: {
|
|
|
79
99
|
}
|
|
80
100
|
```
|
|
81
101
|
|
|
102
|
+
An array runs each entry as its own command, sequentially, equivalent to joining them with `&&`. It is **not** a way to split one command into argv tokens — `['vp', 'build']` would try to run a command called `vp` with no arguments, then a command called `build`, instead of `vp build`.
|
|
103
|
+
|
|
104
|
+
```ts [vite.config.ts]
|
|
105
|
+
tasks: {
|
|
106
|
+
check: {
|
|
107
|
+
// Two commands, run in order
|
|
108
|
+
command: ['vp lint', 'vp build'],
|
|
109
|
+
},
|
|
110
|
+
bad: {
|
|
111
|
+
// Wrong: this is NOT `vp build`; it is `vp` followed by `build`
|
|
112
|
+
command: ['vp', 'build'],
|
|
113
|
+
},
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
82
117
|
Each task defined in `vite.config.ts` must include its own `command`. You cannot define a task in both `vite.config.ts` and `package.json` with the same task name.
|
|
83
118
|
|
|
84
|
-
Commands joined with `&&` are automatically split into independently cached sub-tasks. See [Compound Commands](/guide/run#compound-commands).
|
|
119
|
+
Commands joined with `&&` (or supplied as an array) are automatically split into independently cached sub-tasks. See [Compound Commands](/guide/run#compound-commands).
|
|
85
120
|
|
|
86
121
|
### `dependsOn`
|
|
87
122
|
|
|
88
|
-
- **Type:** `string
|
|
123
|
+
- **Type:** `Array<string | { task: string, from: DependsOnFrom }>`
|
|
89
124
|
- **Default:** `[]`
|
|
90
125
|
|
|
126
|
+
`from` accepts the dependency types `"dependencies"`, `"devDependencies"`, `"peerDependencies"`, or an array of those values, such as `["dependencies", "devDependencies"]`.
|
|
127
|
+
|
|
91
128
|
Tasks that must complete successfully before this one starts.
|
|
92
129
|
|
|
93
|
-
```ts
|
|
130
|
+
```ts [vite.config.ts]
|
|
94
131
|
tasks: {
|
|
95
132
|
deploy: {
|
|
96
133
|
command: 'deploy-script --prod',
|
|
@@ -101,10 +138,23 @@ tasks: {
|
|
|
101
138
|
|
|
102
139
|
Dependencies can reference tasks in other packages using the `package#task` format:
|
|
103
140
|
|
|
104
|
-
```ts
|
|
141
|
+
```ts [vite.config.ts]
|
|
105
142
|
dependsOn: ['@my/core#build', '@my/utils#lint'];
|
|
106
143
|
```
|
|
107
144
|
|
|
145
|
+
Use the object form `{ task: string, from: DependsOnFrom }` to reference tasks from all dependencies:
|
|
146
|
+
|
|
147
|
+
```ts [vite.config.ts]
|
|
148
|
+
tasks: {
|
|
149
|
+
test: {
|
|
150
|
+
command: 'vp test',
|
|
151
|
+
dependsOn: [{ task: 'build', from: ['dependencies', 'devDependencies'] }],
|
|
152
|
+
},
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
For the example above, Vite Task reads the declaring package's direct `dependencies` and `devDependencies`, and runs the `build` task in each dependency that defines one. Packages without `build` are skipped.
|
|
157
|
+
|
|
108
158
|
See [Task Dependencies](/guide/run#task-dependencies) for details on how explicit and topological dependencies interact.
|
|
109
159
|
|
|
110
160
|
### `cache`
|
|
@@ -114,7 +164,7 @@ See [Task Dependencies](/guide/run#task-dependencies) for details on how explici
|
|
|
114
164
|
|
|
115
165
|
Whether to cache this task's output. Set to `false` for tasks that should never be cached, like dev servers:
|
|
116
166
|
|
|
117
|
-
```ts
|
|
167
|
+
```ts [vite.config.ts]
|
|
118
168
|
tasks: {
|
|
119
169
|
dev: {
|
|
120
170
|
command: 'vp dev',
|
|
@@ -130,20 +180,22 @@ tasks: {
|
|
|
130
180
|
|
|
131
181
|
Environment variables included in the cache fingerprint. When any listed variable's value changes, the cache is invalidated.
|
|
132
182
|
|
|
133
|
-
```ts
|
|
183
|
+
```ts [vite.config.ts]
|
|
134
184
|
tasks: {
|
|
135
185
|
build: {
|
|
136
|
-
command: '
|
|
186
|
+
command: 'node build.mjs',
|
|
137
187
|
env: ['NODE_ENV'],
|
|
138
188
|
},
|
|
139
189
|
}
|
|
140
190
|
```
|
|
141
191
|
|
|
142
|
-
Wildcard patterns are supported: `VITE_*` matches all variables starting with `VITE_
|
|
192
|
+
Wildcard patterns and `!` exclusion patterns are supported: `VITE_*` matches all variables starting with `VITE_`, and `!VITE_SECRET` excludes the `VITE_SECRET` variable from the match.
|
|
193
|
+
|
|
194
|
+
For `vp build`, Vite reports Vite environment variables through [automatic tracking](/guide/automatic-data-tracking#cooperative-tracking). Do not add `VITE_*` or `NODE_ENV` here for a standard Vite build unless your project has extra build behavior Vite cannot report.
|
|
143
195
|
|
|
144
196
|
```bash
|
|
145
197
|
$ NODE_ENV=development vp run build # first run
|
|
146
|
-
$ NODE_ENV=production vp run build # cache miss:
|
|
198
|
+
$ NODE_ENV=production vp run build # cache miss: env 'NODE_ENV' changed
|
|
147
199
|
```
|
|
148
200
|
|
|
149
201
|
### `untrackedEnv`
|
|
@@ -153,32 +205,36 @@ $ NODE_ENV=production vp run build # cache miss: variable changed
|
|
|
153
205
|
|
|
154
206
|
Environment variables passed to the task process but **not** included in the cache fingerprint. Changing these values won't invalidate the cache.
|
|
155
207
|
|
|
156
|
-
```ts
|
|
208
|
+
```ts [vite.config.ts]
|
|
157
209
|
tasks: {
|
|
158
210
|
build: {
|
|
159
|
-
command: '
|
|
211
|
+
command: 'node build.mjs',
|
|
160
212
|
untrackedEnv: ['CI', 'GITHUB_ACTIONS'],
|
|
161
213
|
},
|
|
162
214
|
}
|
|
163
215
|
```
|
|
164
216
|
|
|
165
|
-
|
|
217
|
+
`untrackedEnv` accepts the same wildcard and `!` exclusion patterns as [`env`](#env).
|
|
218
|
+
|
|
219
|
+
Do not put a variable in `untrackedEnv` if its value changes the task result. If a cache-reporting tool covers the variable through [automatic tracking](/guide/automatic-data-tracking#cooperative-tracking), leave it out of both `env` and `untrackedEnv`.
|
|
220
|
+
|
|
221
|
+
Vite Task passes a set of common environment variables to all tasks:
|
|
166
222
|
|
|
167
223
|
- **System:** `HOME`, `USER`, `PATH`, `SHELL`, `LANG`, `TZ`
|
|
168
224
|
- **Node.js:** `NODE_OPTIONS`, `COREPACK_HOME`, `PNPM_HOME`
|
|
169
225
|
- **CI/CD:** `CI`, `VERCEL_*`, `NEXT_*`
|
|
170
|
-
- **Terminal:** `
|
|
226
|
+
- **Terminal:** Color variables (`FORCE_COLOR`, `NO_COLOR`, `COLORTERM`, `TERM`, `TERM_PROGRAM`) aren't passed to tasks unless you list them under `env` (the value gets fingerprinted, so changing it invalidates the cache) or `untrackedEnv` (passed without fingerprinting). If `FORCE_COLOR` isn't in either list, the child gets `FORCE_COLOR=1` so cached logs stay colored. Colors get stripped on display when the terminal can't render them.
|
|
171
227
|
|
|
172
228
|
### `input`
|
|
173
229
|
|
|
174
230
|
- **Type:** `Array<string | { auto: boolean } | { pattern: string, base: "workspace" | "package" }>`
|
|
175
231
|
- **Default:** `[{ auto: true }]` (auto-inferred)
|
|
176
232
|
|
|
177
|
-
Vite Task automatically detects which files
|
|
233
|
+
Vite Task automatically detects which files a command uses. See [Automatic Data Tracking](/guide/automatic-data-tracking) for the details and when to add manual config.
|
|
178
234
|
|
|
179
235
|
**Exclude files** from automatic tracking:
|
|
180
236
|
|
|
181
|
-
```ts
|
|
237
|
+
```ts [vite.config.ts]
|
|
182
238
|
tasks: {
|
|
183
239
|
build: {
|
|
184
240
|
command: 'vp build',
|
|
@@ -190,7 +246,7 @@ tasks: {
|
|
|
190
246
|
|
|
191
247
|
**Specify explicit files** only without automatic tracking:
|
|
192
248
|
|
|
193
|
-
```ts
|
|
249
|
+
```ts [vite.config.ts]
|
|
194
250
|
tasks: {
|
|
195
251
|
build: {
|
|
196
252
|
command: 'vp build',
|
|
@@ -201,7 +257,7 @@ tasks: {
|
|
|
201
257
|
|
|
202
258
|
**Resolve patterns relative to the workspace root** using the object form:
|
|
203
259
|
|
|
204
|
-
```ts
|
|
260
|
+
```ts [vite.config.ts]
|
|
205
261
|
tasks: {
|
|
206
262
|
build: {
|
|
207
263
|
command: 'vp build',
|
|
@@ -214,12 +270,13 @@ tasks: {
|
|
|
214
270
|
```
|
|
215
271
|
|
|
216
272
|
The `base` field is required and controls how the glob pattern is resolved:
|
|
273
|
+
|
|
217
274
|
- `"package"`: relative to the package directory
|
|
218
275
|
- `"workspace"`: relative to the workspace root
|
|
219
276
|
|
|
220
277
|
**Disable file tracking** entirely and cache only on command/env changes:
|
|
221
278
|
|
|
222
|
-
```ts
|
|
279
|
+
```ts [vite.config.ts]
|
|
223
280
|
tasks: {
|
|
224
281
|
greet: {
|
|
225
282
|
command: 'node greet.mjs',
|
|
@@ -232,6 +289,64 @@ tasks: {
|
|
|
232
289
|
String glob patterns are resolved relative to the package directory by default. Use the object form with `base: "workspace"` to resolve relative to the workspace root.
|
|
233
290
|
:::
|
|
234
291
|
|
|
292
|
+
### `output`
|
|
293
|
+
|
|
294
|
+
- **Type:** `Array<string | { auto: boolean } | { pattern: string, base: "workspace" | "package" }>`
|
|
295
|
+
- **Default:** automatic write tracking
|
|
296
|
+
|
|
297
|
+
Vite Task automatically archives files generated by a successful task run and restores them on a cache hit.
|
|
298
|
+
|
|
299
|
+
If you omit `output`, Vite Task uses automatic write tracking to choose those files. Add explicit `output` entries when you need to override which files are restored.
|
|
300
|
+
|
|
301
|
+
```ts [vite.config.ts]
|
|
302
|
+
tasks: {
|
|
303
|
+
build: {
|
|
304
|
+
command: 'node build.mjs',
|
|
305
|
+
output: ['dist/**', '!dist/cache/**'],
|
|
306
|
+
},
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Use `{ auto: true }` to keep automatic write tracking while adding explicit output globs.
|
|
311
|
+
|
|
312
|
+
This is useful when a task writes files that should not be restored from the cache. For example, exclude TypeScript `.tsbuildinfo` files:
|
|
313
|
+
|
|
314
|
+
```ts [vite.config.ts]
|
|
315
|
+
tasks: {
|
|
316
|
+
typecheck: {
|
|
317
|
+
command: 'tsc --build',
|
|
318
|
+
output: [{ auto: true }, '!*.tsbuildinfo'],
|
|
319
|
+
},
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
If a task writes outside its own package, use the object form with `base: "workspace"`:
|
|
324
|
+
|
|
325
|
+
```ts [vite.config.ts]
|
|
326
|
+
tasks: {
|
|
327
|
+
build: {
|
|
328
|
+
command: 'node build.mjs',
|
|
329
|
+
output: [
|
|
330
|
+
'dist/**',
|
|
331
|
+
{ pattern: 'shared-artifacts/**', base: 'workspace' },
|
|
332
|
+
],
|
|
333
|
+
},
|
|
334
|
+
}
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
Set `output: []` to disable output restoration for a cached task:
|
|
338
|
+
|
|
339
|
+
```ts [vite.config.ts]
|
|
340
|
+
tasks: {
|
|
341
|
+
report: {
|
|
342
|
+
command: 'node scripts/report.mjs',
|
|
343
|
+
output: [],
|
|
344
|
+
},
|
|
345
|
+
}
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
Unlike `cache: false`, `output: []` still lets Vite Task fingerprint the task. On a cache hit, Vite Task skips the command and replays its terminal output. Use this for local caches when the task's output files are already there and do not need to be restored.
|
|
349
|
+
|
|
235
350
|
### `cwd`
|
|
236
351
|
|
|
237
352
|
- **Type:** `string`
|
|
@@ -239,7 +354,7 @@ String glob patterns are resolved relative to the package directory by default.
|
|
|
239
354
|
|
|
240
355
|
Working directory for the task, relative to the package root.
|
|
241
356
|
|
|
242
|
-
```ts
|
|
357
|
+
```ts [vite.config.ts]
|
|
243
358
|
tasks: {
|
|
244
359
|
'test-e2e': {
|
|
245
360
|
command: 'vp test',
|