Skip to content

feat: integrate vite-task runner-aware tools (auto output + tracked envs)#1774

Draft
wan9chi wants to merge 15 commits into
mainfrom
feat/vite-task-runner-tools
Draft

feat: integrate vite-task runner-aware tools (auto output + tracked envs)#1774
wan9chi wants to merge 15 commits into
mainfrom
feat/vite-task-runner-tools

Conversation

@wan9chi

@wan9chi wan9chi commented Jun 6, 2026

Copy link
Copy Markdown
Member

Integrates the runner-aware-tools work now available on vite-task/main: Vite reports its inputs/outputs/envs to the vp runner via @voidzero-dev/vite-task-client, so vp build no longer needs a hand-synthesized cache config. This enables auto output restoration and auto tracked envs through the runner protocol.

Changes

  • Bump vite-task git deps to 82ec12b2 (latest main): runner-aware IPC server/client + embedded napi addon, tracked env fingerprinting, automatic output tracking/restoration by default, per-schema-version cache directories, and prefix-env executable lookup fixes. Regenerate the napi binding (RunnerClient/load exports) and run-config.ts for the new task-config types (AutoTracking).
  • Point the vite behind vp build/vp dev to latest vitejs/vite (c13a37b53), which carries the vite-task-client integration. vite lists @voidzero-dev/vite-task-client in devDependencies, so it is bundled into vite's output, and therefore into @voidzero-dev/vite-plus-core, the same way as vite's other bundled deps (cac, esbuild, ...). No extra runtime dependency or build wiring is needed.
  • Remove vp build's synthetic cache config (env: ["VITE_*"], manual input excludes). The all-None EnabledCacheConfig keeps caching enabled with auto input/output inference; vite's ignoreInput/ignoreOutput/getEnv/getEnvs refine the fingerprint at runtime. vp dev stays disabled().
  • Docs: update cache/run docs for automatic output restoration by default and output: [] as the opt-out.
  • Snap tests: vp-build-auto-output-restoration (dist restored on cache hit without a synthetic output config) and vp-build-auto-tracked-env (a VITE_ env change invalidates the cache and names the changed env). Edge cases live in vite-task.

Notes

@netlify

netlify Bot commented Jun 6, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview ready!

Name Link
🔨 Latest commit 22f79af
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a3a348a76787700093756d5
😎 Deploy Preview https://deploy-preview-1774--viteplus-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@wan9chi wan9chi force-pushed the feat/vite-task-runner-tools branch from 83d8d81 to 6006f44 Compare June 6, 2026 19:11
@wan9chi wan9chi marked this pull request as ready for review June 6, 2026 19:21
@wan9chi wan9chi marked this pull request as draft June 7, 2026 00:39
@wan9chi wan9chi force-pushed the feat/vite-task-runner-tools branch 2 times, most recently from 2d380bf to a39a5d3 Compare June 7, 2026 01:22
@wan9chi wan9chi marked this pull request as ready for review June 7, 2026 01:29
@wan9chi wan9chi marked this pull request as draft June 7, 2026 01:30
@wan9chi wan9chi force-pushed the feat/vite-task-runner-tools branch 3 times, most recently from f3c2f78 to 0c7099a Compare June 7, 2026 02:38
@wan9chi wan9chi added the test: e2e Auto run e2e tests label Jun 7, 2026
@wan9chi wan9chi force-pushed the feat/vite-task-runner-tools branch from 0c7099a to 5285a43 Compare June 7, 2026 03:52
@socket-security

socket-security Bot commented Jun 7, 2026

Copy link
Copy Markdown

@wan9chi wan9chi force-pushed the feat/vite-task-runner-tools branch from baadc47 to 8f14d85 Compare June 8, 2026 02:13
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: b35d839

