Skip to content

Commit 84dd3f5

Browse files
code-asherkylecarbs
authored andcommitted
Feature/1.32.0 update (#117)
* Update VS Code to 1.32.0 * Update patch Most changes are moved files, most notably shell.contribution.ts which is now main.contribution.ts. Also: - repl.ts no longer uses isMacintosh - shell.ts doesn't exist - added back the commented-out CSP headers * Use es6 target for bootstrap-fork * Directly reference cross-env binary yarn and npm find the binary just fine when running the tasks from the root but it doesn't work if you run one of those tasks directly from within those directories. * Update import paths and bootstrap-fork ignores * Increase memory limit for building default extensions * Fix invalid regex in Firefox * Update startup function * Fix global.require error * Update zip extract arguments * Update travis to minimum required Node version * Always chmod executable dependencies Fixes EACCESS errors for users that had the files unpacked before we added the chmod call. * Remove unused var declaration
1 parent d99734a commit 84dd3f5

16 files changed

+371
-408
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
language: node_js
22
node_js:
3-
- 8.9.3
3+
- 8.10.0
44
env:
5-
- VERSION="1.31.1-$TRAVIS_BUILD_NUMBER"
5+
- VERSION="1.32.0-$TRAVIS_BUILD_NUMBER"
66
matrix:
77
include:
88
- os: linux

build/tasks.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ const buildDefaultExtensions = register("build:default-extensions", async (runne
194194
if (!fs.existsSync(defaultExtensionsPath)) {
195195
await copyForDefaultExtensions();
196196
runner.cwd = extDirPath;
197-
const resp = await runner.execute(isWin ? "npx.cmd" : "npx", [isWin ? "gulp.cmd" : "gulp", "vscode-linux-x64"]);
197+
const resp = await runner.execute(isWin ? "npx.cmd" : "npx", [isWin ? "gulp.cmd" : "gulp", "vscode-linux-x64", "--max-old-space-size=32384"]);
198198
if (resp.exitCode !== 0) {
199199
throw new Error(`Failed to build default extensions: ${resp.stderr}`);
200200
}
@@ -224,7 +224,7 @@ const ensureCloned = register("vscode:clone", async (runner) => {
224224
}
225225

226226
runner.cwd = vscodePath;
227-
const checkout = await runner.execute("git", ["checkout", "tags/1.31.1"]);
227+
const checkout = await runner.execute("git", ["checkout", "tags/1.32.0"]);
228228
if (checkout.exitCode !== 0) {
229229
throw new Error(`Failed to checkout: ${checkout.stderr}`);
230230
}

packages/app/common/src/containers.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export class Server extends React.Component<ServerProps, {
258258
if (xhr.status === 200) {
259259
this.setState({
260260
status: "Online",
261-
version: "v1.31.0",
261+
version: process.env.VERSION,
262262
});
263263
} else {
264264
this.setState({

packages/server/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"files": [],
66
"scripts": {
77
"start": "node --max-old-space-size=32384 --require ts-node/register --require tsconfig-paths/register src/cli.ts",
8-
"build": "rm -rf ./out && cross-env CLI=true UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js",
8+
"build": "rm -rf ./out && ../../node_modules/.bin/cross-env CLI=true UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js",
99
"build:nexe": "node scripts/nexe.js"
1010
},
1111
"dependencies": {

packages/server/src/modules.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import * as path from "path";
33
import * as os from "os";
44
import { isCli, buildDir } from "./constants";
55

6-
declare var __non_webpack_require__: typeof require;
7-
86
/**
97
* Handling of native modules within the CLI
108
*/
@@ -27,10 +25,9 @@ export const setup = (dataDirectory: string): void => {
2725
const diskFile = path.join(dataDirectory, "dependencies", moduleName);
2826
if (!fs.existsSync(diskFile)) {
2927
fs.writeFileSync(diskFile, fs.readFileSync(memFile));
30-
31-
if (markExecutable) {
32-
fs.chmodSync(diskFile, "755");
33-
}
28+
}
29+
if (markExecutable) {
30+
fs.chmodSync(diskFile, "755");
3431
}
3532
};
3633

packages/vscode/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "VS Code implementation of the browser-based IDE client.",
44
"main": "src/index.ts",
55
"scripts": {
6-
"build:bootstrap-fork": "cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.bootstrap.config.js"
6+
"build:bootstrap-fork": "../../node_modules/.bin/cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.bootstrap.config.js"
77
},
88
"dependencies": {
99
"iconv-lite": "^0.4.24",

packages/vscode/src/fill/labels.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import * as labels from "vs/base/common/labels";
22

3-
// Here we simply disable translation of mnemonics and leave everything as &&.
4-
// Since we're in the browser, we can handle all platforms in the same way.
3+
// Disable all mnemonics for now until we implement it.
54
const target = labels as typeof labels;
65
target.mnemonicMenuLabel = (label: string, forceDisable?: boolean): string => {
7-
return forceDisable ? label.replace(/\(&&\w\)|&&/g, "") : label;
6+
return label.replace(/\(&&\w\)|&&/g, "");
7+
};
8+
target.mnemonicButtonLabel = (label: string): string => {
9+
return label.replace(/\(&&\w\)|&&/g, "");
810
};
9-
target.mnemonicButtonLabel = (label: string): string => { return label; };
1011
target.unmnemonicLabel = (label: string): string => { return label; };

packages/vscode/src/fill/paste.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as nls from "vs/nls";
22
import { Action } from "vs/base/common/actions";
3-
import { TERMINAL_COMMAND_ID } from "vs/workbench/parts/terminal/common/terminalCommands";
4-
import { ITerminalService } from "vs/workbench/parts/terminal/common/terminal";
5-
import * as actions from "vs/workbench/parts/terminal/electron-browser/terminalActions";
6-
import * as instance from "vs/workbench/parts/terminal/electron-browser/terminalInstance";
3+
import { TERMINAL_COMMAND_ID } from "vs/workbench/contrib/terminal/common/terminalCommands";
4+
import { ITerminalService } from "vs/workbench/contrib/terminal/common/terminal";
5+
import * as actions from "vs/workbench/contrib/terminal/electron-browser/terminalActions";
6+
import * as instance from "vs/workbench/contrib/terminal/electron-browser/terminalInstance";
77
import { client } from "../client";
88

99
const getLabel = (key: string, enabled: boolean): string => {

packages/vscode/src/fill/product.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IProductConfiguration } from "vs/platform/node/product";
1+
import { IProductConfiguration } from "vs/platform/product/node/product";
22

33
const product = {
44
nameShort: "code-server",

packages/vscode/src/fill/workbenchRegistry.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { IWorkbenchActionRegistry, Extensions } from "vs/workbench/common/action
55
import { SyncActionDescriptor } from "vs/platform/actions/common/actions";
66
import { ContextKeyExpr } from "vs/platform/contextkey/common/contextkey";
77
import { ToggleDevToolsAction } from "vs/workbench/electron-browser/actions/developerActions";
8-
import { TerminalPasteAction } from "vs/workbench/parts/terminal/electron-browser/terminalActions";
9-
import { KEYBINDING_CONTEXT_TERMINAL_FOCUS } from "vs/workbench/parts/terminal/common/terminal";
8+
import { TerminalPasteAction } from "vs/workbench/contrib/terminal/electron-browser/terminalActions";
9+
import { KEYBINDING_CONTEXT_TERMINAL_FOCUS } from "vs/workbench/contrib/terminal/common/terminal";
1010
import { KeyCode, KeyMod } from "vs/base/common/keyCodes";
1111
import { workbench } from "../workbench";
1212

packages/vscode/src/fill/zip.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function zip(tarPath: string, files: IFile[]): Promise<string> {
5858
});
5959
}
6060

61-
export async function extract(tarPath: string, targetPath: string, options: IExtractOptions = {}, logService: ILogService, token: CancellationToken): Promise<void> {
61+
export async function extract(tarPath: string, targetPath: string, options: IExtractOptions = {}, token: CancellationToken): Promise<void> {
6262
const sourcePathRegex = new RegExp(options.sourcePath ? `^${options.sourcePath}` : '');
6363

6464
return new Promise<void>(async (c, e) => {

packages/vscode/src/workbench.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import "./fill/workspacesService";
1717
import * as paths from "./fill/paths";
1818
import { PasteAction } from "./fill/paste";
1919

20-
import { ExplorerItem, ExplorerModel } from "vs/workbench/parts/files/common/explorerModel";
21-
import { IEditorGroup } from "vs/workbench/services/group/common/editorGroupsService";
20+
import { ExplorerItem, ExplorerModel } from "vs/workbench/contrib/files/common/explorerModel";
21+
import { IEditorGroup } from "vs/workbench/services/editor/common/editorGroupsService";
2222
import { IEditorService, IResourceEditor } from "vs/workbench/services/editor/common/editorService";
2323
import { INotificationService } from "vs/platform/notification/common/notification";
2424
import { IProgressService2, ProgressLocation } from "vs/platform/progress/common/progress";
@@ -171,7 +171,7 @@ export class Workbench {
171171
// If we try to import this above, workbench will be undefined due to
172172
// circular imports.
173173
require("vs/workbench/workbench.main");
174-
const { startup } = require("vs/workbench/electron-browser/main");
174+
const { main } = require("vs/workbench/electron-browser/main");
175175
const config: IWindowConfiguration = {
176176
machineId: "1",
177177
windowId: this.windowId,
@@ -189,7 +189,7 @@ export class Workbench {
189189
} else {
190190
config.folderUri = workspace as URI;
191191
}
192-
await startup(config);
192+
await main(config);
193193
const contextKeys = this.serviceCollection.get(IContextKeyService) as IContextKeyService;
194194
const bounded = this.clipboardContextKey.bindTo(contextKeys);
195195
client.clipboard.onPermissionChange((enabled) => {

packages/vscode/webpack.bootstrap.config.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const vsFills = path.join(root, "packages/vscode/src/fill");
88
module.exports = merge(
99
require(path.join(root, "scripts/webpack.node.config.js"))({
1010
typescriptCompilerOptions: {
11-
target: "es5",
11+
target: "es6",
1212
},
1313
}), {
1414
entry: path.join(root, "lib/vscode/src/bootstrap-fork.js"),
@@ -36,7 +36,7 @@ module.exports = merge(
3636
loader: "ignore-loader",
3737
}],
3838
}, {
39-
test: /((\\|\/)vs(\\|\/)code(\\|\/)electron-main(\\|\/))|((\\|\/)test(\\|\/))|(OSSREADME\.json$)|(\.(test\.ts|test\.js|d\.ts|qwoff|node|html|txt|exe|wuff|md|sh|scpt|less)$)/,
39+
test: /((\\|\/)vs(\\|\/)code(\\|\/)electron-main(\\|\/))|((\\|\/)test(\\|\/))|(OSSREADME\.json$)|\/browser\//,
4040
use: [{
4141
loader: "ignore-loader",
4242
}],
@@ -49,6 +49,8 @@ module.exports = merge(
4949
"node-pty": path.resolve(fills, "empty.ts"),
5050
"windows-mutex": path.resolve(fills, "empty.ts"),
5151
"windows-process-tree": path.resolve(fills, "empty.ts"),
52+
"vscode-windows-registry": path.resolve(fills, "empty.ts"),
53+
"vscode-sqlite3": path.resolve(fills, "empty.ts"),
5254
"vs/base/browser/browser": path.resolve(fills, "empty.ts"),
5355

5456
"electron": path.join(vsFills, "stdioElectron.ts"),
@@ -57,9 +59,9 @@ module.exports = merge(
5759
"native-watchdog": path.join(vsFills, "native-watchdog.ts"),
5860
"vs/base/common/amd": path.resolve(vsFills, "amd.ts"),
5961
"vs/base/node/paths": path.resolve(vsFills, "paths.ts"),
60-
"vs/platform/node/package": path.resolve(vsFills, "package.ts"),
61-
"vs/platform/node/product": path.resolve(vsFills, "product.ts"),
62-
"vs/platform/node/zip": path.resolve(vsFills, "zip.ts"),
62+
"vs/platform/product/node/package": path.resolve(vsFills, "package.ts"),
63+
"vs/platform/product/node/product": path.resolve(vsFills, "product.ts"),
64+
"vs/base/node/zip": path.resolve(vsFills, "zip.ts"),
6365
"vs": path.resolve(root, "lib/vscode/src/vs"),
6466
},
6567
},

packages/web/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coder/web",
33
"scripts": {
4-
"build": "cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js"
4+
"build": "../../node_modules/.bin/cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js"
55
}
6-
}
6+
}

packages/web/webpack.config.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module.exports = merge(
3232
"selenium-webdriver": path.join(fills, "empty.ts"),
3333
"vscode": path.join(fills, "empty.ts"),
3434
"vscode-fsevents": path.join(fills, "empty.ts"),
35+
"vscode-windows-registry": path.resolve(fills, "empty.ts"),
3536
"vsda": path.join(fills, "empty.ts"),
3637
"windows-foreground-love": path.join(fills, "empty.ts"),
3738
"windows-mutex": path.join(fills, "empty.ts"),
@@ -66,11 +67,14 @@ module.exports = merge(
6667
"native-watchdog": path.join(vsFills, "native-watchdog.ts"),
6768
"iconv-lite": path.join(vsFills, "iconv-lite.ts"),
6869

70+
// This seems to be in the wrong place?
71+
"vs/workbench/contrib/codeEditor/electron-browser/media/WordWrap_16x.svg": "vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/WordWrap_16x.svg",
72+
6973
"vs/base/node/paths": path.join(vsFills, "paths.ts"),
7074
"vs/base/common/amd": path.join(vsFills, "amd.ts"),
71-
"vs/platform/node/product": path.join(vsFills, "product.ts"),
72-
"vs/platform/node/package": path.join(vsFills, "package.ts"),
73-
"vs/platform/node/zip": path.resolve(vsFills, "zip.ts"),
75+
"vs/platform/product/node/package": path.resolve(vsFills, "package.ts"),
76+
"vs/platform/product/node/product": path.resolve(vsFills, "product.ts"),
77+
"vs/base/node/zip": path.resolve(vsFills, "zip.ts"),
7478
"vs": path.join(root, "lib", "vscode", "src", "vs"),
7579
},
7680
},

0 commit comments

Comments
 (0)