-
Notifications
You must be signed in to change notification settings - Fork 245
refactor(env): remove the task type update flag #2315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -464,17 +464,9 @@ mod tests { | |
| 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." | ||
| ); | ||
| } | ||
| 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."); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When an upstream Useful? React with 👍 / 👎.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ^ This is the correct explanation of |
||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VITE_UPDATE_TASK_TYPESshould not be removed. It's supposed to be manually set for this test to update the config.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying. In that case, should we keep the manual update mode and rename the variable to
VP_UPDATE_TASK_TYPESinstead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please keep it.
VP_UPDATE_TASK_TYPESLGTM.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll close this PR and update #2312 with an additional commit that renames the variable to
VP_UPDATE_TASK_TYPES🙇♂️