diff --git a/crates/turborepo-cache/src/async_cache.rs b/crates/turborepo-cache/src/async_cache.rs index 94c32a0ad8da6..c8961b173ec0b 100644 --- a/crates/turborepo-cache/src/async_cache.rs +++ b/crates/turborepo-cache/src/async_cache.rs @@ -272,12 +272,8 @@ mod tests { // Wait for async cache to process async_cache.wait().await.unwrap(); - let fs_cache_path = repo_root_path.join_components(&[ - "node_modules", - ".cache", - "turbo", - &format!("{}.tar.zst", hash), - ]); + let fs_cache_path = + repo_root_path.join_components(&[".turbo", "cache", &format!("{}.tar.zst", hash)]); // Confirm that fs cache file does *not* exist assert!(!fs_cache_path.exists()); @@ -360,12 +356,8 @@ mod tests { // Wait for async cache to process async_cache.wait().await.unwrap(); - let fs_cache_path = repo_root_path.join_components(&[ - "node_modules", - ".cache", - "turbo", - &format!("{}.tar.zst", hash), - ]); + let fs_cache_path = + repo_root_path.join_components(&[".turbo", "cache", &format!("{}.tar.zst", hash)]); // Confirm that fs cache file exists assert!(fs_cache_path.exists()); @@ -454,12 +446,8 @@ mod tests { // Wait for async cache to process async_cache.wait().await.unwrap(); - let fs_cache_path = repo_root_path.join_components(&[ - "node_modules", - ".cache", - "turbo", - &format!("{}.tar.zst", hash), - ]); + let fs_cache_path = + repo_root_path.join_components(&[".turbo", "cache", &format!("{}.tar.zst", hash)]); // Confirm that fs cache file exists assert!(fs_cache_path.exists()); diff --git a/crates/turborepo-cache/src/fs.rs b/crates/turborepo-cache/src/fs.rs index 629d337241451..a8a205ec5d783 100644 --- a/crates/turborepo-cache/src/fs.rs +++ b/crates/turborepo-cache/src/fs.rs @@ -37,7 +37,7 @@ impl FSCache { if let Some(override_dir) = override_dir { AbsoluteSystemPathBuf::from_unknown(repo_root, override_dir) } else { - repo_root.join_components(&["node_modules", ".cache", "turbo"]) + repo_root.join_components(&[".turbo", "cache"]) } } diff --git a/turborepo-tests/integration/tests/run-caching/cache-state.t b/turborepo-tests/integration/tests/run-caching/cache-state.t index 6c441317fa974..fbe40396cdcdd 100644 --- a/turborepo-tests/integration/tests/run-caching/cache-state.t +++ b/turborepo-tests/integration/tests/run-caching/cache-state.t @@ -17,7 +17,7 @@ Do a dry run so we can see the state of the cache Get the hash of the my-app#build task, so we can inspect the cache $ HASH=$(cat dry.json | jq -r '.tasks | map(select(.taskId == "my-app#build")) | .[0].hash') - $ duration=$(cat "node_modules/.cache/turbo/$HASH-meta.json" | jq .duration) + $ duration=$(cat ".turbo/cache/$HASH-meta.json" | jq .duration) check that it exists $ echo $duration [0-9]+ (re) diff --git a/turborepo-tests/integration/tests/workspace-configs/add-keys.t b/turborepo-tests/integration/tests/workspace-configs/add-keys.t index 2781e27a04dc5..a7ac4495913e0 100644 --- a/turborepo-tests/integration/tests/workspace-configs/add-keys.t +++ b/turborepo-tests/integration/tests/workspace-configs/add-keys.t @@ -31,7 +31,7 @@ Setup Time:\s*[\.0-9]+m?s (re) $ HASH=$(cat tmp.log | grep -E "add-keys:add-keys-task.* executing .*" | awk '{print $5}') - $ tar -tf $TARGET_DIR/node_modules/.cache/turbo/$HASH.tar.zst; + $ tar -tf $TARGET_DIR/.turbo/cache/$HASH.tar.zst; apps/add-keys/.turbo/turbo-add-keys-task.log apps/add-keys/out/ apps/add-keys/out/.keep diff --git a/turborepo-tests/integration/tests/workspace-configs/cache.t b/turborepo-tests/integration/tests/workspace-configs/cache.t index 22076afe2135f..4fdc1a837d28f 100644 --- a/turborepo-tests/integration/tests/workspace-configs/cache.t +++ b/turborepo-tests/integration/tests/workspace-configs/cache.t @@ -26,7 +26,7 @@ This test covers: $ HASH=$(cat tmp.log | grep -E "cached:cached-task-1.* executing .*" | awk '{print $5}') $ echo $HASH [a-z0-9]{16} (re) - $ tar -tf $TARGET_DIR/node_modules/.cache/turbo/$HASH.tar.zst; + $ tar -tf $TARGET_DIR/.turbo/cache/$HASH.tar.zst; apps/cached/.turbo/turbo-cached-task-1.log apps/cached/out/ apps/cached/out/.keep @@ -51,7 +51,7 @@ This test covers: $ HASH=$(cat tmp.log | grep -E "cached:cached-task-2.* executing .*" | awk '{print $6}') $ echo $HASH [a-z0-9]{16} (re) - $ test -f $TARGET_DIR/node_modules/.cache/turbo/$HASH.tar.zst; + $ test -f $TARGET_DIR/.turbo/cache/$HASH.tar.zst; [1] no `cache` config in root, cache:false in workspace @@ -73,7 +73,7 @@ no `cache` config in root, cache:false in workspace $ HASH=$(cat tmp.log | grep -E "cached:cached-task-3.* executing .*" | awk '{print $6}') $ echo $HASH [a-z0-9]{16} (re) - $ test -f $TARGET_DIR/node_modules/.cache/turbo/$HASH.tar.zst; + $ test -f $TARGET_DIR/.turbo/cache/$HASH.tar.zst; [1] cache:false in root, no turbo.json in workspace. @@ -97,5 +97,5 @@ we already have a workspace that doesn't have a config $ HASH=$(cat tmp.log | grep -E "missing-workspace-config:cached-task-4.* executing .*" | awk '{print $6}') $ echo $HASH [a-z0-9]{16} (re) - $ test -f $TARGET_DIR/node_modules/.cache/turbo/$HASH.tar.zst; + $ test -f $TARGET_DIR/.turbo/cache/$HASH.tar.zst; [1] diff --git a/turborepo-tests/integration/tests/workspace-configs/missing-workspace-config.t b/turborepo-tests/integration/tests/workspace-configs/missing-workspace-config.t index c4cbae18966ac..b5ae828184324 100644 --- a/turborepo-tests/integration/tests/workspace-configs/missing-workspace-config.t +++ b/turborepo-tests/integration/tests/workspace-configs/missing-workspace-config.t @@ -22,7 +22,7 @@ Setup Time:\s*[\.0-9]+m?s (re) $ HASH=$(cat tmp.log | grep -E "missing-workspace-config:missing-workspace-config-task.* executing .*" | awk '{print $5}') - $ tar -tf $TARGET_DIR/node_modules/.cache/turbo/$HASH.tar.zst; + $ tar -tf $TARGET_DIR/.turbo/cache/$HASH.tar.zst; apps/missing-workspace-config/.turbo/turbo-missing-workspace-config-task.log apps/missing-workspace-config/out/ apps/missing-workspace-config/out/.keep @@ -102,5 +102,5 @@ Setup $ HASH=$(cat tmp.log | grep -E "missing-workspace-config:cached-task-4.* executing .*" | awk '{print $6}') $ echo $HASH [a-z0-9]{16} (re) - $ test -f $TARGET_DIR/node_modules/.cache/turbo/$HASH.tar.zst; + $ test -f $TARGET_DIR/.turbo/cache/$HASH.tar.zst; [1] diff --git a/turborepo-tests/integration/tests/workspace-configs/omit-keys-deps.t b/turborepo-tests/integration/tests/workspace-configs/omit-keys-deps.t index c229c3bc5a125..d44e5307fa1c0 100644 --- a/turborepo-tests/integration/tests/workspace-configs/omit-keys-deps.t +++ b/turborepo-tests/integration/tests/workspace-configs/omit-keys-deps.t @@ -43,7 +43,7 @@ Setup Time:\s*[\.0-9]+m?s (re) $ HASH=$(cat tmp.log | grep -E "omit-keys:omit-keys-task-with-deps.* executing .*" | awk '{print $5}') - $ tar -tf $TARGET_DIR/node_modules/.cache/turbo/$HASH.tar.zst; + $ tar -tf $TARGET_DIR/.turbo/cache/$HASH.tar.zst; apps/omit-keys/.turbo/turbo-omit-keys-task-with-deps.log apps/omit-keys/out/ apps/omit-keys/out/.keep diff --git a/turborepo-tests/integration/tests/workspace-configs/omit-keys.t b/turborepo-tests/integration/tests/workspace-configs/omit-keys.t index 939676a78a083..d5d50a159713a 100644 --- a/turborepo-tests/integration/tests/workspace-configs/omit-keys.t +++ b/turborepo-tests/integration/tests/workspace-configs/omit-keys.t @@ -25,7 +25,7 @@ Setup Time:\s*[\.0-9]+m?s (re) $ HASH=$(cat tmp.log | grep -E "omit-keys:omit-keys-task.* executing .*" | awk '{print $5}') - $ tar -tf $TARGET_DIR/node_modules/.cache/turbo/$HASH.tar.zst; + $ tar -tf $TARGET_DIR/.turbo/cache/$HASH.tar.zst; apps/omit-keys/.turbo/turbo-omit-keys-task.log apps/omit-keys/out/ apps/omit-keys/out/.keep diff --git a/turborepo-tests/integration/tests/workspace-configs/override-values.t b/turborepo-tests/integration/tests/workspace-configs/override-values.t index 3388bb7ed1e30..f244e0475a958 100644 --- a/turborepo-tests/integration/tests/workspace-configs/override-values.t +++ b/turborepo-tests/integration/tests/workspace-configs/override-values.t @@ -22,7 +22,7 @@ Setup Time:\s*[\.0-9]+m?s (re) $ HASH=$(cat tmp.log | grep -E "override-values:override-values-task.* executing .*" | awk '{print $5}') - $ tar -tf $TARGET_DIR/node_modules/.cache/turbo/$HASH.tar.zst; + $ tar -tf $TARGET_DIR/.turbo/cache/$HASH.tar.zst; apps/override-values/.turbo/turbo-override-values-task.log apps/override-values/lib/ apps/override-values/lib/.keep