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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 20
node-version-file: .node-version
cache: pnpm

- run: pnpm install --frozen-lockfile
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version

- name: Compare versions to registry
id: check
run: |
Expand Down Expand Up @@ -57,7 +62,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
node-version-file: .node-version
cache: pnpm
registry-url: "https://registry.npmjs.org"

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ zig-out/
!packages/@wterm/ghostty/wasm/ghostty-vt.wasm
.DS_Store
node_modules/
.pnpm-store/
dist/
.turbo/
*.tsbuildinfo
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ wterm ("dub-term") renders to the DOM — native text selection, copy/paste, fin
### Prerequisites

- [Zig](https://ziglang.org/) 0.16.0+
- [Node.js](https://nodejs.org/) 20+
- [pnpm](https://pnpm.io/) 10+
- [Node.js](https://nodejs.org/) 24+
- [pnpm](https://pnpm.io/) 11+

### Setup

Expand Down
9 changes: 5 additions & 4 deletions examples/vue/vite-plugins/pty-server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Plugin } from "vite";
import type { IPty } from "node-pty";
import { WebSocketServer, type WebSocket } from "ws";
import * as pty from "node-pty";
import { parse as parseUrl } from "url";

function cleanEnv(): Record<string, string> {
Expand All @@ -11,11 +11,12 @@ function cleanEnv(): Record<string, string> {
return env;
}

function handlePTYConnection(ws: WebSocket) {
async function handlePTYConnection(ws: WebSocket) {
const shell = process.env.SHELL || "/bin/zsh";

let ptyProcess: pty.IPty;
let ptyProcess: IPty;
try {
const pty = await import("node-pty");
ptyProcess = pty.spawn(shell, ["-l"], {
name: "xterm-256color",
cols: 80,
Expand Down Expand Up @@ -71,7 +72,7 @@ export function ptyServer(): Plugin {
if (pathname !== "/api/terminal") return;

wss.handleUpgrade(req, socket, head, (ws) => {
handlePTYConnection(ws);
void handlePTYConnection(ws);
});
});
},
Expand Down
17 changes: 5 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"type": "git",
"url": "https://github.com/vercel-labs/wterm"
},
"engines": {
"node": ">=24.0.0",
"pnpm": ">=11.0.0"
},
"scripts": {
"build": "turbo run build",
"predev": "command -v portless >/dev/null 2>&1 || (echo '\\nportless is required but not installed. Run: npm i -g portless\\nSee: https://github.com/vercel-labs/portless\\n' && exit 1)",
Expand All @@ -27,16 +31,5 @@
"turbo": "^2.9.6",
"vitest": "^4.1.4"
},
"pnpm": {
"onlyBuiltDependencies": [
"cpu-features",
"esbuild",
"node-pty",
"ssh2"
],
"patchedDependencies": {
"next-themes@0.4.6": "patches/next-themes@0.4.6.patch"
}
},
"packageManager": "pnpm@10.11.0"
"packageManager": "pnpm@11.1.3"
}
16 changes: 16 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,19 @@ packages:
- "packages/@internal/*"
- "apps/*"
- "examples/*"

minimumReleaseAge: 2880

allowBuilds:
"@mongodb-js/zstd": false
"cpu-features": false
"esbuild": false
"msw": false
"node-pty": false
"node-liblzma": false
"sharp": false
"ssh2": false
"unrs-resolver": false

patchedDependencies:
"next-themes@0.4.6": "patches/next-themes@0.4.6.patch"
Loading