diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots.toml b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots.toml index 36a7ffbd..cfa7bbb7 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots.toml +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots.toml @@ -4,18 +4,14 @@ # - Files matching the glob trigger cache invalidation # - Files outside the glob do NOT trigger cache invalidation [[e2e]] -name = "positive globs only - cache hit on second run" +name = "positive globs only" steps = [ - # First run - cache miss "vp run positive-globs-only", - # Second run - cache hit + # Cache hit on second run "vp run positive-globs-only", -] - -[[e2e]] -name = "positive globs only - miss on matched file change" -steps = [ - # Initial run + # Modify a file that does NOT match the glob (test/ is outside src/) + "replace-file-content test/main.test.ts outside modified", + # Cache hit: file not in inputs "vp run positive-globs-only", # Modify a file that matches the glob "replace-file-content src/main.ts initial modified", @@ -23,17 +19,6 @@ steps = [ "vp run positive-globs-only", ] -[[e2e]] -name = "positive globs only - hit on unmatched file change" -steps = [ - # Initial run - "vp run positive-globs-only", - # Modify a file that does NOT match the glob (test/ is outside src/) - "replace-file-content test/main.test.ts outside modified", - # Cache hit: file not in inputs - "vp run positive-globs-only", -] - # 1b. Positive globs reads unmatched file: inputs: ["src/main.ts"], command reads src/utils.ts too # - File read by command but NOT matched by glob should NOT be fingerprinted # - This tests that inference is truly disabled when only explicit globs are used @@ -52,43 +37,24 @@ steps = [ # - Files matching positive but NOT negative trigger invalidation # - Files matching negative glob are excluded [[e2e]] -name = "positive negative globs - miss on non-excluded file" +name = "positive negative globs" steps = [ - # Initial run - "vp run positive-negative-globs", - # Modify a file that matches positive but NOT negative - "replace-file-content src/main.ts initial modified", - # Cache miss: file changed - "vp run positive-negative-globs", -] - -[[e2e]] -name = "positive negative globs - hit on excluded file" -steps = [ - # Initial run "vp run positive-negative-globs", # Modify a file that matches the negative glob (excluded) "replace-file-content src/main.test.ts main modified", # Cache hit: file excluded by negative glob "vp run positive-negative-globs", + # Modify a file that matches positive but NOT negative + "replace-file-content src/main.ts initial modified", + # Cache miss: file changed + "vp run positive-negative-globs", ] # 3. Auto only: inputs: [{ "auto": true }] # - Files read by the command trigger invalidation (fspy inference) # - Files NOT read by the command do NOT trigger invalidation [[e2e]] -name = "auto only - miss on inferred file change" -steps = [ - # Initial run - reads src/main.ts - "vp run auto-only", - # Modify the file that was read - "replace-file-content src/main.ts initial modified", - # Cache miss: inferred input changed - "vp run auto-only", -] - -[[e2e]] -name = "auto only - hit on non-inferred file change" +name = "auto only" steps = [ # Initial run - reads src/main.ts (NOT utils.ts) "vp run auto-only", @@ -96,13 +62,17 @@ steps = [ "replace-file-content src/utils.ts initial modified", # Cache hit: file not in inferred inputs "vp run auto-only", + # Modify the file that was read + "replace-file-content src/main.ts initial modified", + # Cache miss: inferred input changed + "vp run auto-only", ] # 4. Auto + negative: inputs: [{ "auto": true }, "!dist/**"] # - Inferred files are tracked, but negative globs filter them out # - Files in excluded directories don't trigger invalidation even if read [[e2e]] -name = "auto with negative - hit on excluded inferred file" +name = "auto with negative" steps = [ # Initial run - reads both src/main.ts and dist/output.js "vp run auto-with-negative", @@ -110,13 +80,6 @@ steps = [ "replace-file-content dist/output.js initial modified", # Cache hit: dist/ is excluded by negative glob "vp run auto-with-negative", -] - -[[e2e]] -name = "auto with negative - miss on non-excluded inferred file" -steps = [ - # Initial run - "vp run auto-with-negative", # Modify file NOT in excluded directory "replace-file-content src/main.ts initial modified", # Cache miss: inferred input changed @@ -129,7 +92,6 @@ steps = [ [[e2e]] name = "positive auto negative - miss on explicit glob file" steps = [ - # Initial run "vp run positive-auto-negative", # Modify explicit input file "replace-file-content package.json inputs-cache-test modified-pkg", @@ -138,46 +100,30 @@ steps = [ ] [[e2e]] -name = "positive auto negative - miss on inferred file" -steps = [ - # Initial run - "vp run positive-auto-negative", - # Modify inferred input file (read by command) - "replace-file-content src/main.ts initial modified", - # Cache miss: inferred input changed - "vp run positive-auto-negative", -] - -[[e2e]] -name = "positive auto negative - hit on excluded file" +name = "positive auto negative - hit on excluded then miss on inferred" steps = [ - # Initial run "vp run positive-auto-negative", # Modify file excluded by negative glob "replace-file-content src/main.test.ts main modified", # Cache hit: file excluded by negative glob "vp run positive-auto-negative", + # Modify inferred input file (read by command) + "replace-file-content src/main.ts initial modified", + # Cache miss: inferred input changed + "vp run positive-auto-negative", ] # 6. Empty inputs: inputs: [] # - No file changes affect the cache # - Only command/env changes trigger cache invalidation [[e2e]] -name = "empty inputs - hit despite file changes" +name = "empty inputs" steps = [ - # Initial run "vp run empty-inputs", # Modify any file - should NOT affect cache "replace-file-content src/main.ts initial modified", # Cache hit: no inputs configured "vp run empty-inputs", -] - -[[e2e]] -name = "empty inputs - miss on command change" -steps = [ - # Initial run - "vp run empty-inputs", # Change the command "json-edit vite-task.json \"_.tasks['empty-inputs'].command = 'print-file src/utils.ts'\"", # Cache miss: command changed @@ -188,15 +134,10 @@ steps = [ # - FSPY=1 is set when fspy is enabled (includes_auto is true) # - FSPY is NOT set when fspy is disabled (explicit globs only) [[e2e]] -name = "fspy env - set when auto inference enabled" +name = "fspy env" steps = [ # Run task with auto inference - should see FSPY=1 "vp run check-fspy-env-with-auto", -] - -[[e2e]] -name = "fspy env - not set when auto inference disabled" -steps = [ # Run task without auto inference - should see (undefined) "vp run check-fspy-env-without-auto", ] diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto only - miss on inferred file change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto only - miss on inferred file change.snap deleted file mode 100644 index 5ecaa950..00000000 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto only - miss on inferred file change.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- -> vp run auto-only -$ print-file src/main.ts -export const main = 'initial'; -> replace-file-content src/main.ts initial modified - -> vp run auto-only -$ print-file src/main.ts ✗ cache miss: 'src/main.ts' modified, executing -export const main = 'modified'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto only - hit on non-inferred file change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto only.snap similarity index 66% rename from crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto only - hit on non-inferred file change.snap rename to crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto only.snap index a524b6b4..6f8c3069 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto only - hit on non-inferred file change.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto only.snap @@ -13,3 +13,8 @@ export const main = 'initial'; --- [vp run] cache hit, saved. +> replace-file-content src/main.ts initial modified + +> vp run auto-only +$ print-file src/main.ts ✗ cache miss: 'src/main.ts' modified, executing +export const main = 'modified'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto with negative - miss on non-excluded inferred file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto with negative - miss on non-excluded inferred file.snap deleted file mode 100644 index e72332ad..00000000 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto with negative - miss on non-excluded inferred file.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- -> vp run auto-with-negative -$ print-file src/main.ts dist/output.js -export const main = 'initial'; -// initial output -> replace-file-content src/main.ts initial modified - -> vp run auto-with-negative -$ print-file src/main.ts dist/output.js ✗ cache miss: 'src/main.ts' modified, executing -export const main = 'modified'; -// initial output diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto with negative - hit on excluded inferred file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto with negative.snap similarity index 66% rename from crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto with negative - hit on excluded inferred file.snap rename to crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto with negative.snap index 68767f83..23431d9c 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto with negative - hit on excluded inferred file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/auto with negative.snap @@ -15,3 +15,9 @@ export const main = 'initial'; --- [vp run] cache hit, saved. +> replace-file-content src/main.ts initial modified + +> vp run auto-with-negative +$ print-file src/main.ts dist/output.js ✗ cache miss: 'src/main.ts' modified, executing +export const main = 'modified'; +// modified output diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/empty inputs - hit despite file changes.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/empty inputs - hit despite file changes.snap deleted file mode 100644 index 4cc5f6f2..00000000 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/empty inputs - hit despite file changes.snap +++ /dev/null @@ -1,15 +0,0 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- -> vp run empty-inputs -$ print-file src/main.ts -export const main = 'initial'; -> replace-file-content src/main.ts initial modified - -> vp run empty-inputs -$ print-file src/main.ts ✓ cache hit, replaying -export const main = 'initial'; - ---- -[vp run] cache hit, saved. diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/empty inputs - miss on command change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/empty inputs.snap similarity index 65% rename from crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/empty inputs - miss on command change.snap rename to crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/empty inputs.snap index 6ec2904b..858c1ccd 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/empty inputs - miss on command change.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/empty inputs.snap @@ -5,6 +5,14 @@ expression: e2e_outputs > vp run empty-inputs $ print-file src/main.ts export const main = 'initial'; +> replace-file-content src/main.ts initial modified + +> vp run empty-inputs +$ print-file src/main.ts ✓ cache hit, replaying +export const main = 'initial'; + +--- +[vp run] cache hit, saved. > json-edit vite-task.json "_.tasks['empty-inputs'].command = 'print-file src/utils.ts'" > vp run empty-inputs diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/fspy env - set when auto inference enabled.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/fspy env - set when auto inference enabled.snap deleted file mode 100644 index 5f42dce0..00000000 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/fspy env - set when auto inference enabled.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- -> vp run check-fspy-env-with-auto -$ print-env FSPY -1 diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/fspy env - not set when auto inference disabled.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/fspy env.snap similarity index 74% rename from crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/fspy env - not set when auto inference disabled.snap rename to crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/fspy env.snap index 2b726d21..c59cbf08 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/fspy env - not set when auto inference disabled.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/fspy env.snap @@ -2,6 +2,9 @@ source: crates/vite_task_bin/tests/e2e_snapshots/main.rs expression: e2e_outputs --- +> vp run check-fspy-env-with-auto +$ print-env FSPY +1 > vp run check-fspy-env-without-auto $ print-env FSPY (undefined) diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive auto negative - hit on excluded file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive auto negative - hit on excluded then miss on inferred.snap similarity index 66% rename from crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive auto negative - hit on excluded file.snap rename to crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive auto negative - hit on excluded then miss on inferred.snap index 9e245558..c020635b 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive auto negative - hit on excluded file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive auto negative - hit on excluded then miss on inferred.snap @@ -13,3 +13,8 @@ export const main = 'initial'; --- [vp run] cache hit, saved. +> replace-file-content src/main.ts initial modified + +> vp run positive-auto-negative +$ print-file src/main.ts ✗ cache miss: 'src/main.ts' modified, executing +export const main = 'modified'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive auto negative - miss on inferred file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive auto negative - miss on inferred file.snap deleted file mode 100644 index 1253d141..00000000 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive auto negative - miss on inferred file.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- -> vp run positive-auto-negative -$ print-file src/main.ts -export const main = 'initial'; -> replace-file-content src/main.ts initial modified - -> vp run positive-auto-negative -$ print-file src/main.ts ✗ cache miss: 'src/main.ts' modified, executing -export const main = 'modified'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive globs only - cache hit on second run.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive globs only - cache hit on second run.snap deleted file mode 100644 index b110416a..00000000 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive globs only - cache hit on second run.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- -> vp run positive-globs-only -$ print-file src/main.ts -export const main = 'initial'; -> vp run positive-globs-only -$ print-file src/main.ts ✓ cache hit, replaying -export const main = 'initial'; - ---- -[vp run] cache hit, saved. diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive globs only - miss on matched file change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive globs only - miss on matched file change.snap deleted file mode 100644 index 03d5e6c9..00000000 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive globs only - miss on matched file change.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- -> vp run positive-globs-only -$ print-file src/main.ts -export const main = 'initial'; -> replace-file-content src/main.ts initial modified - -> vp run positive-globs-only -$ print-file src/main.ts ✗ cache miss: 'src/main.ts' modified, executing -export const main = 'modified'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive globs only - hit on unmatched file change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive globs only.snap similarity index 53% rename from crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive globs only - hit on unmatched file change.snap rename to crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive globs only.snap index f257d2f1..de71ca53 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive globs only - hit on unmatched file change.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive globs only.snap @@ -5,6 +5,12 @@ expression: e2e_outputs > vp run positive-globs-only $ print-file src/main.ts export const main = 'initial'; +> vp run positive-globs-only +$ print-file src/main.ts ✓ cache hit, replaying +export const main = 'initial'; + +--- +[vp run] cache hit, saved. > replace-file-content test/main.test.ts outside modified > vp run positive-globs-only @@ -13,3 +19,8 @@ export const main = 'initial'; --- [vp run] cache hit, saved. +> replace-file-content src/main.ts initial modified + +> vp run positive-globs-only +$ print-file src/main.ts ✗ cache miss: 'src/main.ts' modified, executing +export const main = 'modified'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive negative globs - miss on non-excluded file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive negative globs - miss on non-excluded file.snap deleted file mode 100644 index fd3dbf3b..00000000 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive negative globs - miss on non-excluded file.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- -> vp run positive-negative-globs -$ print-file src/main.ts -export const main = 'initial'; -> replace-file-content src/main.ts initial modified - -> vp run positive-negative-globs -$ print-file src/main.ts ✗ cache miss: 'src/main.ts' modified, executing -export const main = 'modified'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive negative globs - hit on excluded file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive negative globs.snap similarity index 66% rename from crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive negative globs - hit on excluded file.snap rename to crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive negative globs.snap index 44f165f7..78694ee7 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive negative globs - hit on excluded file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-cache-test/snapshots/positive negative globs.snap @@ -13,3 +13,8 @@ export const main = 'initial'; --- [vp run] cache hit, saved. +> replace-file-content src/main.ts initial modified + +> vp run positive-negative-globs +$ print-file src/main.ts ✗ cache miss: 'src/main.ts' modified, executing +export const main = 'modified'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots.toml b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots.toml index 51bac65f..bc4a2cad 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots.toml +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots.toml @@ -7,7 +7,7 @@ # - dist/ should be excluded even though the package is a subpackage # - Modifying dist/output.js should be a cache hit [[e2e]] -name = "subpackage auto with negative - hit on excluded inferred file" +name = "subpackage auto with negative" steps = [ # First run - reads both src/main.ts and dist/output.js "vp run sub-pkg#auto-with-negative", @@ -15,13 +15,6 @@ steps = [ "replace-file-content packages/sub-pkg/dist/output.js initial modified", # Cache hit: dist/ is excluded by negative glob "vp run sub-pkg#auto-with-negative", -] - -[[e2e]] -name = "subpackage auto with negative - miss on non-excluded inferred file" -steps = [ - # First run - "vp run sub-pkg#auto-with-negative", # Modify file NOT in excluded directory "replace-file-content packages/sub-pkg/src/main.ts initial modified", # Cache miss: inferred input changed @@ -32,65 +25,47 @@ steps = [ # - Should find files in sibling package via .. # - Cache miss when sibling file changes, hit when unrelated file changes [[e2e]] -name = "dotdot positive glob - miss on sibling file change" -steps = [ - "vp run sub-pkg#dotdot-positive", - # Modify a file that matches ../shared/src/** - "replace-file-content packages/shared/src/utils.ts initial modified", - # Cache miss: matched file changed - "vp run sub-pkg#dotdot-positive", -] - -[[e2e]] -name = "dotdot positive glob - hit on unmatched file change" +name = "dotdot positive glob" steps = [ "vp run sub-pkg#dotdot-positive", # Modify a file NOT matched by ../shared/src/** "replace-file-content packages/shared/dist/output.js initial modified", # Cache hit: file not in inputs "vp run sub-pkg#dotdot-positive", + # Modify a file that matches ../shared/src/** + "replace-file-content packages/shared/src/utils.ts initial modified", + # Cache miss: matched file changed + "vp run sub-pkg#dotdot-positive", ] # .. prefix positive + negative globs: inputs: ["../shared/**", "!../shared/dist/**"] # - Positive glob matches sibling package files via .. # - Negative glob excludes sibling dist/ via .. [[e2e]] -name = "dotdot positive negative - miss on non-excluded sibling file" -steps = [ - "vp run sub-pkg#dotdot-positive-negative", - # Modify file matching positive but NOT negative - "replace-file-content packages/shared/src/utils.ts initial modified", - # Cache miss: file changed - "vp run sub-pkg#dotdot-positive-negative", -] - -[[e2e]] -name = "dotdot positive negative - hit on excluded sibling file" +name = "dotdot positive negative" steps = [ "vp run sub-pkg#dotdot-positive-negative", # Modify file in excluded sibling dist/ "replace-file-content packages/shared/dist/output.js initial modified", # Cache hit: excluded by !../shared/dist/** "vp run sub-pkg#dotdot-positive-negative", + # Modify file matching positive but NOT negative + "replace-file-content packages/shared/src/utils.ts initial modified", + # Cache miss: file changed + "vp run sub-pkg#dotdot-positive-negative", ] # .. prefix auto + negative: inputs: [{ "auto": true }, "!../shared/dist/**"] # - Auto-inferred files from sibling package are tracked # - Negative glob excludes sibling dist/ from inferred inputs [[e2e]] -name = "dotdot auto negative - hit on excluded sibling inferred file" +name = "dotdot auto negative" steps = [ "vp run sub-pkg#dotdot-auto-negative", # Modify file in excluded sibling dist/ "replace-file-content packages/shared/dist/output.js initial modified", # Cache hit: excluded by !../shared/dist/** "vp run sub-pkg#dotdot-auto-negative", -] - -[[e2e]] -name = "dotdot auto negative - miss on non-excluded sibling inferred file" -steps = [ - "vp run sub-pkg#dotdot-auto-negative", # Modify non-excluded sibling file "replace-file-content packages/shared/src/utils.ts initial modified", # Cache miss: inferred input changed diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot auto negative - miss on non-excluded sibling inferred file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot auto negative - miss on non-excluded sibling inferred file.snap deleted file mode 100644 index 83dcfc68..00000000 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot auto negative - miss on non-excluded sibling inferred file.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- -> vp run sub-pkg#dotdot-auto-negative -~/packages/sub-pkg$ print-file ../shared/src/utils.ts ../shared/dist/output.js -export const shared = 'initial'; -// initial output -> replace-file-content packages/shared/src/utils.ts initial modified - -> vp run sub-pkg#dotdot-auto-negative -~/packages/sub-pkg$ print-file ../shared/src/utils.ts ../shared/dist/output.js ✗ cache miss: 'packages/shared/src/utils.ts' modified, executing -export const shared = 'modified'; -// initial output diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot auto negative - hit on excluded sibling inferred file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot auto negative.snap similarity index 64% rename from crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot auto negative - hit on excluded sibling inferred file.snap rename to crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot auto negative.snap index 3a127e1f..19b53b98 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot auto negative - hit on excluded sibling inferred file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot auto negative.snap @@ -15,3 +15,9 @@ export const shared = 'initial'; --- [vp run] cache hit, saved. +> replace-file-content packages/shared/src/utils.ts initial modified + +> vp run sub-pkg#dotdot-auto-negative +~/packages/sub-pkg$ print-file ../shared/src/utils.ts ../shared/dist/output.js ✗ cache miss: 'packages/shared/src/utils.ts' modified, executing +export const shared = 'modified'; +// modified output diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive glob - miss on sibling file change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive glob - miss on sibling file change.snap deleted file mode 100644 index f10b8be5..00000000 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive glob - miss on sibling file change.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- -> vp run sub-pkg#dotdot-positive -~/packages/sub-pkg$ print-file ../shared/src/utils.ts -export const shared = 'initial'; -> replace-file-content packages/shared/src/utils.ts initial modified - -> vp run sub-pkg#dotdot-positive -~/packages/sub-pkg$ print-file ../shared/src/utils.ts ✗ cache miss: 'packages/shared/src/utils.ts' modified, executing -export const shared = 'modified'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive glob - hit on unmatched file change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive glob.snap similarity index 64% rename from crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive glob - hit on unmatched file change.snap rename to crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive glob.snap index 4f32efef..e4822c05 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive glob - hit on unmatched file change.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive glob.snap @@ -13,3 +13,8 @@ export const shared = 'initial'; --- [vp run] cache hit, saved. +> replace-file-content packages/shared/src/utils.ts initial modified + +> vp run sub-pkg#dotdot-positive +~/packages/sub-pkg$ print-file ../shared/src/utils.ts ✗ cache miss: 'packages/shared/src/utils.ts' modified, executing +export const shared = 'modified'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive negative - miss on non-excluded sibling file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive negative - miss on non-excluded sibling file.snap deleted file mode 100644 index 2838b48a..00000000 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive negative - miss on non-excluded sibling file.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- -> vp run sub-pkg#dotdot-positive-negative -~/packages/sub-pkg$ print-file ../shared/src/utils.ts ../shared/dist/output.js -export const shared = 'initial'; -// initial output -> replace-file-content packages/shared/src/utils.ts initial modified - -> vp run sub-pkg#dotdot-positive-negative -~/packages/sub-pkg$ print-file ../shared/src/utils.ts ../shared/dist/output.js ✗ cache miss: 'packages/shared/src/utils.ts' modified, executing -export const shared = 'modified'; -// initial output diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive negative - hit on excluded sibling file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive negative.snap similarity index 64% rename from crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive negative - hit on excluded sibling file.snap rename to crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive negative.snap index 08d6027c..af139c9d 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive negative - hit on excluded sibling file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/dotdot positive negative.snap @@ -15,3 +15,9 @@ export const shared = 'initial'; --- [vp run] cache hit, saved. +> replace-file-content packages/shared/src/utils.ts initial modified + +> vp run sub-pkg#dotdot-positive-negative +~/packages/sub-pkg$ print-file ../shared/src/utils.ts ../shared/dist/output.js ✗ cache miss: 'packages/shared/src/utils.ts' modified, executing +export const shared = 'modified'; +// modified output diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/subpackage auto with negative - miss on non-excluded inferred file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/subpackage auto with negative - miss on non-excluded inferred file.snap deleted file mode 100644 index 341b6a61..00000000 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/subpackage auto with negative - miss on non-excluded inferred file.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- -> vp run sub-pkg#auto-with-negative -~/packages/sub-pkg$ print-file src/main.ts dist/output.js -export const main = 'initial'; -// initial output -> replace-file-content packages/sub-pkg/src/main.ts initial modified - -> vp run sub-pkg#auto-with-negative -~/packages/sub-pkg$ print-file src/main.ts dist/output.js ✗ cache miss: 'packages/sub-pkg/src/main.ts' modified, executing -export const main = 'modified'; -// initial output diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/subpackage auto with negative - hit on excluded inferred file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/subpackage auto with negative.snap similarity index 64% rename from crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/subpackage auto with negative - hit on excluded inferred file.snap rename to crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/subpackage auto with negative.snap index d0dc00e6..581f9644 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/subpackage auto with negative - hit on excluded inferred file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/inputs-negative-glob-subpackage/snapshots/subpackage auto with negative.snap @@ -15,3 +15,9 @@ export const main = 'initial'; --- [vp run] cache hit, saved. +> replace-file-content packages/sub-pkg/src/main.ts initial modified + +> vp run sub-pkg#auto-with-negative +~/packages/sub-pkg$ print-file src/main.ts dist/output.js ✗ cache miss: 'packages/sub-pkg/src/main.ts' modified, executing +export const main = 'modified'; +// modified output