@wan9chi wan9chi force-pushed the feat/vite-task-runner-tools branch from 6c9f8bf to 88a28a4 Compare June 15, 2026 02:47
Comment thread packages/core/build.ts
Comment on lines 317 to 324
UserInputEntry::Auto(AutoInput { auto: true }),
UserInputEntry::Auto(AutoTracking { auto: true }),
exclude_glob("!node_modules/.vite-temp/**", InputBase::Workspace),
exclude_glob("!node_modules/.vite-temp/**", InputBase::Package),

@liangmiQwQ liangmiQwQ Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://discord.com/channels/1475973262193459293/1479410337223802951/1518498738413244446, these two lines which exclude .vite-temp config files could probably be safely removed, since the config files will be ignored automatically.

https://github.com/vitejs/vite/blob/403cc608e4e8633b0335f5e8221c83dfca4994f8/packages/vite/src/node/config.ts#L2652-L2655

wan9chi and others added 4 commits June 23, 2026 11:19
…nvs)

Vite reports its inputs/outputs/envs to the `vp` runner via
`@voidzero-dev/vite-task-client`, so `vp build` no longer needs a
hand-synthesized cache config.

- Bump vite-task git deps to c44d7c33 (runner-aware IPC server/client +
  embedded napi addon); regenerate run-config.ts for the new task-config types.
- Point the vite behind vp build/vp dev to latest vitejs/vite (c13a37b53),
  which carries the vite-task-client integration. vite lists vite-task-client
  in devDependencies, so it is bundled into vite's output (and thus into core)
  the same way as vite's other bundled deps (cac, esbuild, ...) — no extra
  dependency or build wiring needed.
- Work around an upstream vite dts bug (vitejs/vite#21863): `node/index.ts`
  re-exports `KnownQueryTypeMap` but the type is declared without `export`,
  which breaks downstream type bundling (`vp build` MISSING_EXPORT). core's
  build adds the missing `export` when copying vite's type defs.
- Remove vp build's synthetic cache config (env: [VITE_*], manual input
  excludes). All-None EnabledCacheConfig keeps caching enabled with auto
  input/output inference (output restoration); vp dev stays disabled.
- Snap tests: vp-build-auto-output-restoration, vp-build-auto-tracked-env.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Repoints the vite-task git deps to the tip of the split stack
(voidzero-dev/vite-task#431, the auto-output-track branch), whose crates
tree is identical to the prior pin plus the runner env-change message
refinement. Regenerates the two snapshots whose `VITE_*` cache-miss line
now renders as "envs changed" (matching manual env config) instead of
"tracked env glob 'VITE_*' changed".

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Picks up the cache-miss message refinement that now names the changed env
var. Regenerates the two snapshots whose `VITE_*` cache-miss line reads
`env 'VITE_MY_VAR' changed` / `env 'VITE_GREETING' changed` instead of the
generic `envs changed`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
wan9chi and others added 11 commits June 23, 2026 11:19
vite reports its transient bundled-config file under
node_modules/.vite-temp to the task runner at runtime (ignoreInput/
ignoreOutput via @voidzero-dev/vite-task-client, vitejs/vite#22453),
so the synthetic input excludes for pack/test/check are redundant.
Keeps the OXLINT_TSGOLINT_PATH env tracking, results.json, !dist/**,
and .vite/task-cache excludes unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Verify `vp run lint` and `vp run fmt` hit the cache on the second run.
The lint fixture gitignores node_modules so oxlint does not fingerprint
the runner's own node_modules/.vite/task-cache state; the fmt fixture
sets an fmt config to avoid the non-deterministic "No config found"
stderr-vs-stdout ordering.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@wan9chi wan9chi force-pushed the feat/vite-task-runner-tools branch from db35a29 to 22f79af Compare June 23, 2026 07:23
@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @typescript-eslint/eslint-plugin is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yamlnpm/typescript-eslint@8.61.1npm/@typescript-eslint/eslint-plugin@8.61.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript-eslint/eslint-plugin@8.61.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: e2e Auto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task cache: a build with outDir under a tracked dir (e.g. Laravel public/build) never caches — emptyOutDir delete-probe counted as a read

3 participants