Skip to content

refactor(env): rename remaining Vite+ environment variables - #2312

Merged
fengmk2 merged 3 commits into
voidzero-dev:mainfrom
jong-kyung:refactor/rename-remaining-env-vars
Aug 4, 2026
Merged

refactor(env): rename remaining Vite+ environment variables#2312
fengmk2 merged 3 commits into
voidzero-dev:mainfrom
jong-kyung:refactor/rename-remaining-env-vars

Conversation

@jong-kyung

@jong-kyung jong-kyung commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

This follows up on #1166, which renamed VITE_PLUS_* environment variables to use the VP_* prefix. It applies the
same convention to the remaining Vite+-specific variables: VITE_LOG, VITE_GLOBAL_CLI_JS_SCRIPTS_DIR, and
VITE_UPDATE_TASK_TYPES, without retaining compatibility aliases.

Resolves #2206

@netlify

netlify Bot commented Aug 4, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 096bdab
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a7155a04559cf0008f24654

@jong-kyung jong-kyung self-assigned this Aug 4, 2026
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: f97c1b1368

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jong-kyung
jong-kyung marked this pull request as ready for review August 4, 2026 00:53
@jong-kyung
jong-kyung requested a review from fengmk2 August 4, 2026 00:53
@fengmk2

fengmk2 commented Aug 4, 2026

Copy link
Copy Markdown
Member

The VITE_UPDATE_TASK_TYPES environment variable doesn't seem to be used anywhere? I didn't see it being set anywhere.

@jong-kyung

Copy link
Copy Markdown
Collaborator Author

The VITE_UPDATE_TASK_TYPES environment variable doesn't seem to be used anywhere? I didn't see it being set anywhere.

It is read in packages/cli/binding/src/cli/mod.rs. I wasn't sure whether it should be renamed or removed, so I left it out of this PR and raised the question here.

#[test]
fn run_config_types_in_sync() {
// Remove \r for cross-platform consistency
let ts_type = UserRunConfig::TS_TYPE.replace('\r', "");
let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
let run_config_path = PathBuf::from(manifest_dir).join("../src/run-config.ts");
if std::env::var("VITE_UPDATE_TASK_TYPES").as_deref() == Ok("1") {
std::fs::write(&run_config_path, &ts_type).expect("Failed to write run-config.ts");
} else {
let current = std::fs::read_to_string(&run_config_path)
.expect("Failed to read run-config.ts")
.replace('\r', "");
pretty_assertions::assert_eq!(
current,
ts_type,
"run-config.ts is out of sync. Run `VITE_UPDATE_TASK_TYPES=1 cargo test -p vite-plus-cli run_config_types_in_sync` to update."
);
}
}
}

@fengmk2

fengmk2 commented Aug 4, 2026

Copy link
Copy Markdown
Member

It is read in packages/cli/binding/src/cli/mod.rs. I wasn't sure whether it should be renamed or removed, so I left it out of this PR and raised the question here.

Here, we are just reading VITE_UPDATE_TASK_TYPES, but it needs to be confirmed where it is set.

@jong-kyung

Copy link
Copy Markdown
Collaborator Author

I couldn't find anywhere in the repository that sets it either. It appears to be intended as a developer flag. Should we remove it? 🤔

@fengmk2

fengmk2 commented Aug 4, 2026

Copy link
Copy Markdown
Member

I couldn't find anywhere in the repository that sets it either. It appears to be intended as a developer flag. Should we remove it? 🤔

Sure, go ahead and delete it with a new PR.

cc @wan9chi

@jong-kyung

Copy link
Copy Markdown
Collaborator Author

Renamed VITE_UPDATE_TASK_TYPES to VP_UPDATE_TASK_TYPES while preserving the manual regeneration flow.
Context: #2315 (comment)

@jong-kyung
jong-kyung requested a review from wan9chi August 4, 2026 03:00
@fengmk2
fengmk2 merged commit fc71714 into voidzero-dev:main Aug 4, 2026
59 checks passed
@jong-kyung
jong-kyung deleted the refactor/rename-remaining-env-vars branch August 4, 2026 03:29
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.

Rename the remaining env vars that starts with VITE_

3 participants