This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

Remove tsx

Nathan Herald (Mar 22, 2026, 5:25 PM +0100) 64010a16 c73ce0ce

+45 -61
+1 -2
bin/pty
··· 4 4 import { dirname, join } from 'node:path'; 5 5 6 6 const __dirname = dirname(fileURLToPath(import.meta.url)); 7 - const tsx = join(__dirname, '..', 'node_modules', '.bin', 'tsx'); 8 7 const cli = join(__dirname, '..', 'src', 'cli.ts'); 9 8 10 - const result = spawnSync(tsx, [cli, ...process.argv.slice(2)], { 9 + const result = spawnSync(process.execPath, [cli, ...process.argv.slice(2)], { 11 10 stdio: 'inherit', 12 11 env: process.env, 13 12 });
+31 -44
package-lock.json
··· 1 1 { 2 - "name": "pty-manager", 2 + "name": "ptym", 3 3 "version": "0.1.0", 4 4 "lockfileVersion": 3, 5 5 "requires": true, 6 6 "packages": { 7 7 "": { 8 - "name": "pty-manager", 8 + "name": "ptym", 9 9 "version": "0.1.0", 10 10 "hasInstallScript": true, 11 11 "dependencies": { 12 12 "@xterm/addon-serialize": "^0.14.0", 13 13 "@xterm/headless": "^6.0.0", 14 - "node-pty": "^1.0.0", 15 - "tsx": "^4.19.0" 14 + "node-pty": "^1.0.0" 16 15 }, 17 16 "bin": { 18 17 "pty": "bin/pty" ··· 30 29 "cpu": [ 31 30 "ppc64" 32 31 ], 32 + "dev": true, 33 33 "license": "MIT", 34 34 "optional": true, 35 35 "os": [ ··· 46 46 "cpu": [ 47 47 "arm" 48 48 ], 49 + "dev": true, 49 50 "license": "MIT", 50 51 "optional": true, 51 52 "os": [ ··· 62 63 "cpu": [ 63 64 "arm64" 64 65 ], 66 + "dev": true, 65 67 "license": "MIT", 66 68 "optional": true, 67 69 "os": [ ··· 78 80 "cpu": [ 79 81 "x64" 80 82 ], 83 + "dev": true, 81 84 "license": "MIT", 82 85 "optional": true, 83 86 "os": [ ··· 94 97 "cpu": [ 95 98 "arm64" 96 99 ], 100 + "dev": true, 97 101 "license": "MIT", 98 102 "optional": true, 99 103 "os": [ ··· 110 114 "cpu": [ 111 115 "x64" 112 116 ], 117 + "dev": true, 113 118 "license": "MIT", 114 119 "optional": true, 115 120 "os": [ ··· 126 131 "cpu": [ 127 132 "arm64" 128 133 ], 134 + "dev": true, 129 135 "license": "MIT", 130 136 "optional": true, 131 137 "os": [ ··· 142 148 "cpu": [ 143 149 "x64" 144 150 ], 151 + "dev": true, 145 152 "license": "MIT", 146 153 "optional": true, 147 154 "os": [ ··· 158 165 "cpu": [ 159 166 "arm" 160 167 ], 168 + "dev": true, 161 169 "license": "MIT", 162 170 "optional": true, 163 171 "os": [ ··· 174 182 "cpu": [ 175 183 "arm64" 176 184 ], 185 + "dev": true, 177 186 "license": "MIT", 178 187 "optional": true, 179 188 "os": [ ··· 190 199 "cpu": [ 191 200 "ia32" 192 201 ], 202 + "dev": true, 193 203 "license": "MIT", 194 204 "optional": true, 195 205 "os": [ ··· 206 216 "cpu": [ 207 217 "loong64" 208 218 ], 219 + "dev": true, 209 220 "license": "MIT", 210 221 "optional": true, 211 222 "os": [ ··· 222 233 "cpu": [ 223 234 "mips64el" 224 235 ], 236 + "dev": true, 225 237 "license": "MIT", 226 238 "optional": true, 227 239 "os": [ ··· 238 250 "cpu": [ 239 251 "ppc64" 240 252 ], 253 + "dev": true, 241 254 "license": "MIT", 242 255 "optional": true, 243 256 "os": [ ··· 254 267 "cpu": [ 255 268 "riscv64" 256 269 ], 270 + "dev": true, 257 271 "license": "MIT", 258 272 "optional": true, 259 273 "os": [ ··· 270 284 "cpu": [ 271 285 "s390x" 272 286 ], 287 + "dev": true, 273 288 "license": "MIT", 274 289 "optional": true, 275 290 "os": [ ··· 286 301 "cpu": [ 287 302 "x64" 288 303 ], 304 + "dev": true, 289 305 "license": "MIT", 290 306 "optional": true, 291 307 "os": [ ··· 302 318 "cpu": [ 303 319 "arm64" 304 320 ], 321 + "dev": true, 305 322 "license": "MIT", 306 323 "optional": true, 307 324 "os": [ ··· 318 335 "cpu": [ 319 336 "x64" 320 337 ], 338 + "dev": true, 321 339 "license": "MIT", 322 340 "optional": true, 323 341 "os": [ ··· 334 352 "cpu": [ 335 353 "arm64" 336 354 ], 355 + "dev": true, 337 356 "license": "MIT", 338 357 "optional": true, 339 358 "os": [ ··· 350 369 "cpu": [ 351 370 "x64" 352 371 ], 372 + "dev": true, 353 373 "license": "MIT", 354 374 "optional": true, 355 375 "os": [ ··· 366 386 "cpu": [ 367 387 "arm64" 368 388 ], 389 + "dev": true, 369 390 "license": "MIT", 370 391 "optional": true, 371 392 "os": [ ··· 382 403 "cpu": [ 383 404 "x64" 384 405 ], 406 + "dev": true, 385 407 "license": "MIT", 386 408 "optional": true, 387 409 "os": [ ··· 398 420 "cpu": [ 399 421 "arm64" 400 422 ], 423 + "dev": true, 401 424 "license": "MIT", 402 425 "optional": true, 403 426 "os": [ ··· 414 437 "cpu": [ 415 438 "ia32" 416 439 ], 440 + "dev": true, 417 441 "license": "MIT", 418 442 "optional": true, 419 443 "os": [ ··· 430 454 "cpu": [ 431 455 "x64" 432 456 ], 457 + "dev": true, 433 458 "license": "MIT", 434 459 "optional": true, 435 460 "os": [ ··· 995 1020 "version": "0.27.3", 996 1021 "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz", 997 1022 "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==", 1023 + "dev": true, 998 1024 "hasInstallScript": true, 999 1025 "license": "MIT", 1000 1026 "bin": { ··· 1074 1100 "version": "2.3.3", 1075 1101 "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", 1076 1102 "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", 1103 + "dev": true, 1077 1104 "hasInstallScript": true, 1078 1105 "license": "MIT", 1079 1106 "optional": true, ··· 1084 1111 "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 1085 1112 } 1086 1113 }, 1087 - "node_modules/get-tsconfig": { 1088 - "version": "4.13.6", 1089 - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.6.tgz", 1090 - "integrity": "sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==", 1091 - "license": "MIT", 1092 - "dependencies": { 1093 - "resolve-pkg-maps": "^1.0.0" 1094 - }, 1095 - "funding": { 1096 - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" 1097 - } 1098 - }, 1099 1114 "node_modules/magic-string": { 1100 1115 "version": "0.30.21", 1101 1116 "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", ··· 1208 1223 "node": "^10 || ^12 || >=14" 1209 1224 } 1210 1225 }, 1211 - "node_modules/resolve-pkg-maps": { 1212 - "version": "1.0.0", 1213 - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", 1214 - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", 1215 - "license": "MIT", 1216 - "funding": { 1217 - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" 1218 - } 1219 - }, 1220 1226 "node_modules/rollup": { 1221 1227 "version": "4.59.0", 1222 1228 "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz", ··· 1335 1341 "license": "MIT", 1336 1342 "engines": { 1337 1343 "node": ">=14.0.0" 1338 - } 1339 - }, 1340 - "node_modules/tsx": { 1341 - "version": "4.21.0", 1342 - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", 1343 - "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", 1344 - "license": "MIT", 1345 - "dependencies": { 1346 - "esbuild": "~0.27.0", 1347 - "get-tsconfig": "^4.7.5" 1348 - }, 1349 - "bin": { 1350 - "tsx": "dist/cli.mjs" 1351 - }, 1352 - "engines": { 1353 - "node": ">=18.0.0" 1354 - }, 1355 - "optionalDependencies": { 1356 - "fsevents": "~2.3.3" 1357 1344 } 1358 1345 }, 1359 1346 "node_modules/typescript": {
+2 -3
package.json
··· 15 15 "typecheck": "tsc", 16 16 "test": "vitest run", 17 17 "test:watch": "vitest", 18 - "verify-docs": "tsx scripts/verify-docs.ts" 18 + "verify-docs": "node scripts/verify-docs.ts" 19 19 }, 20 20 "dependencies": { 21 21 "@xterm/addon-serialize": "^0.14.0", 22 22 "@xterm/headless": "^6.0.0", 23 - "node-pty": "^1.0.0", 24 - "tsx": "^4.19.0" 23 + "node-pty": "^1.0.0" 25 24 }, 26 25 "devDependencies": { 27 26 "@types/node": "^25.3.5",
+1 -2
src/spawn.ts
··· 18 18 const rows = stdout.rows ?? 24; 19 19 const cols = stdout.columns ?? 80; 20 20 21 - const tsxBin = path.join(__dirname, "..", "node_modules", ".bin", "tsx"); 22 21 const serverModule = path.join(__dirname, "server.ts"); 23 22 const config = JSON.stringify({ 24 23 name, ··· 30 29 cols, 31 30 }); 32 31 33 - const child = spawn(tsxBin, [serverModule], { 32 + const child = spawn(process.execPath, [serverModule], { 34 33 detached: true, 35 34 stdio: ["ignore", "ignore", "pipe"], 36 35 env: { ...process.env, PTY_SERVER_CONFIG: config },
+7 -7
tests/screenshot.test.ts
··· 860 860 861 861 describe("daemon spawning", () => { 862 862 const __dirname = path.dirname(fileURLToPath(import.meta.url)); 863 - const tsxBin = path.join(__dirname, "..", "node_modules", ".bin", "tsx"); 863 + const nodeBin = process.execPath; 864 864 const serverModule = path.join(__dirname, "..", "src", "server.ts"); 865 865 866 866 it( 867 - "daemon starts and serves a session via the tsx spawn mechanism", 867 + "daemon starts and serves a session via the node spawn mechanism", 868 868 async () => { 869 869 const name = uniqueName(); 870 870 const config = JSON.stringify({ ··· 876 876 cols: 80, 877 877 }); 878 878 879 - const child = spawn(tsxBin, [serverModule], { 879 + const child = spawn(nodeBin, [serverModule], { 880 880 detached: true, 881 881 stdio: ["ignore", "ignore", "pipe"], 882 882 env: { ...process.env, PTY_SERVER_CONFIG: config }, ··· 960 960 cols: 80, 961 961 }); 962 962 963 - const child = spawn(tsxBin, [serverModule], { 963 + const child = spawn(nodeBin, [serverModule], { 964 964 detached: true, 965 965 stdio: ["ignore", "ignore", "pipe"], 966 966 env: { ...process.env, PTY_SERVER_CONFIG: config }, ··· 1033 1033 1034 1034 describe("immediate attach after daemon start", () => { 1035 1035 const __dirname = path.dirname(fileURLToPath(import.meta.url)); 1036 - const tsxBin = path.join(__dirname, "..", "node_modules", ".bin", "tsx"); 1036 + const nodeBin = process.execPath; 1037 1037 const serverModule = path.join(__dirname, "..", "src", "server.ts"); 1038 1038 1039 1039 async function spawnDaemonAndWaitForSocket( ··· 1051 1051 cols: 80, 1052 1052 }); 1053 1053 1054 - const child = spawn(tsxBin, [serverModule], { 1054 + const child = spawn(nodeBin, [serverModule], { 1055 1055 detached: true, 1056 1056 stdio: ["ignore", "ignore", "pipe"], 1057 1057 env: { ...process.env, PTY_SERVER_CONFIG: config }, ··· 1170 1170 cols: 80, 1171 1171 }); 1172 1172 1173 - const child = spawn(tsxBin, [serverModule], { 1173 + const child = spawn(nodeBin, [serverModule], { 1174 1174 detached: true, 1175 1175 stdio: ["ignore", "ignore", "pipe"], 1176 1176 env: { ...process.env, PTY_SERVER_CONFIG: config },
+3 -3
tests/tui.test.ts
··· 7 7 import { Session } from "../src/testing/index.ts"; 8 8 9 9 const __dirname = path.dirname(fileURLToPath(import.meta.url)); 10 - const tsxBin = path.join(__dirname, "..", "node_modules", ".bin", "tsx"); 10 + const nodeBin = process.execPath; 11 11 const cliPath = path.join(__dirname, "..", "src", "cli.ts"); 12 12 const serverModule = path.join(__dirname, "..", "src", "server.ts"); 13 13 ··· 59 59 function createTuiSession(sessionDir: string, opts: { rows?: number; cols?: number } = {}): Session { 60 60 const rows = opts.rows ?? 24; 61 61 const cols = opts.cols ?? 80; 62 - const session = Session.spawn(tsxBin, [cliPath], { 62 + const session = Session.spawn(nodeBin, [cliPath], { 63 63 rows, 64 64 cols, 65 65 env: { ··· 92 92 cols: 80, 93 93 }); 94 94 95 - const child = spawn(tsxBin, [serverModule], { 95 + const child = spawn(nodeBin, [serverModule], { 96 96 detached: true, 97 97 stdio: ["ignore", "ignore", "pipe"], 98 98 env: {