From 29c9a98b2c0100993331f4ba8aafd4787cc8364c Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Fri, 10 Jul 2026 14:06:03 +0000 Subject: [PATCH] test(snapshots): remove the parked snap-tests-todo tree (#2145) The three cases (command-pack-watch-restart, exit-non-zero-on-cmd-not-exists, pnpm-install-with-options) were parked outside every runner: nothing in the repo references the directory and no CI job executes it. The PTY suite already covers install-with-options flows per package manager and command-not-found exits; recover the watch-restart case from history if it becomes automatable. Part of #2116. --- .../command-pack-watch-restart/kill-watch.sh | 9 ---- .../command-pack-watch-restart/package.json | 5 -- .../command-pack-watch-restart/run-watch.sh | 4 -- .../command-pack-watch-restart/snap.txt | 17 ------- .../command-pack-watch-restart/src/index.ts | 3 -- .../command-pack-watch-restart/steps.json | 16 ------ .../command-pack-watch-restart/vite.config.ts | 6 --- .../wait-for-dist.sh | 11 ----- .../wait-for-dist2.sh | 15 ------ .../package.json | 1 - .../exit-non-zero-on-cmd-not-exists/snap.txt | 7 --- .../steps.json | 4 -- .../pnpm-install-with-options/package.json | 12 ----- .../pnpm-install-with-options/snap.txt | 49 ------------------- .../pnpm-install-with-options/steps.json | 9 ---- 15 files changed, 168 deletions(-) delete mode 100644 packages/cli/snap-tests-todo/command-pack-watch-restart/kill-watch.sh delete mode 100644 packages/cli/snap-tests-todo/command-pack-watch-restart/package.json delete mode 100644 packages/cli/snap-tests-todo/command-pack-watch-restart/run-watch.sh delete mode 100644 packages/cli/snap-tests-todo/command-pack-watch-restart/snap.txt delete mode 100644 packages/cli/snap-tests-todo/command-pack-watch-restart/src/index.ts delete mode 100644 packages/cli/snap-tests-todo/command-pack-watch-restart/steps.json delete mode 100644 packages/cli/snap-tests-todo/command-pack-watch-restart/vite.config.ts delete mode 100644 packages/cli/snap-tests-todo/command-pack-watch-restart/wait-for-dist.sh delete mode 100644 packages/cli/snap-tests-todo/command-pack-watch-restart/wait-for-dist2.sh delete mode 100644 packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/package.json delete mode 100644 packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/snap.txt delete mode 100644 packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/steps.json delete mode 100644 packages/cli/snap-tests-todo/pnpm-install-with-options/package.json delete mode 100644 packages/cli/snap-tests-todo/pnpm-install-with-options/snap.txt delete mode 100644 packages/cli/snap-tests-todo/pnpm-install-with-options/steps.json diff --git a/packages/cli/snap-tests-todo/command-pack-watch-restart/kill-watch.sh b/packages/cli/snap-tests-todo/command-pack-watch-restart/kill-watch.sh deleted file mode 100644 index 3b7ee9f3a9..0000000000 --- a/packages/cli/snap-tests-todo/command-pack-watch-restart/kill-watch.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# Kill children processes first, then the parent -if [ -f .pid ]; then - PID=$(cat .pid) - # Kill all child processes of the parent PID - pkill -P $PID 2>/dev/null || true - # Then kill the parent process - kill $PID 2>/dev/null || true -fi diff --git a/packages/cli/snap-tests-todo/command-pack-watch-restart/package.json b/packages/cli/snap-tests-todo/command-pack-watch-restart/package.json deleted file mode 100644 index d07a69ac57..0000000000 --- a/packages/cli/snap-tests-todo/command-pack-watch-restart/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "command-pack-watch-restart", - "version": "1.0.0", - "type": "module" -} diff --git a/packages/cli/snap-tests-todo/command-pack-watch-restart/run-watch.sh b/packages/cli/snap-tests-todo/command-pack-watch-restart/run-watch.sh deleted file mode 100644 index 052cd3985d..0000000000 --- a/packages/cli/snap-tests-todo/command-pack-watch-restart/run-watch.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -# Start vp pack watch in background, redirect output to file, and save PID -vp pack --watch > .watch-output.log 2>&1 & -echo $! > .pid diff --git a/packages/cli/snap-tests-todo/command-pack-watch-restart/snap.txt b/packages/cli/snap-tests-todo/command-pack-watch-restart/snap.txt deleted file mode 100644 index 2bfe8bf166..0000000000 --- a/packages/cli/snap-tests-todo/command-pack-watch-restart/snap.txt +++ /dev/null @@ -1,17 +0,0 @@ -> bash run-watch.sh -> bash wait-for-dist.sh # wait for initial build -dist found - -> ls dist # should have initial build -index.mjs - -> sed -i.bak "s/outDir: 'dist'/outDir: 'dist2'/" vite.config.ts -> bash wait-for-dist2.sh # wait for rebuild with new config -dist2 found - -> ls dist2 # should have rebuild with new outDir after config change -index.mjs - -> grep 'Reload config' .watch-output.log # verify restart was triggered -ℹ Reload config: /vite.config.ts, restarting... -ℹ Reload config: /vite.config.ts, restarting... diff --git a/packages/cli/snap-tests-todo/command-pack-watch-restart/src/index.ts b/packages/cli/snap-tests-todo/command-pack-watch-restart/src/index.ts deleted file mode 100644 index a9fac1eb7c..0000000000 --- a/packages/cli/snap-tests-todo/command-pack-watch-restart/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function hello() { - console.log('Hello!'); -} diff --git a/packages/cli/snap-tests-todo/command-pack-watch-restart/steps.json b/packages/cli/snap-tests-todo/command-pack-watch-restart/steps.json deleted file mode 100644 index 1a0642130c..0000000000 --- a/packages/cli/snap-tests-todo/command-pack-watch-restart/steps.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "ignoredPlatforms": ["win32"], - "commands": [ - "bash run-watch.sh", - "bash wait-for-dist.sh # wait for initial build", - "ls dist # should have initial build", - "sed -i.bak \"s/outDir: 'dist'/outDir: 'dist2'/\" vite.config.ts", - { - "command": "bash wait-for-dist2.sh # wait for rebuild with new config", - "timeout": 50000 - }, - "ls dist2 # should have rebuild with new outDir after config change", - "grep 'Reload config' .watch-output.log # verify restart was triggered" - ], - "after": ["bash kill-watch.sh"] -} diff --git a/packages/cli/snap-tests-todo/command-pack-watch-restart/vite.config.ts b/packages/cli/snap-tests-todo/command-pack-watch-restart/vite.config.ts deleted file mode 100644 index cb08aa6964..0000000000 --- a/packages/cli/snap-tests-todo/command-pack-watch-restart/vite.config.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - pack: { - entry: 'src/index.ts', - outDir: 'dist', - }, -}; diff --git a/packages/cli/snap-tests-todo/command-pack-watch-restart/wait-for-dist.sh b/packages/cli/snap-tests-todo/command-pack-watch-restart/wait-for-dist.sh deleted file mode 100644 index 5a84b03a38..0000000000 --- a/packages/cli/snap-tests-todo/command-pack-watch-restart/wait-for-dist.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# Wait for dist directory to appear (max 10 seconds) -for i in {1..20}; do - if [ -d "dist" ]; then - echo "dist found" - exit 0 - fi - sleep 0.5 -done -echo "dist not found after 10 seconds" -exit 1 diff --git a/packages/cli/snap-tests-todo/command-pack-watch-restart/wait-for-dist2.sh b/packages/cli/snap-tests-todo/command-pack-watch-restart/wait-for-dist2.sh deleted file mode 100644 index fe98399491..0000000000 --- a/packages/cli/snap-tests-todo/command-pack-watch-restart/wait-for-dist2.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# Wait for dist2 directory to appear (max 40 seconds) -# Rolldown notify polling interval default is 30s -# https://github.com/rolldown/rolldown/blob/097316fb273a697d59b5b6f40d0cb30f30eb4296/packages/rolldown/src/options/input-options.ts#L78 -for i in {1..80}; do - if [ -d "dist2" ]; then - echo "dist2 found" - exit 0 - fi - sleep 0.5 -done -echo "dist2 not found after 40 seconds" -echo "=== .watch-output.log ===" -cat .watch-output.log 2>/dev/null || echo "(no log file)" -exit 1 diff --git a/packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/package.json b/packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/package.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/snap.txt b/packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/snap.txt deleted file mode 100644 index 3d842f10da..0000000000 --- a/packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/snap.txt +++ /dev/null @@ -1,7 +0,0 @@ -[2]> vite command-not-exists # should exit with non-zero code -error: 'vite' requires a subcommand but one was not provided - [subcommands: run, lint, fmt, build, test, lib, dev, doc, cache, install, i, add, remove, rm, un, uninstall, update, up, dedupe, outdated, why, explain, link, ln, unlink, pm, help] - -Usage: vite [OPTIONS] [TASK] [-- ...] - -For more information, try '--help'. diff --git a/packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/steps.json b/packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/steps.json deleted file mode 100644 index 6d8f62d58c..0000000000 --- a/packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/steps.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "ignoredPlatforms": ["win32"], - "commands": ["vite command-not-exists # should exit with non-zero code"] -} diff --git a/packages/cli/snap-tests-todo/pnpm-install-with-options/package.json b/packages/cli/snap-tests-todo/pnpm-install-with-options/package.json deleted file mode 100644 index abbba1759f..0000000000 --- a/packages/cli/snap-tests-todo/pnpm-install-with-options/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "pnpm-install-with-options", - "version": "1.0.0", - "private": true, - "dependencies": { - "tslib": "2.8.1" - }, - "devDependencies": { - "oxlint": "latest" - }, - "packageManager": "pnpm@10.15.1" -} diff --git a/packages/cli/snap-tests-todo/pnpm-install-with-options/snap.txt b/packages/cli/snap-tests-todo/pnpm-install-with-options/snap.txt deleted file mode 100644 index 897fb0b9e8..0000000000 --- a/packages/cli/snap-tests-todo/pnpm-install-with-options/snap.txt +++ /dev/null @@ -1,49 +0,0 @@ -> vp install --help | head -n 20 # print help message -Version (compiled to binary; bundled Node.js v) -Usage: pnpm install [options] - -Alias: i - -Installs all dependencies of the project in the current working directory. When executed inside a workspace, installs all dependencies of all projects. - -Options: - --[no-]color Controls colors in the output. By - default, output is always colored when - it goes directly to a terminal - --[no-]frozen-lockfile Don't generate a lockfile and fail if an - update is needed. This setting is on by - default in CI environments, so use - --no-frozen-lockfile if you need to - disable it for some reason - --[no-]verify-store-integrity If false, doesn't check whether packages - in the store were mutated - --aggregate-output Aggregate output from child processes - -> vp install --prod # https://pnpm.io/cli/install#--prod--p -Packages: + -+ -Progress: resolved , reused , downloaded , added , done - -dependencies: -+ tslib - -devDependencies: skipped - -Done in ms using pnpm v - - -> ls node_modules -tslib - -> vp install --prod # install again hit cache -✓ cache hit, replaying -Packages: + -+ -Progress: resolved , reused , downloaded , added , done - -dependencies: -+ tslib - -devDependencies: skipped - -Done in ms using pnpm v diff --git a/packages/cli/snap-tests-todo/pnpm-install-with-options/steps.json b/packages/cli/snap-tests-todo/pnpm-install-with-options/steps.json deleted file mode 100644 index c430058223..0000000000 --- a/packages/cli/snap-tests-todo/pnpm-install-with-options/steps.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ignoredPlatforms": ["win32"], - "commands": [ - "vp install --help | head -n 20 # print help message", - "vp install --prod # https://pnpm.io/cli/install#--prod--p", - "ls node_modules", - "vp install --prod # install again hit cache" - ] -}