Skip to content

Commit 2cfd504

Browse files
committed
fix: align default untracked env patterns with Turborepo
1 parent 63f0733 commit 2cfd504

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

  • crates/vite_task_graph/src/config

crates/vite_task_graph/src/config/mod.rs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ impl ResolvedTaskConfig {
300300

301301
// Exact matches for common environment variables
302302
// Referenced from Turborepo's implementation:
303-
// https://github.com/vercel/turborepo/blob/26d309f073ca3ac054109ba0c29c7e230e7caac3/crates/turborepo-lib/src/task_hash.rs#L439
303+
// https://github.com/vercel/turborepo/blob/06ba8e2f7b8d7c7ff99edff7114e2584713e18c4/crates/turborepo-env/src/lib.rs#L20
304304
#[doc(hidden)] // exported for redacting snapshots in tests
305305
pub const DEFAULT_UNTRACKED_ENV: &[&str] = &[
306306
// System and shell
@@ -311,16 +311,22 @@ pub const DEFAULT_UNTRACKED_ENV: &[&str] = &[
311311
"SHELL",
312312
"PWD",
313313
"PATH",
314+
// Linux/X11 session
315+
"XDG_RUNTIME_DIR",
316+
"XAUTHORITY",
317+
"DBUS_SESSION_BUS_ADDRESS",
314318
// CI/CD environments
315319
"CI",
316320
// Node.js specific
317321
"NODE_OPTIONS",
318-
"COREPACK_HOME",
322+
"COREPACK_*",
319323
"NPM_CONFIG_STORE_DIR",
320324
"PNPM_HOME",
321325
// Library paths
322326
"LD_LIBRARY_PATH",
327+
"LD_PRELOAD",
323328
"DYLD_FALLBACK_LIBRARY_PATH",
329+
"DYLD_INSERT_LIBRARIES",
324330
"LIBPATH",
325331
// Terminal/display
326332
"COLORTERM",
@@ -338,6 +344,10 @@ pub const DEFAULT_UNTRACKED_ENV: &[&str] = &[
338344
"NEXT_*",
339345
"USE_OUTPUT_FOR_EDGE_FUNCTIONS",
340346
"NOW_BUILDER",
347+
"VC_MICROFRONTENDS_CONFIG_FILE_NAME",
348+
// GitHub Actions
349+
"GITHUB_*",
350+
"RUNNER_*",
341351
// Windows specific
342352
"APPDATA",
343353
"PROGRAMDATA",
@@ -346,6 +356,9 @@ pub const DEFAULT_UNTRACKED_ENV: &[&str] = &[
346356
"USERPROFILE",
347357
"HOMEDRIVE",
348358
"HOMEPATH",
359+
"WINDIR",
360+
"ProgramFiles",
361+
"ProgramFiles[(]x86[)]", // Parens escaped for glob syntax (Turborepo uses literal `ProgramFiles(x86)`)
349362
// IDE specific (exact matches)
350363
"ELECTRON_RUN_AS_NODE",
351364
"JB_INTERPRETER",

0 commit comments

Comments
 (0)