Skip to content

Commit aabb2ec

Browse files
authored
Update node to 10.15.1 (coder#472)
* Update Node to 10.15.1 * Remove string replace that was used for oclif * Update nbin * Package node-pty and spdlog with nbin * Label stderr/stdout from shared process * Remove fork override * Prevent "already disposed" errors when trying to kill disposed proxies * Include spdlog dependencies * Shim /node_modules * Add node_modules to Docker ignore It keeps using my already-built .node files which results in a mismatching GLIBC version error. * Update nbin
1 parent dfabc07 commit aabb2ec

22 files changed

+95
-647
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ doc/
77
.travis.yml
88
LICENSE
99
README.md
10+
node_modules

.node-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.15.0
1+
10.15.1

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- 8.15.0
3+
- 10.15.1
44
env:
55
- VSCODE_VERSION="1.33.1" MAJOR_VERSION="1" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER-vsc$VSCODE_VERSION"
66
matrix:

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:8.15.0
1+
FROM node:10.15.1
22

33
# Install VS Code's deps. These are the only two it seems we need.
44
RUN apt-get update && apt-get install -y \

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

+5
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,13 @@
5656
"webpack-hot-middleware": "^2.24.3",
5757
"write-file-webpack-plugin": "^4.5.0"
5858
},
59+
"resolutions": {
60+
"bindings": "1.3.0"
61+
},
5962
"dependencies": {
6063
"node-loader": "^0.6.0",
64+
"node-pty": "0.8.1",
65+
"spdlog": "0.8.1",
6166
"webpack-merge": "^4.2.1"
6267
}
6368
}

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
},

packages/protocol/src/browser/client.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,10 @@ export class Client {
174174
* Make a remote call for a proxy's method using proto.
175175
*/
176176
private remoteCall(proxyId: number | Module, method: string, args: any[]): Promise<any> {
177-
if (this.disconnected && typeof proxyId === "number") {
178-
// Can assume killing or closing works because a disconnected proxy
179-
// is disposed on the server's side.
177+
if (typeof proxyId === "number" && (this.disconnected || !this.proxies.has(proxyId))) {
178+
// Can assume killing or closing works because a disconnected proxy is
179+
// disposed on the server's side, and a non-existent proxy has already
180+
// been disposed.
180181
switch (method) {
181182
case "close":
182183
case "kill":

0 commit comments

Comments
 (0)