From cd438a2850832c8e2854845d9bf8b79f4b2bdb80 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Thu, 29 Feb 2024 18:33:38 -0800 Subject: [PATCH] why were we doing this in tests --- test/cli/install/bun-add.test.ts | 64 ++-- test/cli/install/bun-create.test.ts | 8 +- test/cli/install/bun-install.test.ts | 308 +++++++++--------- test/cli/install/bun-link.test.ts | 38 +-- test/cli/install/bun-pm.test.ts | 18 +- test/cli/install/bun-remove.test.ts | 20 +- test/cli/install/bun-run.test.ts | 8 +- test/cli/install/bun-update.test.ts | 12 +- test/cli/install/bunx.test.ts | 20 +- .../registry/bun-install-registry.test.ts | 112 +++---- test/js/bun/test/test-test.test.ts | 8 +- test/js/web/streams/streams.test.js | 2 +- test/regression/issue/08093.test.ts | 2 +- 13 files changed, 310 insertions(+), 310 deletions(-) diff --git a/test/cli/install/bun-add.test.ts b/test/cli/install/bun-add.test.ts index aafbda65d1..a8d45ed673 100644 --- a/test/cli/install/bun-add.test.ts +++ b/test/cli/install/bun-add.test.ts @@ -62,7 +62,7 @@ it("should add existing package", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", dep], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -109,7 +109,7 @@ it("should reject missing package", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", dep], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -152,7 +152,7 @@ it("should reject invalid path without segfault", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", dep], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -197,7 +197,7 @@ it("should handle semver-like names", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", "1.2.3"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -240,7 +240,7 @@ it("should handle @scoped names", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", "@bar/baz"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -274,7 +274,7 @@ it("should add dependency with capital letters", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", "BaR"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -329,7 +329,7 @@ it("should add exact version with --exact", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", "--exact", "BaR"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -385,7 +385,7 @@ it("should add exact version with install.exact", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", "BaR"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -440,7 +440,7 @@ it("should add exact version with -E", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", "-E", "BaR"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -502,7 +502,7 @@ it("should add dependency with specified semver", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", "baz@~0.0.2"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -563,7 +563,7 @@ it("should add dependency (GitHub)", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", "mishoo/UglifyJS#v3.14.1"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -650,7 +650,7 @@ it("should add dependency alongside workspaces", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", "baz"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -724,7 +724,7 @@ it("should add aliased dependency (npm)", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", "bar@npm:baz@~0.0.2"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -785,7 +785,7 @@ it("should add aliased dependency (GitHub)", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", "uglify@mishoo/UglifyJS#v3.14.1"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -870,7 +870,7 @@ it("should let you add the same package twice", async () => { } = spawn({ cmd: [bunExe(), "add", "baz@0.0.3"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -922,7 +922,7 @@ it("should let you add the same package twice", async () => { } = spawn({ cmd: [bunExe(), "add", "baz", "-d"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -986,7 +986,7 @@ it("should install version tagged with `latest` by default", async () => { } = spawn({ cmd: [bunExe(), "add", "baz"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1039,7 +1039,7 @@ it("should install version tagged with `latest` by default", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1100,7 +1100,7 @@ it("should handle Git URL in dependencies (SCP-style)", async () => { } = spawn({ cmd: [bunExe(), "add", "bun@github.com:mishoo/UglifyJS.git"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1166,7 +1166,7 @@ it("should handle Git URL in dependencies (SCP-style)", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1199,7 +1199,7 @@ it("should not save git urls twice", async () => { const { exited: exited1 } = spawn({ cmd: [bunExe(), "add", "https://github.com/liz3/empty-bun-repo"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1215,7 +1215,7 @@ it("should not save git urls twice", async () => { const { exited: exited2 } = spawn({ cmd: [bunExe(), "add", "https://github.com/liz3/empty-bun-repo"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1248,7 +1248,7 @@ it("should prefer optionalDependencies over dependencies of the same name", asyn const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", "bar@0.0.2"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1308,7 +1308,7 @@ it("should prefer dependencies over peerDependencies of the same name", async () const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", "bar@0.0.2"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1366,7 +1366,7 @@ it("should add dependency without duplication", async () => { } = spawn({ cmd: [bunExe(), "add", "bar"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1415,7 +1415,7 @@ it("should add dependency without duplication", async () => { } = spawn({ cmd: [bunExe(), "add", "bar"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1472,7 +1472,7 @@ it("should add dependency without duplication (GitHub)", async () => { } = spawn({ cmd: [bunExe(), "add", "mishoo/UglifyJS#v3.14.1"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1533,7 +1533,7 @@ it("should add dependency without duplication (GitHub)", async () => { } = spawn({ cmd: [bunExe(), "add", "mishoo/UglifyJS#v3.14.1"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1616,7 +1616,7 @@ it("should add dependencies to workspaces directly", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", dep], cwd: join(package_dir, "moo"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1679,7 +1679,7 @@ async function installRedirectsToAdd(saveFlagFirst: boolean) { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install", ...args], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1716,7 +1716,7 @@ it("should add dependency alongside peerDependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", "bar"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1770,7 +1770,7 @@ it("should add local tarball dependency", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", tarball], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, diff --git a/test/cli/install/bun-create.test.ts b/test/cli/install/bun-create.test.ts index 97ecb89714..445af2cf2c 100644 --- a/test/cli/install/bun-create.test.ts +++ b/test/cli/install/bun-create.test.ts @@ -40,7 +40,7 @@ it("should create selected template with @ prefix", async () => { const { stderr } = spawn({ cmd: [bunExe(), "create", "@quick-start/some-template"], cwd: x_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -56,7 +56,7 @@ it("should create selected template with @ prefix implicit `/create`", async () const { stderr } = spawn({ cmd: [bunExe(), "create", "@second-quick-start"], cwd: x_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -72,7 +72,7 @@ it("should create selected template with @ prefix implicit `/create` with versio const { stderr } = spawn({ cmd: [bunExe(), "create", "@second-quick-start"], cwd: x_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -92,7 +92,7 @@ it("should create template from local folder", async () => { const { exited } = spawn({ cmd: [bunExe(), "create", testTemplate], cwd: x_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: { ...env, BUN_CREATE_DIR: bunCreateDir }, diff --git a/test/cli/install/bun-install.test.ts b/test/cli/install/bun-install.test.ts index 9038957ce2..de7c6c7e89 100644 --- a/test/cli/install/bun-install.test.ts +++ b/test/cli/install/bun-install.test.ts @@ -66,7 +66,7 @@ describe("chooses", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -158,7 +158,7 @@ registry = "http://${server.hostname}:${server.port}/" const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -192,7 +192,7 @@ it("should handle missing package", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install", "foo"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -244,7 +244,7 @@ foo = { token = "bar" } const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install", "@foo/bar"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -282,7 +282,7 @@ it("should handle empty string in dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -362,7 +362,7 @@ it("should handle workspaces", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -411,7 +411,7 @@ it("should handle workspaces", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -477,7 +477,7 @@ it("should handle `workspace:` specifier", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -507,7 +507,7 @@ it("should handle `workspace:` specifier", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -550,7 +550,7 @@ it("should handle workspaces with packages array", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -609,7 +609,7 @@ it("should handle inter-dependency between workspaces", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -668,7 +668,7 @@ it("should handle inter-dependency between workspaces (devDependencies)", async const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -727,7 +727,7 @@ it("should handle inter-dependency between workspaces (optionalDependencies)", a const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -785,7 +785,7 @@ it("should ignore peerDependencies within workspaces", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -828,7 +828,7 @@ it("should handle installing the same peerDependency with different versions", a const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -867,7 +867,7 @@ it("should handle installing the same peerDependency with the same version", asy const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -917,7 +917,7 @@ it("should handle life-cycle scripts within workspaces", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -982,7 +982,7 @@ it("should handle life-cycle scripts during re-installation", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1015,7 +1015,7 @@ it("should handle life-cycle scripts during re-installation", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1049,7 +1049,7 @@ it("should handle life-cycle scripts during re-installation", async () => { } = spawn({ cmd: [bunExe(), "install", "--production"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1109,7 +1109,7 @@ it("should use updated life-cycle scripts in root during re-installation", async } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1159,7 +1159,7 @@ it("should use updated life-cycle scripts in root during re-installation", async } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1195,7 +1195,7 @@ it("should use updated life-cycle scripts in root during re-installation", async } = spawn({ cmd: [bunExe(), "install", "--production"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1256,7 +1256,7 @@ it("should use updated life-cycle scripts in dependency during re-installation", } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1309,7 +1309,7 @@ it("should use updated life-cycle scripts in dependency during re-installation", } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1348,7 +1348,7 @@ it("should use updated life-cycle scripts in dependency during re-installation", } = spawn({ cmd: [bunExe(), "install", "--production"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1396,7 +1396,7 @@ it("should ignore workspaces within workspaces", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1435,7 +1435,7 @@ it("should handle ^0 in dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1479,7 +1479,7 @@ it("should handle ^1 in dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1516,7 +1516,7 @@ it("should handle ^0.0 in dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1560,7 +1560,7 @@ it("should handle ^0.1 in dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1597,7 +1597,7 @@ it("should handle ^0.0.0 in dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1634,7 +1634,7 @@ it("should handle ^0.0.2 in dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1702,7 +1702,7 @@ it("should handle matching workspaces from dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1736,7 +1736,7 @@ it("should edit package json correctly with git dependencies", async () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "i", "dylan-conway/install-test2"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1756,7 +1756,7 @@ it("should edit package json correctly with git dependencies", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "i", "dylan-conway/install-test2#HEAD"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1776,7 +1776,7 @@ it("should edit package json correctly with git dependencies", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "i", "github:dylan-conway/install-test2"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1796,7 +1796,7 @@ it("should edit package json correctly with git dependencies", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "i", "github:dylan-conway/install-test2#HEAD"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1831,7 +1831,7 @@ it("should handle ^0.0.2-rc in dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1876,7 +1876,7 @@ it("should handle ^0.0.2-alpha.3+b4d in dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1921,7 +1921,7 @@ it("should choose the right version with prereleases", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1966,7 +1966,7 @@ it("should handle ^0.0.2rc1 in dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2011,7 +2011,7 @@ it("should handle ^0.0.2_pre3 in dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2056,7 +2056,7 @@ it("should handle ^0.0.2b_4+cafe_b0ba in dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2101,7 +2101,7 @@ it("should handle caret range in dependencies when the registry has prereleased const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2160,7 +2160,7 @@ it("should prefer latest-tagged dependency", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2213,7 +2213,7 @@ it("should install latest with prereleases", async () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install", "baz"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2246,7 +2246,7 @@ it("should install latest with prereleases", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2278,7 +2278,7 @@ it("should install latest with prereleases", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2311,7 +2311,7 @@ it("should install latest with prereleases", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2355,7 +2355,7 @@ it("should handle dependency aliasing", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2412,7 +2412,7 @@ it("should handle dependency aliasing (versioned)", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2469,7 +2469,7 @@ it("should handle dependency aliasing (dist-tagged)", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2530,7 +2530,7 @@ it("should not reinstall aliased dependencies", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2570,7 +2570,7 @@ it("should not reinstall aliased dependencies", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2637,7 +2637,7 @@ it("should handle aliased & direct dependency references", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2719,7 +2719,7 @@ it("should not hoist if name collides with alias", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2799,7 +2799,7 @@ it("should get npm alias with matching version", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2853,7 +2853,7 @@ it("should not apply overrides to package name of aliased package", async () => const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2900,7 +2900,7 @@ it("should handle unscoped alias on scoped dependency", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -2961,7 +2961,7 @@ it("should handle scoped alias on unscoped dependency", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3032,7 +3032,7 @@ it("should handle aliased dependency with existing lockfile", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3094,7 +3094,7 @@ it("should handle aliased dependency with existing lockfile", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3161,7 +3161,7 @@ it("should handle GitHub URL in dependencies (user/repo)", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3214,7 +3214,7 @@ it("should handle GitHub URL in dependencies (user/repo#commit-id)", async () => const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3281,7 +3281,7 @@ it("should handle GitHub URL in dependencies (user/repo#tag)", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3355,7 +3355,7 @@ it("should handle bitbucket git dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3392,7 +3392,7 @@ it("should handle bitbucket git dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", dep], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3434,7 +3434,7 @@ it("should handle gitlab git dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3471,7 +3471,7 @@ it("should handle gitlab git dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "add", dep], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3511,7 +3511,7 @@ it("should handle GitHub URL in dependencies (github:user/repo#tag)", async () = const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3579,7 +3579,7 @@ it("should handle GitHub URL in dependencies (https://github.com/user/repo.git)" const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3632,7 +3632,7 @@ it("should handle GitHub URL in dependencies (git://github.com/user/repo.git#com const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3700,7 +3700,7 @@ it("should handle GitHub URL in dependencies (git+https://github.com/user/repo.g const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3753,7 +3753,7 @@ it("should handle GitHub tarball URL in dependencies (https://github.com/user/re const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3810,7 +3810,7 @@ it("should handle GitHub tarball URL in dependencies (https://github.com/user/re const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: { @@ -3875,7 +3875,7 @@ it("should treat non-GitHub http(s) URLs as tarballs (https://some.url/path?stuf const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3933,7 +3933,7 @@ cache = false } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3991,7 +3991,7 @@ cache = false } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4093,7 +4093,7 @@ it("should consider peerDependencies during hoisting", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4193,7 +4193,7 @@ it("should install peerDependencies when needed", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4258,7 +4258,7 @@ it("should not regard peerDependencies declarations as duplicates", async () => const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4291,7 +4291,7 @@ it("should report error on invalid format for package.json", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4317,7 +4317,7 @@ it("should report error on invalid format for dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4343,7 +4343,7 @@ it("should report error on invalid format for optionalDependencies", async () => const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4371,7 +4371,7 @@ it("should report error on invalid format for workspaces", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4413,7 +4413,7 @@ it("should report error on duplicated workspace packages", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4448,7 +4448,7 @@ it("should handle Git URL in dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4510,7 +4510,7 @@ it("should handle Git URL in dependencies (SCP-style)", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4570,7 +4570,7 @@ it("should handle Git URL with committish in dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4632,7 +4632,7 @@ it("should fail on invalid Git URL", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4670,7 +4670,7 @@ it("should fail on Git URL with invalid committish", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4711,7 +4711,7 @@ it("should de-duplicate committish in Git URLs", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4809,7 +4809,7 @@ cache = false } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4867,7 +4867,7 @@ cache = false } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4942,7 +4942,7 @@ cache = false } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5016,7 +5016,7 @@ it("should prefer optionalDependencies over dependencies of the same name", asyn const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5070,7 +5070,7 @@ it("should prefer dependencies over peerDependencies of the same name", async () const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5116,7 +5116,7 @@ it("should handle tarball URL", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5165,7 +5165,7 @@ it("should handle tarball path", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5213,7 +5213,7 @@ it("should handle tarball URL with aliasing", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5262,7 +5262,7 @@ it("should handle tarball path with aliasing", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5320,7 +5320,7 @@ it("should de-duplicate dependencies alongside tarball URL", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5404,7 +5404,7 @@ it("should handle tarball URL with existing lockfile", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5466,7 +5466,7 @@ it("should handle tarball URL with existing lockfile", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5549,7 +5549,7 @@ it("should handle tarball path with existing lockfile", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5610,7 +5610,7 @@ it("should handle tarball path with existing lockfile", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5688,7 +5688,7 @@ it("should handle devDependencies from folder", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5744,7 +5744,7 @@ it("should deduplicate devDependencies from folder", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5798,7 +5798,7 @@ it("should install dependencies in root package of workspace", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: join(package_dir, "moo"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5851,7 +5851,7 @@ it("should install dependencies in root package of workspace (*)", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: join(package_dir, "moo"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5903,7 +5903,7 @@ it("should ignore invalid workspaces from parent directory", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: join(package_dir, "moo"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -5960,7 +5960,7 @@ it("should handle --cwd", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install", "--cwd", "moo"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6005,7 +6005,7 @@ it("should handle --frozen-lockfile", async () => { const { stderr, exited } = spawn({ cmd: [bunExe(), "install", "--frozen-lockfile"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6033,7 +6033,7 @@ frozenLockfile = true const { stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6070,7 +6070,7 @@ cache = false } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6212,7 +6212,7 @@ cache = false } = spawn({ cmd: [bunExe(), "install", "--production"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6270,7 +6270,7 @@ it("should handle trustedDependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6322,7 +6322,7 @@ it("should handle `workspaces:*` and `workspace:*` gracefully", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6353,7 +6353,7 @@ it("should handle `workspaces:*` and `workspace:*` gracefully", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6397,7 +6397,7 @@ it("should handle `workspaces:bar` and `workspace:*` gracefully", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6441,7 +6441,7 @@ it("should handle `workspaces:*` and `workspace:bar` gracefully", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6485,7 +6485,7 @@ it("should handle `workspaces:bar` and `workspace:bar` gracefully", async () => const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6540,7 +6540,7 @@ it("should handle installing packages from inside a workspace with `*`", async ( } = spawn({ cmd: [bunExe(), "install"], cwd: join(package_dir, "packages", "yolo"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6571,7 +6571,7 @@ it("should handle installing packages from inside a workspace with `*`", async ( } = spawn({ cmd: [bunExe(), "install", "bar"], cwd: join(package_dir, "packages", "yolo"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6623,7 +6623,7 @@ it("should handle installing packages from inside a workspace without prefix", a } = spawn({ cmd: [bunExe(), "install"], cwd: join(package_dir, "packages", "p1"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6651,7 +6651,7 @@ it("should handle installing packages from inside a workspace without prefix", a } = spawn({ cmd: [bunExe(), "install", "bar"], cwd: join(package_dir, "packages", "p1"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6796,7 +6796,7 @@ it("should handle installing packages inside workspaces with difference versions } = spawn({ cmd: [bunExe(), "install"], cwd: join(package_dir, "packages", "package2"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6828,7 +6828,7 @@ it("should handle installing packages inside workspaces with difference versions } = spawn({ cmd: [bunExe(), "install", "bar"], cwd: join(package_dir, "packages", "package2"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6854,7 +6854,7 @@ it("should handle installing packages inside workspaces with difference versions } = spawn({ cmd: [bunExe(), "install"], cwd: join(package_dir, "packages", "package3"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6884,7 +6884,7 @@ it("should handle installing packages inside workspaces with difference versions } = spawn({ cmd: [bunExe(), "install", "bar"], cwd: join(package_dir, "packages", "package3"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6909,7 +6909,7 @@ it("should handle installing packages inside workspaces with difference versions } = spawn({ cmd: [bunExe(), "install"], cwd: join(package_dir, "packages", "package4"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6939,7 +6939,7 @@ it("should handle installing packages inside workspaces with difference versions } = spawn({ cmd: [bunExe(), "install", "bar"], cwd: join(package_dir, "packages", "package4"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6964,7 +6964,7 @@ it("should handle installing packages inside workspaces with difference versions } = spawn({ cmd: [bunExe(), "install"], cwd: join(package_dir, "packages", "package5"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -6994,7 +6994,7 @@ it("should handle installing packages inside workspaces with difference versions } = spawn({ cmd: [bunExe(), "install", "bar"], cwd: join(package_dir, "packages", "package5"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7020,7 +7020,7 @@ it("should handle installing packages inside workspaces with difference versions } = spawn({ cmd: [bunExe(), "install"], cwd: join(package_dir), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7050,7 +7050,7 @@ it("should handle installing packages inside workspaces with difference versions } = spawn({ cmd: [bunExe(), "install", "bar"], cwd: join(package_dir), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7093,7 +7093,7 @@ it("should override npm dependency by matching workspace", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7140,7 +7140,7 @@ it("should not override npm dependency by workspace with mismatched version", as const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7184,7 +7184,7 @@ it("should override @scoped npm dependency by matching workspace", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7234,7 +7234,7 @@ it("should override aliased npm dependency by matching workspace", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7289,7 +7289,7 @@ it("should override child npm dependency by matching workspace", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7347,7 +7347,7 @@ it("should not override child npm dependency by workspace with mismatched versio const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7411,7 +7411,7 @@ it("should override @scoped child npm dependency by matching workspace", async ( const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7474,7 +7474,7 @@ it("should override aliased child npm dependency by matching workspace", async ( const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7539,7 +7539,7 @@ it("should handle `workspace:` with semver range", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7596,7 +7596,7 @@ it("should handle `workspace:` with alias & @scope", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7670,7 +7670,7 @@ it("should handle `workspace:*` on both root & child", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7708,7 +7708,7 @@ it("should handle `workspace:*` on both root & child", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7755,7 +7755,7 @@ it("should install peer dependencies from root package", async () => { cmd: [bunExe(), "install"], cwd: package_dir, env, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", }); @@ -7796,7 +7796,7 @@ it("should install correct version of peer dependency from root package", async cmd: [bunExe(), "install"], cwd: package_dir, env, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", }); @@ -7868,7 +7868,7 @@ describe("Registry URLs", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7911,7 +7911,7 @@ describe("Registry URLs", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -7952,7 +7952,7 @@ describe("Registry URLs", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, diff --git a/test/cli/install/bun-link.test.ts b/test/cli/install/bun-link.test.ts index b9625c1eba..b3417fdeaa 100644 --- a/test/cli/install/bun-link.test.ts +++ b/test/cli/install/bun-link.test.ts @@ -61,7 +61,7 @@ it("should link and unlink workspace package", async () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: link_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -83,7 +83,7 @@ it("should link and unlink workspace package", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "link"], cwd: join(link_dir, "packages", "moo"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -99,7 +99,7 @@ it("should link and unlink workspace package", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "link", "moo"], cwd: join(link_dir, "packages", "boba"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -124,7 +124,7 @@ it("should link and unlink workspace package", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "unlink"], cwd: join(link_dir, "packages", "moo"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -141,7 +141,7 @@ it("should link and unlink workspace package", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "link"], cwd: link_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -157,7 +157,7 @@ it("should link and unlink workspace package", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "link", "foo"], cwd: join(link_dir, "packages", "boba"), - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -183,7 +183,7 @@ it("should link and unlink workspace package", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "unlink"], cwd: link_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -221,7 +221,7 @@ it("should link package", async () => { } = spawn({ cmd: [bunExe(), "link"], cwd: link_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -240,7 +240,7 @@ it("should link package", async () => { } = spawn({ cmd: [bunExe(), "link", link_name], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -265,7 +265,7 @@ it("should link package", async () => { } = spawn({ cmd: [bunExe(), "unlink"], cwd: link_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -284,7 +284,7 @@ it("should link package", async () => { } = spawn({ cmd: [bunExe(), "link", link_name], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -321,7 +321,7 @@ it("should link scoped package", async () => { } = spawn({ cmd: [bunExe(), "link"], cwd: link_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -340,7 +340,7 @@ it("should link scoped package", async () => { } = spawn({ cmd: [bunExe(), "link", link_name], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -365,7 +365,7 @@ it("should link scoped package", async () => { } = spawn({ cmd: [bunExe(), "unlink"], cwd: link_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -384,7 +384,7 @@ it("should link scoped package", async () => { } = spawn({ cmd: [bunExe(), "link", link_name], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -428,7 +428,7 @@ it("should link dependency without crashing", async () => { } = spawn({ cmd: [bunExe(), "link"], cwd: link_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -447,7 +447,7 @@ it("should link dependency without crashing", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -479,7 +479,7 @@ it("should link dependency without crashing", async () => { } = spawn({ cmd: [bunExe(), "unlink"], cwd: link_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -498,7 +498,7 @@ it("should link dependency without crashing", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, diff --git a/test/cli/install/bun-pm.test.ts b/test/cli/install/bun-pm.test.ts index 8703f780c8..87e9fc8926 100644 --- a/test/cli/install/bun-pm.test.ts +++ b/test/cli/install/bun-pm.test.ts @@ -51,7 +51,7 @@ it("should list top-level dependency", async () => { await spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -63,7 +63,7 @@ it("should list top-level dependency", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "pm", "ls"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -107,7 +107,7 @@ it("should list all dependencies", async () => { await spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -119,7 +119,7 @@ it("should list all dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "pm", "ls", "--all"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -164,7 +164,7 @@ it("should list top-level aliased dependency", async () => { await spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -176,7 +176,7 @@ it("should list top-level aliased dependency", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "pm", "ls"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -220,7 +220,7 @@ it("should list aliased dependencies", async () => { await spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -232,7 +232,7 @@ it("should list aliased dependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "pm", "ls", "--all"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -278,7 +278,7 @@ it("should remove all cache", async () => { await spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: { diff --git a/test/cli/install/bun-remove.test.ts b/test/cli/install/bun-remove.test.ts index 2a302821af..da8d7d5a39 100644 --- a/test/cli/install/bun-remove.test.ts +++ b/test/cli/install/bun-remove.test.ts @@ -54,7 +54,7 @@ it("should remove existing package", async () => { const { exited: exited1 } = spawn({ cmd: [bunExe(), "add", `file:${pkg1_path}`.replace(/\\/g, "\\\\")], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -63,7 +63,7 @@ it("should remove existing package", async () => { const { exited: exited2 } = spawn({ cmd: [bunExe(), "add", `file:${pkg2_path}`.replace(/\\/g, "\\\\")], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -91,7 +91,7 @@ it("should remove existing package", async () => { } = spawn({ cmd: [bunExe(), "remove", "pkg1"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -132,7 +132,7 @@ it("should remove existing package", async () => { } = spawn({ cmd: [bunExe(), "remove", "pkg2"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -181,7 +181,7 @@ it("should not reject missing package", async () => { const { exited: addExited } = spawn({ cmd: [bunExe(), "add", `file:${pkg_path}`.replace(/\\/g, "\\\\")], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -191,7 +191,7 @@ it("should not reject missing package", async () => { const { exited: rmExited } = spawn({ cmd: [bunExe(), "remove", "pkg2"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -211,7 +211,7 @@ it("should not affect if package is not installed", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "remove", "pkg"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -248,7 +248,7 @@ it("should retain a new line in the end of package.json", async () => { const { exited: addExited } = spawn({ cmd: [bunExe(), "add", `file:${pkg_path}`.replace(/\\/g, "\\\\")], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -261,7 +261,7 @@ it("should retain a new line in the end of package.json", async () => { const { exited } = spawn({ cmd: [bunExe(), "remove", "pkg"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -294,7 +294,7 @@ it("should remove peerDependencies", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "remove", "bar"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, diff --git a/test/cli/install/bun-run.test.ts b/test/cli/install/bun-run.test.ts index c1701a61e5..39b5f1931d 100644 --- a/test/cli/install/bun-run.test.ts +++ b/test/cli/install/bun-run.test.ts @@ -257,7 +257,7 @@ console.log(minify("print(6 * 7)").code); } = spawn({ cmd: [bunExe(), "run", "test.js"], cwd: run_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: { @@ -283,7 +283,7 @@ console.log(minify("print(6 * 7)").code); } = spawn({ cmd: [bunExe(), "test.js"], cwd: run_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: { @@ -323,7 +323,7 @@ for (const entry of await decompress(Buffer.from(buffer))) { } = spawn({ cmd: [bunExe(), "test.js"], cwd: run_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: { @@ -363,7 +363,7 @@ for (const entry of await decompress(Buffer.from(buffer))) { } = spawn({ cmd: [bunExe(), "run", "test.js"], cwd: run_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: { diff --git a/test/cli/install/bun-update.test.ts b/test/cli/install/bun-update.test.ts index 29dcec610d..aa46064c22 100644 --- a/test/cli/install/bun-update.test.ts +++ b/test/cli/install/bun-update.test.ts @@ -58,7 +58,7 @@ it("should update to latest version of dependency", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -102,7 +102,7 @@ it("should update to latest version of dependency", async () => { } = spawn({ cmd: [bunExe(), "update", "baz"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -171,7 +171,7 @@ it("should update to latest versions of dependencies", async () => { } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -223,7 +223,7 @@ it("should update to latest versions of dependencies", async () => { } = spawn({ cmd: [bunExe(), "update"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -289,7 +289,7 @@ it("lockfile should not be modified when there are no version changes, issue#588 const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -312,7 +312,7 @@ it("lockfile should not be modified when there are no version changes, issue#588 const { exited } = spawn({ cmd: [bunExe(), "update"], cwd: package_dir, // package.json is not changed - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, diff --git a/test/cli/install/bunx.test.ts b/test/cli/install/bunx.test.ts index e7bbb8a99a..d7364397a5 100644 --- a/test/cli/install/bunx.test.ts +++ b/test/cli/install/bunx.test.ts @@ -40,7 +40,7 @@ it("should install and run default (latest) version", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "x", "uglify-js", "--compress"], cwd: x_dir, - stdout: null, + stdout: "pipe", stdin: new TextEncoder().encode("console.log(6 * 7);"), stderr: "pipe", env, @@ -58,7 +58,7 @@ it("should install and run specified version", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "x", "uglify-js@3.14.1", "-v"], cwd: x_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -76,7 +76,7 @@ it("should output usage if no arguments are passed", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "x"], cwd: x_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -97,7 +97,7 @@ it("should work for @scoped packages", async () => { const withoutCache = spawn({ cmd: [bunExe(), "x", "@withfig/autocomplete-tools", "--help"], cwd: x_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -115,7 +115,7 @@ it("should work for @scoped packages", async () => { const cached = spawn({ cmd: [bunExe(), "x", "@withfig/autocomplete-tools", "--help"], cwd: x_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -143,7 +143,7 @@ console.log( const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "--bun", "x", "uglify-js", "test.js", "--compress"], cwd: x_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -164,7 +164,7 @@ it("should work for github repository", async () => { const withoutCache = spawn({ cmd: [bunExe(), "x", "github:piuccio/cowsay", "--help"], cwd: x_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -182,7 +182,7 @@ it("should work for github repository", async () => { const cached = spawn({ cmd: [bunExe(), "x", "github:piuccio/cowsay", "--help"], cwd: x_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -202,7 +202,7 @@ it("should work for github repository with committish", async () => { const withoutCache = spawn({ cmd: [bunExe(), "x", "github:piuccio/cowsay#HEAD", "hello bun!"], cwd: x_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -220,7 +220,7 @@ it("should work for github repository with committish", async () => { const cached = spawn({ cmd: [bunExe(), "x", "github:piuccio/cowsay#HEAD", "hello bun!"], cwd: x_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, diff --git a/test/cli/install/registry/bun-install-registry.test.ts b/test/cli/install/registry/bun-install-registry.test.ts index c55ae499d1..f09b2454a1 100644 --- a/test/cli/install/registry/bun-install-registry.test.ts +++ b/test/cli/install/registry/bun-install-registry.test.ts @@ -64,7 +64,7 @@ test("basic 1", async () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -93,7 +93,7 @@ test("basic 1", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -129,7 +129,7 @@ test("dependency from root satisfies range from dependency", async () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -160,7 +160,7 @@ test("dependency from root satisfies range from dependency", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -197,7 +197,7 @@ test("peerDependency in child npm dependency should not maintain old version whe var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -238,7 +238,7 @@ test("peerDependency in child npm dependency should not maintain old version whe ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -277,7 +277,7 @@ test("package added after install", async () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -319,7 +319,7 @@ test("package added after install", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -355,7 +355,7 @@ test("package added after install", async () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -456,7 +456,7 @@ test("it should re-symlink binaries that become invalid when updating package ve var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -496,7 +496,7 @@ test("it should re-symlink binaries that become invalid when updating package ve ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -1744,7 +1744,7 @@ for (const forceWaiterThread of [false, true]) { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -1793,7 +1793,7 @@ for (const forceWaiterThread of [false, true]) { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -1847,7 +1847,7 @@ for (const forceWaiterThread of [false, true]) { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -1935,7 +1935,7 @@ for (const forceWaiterThread of [false, true]) { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -2005,7 +2005,7 @@ for (const forceWaiterThread of [false, true]) { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -2037,7 +2037,7 @@ for (const forceWaiterThread of [false, true]) { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -2083,7 +2083,7 @@ for (const forceWaiterThread of [false, true]) { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -2125,7 +2125,7 @@ for (const forceWaiterThread of [false, true]) { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -2151,7 +2151,7 @@ for (const forceWaiterThread of [false, true]) { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -2183,7 +2183,7 @@ for (const forceWaiterThread of [false, true]) { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -2207,7 +2207,7 @@ for (const forceWaiterThread of [false, true]) { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -2242,7 +2242,7 @@ for (const forceWaiterThread of [false, true]) { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -2277,7 +2277,7 @@ for (const forceWaiterThread of [false, true]) { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -2302,7 +2302,7 @@ for (const forceWaiterThread of [false, true]) { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -2357,7 +2357,7 @@ for (const forceWaiterThread of [false, true]) { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -2763,7 +2763,7 @@ for (const forceWaiterThread of [false, true]) { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: testEnv, @@ -2944,7 +2944,7 @@ for (const forceWaiterThread of [false, true]) { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3156,7 +3156,7 @@ describe("semver", () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3194,7 +3194,7 @@ describe("semver", () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3322,7 +3322,7 @@ for (let i = 0; i < prereleaseTests.length; i++) { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3464,7 +3464,7 @@ for (let i = 0; i < prereleaseFailTests.length; i++) { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3499,7 +3499,7 @@ describe("yarn tests", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3590,7 +3590,7 @@ describe("yarn tests", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3643,7 +3643,7 @@ describe("yarn tests", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3711,7 +3711,7 @@ describe("yarn tests", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3791,7 +3791,7 @@ describe("yarn tests", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3926,7 +3926,7 @@ describe("yarn tests", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -3972,7 +3972,7 @@ describe("yarn tests", () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4004,7 +4004,7 @@ describe("yarn tests", () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "test.js"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4056,7 +4056,7 @@ describe("yarn tests", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4097,7 +4097,7 @@ describe("yarn tests", () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4175,7 +4175,7 @@ describe("yarn tests", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install", "--dev"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4238,7 +4238,7 @@ describe("yarn tests", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4291,7 +4291,7 @@ describe("yarn tests", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install", "--dev"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4332,7 +4332,7 @@ describe("yarn tests", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install", "--dev"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4373,7 +4373,7 @@ describe("yarn tests", () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4449,7 +4449,7 @@ describe("yarn tests", () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "test.js"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4478,7 +4478,7 @@ describe("yarn tests", () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4510,7 +4510,7 @@ describe("yarn tests", () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "test.js"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4539,7 +4539,7 @@ describe("yarn tests", () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4572,7 +4572,7 @@ describe("yarn tests", () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "test.js"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4602,7 +4602,7 @@ describe("yarn tests", () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4629,7 +4629,7 @@ describe("yarn tests", () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "test.js"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4659,7 +4659,7 @@ describe("yarn tests", () => { var { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install", "--dev"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, @@ -4685,7 +4685,7 @@ describe("yarn tests", () => { ({ stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install", "--dev"], cwd: packageDir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env, diff --git a/test/js/bun/test/test-test.test.ts b/test/js/bun/test/test-test.test.ts index d1dccd6800..aabc3882c6 100644 --- a/test/js/bun/test/test-test.test.ts +++ b/test/js/bun/test/test-test.test.ts @@ -34,7 +34,7 @@ it("shouldn't crash when async test runner callback throws", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "test", "bad.test.js"], cwd: test_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: bunEnv, @@ -296,7 +296,7 @@ it("should return non-zero exit code for invalid syntax", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "test", "bad.test.js"], cwd: test_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: bunEnv, @@ -325,7 +325,7 @@ it("invalid syntax counts towards bail", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "test", "--bail=3"], cwd: test_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: bunEnv, @@ -638,7 +638,7 @@ describe("empty", () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "test", "empty.test.js"], cwd: test_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env: bunEnv, diff --git a/test/js/web/streams/streams.test.js b/test/js/web/streams/streams.test.js index 605edf39d1..aa82dcb7c0 100644 --- a/test/js/web/streams/streams.test.js +++ b/test/js/web/streams/streams.test.js @@ -437,7 +437,7 @@ it.skipIf(isWindows)("Bun.file() read text from pipe", async () => { const proc = Bun.spawn({ cmd: ["bash", join(import.meta.dir + "/", "bun-streams-test-fifo.sh"), "/tmp/fifo"], stderr: "inherit", - stdout: null, + stdout: "pipe", stdin: null, env: { FIFO_TEST: large, diff --git a/test/regression/issue/08093.test.ts b/test/regression/issue/08093.test.ts index 3a98f8e066..1be12f5602 100644 --- a/test/regression/issue/08093.test.ts +++ b/test/regression/issue/08093.test.ts @@ -42,7 +42,7 @@ it("should install vendored node_modules with hardlink", async () => { const { stdout, stderr, exited } = spawn({ cmd: [bunExe(), "install", "--backend", "hardlink"], cwd: package_dir, - stdout: null, + stdout: "pipe", stdin: "pipe", stderr: "pipe", env,