Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@webcontainer/api": "^1.5.3"
"@webcontainer/api": "^1.6.1"
},
"peerDependencies": {
"@vitest/browser": "^3.1",
Expand Down
11 changes: 6 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions src/fixtures/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,7 @@ export class ProcessWrap {
exit = async () => {
await this._isReady;

// @ts-ignore -- internal check
if (this._webcontainerProcess._process != null) {
this._webcontainerProcess.kill();
}

this._webcontainerProcess.kill();
this._listeners.splice(0);

return this.isDone;
Expand Down
4 changes: 2 additions & 2 deletions test/run-command.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import { test } from "../src";
test("user can run commands inside webcontainer", async ({ webcontainer }) => {
const output = await webcontainer.runCommand("node", ["--version"]);

expect(output).toMatchInlineSnapshot(`"v20.19.0"`);
expect(output).toContain("v20");
});

test("user can run interactive commands inside webcontainer", async ({
webcontainer,
}) => {
const { exit, waitForText, write } = webcontainer.runCommand("node");
await waitForText("Welcome to Node.js v20.19.0");
await waitForText("Welcome to Node.js v20");

await write("console.log(20 + 19)\n");
await waitForText("39");
Expand Down