diff --git a/.editorconfig b/.editorconfig index 65705d95..0f6dc944 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,4 +3,9 @@ root = true [*] indent_style = space trim_trailing_whitespace = true + +# The indent size used in the `package.json` file cannot be changed +# https://github.com/npm/npm/pull/3180#issuecomment-16336516 +[{*.yml,*.yaml,package.json}] +indent_style = space indent_size = 2 diff --git a/.prettierrc.yaml b/.prettierrc.yaml index a0634116..a58621d6 100644 --- a/.prettierrc.yaml +++ b/.prettierrc.yaml @@ -2,3 +2,16 @@ printWidth: 120 semi: false trailingComma: all arrowParens: always +singleQuote: false +useTabs: false + +overrides: + # Attempt to keep VScode's existing code style intact. + - files: "lib/vscode/**/*.ts" + options: + # No limit defined upstream. + printWidth: 10000 + semi: true + singleQuote: true + useTabs: true + arrowParens: avoid diff --git a/ci/build/build-vscode.sh b/ci/build/build-vscode.sh index faddf46e..85c75ea8 100755 --- a/ci/build/build-vscode.sh +++ b/ci/build/build-vscode.sh @@ -10,7 +10,7 @@ main() { cd "$(dirname "${0}")/../.." cd lib/vscode - yarn gulp compile-build compile-extensions-build + yarn gulp compile-build compile-web compile-extensions-build yarn gulp optimize --gulpfile ./coder.js if [[ $MINIFY ]]; then yarn gulp minify --gulpfile ./coder.js diff --git a/ci/dev/watch.ts b/ci/dev/watch.ts index 1503256c..63c56e6d 100644 --- a/ci/dev/watch.ts +++ b/ci/dev/watch.ts @@ -8,7 +8,7 @@ async function main(): Promise { try { const watcher = new Watcher() await watcher.watch() - } catch (error) { + } catch (error: any) { console.error(error.message) process.exit(1) } @@ -38,6 +38,9 @@ class Watcher { } const vscode = cp.spawn("yarn", ["watch"], { cwd: this.vscodeSourcePath }) + + const vscodeWebExtensions = cp.spawn("yarn", ["watch-web"], { cwd: this.vscodeSourcePath }) + const tsc = cp.spawn("tsc", ["--watch", "--pretty", "--preserveWatchOutput"], { cwd: this.rootPath }) const plugin = process.env.PLUGIN_DIR ? cp.spawn("yarn", ["build", "--watch"], { cwd: process.env.PLUGIN_DIR }) @@ -48,6 +51,10 @@ class Watcher { vscode.removeAllListeners() vscode.kill() + Watcher.log("killing vs code web extension watcher") + vscodeWebExtensions.removeAllListeners() + vscodeWebExtensions.kill() + Watcher.log("killing tsc") tsc.removeAllListeners() tsc.kill() @@ -75,10 +82,17 @@ class Watcher { Watcher.log("vs code watcher terminated unexpectedly") cleanup(code) }) + + vscodeWebExtensions.on("exit", (code) => { + Watcher.log("vs code extension watcher terminated unexpectedly") + cleanup(code) + }) + tsc.on("exit", (code) => { Watcher.log("tsc terminated unexpectedly") cleanup(code) }) + if (plugin) { plugin.on("exit", (code) => { Watcher.log("plugin terminated unexpectedly") @@ -86,8 +100,10 @@ class Watcher { }) } + vscodeWebExtensions.stderr.on("data", (d) => process.stderr.write(d)) vscode.stderr.on("data", (d) => process.stderr.write(d)) tsc.stderr.on("data", (d) => process.stderr.write(d)) + if (plugin) { plugin.stderr.on("data", (d) => process.stderr.write(d)) } diff --git a/package.json b/package.json index 2075b2cc..80d1cc25 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "main": "out/node/entry.js", "devDependencies": { "@schemastore/package": "^0.0.6", - "@types/body-parser": "^1.19.0", "@types/browserify": "^12.0.36", "@types/compression": "^1.7.0", "@types/cookie-parser": "^1.4.2", @@ -50,8 +49,7 @@ "@types/safe-compare": "^1.1.0", "@types/semver": "^7.1.0", "@types/split2": "^3.2.0", - "@types/tar-fs": "^2.0.0", - "@types/tar-stream": "^2.1.0", + "@types/trusted-types": "^2.0.2", "@types/ws": "^7.2.6", "@typescript-eslint/eslint-plugin": "^4.7.0", "@typescript-eslint/parser": "^4.7.0", @@ -70,7 +68,7 @@ "stylelint": "^13.0.0", "stylelint-config-recommended": "^5.0.0", "ts-node": "^10.0.0", - "typescript": "^4.1.3" + "typescript": "^4.4.0-dev.20210528" }, "resolutions": { "normalize-package-data": "^3.0.0", @@ -86,7 +84,6 @@ "dependencies": { "@coder/logger": "1.1.16", "argon2": "^0.28.0", - "body-parser": "^1.19.0", "compression": "^1.7.4", "cookie-parser": "^1.4.5", "env-paths": "^2.2.0", @@ -104,7 +101,6 @@ "safe-compare": "^1.1.4", "semver": "^7.1.3", "split2": "^3.2.2", - "tar-fs": "^2.0.0", "ws": "^8.0.0", "xdg-basedir": "^4.0.0", "yarn": "^1.22.4" diff --git a/src/browser/pages/login.html b/src/browser/pages/login.html index 896927e3..5e6c578b 100644 --- a/src/browser/pages/login.html +++ b/src/browser/pages/login.html @@ -30,7 +30,7 @@