diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11_with_workspace/.npmignore b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11_with_workspace/.npmignore new file mode 100644 index 0000000000..ed9f1852c7 --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11_with_workspace/.npmignore @@ -0,0 +1,2 @@ +# Recursive pack writes child archives here while the root package is scanned. +*.tgz diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11_with_workspace/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11_with_workspace/snapshots.toml index 62afef0cf9..b159f3a4cc 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11_with_workspace/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11_with_workspace/snapshots.toml @@ -6,12 +6,10 @@ steps = [ { argv = ["vp", "pm", "pack"], comment = "should pack current workspace root" }, { argv = ["vpt", "rm", "-f", "command-pack-pnpm11-with-workspace-1.0.0.tgz", "app-1.0.0.tgz", "vite-plus-test-utils-1.0.0.tgz"], snapshot = false, continue-on-failure = true }, { argv = ["node", "-e", "const {execFileSync}=require('node:child_process');const out=JSON.parse(execFileSync('vp',['pm','pack','--recursive','--json'],{encoding:'utf8'}));out.sort((a,b)=>a.nameb.name?1:0);console.log(JSON.stringify(out,null,2));"], comment = "should pack all packages in workspace (sorted by name for determinism)" }, - ["vpt", "print-file", "out.json"], { argv = ["vpt", "rm", "-f", "command-pack-pnpm11-with-workspace-1.0.0.tgz", "app-1.0.0.tgz", "vite-plus-test-utils-1.0.0.tgz"], snapshot = false, continue-on-failure = true }, { argv = ["vp", "pm", "pack", "--filter", "app"], comment = "should pack specific package (uses --filter app pack)" }, { argv = ["vpt", "rm", "-f", "command-pack-pnpm11-with-workspace-1.0.0.tgz", "app-1.0.0.tgz", "vite-plus-test-utils-1.0.0.tgz"], snapshot = false, continue-on-failure = true }, { argv = ["node", "-e", "const {execFileSync}=require('node:child_process');const out=JSON.parse(execFileSync('vp',['pm','pack','--filter','app','--filter','@vite-plus-test/utils','--json'],{encoding:'utf8'}));out.sort((a,b)=>a.nameb.name?1:0);console.log(JSON.stringify(out,null,2));"], comment = "should pack multiple packages (sorted by name for determinism)" }, - ["vpt", "print-file", "out.json"], { argv = ["vpt", "rm", "-f", "command-pack-pnpm11-with-workspace-1.0.0.tgz", "app-1.0.0.tgz", "vite-plus-test-utils-1.0.0.tgz"], snapshot = false, continue-on-failure = true }, { argv = ["vp", "pm", "pack", "--out", "./dist/package.tgz"], comment = "should pack with output file" }, { argv = ["vpt", "rm", "-rf", "./dist"], continue-on-failure = true }, diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11_with_workspace/snapshots/command_pack_pnpm11_with_workspace.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11_with_workspace/snapshots/command_pack_pnpm11_with_workspace.md index 9bbd914500..b8e831a2fe 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11_with_workspace/snapshots/command_pack_pnpm11_with_workspace.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11_with_workspace/snapshots/command_pack_pnpm11_with_workspace.md @@ -66,16 +66,8 @@ should pack all packages in workspace (sorted by name for determinism) ] ``` -## `vpt print-file out.json` - -**Exit code:** 1 - -``` -out.json: not found -missing file -``` +## `vpt rm -f command-pack-pnpm11-with-workspace-1.0.0.tgz app-1.0.0.tgz vite-plus-test-utils-1.0.0.tgz` -*(skipped 1 step(s) to the next line boundary: step failed)* ## `vp pm pack --filter app` @@ -121,16 +113,8 @@ should pack multiple packages (sorted by name for determinism) ] ``` -## `vpt print-file out.json` - -**Exit code:** 1 - -``` -out.json: not found -missing file -``` +## `vpt rm -f command-pack-pnpm11-with-workspace-1.0.0.tgz app-1.0.0.tgz vite-plus-test-utils-1.0.0.tgz` -*(skipped 1 step(s) to the next line boundary: step failed)* ## `vp pm pack --out ./dist/package.tgz` @@ -139,12 +123,10 @@ should pack with output file ``` package: command-pack-pnpm11-with-workspace@1.0.0 Tarball Contents -app-1.0.0.tgz package.json packages/app/package.json packages/utils/package.json pnpm-workspace.yaml -vite-plus-test-utils-1.0.0.tgz Tarball Details /dist/package.tgz ``` @@ -161,12 +143,10 @@ should pack with destination ``` package: command-pack-pnpm11-with-workspace@1.0.0 Tarball Contents -app-1.0.0.tgz package.json packages/app/package.json packages/utils/package.json pnpm-workspace.yaml -vite-plus-test-utils-1.0.0.tgz Tarball Details /dist/command-pack-pnpm11-with-workspace-1.0.0.tgz ``` @@ -183,12 +163,10 @@ should pack with gzip compression level ``` package: command-pack-pnpm11-with-workspace@1.0.0 Tarball Contents -app-1.0.0.tgz package.json packages/app/package.json packages/utils/package.json pnpm-workspace.yaml -vite-plus-test-utils-1.0.0.tgz Tarball Details command-pack-pnpm11-with-workspace-1.0.0.tgz ```