From f42cd4d24c3c0dd32dfecd59d9b75716e0759f83 Mon Sep 17 00:00:00 2001 From: MK Date: Thu, 16 Apr 2026 15:07:37 +0800 Subject: [PATCH 1/2] test(snap): reproduce build failure on NTFS junction paths Windows-only snap test that builds a project reached through an NTFS junction prefix. Pre-populated snap.txt expects the post-fix success output, so CI surfaces the bug as a snap diff until it's fixed. Refs #1374 --- .../snap-tests/build-ntfs-junction/real/app/index.html | 8 ++++++++ .../snap-tests/build-ntfs-junction/real/app/package.json | 4 ++++ packages/cli/snap-tests/build-ntfs-junction/setup.js | 9 +++++++++ packages/cli/snap-tests/build-ntfs-junction/snap.txt | 2 ++ packages/cli/snap-tests/build-ntfs-junction/steps.json | 7 +++++++ 5 files changed, 30 insertions(+) create mode 100644 packages/cli/snap-tests/build-ntfs-junction/real/app/index.html create mode 100644 packages/cli/snap-tests/build-ntfs-junction/real/app/package.json create mode 100644 packages/cli/snap-tests/build-ntfs-junction/setup.js create mode 100644 packages/cli/snap-tests/build-ntfs-junction/snap.txt create mode 100644 packages/cli/snap-tests/build-ntfs-junction/steps.json diff --git a/packages/cli/snap-tests/build-ntfs-junction/real/app/index.html b/packages/cli/snap-tests/build-ntfs-junction/real/app/index.html new file mode 100644 index 0000000000..87354c62d3 --- /dev/null +++ b/packages/cli/snap-tests/build-ntfs-junction/real/app/index.html @@ -0,0 +1,8 @@ + + + + + + diff --git a/packages/cli/snap-tests/build-ntfs-junction/real/app/package.json b/packages/cli/snap-tests/build-ntfs-junction/real/app/package.json new file mode 100644 index 0000000000..7abb5d709c --- /dev/null +++ b/packages/cli/snap-tests/build-ntfs-junction/real/app/package.json @@ -0,0 +1,4 @@ +{ + "name": "ntfs-junction-app", + "private": true +} diff --git a/packages/cli/snap-tests/build-ntfs-junction/setup.js b/packages/cli/snap-tests/build-ntfs-junction/setup.js new file mode 100644 index 0000000000..b18356254c --- /dev/null +++ b/packages/cli/snap-tests/build-ntfs-junction/setup.js @@ -0,0 +1,9 @@ +const fs = require('node:fs'); +const path = require('node:path'); + +// Reproduce issue #1374: build fails when project root is reached through an NTFS junction. +// Layout after setup: +// ./real/app <- the actual project (real path) +// ./via <- NTFS junction pointing to ./real +// ./via/app <- the project reached through the junction +fs.symlinkSync(path.resolve('real'), path.resolve('via'), 'junction'); diff --git a/packages/cli/snap-tests/build-ntfs-junction/snap.txt b/packages/cli/snap-tests/build-ntfs-junction/snap.txt new file mode 100644 index 0000000000..9c0361892a --- /dev/null +++ b/packages/cli/snap-tests/build-ntfs-junction/snap.txt @@ -0,0 +1,2 @@ +> cd via/app && vp build 2>&1 | grep -E 'built in|vite:build-html' +✓ built in ms diff --git a/packages/cli/snap-tests/build-ntfs-junction/steps.json b/packages/cli/snap-tests/build-ntfs-junction/steps.json new file mode 100644 index 0000000000..e2b3f83e52 --- /dev/null +++ b/packages/cli/snap-tests/build-ntfs-junction/steps.json @@ -0,0 +1,7 @@ +{ + "ignoredPlatforms": ["darwin", "linux"], + "commands": [ + { "command": "node setup.js", "ignoreOutput": true }, + "cd via/app && vp build 2>&1 | grep -E 'built in|vite:build-html'" + ] +} From 18a2f68e46e5821e23e48321bbc04b278dbe11ad Mon Sep 17 00:00:00 2001 From: MK Date: Thu, 16 Apr 2026 15:45:42 +0800 Subject: [PATCH 2/2] test(snap): capture full vp build output for NTFS junction repro Drop the grep filter so the Windows CI snap diff shows the complete [plugin vite:build-html] failure from issue #1374. --- packages/cli/snap-tests/build-ntfs-junction/snap.txt | 4 ++-- packages/cli/snap-tests/build-ntfs-junction/steps.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/snap-tests/build-ntfs-junction/snap.txt b/packages/cli/snap-tests/build-ntfs-junction/snap.txt index 9c0361892a..f26da1a682 100644 --- a/packages/cli/snap-tests/build-ntfs-junction/snap.txt +++ b/packages/cli/snap-tests/build-ntfs-junction/snap.txt @@ -1,2 +1,2 @@ -> cd via/app && vp build 2>&1 | grep -E 'built in|vite:build-html' -✓ built in ms +> node setup.js +> cd via/app && vp build 2>&1 diff --git a/packages/cli/snap-tests/build-ntfs-junction/steps.json b/packages/cli/snap-tests/build-ntfs-junction/steps.json index e2b3f83e52..b0084b34c5 100644 --- a/packages/cli/snap-tests/build-ntfs-junction/steps.json +++ b/packages/cli/snap-tests/build-ntfs-junction/steps.json @@ -2,6 +2,6 @@ "ignoredPlatforms": ["darwin", "linux"], "commands": [ { "command": "node setup.js", "ignoreOutput": true }, - "cd via/app && vp build 2>&1 | grep -E 'built in|vite:build-html'" + "cd via/app && vp build 2>&1" ] }