Skip to content

feat: add VP_* to DEFAULT_UNTRACKED_ENV#297

Merged
fengmk2 merged 1 commit intovoidzero-dev:mainfrom
jong-kyung:refactor/add-vp-to-default-untracked-env
Mar 26, 2026
Merged

feat: add VP_* to DEFAULT_UNTRACKED_ENV#297
fengmk2 merged 1 commit intovoidzero-dev:mainfrom
jong-kyung:refactor/add-vp-to-default-untracked-env

Conversation

@jong-kyung
Copy link
Copy Markdown
Contributor

Summary

  • Add VP_* pattern to DEFAULT_UNTRACKED_ENV so that Vite+ internal environment variables (e.g. VP_HOME, VP_VERSION) are passed through to child processes without affecting cache keys.

Context

This is a prerequisite for voidzero-dev/vite-plus#1074, which renames all VITE_PLUS_* env vars to VP_* to avoid leaking internal vars through Vite's envPrefix (default VITE_).

After the rename, VP_* vars no longer match the VITE_* fingerprinted env pattern set by vp build. Without this change, VP_VERSION (and other internal state vars) would be filtered out by EnvFingerprints::resolve() and not reach child processes.

VP_* belongs in untracked_env (not fingerprinted_envs) because these are internal runtime state variables that should not affect cache keys.

@jong-kyung jong-kyung force-pushed the refactor/add-vp-to-default-untracked-env branch from 558de2f to cc66d1a Compare March 26, 2026 11:21
@fengmk2 fengmk2 requested a review from branchseer March 26, 2026 12:21
@fengmk2 fengmk2 merged commit 26c1892 into voidzero-dev:main Mar 26, 2026
9 checks passed
fengmk2 added a commit to voidzero-dev/vite-plus that referenced this pull request Mar 27, 2026
## Summary

- Bump vite-task git dependency from `2663222` to `26c1892` (includes
[voidzero-dev/vite-task#297](voidzero-dev/vite-task#297))
- Add `tokio-util` dependency and pass `CancellationToken` to
`fspy::Command::spawn()` to adapt to the updated API

Co-authored-by: MK (fengmk2) <fengmk2@gmail.com>
fengmk2 pushed a commit to voidzero-dev/vite-plus that referenced this pull request Mar 29, 2026
## Summary

Closes #1074

Rename all internal `VITE_PLUS_*` environment variables to `VP_*` prefix
to avoid Vite's default `envPrefix: "VITE_"` from exposing them in
bundled applications via `import.meta.env`.

- Rename 25 env vars across Rust, TypeScript, shell scripts, CI
workflows, and snap tests
- Rename Rust constant identifiers and `get_vite_plus_home()` →
`get_vp_home()` to match
- Update all code comments and user-facing docs (`docs/guide/env.md`)
- Env vars **not** renamed: `VITE_LOG`, `VITE_NODE_DIST_MIRROR`,
`VITE_UPDATE_TASK_TYPES`, `VITE_GLOBAL_CLI_JS_SCRIPTS_DIR` — these use
the `VITE_` prefix (not `VITE_PLUS_`) and are intentionally kept

### Prerequisite (merged)

- vite-task:
[voidzero-dev/vite-task#297](voidzero-dev/vite-task#297)
— Add `VP_*` to `DEFAULT_UNTRACKED_ENV` so internal vars pass through to
child processes without affecting cache keys
otoneko1102 pushed a commit to otoneko1102/viteplus-ja that referenced this pull request Mar 30, 2026
## Summary

Closes #1074

Rename all internal `VITE_PLUS_*` environment variables to `VP_*` prefix
to avoid Vite's default `envPrefix: "VITE_"` from exposing them in
bundled applications via `import.meta.env`.

- Rename 25 env vars across Rust, TypeScript, shell scripts, CI
workflows, and snap tests
- Rename Rust constant identifiers and `get_vite_plus_home()` →
`get_vp_home()` to match
- Update all code comments and user-facing docs (`docs/guide/env.md`)
- Env vars **not** renamed: `VITE_LOG`, `VITE_NODE_DIST_MIRROR`,
`VITE_UPDATE_TASK_TYPES`, `VITE_GLOBAL_CLI_JS_SCRIPTS_DIR` — these use
the `VITE_` prefix (not `VITE_PLUS_`) and are intentionally kept

### Prerequisite (merged)

- vite-task:
[voidzero-dev/vite-task#297](voidzero-dev/vite-task#297)
— Add `VP_*` to `DEFAULT_UNTRACKED_ENV` so internal vars pass through to
child processes without affecting cache keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants