这是indexloc提供的服务,不要输入任何密码
Skip to content

chore(turbo): swap VERCEL_ENV to VERCEL_TARGET_ENV #9718

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/turborepo-env/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use thiserror::Error;

pub mod platform;

const DEFAULT_ENV_VARS: &[&str] = ["VERCEL_ANALYTICS_ID", "VERCEL_ENV"].as_slice();
const DEFAULT_ENV_VARS: &[&str] = ["VERCEL_ANALYTICS_ID", "VERCEL_TARGET_ENV"].as_slice();

#[derive(Clone, Debug, Error)]
pub enum Error {
Expand Down Expand Up @@ -336,13 +336,13 @@ mod tests {
}
}

#[test_case(&[], &["VERCEL_ANALYTICS_ID", "VERCEL_ENV"] ; "defaults")]
#[test_case(&[], &["VERCEL_ANALYTICS_ID", "VERCEL_TARGET_ENV"] ; "defaults")]
#[test_case(&["!VERCEL*"], &[] ; "removing defaults")]
#[test_case(&["FOO*", "!FOOD"], &["FOO", "FOOBAR", "VERCEL_ANALYTICS_ID", "VERCEL_ENV"] ; "intersecting globs")]
#[test_case(&["FOO*", "!FOOD"], &["FOO", "FOOBAR", "VERCEL_ANALYTICS_ID", "VERCEL_TARGET_ENV"] ; "intersecting globs")]
fn test_global_env(inputs: &[&str], expected: &[&str]) {
let env_at_start = EnvironmentVariableMap(
vec![
("VERCEL_ENV", "prod"),
("VERCEL_TARGET_ENV", "prod"),
("VERCEL_ANALYTICS_ID", "1"),
("FOO", "bar"),
("FOOBAR", "baz"),
Expand Down
Loading