Skip to content

Commit ba72851

Browse files
committed
Update VS Code to 1.37.0
1 parent b257c60 commit ba72851

21 files changed

+645
-1590
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ matrix:
88
- os: linux
99
dist: trusty
1010
env:
11-
- VSCODE_VERSION="1.36.1" MAJOR_VERSION="2" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER" TARGET="linux"
11+
- VSCODE_VERSION="1.37.0" MAJOR_VERSION="2" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER" TARGET="linux"
1212
- os: linux
1313
dist: trusty
1414
env:
15-
- VSCODE_VERSION="1.36.1" MAJOR_VERSION="2" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER" TARGET="alpine"
15+
- VSCODE_VERSION="1.37.0" MAJOR_VERSION="2" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER" TARGET="alpine"
1616
- os: osx
1717
env:
18-
- VSCODE_VERSION="1.36.1" MAJOR_VERSION="2" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER"
18+
- VSCODE_VERSION="1.37.0" MAJOR_VERSION="2" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER"
1919
before_install:
2020
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export MINIFY="true"; fi
2121
script:

README.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ data collected to improve code-server.
8181
```shell
8282
git clone https://github.com/microsoft/vscode
8383
cd vscode
84-
git checkout 1.36.1
84+
git checkout 1.37.0
8585
git clone https://github.com/cdr/code-server src/vs/server
8686
cd src/vs/server
8787
yarn patch:apply
@@ -109,23 +109,19 @@ directory.
109109

110110
Our changes include:
111111
- Add a `code-server` schema.
112-
- Make the extension sidebar work in the browser. Mostly involves removing
113-
Node-specific code for the `extensions` channel client and adding a
114-
`gallery` channel.
115112
- Allow multiple extension directories (both user and built-in).
116-
- Rewrite assets used in the CSS (like icons) or as images to use the base URL.
117-
- Change the loader to use the base URL.
118-
- Change the web socket to use the base URL and TLS if necessary.
119-
- Set the favicon using a relative path.
120-
- Modify the file service to support writing from an asynchronous stream (for
121-
uploading files).
113+
- Rewrite assets requested by the browser to use the base URL.
114+
- Modify the loader to use the base URL.
115+
- Modify the web socket to use the base URL and TLS if necessary.
116+
- Send client-side telemetry through the server.
122117
- Add a file prefix to ignore for temporary files created during upload.
123118
- Insert our upload service for use in editor windows and explorer.
124119
- Modify the log level to get its initial setting from the server.
125-
- Get telemetry working by adding a channel for it.
126120
- Change a regular expression used for mnemonics so it works on Firefox.
127121
- Make it possible for us to load code on the client.
128122
- Modify the build process to include our code.
123+
- Fix a CSP issue within a webview.
124+
- Fix an issue displaying extension contributions.
129125

130126
## License
131127
[MIT](LICENSE)

scripts/build-json.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// This builds the package and product JSON files for the final build.
2+
const crypto = require("crypto");
3+
const fs = require("fs");
4+
const path = require("path");
5+
const rootPath = path.resolve(__dirname, "..");
6+
const sourcePath = process.argv[2];
7+
const buildPath = process.argv[3];
8+
const vscodeVersion = process.argv[4];
9+
const codeServerVersion = process.argv[5];
10+
const util = require(path.join(sourcePath, "build/lib/util"));
11+
12+
function computeChecksum(filename) {
13+
return crypto.createHash("md5").update(fs.readFileSync(filename))
14+
.digest("base64").replace(/=+$/, "");
15+
}
16+
17+
const computeChecksums = (filenames) => {
18+
const result = {};
19+
filenames.forEach(function (filename) {
20+
result[filename] = computeChecksum(path.join(buildPath, "out", filename));
21+
});
22+
return result;
23+
};
24+
25+
const mergeAndWrite = (name, json = {}) => {
26+
const aJson = JSON.parse(fs.readFileSync(path.join(sourcePath, `${name}.json`)));
27+
const bJson = JSON.parse(fs.readFileSync(path.join(rootPath, "scripts", `${name}.json`)));
28+
29+
delete aJson.scripts;
30+
delete aJson.dependencies;
31+
delete aJson.devDependencies;
32+
delete aJson.optionalDependencies;
33+
34+
fs.writeFileSync(path.join(buildPath, `${name}.json`), JSON.stringify({
35+
...aJson,
36+
...bJson,
37+
...json,
38+
}, null, 2));
39+
};
40+
41+
42+
const writeProduct = () => {
43+
const checksums = computeChecksums([
44+
"vs/workbench/workbench.web.api.js",
45+
"vs/workbench/workbench.web.api.css",
46+
"vs/code/browser/workbench/workbench.html",
47+
"vs/code/browser/workbench/workbench.js",
48+
"vs/server/src/cli.js",
49+
"vs/server/src/uriTransformer.js",
50+
"vs/server/src/login/index.html"
51+
]);
52+
const date = new Date().toISOString();
53+
const commit = util.getVersion(rootPath);
54+
mergeAndWrite("product", { commit, date, checksums });
55+
mergeAndWrite("package", { codeServerVersion: `${codeServerVersion}-vsc${vscodeVersion}` });
56+
};
57+
58+
writeProduct();

scripts/merge.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

scripts/tasks.bash

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ function prepend-loader() {
5656
# Copy code-server into VS Code then build it.
5757
function build-code-server() {
5858
copy-server
59+
yarn gulp compile-build --max-old-space-size=32384
60+
5961
local min=""
60-
export BUILD_SOURCEVERSION
61-
BUILD_SOURCEVERSION=$(node -p "require('${sourcePath}/build/lib/git.js').getVersion('${rootPath}')")
6262
if [[ -n "${minify}" ]] ; then
6363
min="-min"
6464
yarn gulp minify-vscode --max-old-space-size=32384
@@ -74,11 +74,9 @@ function build-code-server() {
7474
cd "${buildPath}" && yarn --production --force --build-from-source
7575
rm "${buildPath}/"{package.json,yarn.lock,.yarnrc}
7676

77-
local packageJson="{\"codeServerVersion\": \"${codeServerVersion}-vsc${vscodeVersion}\"}"
7877
cp -r "${sourcePath}/.build/extensions" "${buildPath}"
79-
node "${rootPath}/scripts/merge.js" "${sourcePath}/package.json" "${rootPath}/scripts/package.json" "${buildPath}/package.json" "${packageJson}"
80-
node "${rootPath}/scripts/merge.js" "${sourcePath}/.build/product.json" "${rootPath}/scripts/product.json" "${buildPath}/product.json"
8178
cp -r "${sourcePath}/out-vscode${min}" "${buildPath}/out"
79+
node "${rootPath}/scripts/build-json.js" "${sourcePath}" "${buildPath}" "${vscodeVersion}" "${codeServerVersion}"
8280

8381
# Only keep production dependencies for the server.
8482
cp "${rootPath}/"{package.json,yarn.lock} "${buildPath}/out/vs/server"
@@ -143,7 +141,7 @@ function build-task() {
143141
log "Pre-built VS Code ${vscodeVersion} has no built extensions" "error"
144142
exit 1
145143
fi
146-
yarn gulp extensions-build-package --max-old-space-size=32384
144+
yarn gulp compile-extensions-build --max-old-space-size=32384
147145
fi
148146
build-code-server
149147
}

0 commit comments

Comments
 (0)