Skip to content

Commit 51a2a2a

Browse files
committed
feat: apply patch after setting up subtree
1 parent 41bee49 commit 51a2a2a

File tree

84 files changed

+3360
-191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+3360
-191
lines changed

lib/vscode/.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414
**/extensions/**/build/**
1515
**/extensions/markdown-language-features/media/**
1616
**/extensions/typescript-basics/test/colorize-fixtures/**
17+
# This is a code-server code symlink.
18+
src/vs/base/node/proxy_agent.ts

lib/vscode/.eslintrc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"code-no-standalone-editor": "warn",
6565
"code-no-unexternalized-strings": "warn",
6666
"code-layering": [
67-
"warn",
67+
"off",
6868
{
6969
"common": [],
7070
"node": [
@@ -90,7 +90,7 @@
9090
}
9191
],
9292
"code-import-patterns": [
93-
"warn",
93+
"off",
9494
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9595
// !!! Do not relax these rules !!!
9696
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

lib/vscode/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ out-vscode-reh-web-pkg/
2525
out-vscode-web/
2626
out-vscode-web-min/
2727
out-vscode-web-pkg/
28-
src/vs/server
2928
resources/server
3029
build/node_modules
3130
coverage/

lib/vscode/.yarnrc

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

lib/vscode/build/gulpfile.reh.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ BUILD_TARGETS.forEach(({ platform, arch }) => {
4444
});
4545

4646
function getNodeVersion() {
47+
return process.versions.node;
4748
const yarnrc = fs.readFileSync(path.join(REPO_ROOT, 'remote', '.yarnrc'), 'utf8');
4849
const target = /^target "(.*)"$/m.exec(yarnrc)[1];
4950
return target;

lib/vscode/build/lib/extensions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function fromLocal(extensionPath: string, forWeb: boolean): Stream {
7070
if (isWebPacked) {
7171
input = updateExtensionPackageJSON(input, (data: any) => {
7272
delete data.scripts;
73-
delete data.dependencies;
73+
// https://github.com/cdr/code-server/pull/2041#issuecomment-685910322
7474
delete data.devDependencies;
7575
if (data.main) {
7676
data.main = data.main.replace('/out/', /dist/);

lib/vscode/build/lib/node.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import * as path from 'path';
7-
import * as fs from 'fs';
87

98
const root = path.dirname(path.dirname(__dirname));
10-
const yarnrcPath = path.join(root, 'remote', '.yarnrc');
11-
const yarnrc = fs.readFileSync(yarnrcPath, 'utf8');
12-
const version = /^target\s+"([^"]+)"$/m.exec(yarnrc)![1];
9+
const version = process.versions.node;
1310
const node = process.platform === 'win32' ? 'node.exe' : 'node';
1411
const nodePath = path.join(root, '.build', 'node', `v${version}`, `${process.platform}-${process.arch}`, node);
1512

16-
console.log(nodePath);
13+
console.log(nodePath);

lib/vscode/build/lib/util.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ export function streamToPromise(stream: NodeJS.ReadWriteStream): Promise<void> {
336336
}
337337

338338
export function getElectronVersion(): string {
339+
return process.versions.node;
339340
const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8');
340341
const target = /^target "(.*)"$/m.exec(yarnrc)![1];
341342
return target;

lib/vscode/build/npm/postinstall.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ function yarnInstall(location, opts) {
3333

3434
yarnInstall('extensions'); // node modules shared by all extensions
3535

36-
if (!(process.platform === 'win32' && (process.arch === 'arm64' || process.env['npm_config_arch'] === 'arm64'))) {
37-
yarnInstall('remote'); // node modules used by vscode server
38-
yarnInstall('remote/web'); // node modules used by vscode web
39-
}
36+
// NOTE@coder: Skip these dependencies since we don't use them.
37+
// if (!(process.platform === 'win32' && (process.arch === 'arm64' || process.env['npm_config_arch'] === 'arm64'))) {
38+
// yarnInstall('remote'); // node modules used by vscode server
39+
// yarnInstall('remote/web'); // node modules used by vscode web
40+
// }
4041

4142
const allExtensionFolders = fs.readdirSync('extensions');
4243
const extensions = allExtensionFolders.filter(e => {
@@ -69,9 +70,9 @@ runtime "${runtime}"`;
6970
}
7071

7172
yarnInstall(`build`); // node modules required for build
72-
yarnInstall('test/automation'); // node modules required for smoketest
73-
yarnInstall('test/smoke'); // node modules required for smoketest
74-
yarnInstall('test/integration/browser'); // node modules required for integration
73+
// yarnInstall('test/automation'); // node modules required for smoketest
74+
// yarnInstall('test/smoke'); // node modules required for smoketest
75+
// yarnInstall('test/integration/browser'); // node modules required for integration
7576
yarnInstallBuildDependencies(); // node modules for watching, specific to host node version, not electron
7677

7778
cp.execSync('git config pull.rebase true');

lib/vscode/build/npm/preinstall.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ let err = false;
88
const majorNodeVersion = parseInt(/^(\d+)\./.exec(process.versions.node)[1]);
99

1010
if (majorNodeVersion < 10 || majorNodeVersion >= 13) {
11-
console.error('\033[1;31m*** Please use node >=10 and <=12.\033[0;0m');
12-
err = true;
11+
// We are ok building above Node 12.
12+
// console.error('\033[1;31m*** Please use node >=10 and <=12.\033[0;0m');
13+
// err = true;
1314
}
1415

1516
const cp = require('child_process');

0 commit comments

Comments
 (0)