Skip to content

Feature/1.32.0 update #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 8, 2019
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: node_js
node_js:
- 8.9.3
- 8.10.0
env:
- VERSION="1.31.1-$TRAVIS_BUILD_NUMBER"
- VERSION="1.32.0-$TRAVIS_BUILD_NUMBER"
matrix:
include:
- os: linux
Expand Down
4 changes: 2 additions & 2 deletions build/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ const buildDefaultExtensions = register("build:default-extensions", async (runne
if (!fs.existsSync(defaultExtensionsPath)) {
await copyForDefaultExtensions();
runner.cwd = extDirPath;
const resp = await runner.execute(isWin ? "npx.cmd" : "npx", [isWin ? "gulp.cmd" : "gulp", "vscode-linux-x64"]);
const resp = await runner.execute(isWin ? "npx.cmd" : "npx", [isWin ? "gulp.cmd" : "gulp", "vscode-linux-x64", "--max-old-space-size=32384"]);
if (resp.exitCode !== 0) {
throw new Error(`Failed to build default extensions: ${resp.stderr}`);
}
Expand Down Expand Up @@ -224,7 +224,7 @@ const ensureCloned = register("vscode:clone", async (runner) => {
}

runner.cwd = vscodePath;
const checkout = await runner.execute("git", ["checkout", "tags/1.31.1"]);
const checkout = await runner.execute("git", ["checkout", "tags/1.32.0"]);
if (checkout.exitCode !== 0) {
throw new Error(`Failed to checkout: ${checkout.stderr}`);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/app/common/src/containers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export class Server extends React.Component<ServerProps, {
if (xhr.status === 200) {
this.setState({
status: "Online",
version: "v1.31.0",
version: process.env.VERSION,
});
} else {
this.setState({
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"files": [],
"scripts": {
"start": "node --max-old-space-size=32384 --require ts-node/register --require tsconfig-paths/register src/cli.ts",
"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",
"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",
"build:nexe": "node scripts/nexe.js"
},
"dependencies": {
Expand Down
9 changes: 3 additions & 6 deletions packages/server/src/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import * as path from "path";
import * as os from "os";
import { isCli, buildDir } from "./constants";

declare var __non_webpack_require__: typeof require;

/**
* Handling of native modules within the CLI
*/
Expand All @@ -27,10 +25,9 @@ export const setup = (dataDirectory: string): void => {
const diskFile = path.join(dataDirectory, "dependencies", moduleName);
if (!fs.existsSync(diskFile)) {
fs.writeFileSync(diskFile, fs.readFileSync(memFile));

if (markExecutable) {
fs.chmodSync(diskFile, "755");
}
}
if (markExecutable) {
fs.chmodSync(diskFile, "755");
}
};

Expand Down
2 changes: 1 addition & 1 deletion packages/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "VS Code implementation of the browser-based IDE client.",
"main": "src/index.ts",
"scripts": {
"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"
"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"
},
"dependencies": {
"iconv-lite": "^0.4.24",
Expand Down
9 changes: 5 additions & 4 deletions packages/vscode/src/fill/labels.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as labels from "vs/base/common/labels";

// Here we simply disable translation of mnemonics and leave everything as &&.
// Since we're in the browser, we can handle all platforms in the same way.
// Disable all mnemonics for now until we implement it.
const target = labels as typeof labels;
target.mnemonicMenuLabel = (label: string, forceDisable?: boolean): string => {
return forceDisable ? label.replace(/\(&&\w\)|&&/g, "") : label;
return label.replace(/\(&&\w\)|&&/g, "");
};
target.mnemonicButtonLabel = (label: string): string => {
return label.replace(/\(&&\w\)|&&/g, "");
};
target.mnemonicButtonLabel = (label: string): string => { return label; };
target.unmnemonicLabel = (label: string): string => { return label; };
8 changes: 4 additions & 4 deletions packages/vscode/src/fill/paste.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as nls from "vs/nls";
import { Action } from "vs/base/common/actions";
import { TERMINAL_COMMAND_ID } from "vs/workbench/parts/terminal/common/terminalCommands";
import { ITerminalService } from "vs/workbench/parts/terminal/common/terminal";
import * as actions from "vs/workbench/parts/terminal/electron-browser/terminalActions";
import * as instance from "vs/workbench/parts/terminal/electron-browser/terminalInstance";
import { TERMINAL_COMMAND_ID } from "vs/workbench/contrib/terminal/common/terminalCommands";
import { ITerminalService } from "vs/workbench/contrib/terminal/common/terminal";
import * as actions from "vs/workbench/contrib/terminal/electron-browser/terminalActions";
import * as instance from "vs/workbench/contrib/terminal/electron-browser/terminalInstance";
import { client } from "../client";

const getLabel = (key: string, enabled: boolean): string => {
Expand Down
2 changes: 1 addition & 1 deletion packages/vscode/src/fill/product.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IProductConfiguration } from "vs/platform/node/product";
import { IProductConfiguration } from "vs/platform/product/node/product";

const product = {
nameShort: "code-server",
Expand Down
4 changes: 2 additions & 2 deletions packages/vscode/src/fill/workbenchRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { IWorkbenchActionRegistry, Extensions } from "vs/workbench/common/action
import { SyncActionDescriptor } from "vs/platform/actions/common/actions";
import { ContextKeyExpr } from "vs/platform/contextkey/common/contextkey";
import { ToggleDevToolsAction } from "vs/workbench/electron-browser/actions/developerActions";
import { TerminalPasteAction } from "vs/workbench/parts/terminal/electron-browser/terminalActions";
import { KEYBINDING_CONTEXT_TERMINAL_FOCUS } from "vs/workbench/parts/terminal/common/terminal";
import { TerminalPasteAction } from "vs/workbench/contrib/terminal/electron-browser/terminalActions";
import { KEYBINDING_CONTEXT_TERMINAL_FOCUS } from "vs/workbench/contrib/terminal/common/terminal";
import { KeyCode, KeyMod } from "vs/base/common/keyCodes";
import { workbench } from "../workbench";

Expand Down
2 changes: 1 addition & 1 deletion packages/vscode/src/fill/zip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function zip(tarPath: string, files: IFile[]): Promise<string> {
});
}

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

return new Promise<void>(async (c, e) => {
Expand Down
8 changes: 4 additions & 4 deletions packages/vscode/src/workbench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import "./fill/workspacesService";
import * as paths from "./fill/paths";
import { PasteAction } from "./fill/paste";

import { ExplorerItem, ExplorerModel } from "vs/workbench/parts/files/common/explorerModel";
import { IEditorGroup } from "vs/workbench/services/group/common/editorGroupsService";
import { ExplorerItem, ExplorerModel } from "vs/workbench/contrib/files/common/explorerModel";
import { IEditorGroup } from "vs/workbench/services/editor/common/editorGroupsService";
import { IEditorService, IResourceEditor } from "vs/workbench/services/editor/common/editorService";
import { INotificationService } from "vs/platform/notification/common/notification";
import { IProgressService2, ProgressLocation } from "vs/platform/progress/common/progress";
Expand Down Expand Up @@ -171,7 +171,7 @@ export class Workbench {
// If we try to import this above, workbench will be undefined due to
// circular imports.
require("vs/workbench/workbench.main");
const { startup } = require("vs/workbench/electron-browser/main");
const { main } = require("vs/workbench/electron-browser/main");
const config: IWindowConfiguration = {
machineId: "1",
windowId: this.windowId,
Expand All @@ -189,7 +189,7 @@ export class Workbench {
} else {
config.folderUri = workspace as URI;
}
await startup(config);
await main(config);
const contextKeys = this.serviceCollection.get(IContextKeyService) as IContextKeyService;
const bounded = this.clipboardContextKey.bindTo(contextKeys);
client.clipboard.onPermissionChange((enabled) => {
Expand Down
12 changes: 7 additions & 5 deletions packages/vscode/webpack.bootstrap.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const vsFills = path.join(root, "packages/vscode/src/fill");
module.exports = merge(
require(path.join(root, "scripts/webpack.node.config.js"))({
typescriptCompilerOptions: {
target: "es5",
target: "es6",
},
}), {
entry: path.join(root, "lib/vscode/src/bootstrap-fork.js"),
Expand Down Expand Up @@ -36,7 +36,7 @@ module.exports = merge(
loader: "ignore-loader",
}],
}, {
test: /((\\|\/)vs(\\|\/)code(\\|\/)electron-main(\\|\/))|((\\|\/)test(\\|\/))|(OSSREADME\.json$)|(\.(test\.ts|test\.js|d\.ts|qwoff|node|html|txt|exe|wuff|md|sh|scpt|less)$)/,
test: /((\\|\/)vs(\\|\/)code(\\|\/)electron-main(\\|\/))|((\\|\/)test(\\|\/))|(OSSREADME\.json$)|\/browser\//,
use: [{
loader: "ignore-loader",
}],
Expand All @@ -49,6 +49,8 @@ module.exports = merge(
"node-pty": path.resolve(fills, "empty.ts"),
"windows-mutex": path.resolve(fills, "empty.ts"),
"windows-process-tree": path.resolve(fills, "empty.ts"),
"vscode-windows-registry": path.resolve(fills, "empty.ts"),
"vscode-sqlite3": path.resolve(fills, "empty.ts"),
"vs/base/browser/browser": path.resolve(fills, "empty.ts"),

"electron": path.join(vsFills, "stdioElectron.ts"),
Expand All @@ -57,9 +59,9 @@ module.exports = merge(
"native-watchdog": path.join(vsFills, "native-watchdog.ts"),
"vs/base/common/amd": path.resolve(vsFills, "amd.ts"),
"vs/base/node/paths": path.resolve(vsFills, "paths.ts"),
"vs/platform/node/package": path.resolve(vsFills, "package.ts"),
"vs/platform/node/product": path.resolve(vsFills, "product.ts"),
"vs/platform/node/zip": path.resolve(vsFills, "zip.ts"),
"vs/platform/product/node/package": path.resolve(vsFills, "package.ts"),
"vs/platform/product/node/product": path.resolve(vsFills, "product.ts"),
"vs/base/node/zip": path.resolve(vsFills, "zip.ts"),
"vs": path.resolve(root, "lib/vscode/src/vs"),
},
},
Expand Down
4 changes: 2 additions & 2 deletions packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coder/web",
"scripts": {
"build": "cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js"
"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"
}
}
}
10 changes: 7 additions & 3 deletions packages/web/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = merge(
"selenium-webdriver": path.join(fills, "empty.ts"),
"vscode": path.join(fills, "empty.ts"),
"vscode-fsevents": path.join(fills, "empty.ts"),
"vscode-windows-registry": path.resolve(fills, "empty.ts"),
"vsda": path.join(fills, "empty.ts"),
"windows-foreground-love": path.join(fills, "empty.ts"),
"windows-mutex": path.join(fills, "empty.ts"),
Expand Down Expand Up @@ -66,11 +67,14 @@ module.exports = merge(
"native-watchdog": path.join(vsFills, "native-watchdog.ts"),
"iconv-lite": path.join(vsFills, "iconv-lite.ts"),

// This seems to be in the wrong place?
"vs/workbench/contrib/codeEditor/electron-browser/media/WordWrap_16x.svg": "vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/WordWrap_16x.svg",

"vs/base/node/paths": path.join(vsFills, "paths.ts"),
"vs/base/common/amd": path.join(vsFills, "amd.ts"),
"vs/platform/node/product": path.join(vsFills, "product.ts"),
"vs/platform/node/package": path.join(vsFills, "package.ts"),
"vs/platform/node/zip": path.resolve(vsFills, "zip.ts"),
"vs/platform/product/node/package": path.resolve(vsFills, "package.ts"),
"vs/platform/product/node/product": path.resolve(vsFills, "product.ts"),
"vs/base/node/zip": path.resolve(vsFills, "zip.ts"),
"vs": path.join(root, "lib", "vscode", "src", "vs"),
},
},
Expand Down
Loading