Skip to content

Commit d0e497f

Browse files
committed
Package node-pty and spdlog with nbin
1 parent aa7956f commit d0e497f

13 files changed

+69
-552
lines changed

build/tasks.ts

+2-12
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,11 @@ const buildServerBinaryCopy = register("build:server:binary:copy", async (runner
4848
const bootstrapForkPath = path.join(pkgsPath, "vscode", "out", "bootstrap-fork.js");
4949
const webOutputPath = path.join(pkgsPath, "web", "out");
5050
const browserAppOutputPath = path.join(pkgsPath, "app", "browser", "out");
51-
const nodePtyModule = path.join(pkgsPath, "protocol", "node_modules", "node-pty-prebuilt", "build", "Release", "pty.node");
52-
const spdlogModule = path.join(pkgsPath, "protocol", "node_modules", "spdlog", "build", "Release", "spdlog.node");
5351
let ripgrepPath = path.join(pkgsPath, "..", "lib", "vscode", "node_modules", "vscode-ripgrep", "bin", "rg");
5452
if (isWin) {
5553
ripgrepPath += ".exe";
5654
}
5755

58-
if (!fs.existsSync(nodePtyModule)) {
59-
throw new Error("Could not find pty.node. Ensure all packages have been installed");
60-
}
61-
if (!fs.existsSync(spdlogModule)) {
62-
throw new Error("Could not find spdlog.node. Ensure all packages have been installed");
63-
}
6456
if (!fs.existsSync(webOutputPath)) {
6557
throw new Error("Web bundle must be built");
6658
}
@@ -91,8 +83,6 @@ const buildServerBinaryCopy = register("build:server:binary:copy", async (runner
9183
cpDir(webOutputPath, "auth", webOutputPath);
9284
cpDir(browserAppOutputPath, "unauth", browserAppOutputPath);
9385
fse.mkdirpSync(path.join(cliBuildPath, "dependencies"));
94-
fse.copySync(nodePtyModule, path.join(cliBuildPath, "dependencies", "pty.node"));
95-
fse.copySync(spdlogModule, path.join(cliBuildPath, "dependencies", "spdlog.node"));
9686
fse.copySync(ripgrepPath, path.join(cliBuildPath, "dependencies", "rg"));
9787
});
9888

@@ -204,9 +194,9 @@ register("package", async (runner, releaseTag) => {
204194
});
205195

206196
runner.cwd = releasePath;
207-
await os.platform() === "linux"
197+
await (os.platform() === "linux"
208198
? runner.execute("tar", ["-cvzf", `${archiveName}.tar.gz`, `${archiveName}`])
209-
: runner.execute("zip", ["-r", `${archiveName}.zip`, `${archiveName}`]);
199+
: runner.execute("zip", ["-r", `${archiveName}.zip`, `${archiveName}`]));
210200
});
211201

212202
run();

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@
5858
},
5959
"dependencies": {
6060
"node-loader": "^0.6.0",
61+
"node-pty": "^0.8.1",
62+
"spdlog": "^0.8.1",
6163
"webpack-merge": "^4.2.1"
6264
}
6365
}

packages/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
"@coder/(.*)/test": "<rootDir>/$1/test",
3434
"@coder/(.*)": "<rootDir>/$1/src",
3535
"vs/(.*)": "<rootDir>/../lib/vscode/src/vs/$1",
36-
"vszip": "<rootDir>/../lib/vscode/src/vs/base/node/zip.ts",
37-
"^node-pty": "node-pty-prebuilt"
36+
"vszip": "<rootDir>/../lib/vscode/src/vs/base/node/zip.ts"
3837
},
3938
"transform": {
4039
"^.+\\.tsx?$": "ts-jest"

packages/protocol/package.json

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
"dependencies": {
55
"express": "^4.16.4",
66
"google-protobuf": "^3.6.1",
7-
"node-pty-prebuilt": "^0.7.6",
8-
"spdlog": "^0.7.2",
97
"trash": "^4.3.0",
108
"ws": "^6.1.2"
119
},

0 commit comments

Comments
 (0)