Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8a13648

Browse files
committedNov 27, 2020
vscode: Make eslint pass
I disabled code-layering and code-import-patterns as I don't think we can make them easily pass as we reference all sorts of code from both browser and node files. At least not worth the headache now to refactor everything.
1 parent c6a118b commit 8a13648

File tree

2 files changed

+89
-48
lines changed

2 files changed

+89
-48
lines changed
 

‎ci/dev/lint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ main() {
1313
fi
1414

1515
cd lib/vscode
16-
yarn eslint --max-warnings=0
16+
# Run this periodically in vanilla VS code to make sure we don't add any more warnings.
17+
yarn eslint --max-warnings=3
1718
cd "$OLDPWD"
1819
}
1920

‎ci/dev/vscode.patch

Lines changed: 87 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
diff --git a/.eslintrc.json b/.eslintrc.json
2+
index 055bc22f8e48e7dee559b83ac56c12a54c6ad544..14c026c04a7df5ac94bea2856e3a7a513c213775 100644
3+
--- a/.eslintrc.json
4+
+++ b/.eslintrc.json
5+
@@ -64,7 +64,7 @@
6+
"code-no-standalone-editor": "warn",
7+
"code-no-unexternalized-strings": "warn",
8+
"code-layering": [
9+
- "warn",
10+
+ "off",
11+
{
12+
"common": [],
13+
"node": [
14+
@@ -90,7 +90,7 @@
15+
}
16+
],
17+
"code-import-patterns": [
18+
- "warn",
19+
+ "off",
20+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
21+
// !!! Do not relax these rules !!!
22+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
123
diff --git a/.gitignore b/.gitignore
224
index b7f5b58c8ede171be547c56b61ce76f79a3accc3..856fbd8c67460fe099d7fbee1475e906b500f053 100644
325
--- a/.gitignore
@@ -437,7 +459,7 @@ index ef2291d49b13c9c995afc90eab9c92afabc2b3b4..29b2f9dfc2b7fa998ac1188db06dee95
437459
\ No newline at end of file
438460
+}
439461
diff --git a/src/vs/base/node/languagePacks.js b/src/vs/base/node/languagePacks.js
440-
index 2c64061da7b01aef0bfe3cec851da232ca9461c8..c0ef8faedd406c38bf9c55bbbdbbb060046492d9 100644
462+
index 2c64061da7b01aef0bfe3cec851da232ca9461c8..db47fe2eb1cded1e9c33b42fe700421c36a1d481 100644
441463
--- a/src/vs/base/node/languagePacks.js
442464
+++ b/src/vs/base/node/languagePacks.js
443465
@@ -128,7 +128,10 @@ function factory(nodeRequire, path, fs, perf) {
@@ -448,12 +470,12 @@ index 2c64061da7b01aef0bfe3cec851da232ca9461c8..c0ef8faedd406c38bf9c55bbbdbbb060
448470
+ // NOTE@coder: Swapped require with readFile since require is cached and
449471
+ // we don't restart the server-side portion of code-server when the
450472
+ // language changes.
451-
+ return JSON.parse(fs.readFileSync(configFile, "utf8"));
473+
+ return JSON.parse(fs.readFileSync(configFile, 'utf8'));
452474
} catch (err) {
453475
// Do nothing. If we can't read the file we have no
454476
// language pack config.
455477
diff --git a/src/vs/code/browser/workbench/workbench.ts b/src/vs/code/browser/workbench/workbench.ts
456-
index 0ef8b9dc81419b53b27cf111fb206d72ba56bada..62a79602a831bca0dc62ad57dc10a9375f8b9cdb 100644
478+
index 0ef8b9dc81419b53b27cf111fb206d72ba56bada..e490cf7449623f96c780a65d538fad72cf9306e4 100644
457479
--- a/src/vs/code/browser/workbench/workbench.ts
458480
+++ b/src/vs/code/browser/workbench/workbench.ts
459481
@@ -17,6 +17,7 @@ import { isStandalone } from 'vs/base/browser/browser';
@@ -496,7 +518,7 @@ index 0ef8b9dc81419b53b27cf111fb206d72ba56bada..62a79602a831bca0dc62ad57dc10a937
496518
+ };
497519
+
498520
+ // Strip the protocol from the authority if it exists.
499-
+ const normalizeAuthority = (authority: string): string => authority.replace(/^https?:\/\//, "");
521+
+ const normalizeAuthority = (authority: string): string => authority.replace(/^https?:\/\//, '');
500522
+ if (config.remoteAuthority) {
501523
+ (config as any).remoteAuthority = normalizeAuthority(config.remoteAuthority);
502524
+ }
@@ -769,7 +791,7 @@ index 096b9e23493539c9937940a56e555d95bbae38d9..ef37e614004f550f7b64eacd362f6894
769791
remove(key: string, scope: StorageScope): void {
770792
diff --git a/src/vs/server/browser/client.ts b/src/vs/server/browser/client.ts
771793
new file mode 100644
772-
index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84a892f49d
794+
index 0000000000000000000000000000000000000000..ead6a3cd5e98fdde074f19ee5043f152ed407146
773795
--- /dev/null
774796
+++ b/src/vs/server/browser/client.ts
775797
@@ -0,0 +1,240 @@
@@ -806,15 +828,15 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
806828
+ * Remove extra slashes in a URL.
807829
+ */
808830
+export const normalize = (url: string, keepTrailing = false): string => {
809-
+ return url.replace(/\/\/+/g, "/").replace(/\/+$/, keepTrailing ? "/" : "");
831+
+ return url.replace(/\/\/+/g, '/').replace(/\/+$/, keepTrailing ? '/' : '');
810832
+};
811833
+
812834
+/**
813835
+ * Get options embedded in the HTML.
814836
+ */
815837
+export const getOptions = <T extends Options>(): T => {
816838
+ try {
817-
+ return JSON.parse(document.getElementById("coder-options")!.getAttribute("data-settings")!);
839+
+ return JSON.parse(document.getElementById('coder-options')!.getAttribute('data-settings')!);
818840
+ } catch (error) {
819841
+ return {} as T;
820842
+ }
@@ -927,12 +949,12 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
927949
+ const logService = (services.get(ILogService) as ILogService);
928950
+ const storageService = (services.get(IStorageService) as IStorageService);
929951
+ // We set this here first in case the path changes.
930-
+ const updateCheckEndpoint = path.join(window.location.pathname, "/update/check")
952+
+ const updateCheckEndpoint = path.join(window.location.pathname, '/update/check');
931953
+ const getUpdate = async (): Promise<void> => {
932-
+ logService.debug("Checking for update...");
954+
+ logService.debug('Checking for update...');
933955
+
934956
+ const response = await fetch(updateCheckEndpoint, {
935-
+ headers: { "Accept": "application/json" },
957+
+ headers: { 'Accept': 'application/json' },
936958
+ });
937959
+ if (!response.ok) {
938960
+ throw new Error(response.statusText);
@@ -945,7 +967,7 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
945967
+ return;
946968
+ }
947969
+
948-
+ const lastNoti = storageService.getNumber("csLastUpdateNotification", StorageScope.GLOBAL);
970+
+ const lastNoti = storageService.getNumber('csLastUpdateNotification', StorageScope.GLOBAL);
949971
+ if (lastNoti) {
950972
+ // Only remind them again after two days.
951973
+ const timeout = 1000*60*24*2;
@@ -955,7 +977,7 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
955977
+ }
956978
+ }
957979
+
958-
+ storageService.store("csLastUpdateNotification", Date.now(), StorageScope.GLOBAL);
980+
+ storageService.store('csLastUpdateNotification', Date.now(), StorageScope.GLOBAL);
959981
+ (services.get(INotificationService) as INotificationService).notify({
960982
+ severity: Severity.Info,
961983
+ message: `[code-server v${json.latest}](https://github.com/cdr/code-server/releases/tag/v${json.latest}) has been released!`,
@@ -974,9 +996,9 @@ index 0000000000000000000000000000000000000000..385b9da491d38a9f5d10fab6e4666c84
974996
+ updateLoop();
975997
+
976998
+ // This will be used to set the background color while VS Code loads.
977-
+ const theme = storageService.get("colorThemeData", StorageScope.GLOBAL);
999+
+ const theme = storageService.get('colorThemeData', StorageScope.GLOBAL);
9781000
+ if (theme) {
979-
+ localStorage.setItem("colorThemeData", theme);
1001+
+ localStorage.setItem('colorThemeData', theme);
9801002
+ }
9811003
+};
9821004
+
@@ -1072,7 +1094,7 @@ index 0000000000000000000000000000000000000000..5dd5406befcb593ad6366d9e98f46485
10721094
+export const IExtHostNodeProxy = createDecorator<IExtHostNodeProxy>('IExtHostNodeProxy');
10731095
diff --git a/src/vs/server/browser/mainThreadNodeProxy.ts b/src/vs/server/browser/mainThreadNodeProxy.ts
10741096
new file mode 100644
1075-
index 0000000000000000000000000000000000000000..21a139288e5b8f56016491879d69d01da929decb
1097+
index 0000000000000000000000000000000000000000..acabf8c167cabc954b8611a77f57641f3ca0b444
10761098
--- /dev/null
10771099
+++ b/src/vs/server/browser/mainThreadNodeProxy.ts
10781100
@@ -0,0 +1,55 @@
@@ -1115,7 +1137,7 @@ index 0000000000000000000000000000000000000000..21a139288e5b8f56016491879d69d01d
11151137
+ scheme: window.location.protocol.replace(':', ''),
11161138
+ authority: window.location.host,
11171139
+ // Use FileAccess to get the static base path.
1118-
+ path: FileAccess.asBrowserUri("", require).path,
1140+
+ path: FileAccess.asBrowserUri('', require).path,
11191141
+ query: `tar=${encodeURIComponent(extensionUri.path)}`,
11201142
+ });
11211143
+ const response = await fetch(fetchUri.toString(true));
@@ -1405,7 +1427,7 @@ index 0000000000000000000000000000000000000000..56331ff1fc32bbd82e769aaecb551e42
14051427
+require('../../bootstrap-amd').load('vs/server/entry');
14061428
diff --git a/src/vs/server/ipc.d.ts b/src/vs/server/ipc.d.ts
14071429
new file mode 100644
1408-
index 0000000000000000000000000000000000000000..6ce56bec114a6d8daf5dd3ded945ea78fc72a5c6
1430+
index 0000000000000000000000000000000000000000..0a4a91e5e36bda7f888feedda348aaff5fe32d27
14091431
--- /dev/null
14101432
+++ b/src/vs/server/ipc.d.ts
14111433
@@ -0,0 +1,131 @@
@@ -1518,8 +1540,8 @@ index 0000000000000000000000000000000000000000..6ce56bec114a6d8daf5dd3ded945ea78
15181540
+ readonly logLevel?: number;
15191541
+ readonly workspaceProvider?: {
15201542
+ payload: [
1521-
+ ["userDataPath", string],
1522-
+ ["enableProposedApi", string],
1543+
+ ['userDataPath', string],
1544+
+ ['enableProposedApi', string],
15231545
+ ];
15241546
+ };
15251547
+ };
@@ -1542,7 +1564,7 @@ index 0000000000000000000000000000000000000000..6ce56bec114a6d8daf5dd3ded945ea78
15421564
+}
15431565
diff --git a/src/vs/server/node/channel.ts b/src/vs/server/node/channel.ts
15441566
new file mode 100644
1545-
index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1e95c3b9d
1567+
index 0000000000000000000000000000000000000000..4827b2da780b66e6dfd65c2a2f1c938cb23f6c26
15461568
--- /dev/null
15471569
+++ b/src/vs/server/node/channel.ts
15481570
@@ -0,0 +1,897 @@
@@ -1976,7 +1998,7 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
19761998
+class Terminal {
19771999
+ private readonly process: TerminalProcess;
19782000
+ private _pid: number = -1;
1979-
+ private _title: string = "";
2001+
+ private _title: string = '';
19802002
+ public readonly workspaceId: string;
19812003
+ public readonly workspaceName: string;
19822004
+ private readonly persist: boolean;
@@ -2013,7 +2035,7 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
20132035
+ onFirstListenerDidAdd: () => {
20142036
+ // We only need to replay if the terminal is being reconnected which is
20152037
+ // true if there is a dispose timeout.
2016-
+ if (typeof this.disposeTimeout !== "undefined") {
2038+
+ if (typeof this.disposeTimeout !== 'undefined') {
20172039
+ return;
20182040
+ }
20192041
+
@@ -2026,7 +2048,7 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
20262048
+ events: [{
20272049
+ cols: this.cols,
20282050
+ rows: this.rows,
2029-
+ data: this.replayData.join(""),
2051+
+ data: this.replayData.join(''),
20302052
+ }]
20312053
+ });
20322054
+ },
@@ -2245,15 +2267,15 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
22452267
+
22462268
+ private async createTerminalProcess(remoteAuthority: string, args: terminal.ICreateTerminalProcessArguments): Promise<terminal.ICreateTerminalProcessResult> {
22472269
+ const terminalId = this.id++;
2248-
+ logger.debug('Creating terminal', field('id', terminalId), field("terminals", this.terminals.size));
2270+
+ logger.debug('Creating terminal', field('id', terminalId), field('terminals', this.terminals.size));
22492271
+
22502272
+ const shellLaunchConfig: IShellLaunchConfig = {
22512273
+ name: args.shellLaunchConfig.name,
22522274
+ executable: args.shellLaunchConfig.executable,
22532275
+ args: args.shellLaunchConfig.args,
22542276
+ // TODO: Should we transform if it's a string as well? The incoming
22552277
+ // transform only takes `UriComponents` so I suspect it's not necessary.
2256-
+ cwd: typeof args.shellLaunchConfig.cwd !== "string"
2278+
+ cwd: typeof args.shellLaunchConfig.cwd !== 'string'
22572279
+ ? transformIncoming(remoteAuthority, args.shellLaunchConfig.cwd)
22582280
+ : args.shellLaunchConfig.cwd,
22592281
+ env: args.shellLaunchConfig.env,
@@ -2445,7 +2467,7 @@ index 0000000000000000000000000000000000000000..693174ee0d21353c3a08a42fd30eaad1
24452467
+}
24462468
diff --git a/src/vs/server/node/connection.ts b/src/vs/server/node/connection.ts
24472469
new file mode 100644
2448-
index 0000000000000000000000000000000000000000..93062cadc627c61e0829c27a72894b81e6a0e039
2470+
index 0000000000000000000000000000000000000000..51f10fec9486a5f4b8ce04140a42b8cdcebe1ad6
24492471
--- /dev/null
24502472
+++ b/src/vs/server/node/connection.ts
24512473
@@ -0,0 +1,171 @@
@@ -2529,7 +2551,7 @@ index 0000000000000000000000000000000000000000..93062cadc627c61e0829c27a72894b81
25292551
+ private readonly environment: INativeEnvironmentService,
25302552
+ ) {
25312553
+ super(protocol, token);
2532-
+ this.logger = logger.named("exthost", field("token", token));
2554+
+ this.logger = logger.named('exthost', field('token', token));
25332555
+ this.protocol.dispose();
25342556
+ this.spawn(locale, buffer).then((p) => this.process = p);
25352557
+ this.protocol.getUnderlyingSocket().pause();
@@ -2611,7 +2633,7 @@ index 0000000000000000000000000000000000000000..93062cadc627c61e0829c27a72894b81
26112633
+ this.sendInitMessage(buffer);
26122634
+ break;
26132635
+ default:
2614-
+ this.logger.error('Unexpected message', field("event", event));
2636+
+ this.logger.error('Unexpected message', field('event', event));
26152637
+ break;
26162638
+ }
26172639
+ });
@@ -3101,7 +3123,7 @@ index 0000000000000000000000000000000000000000..3d428a57d31f29c40f9c3ce45f715b44
31013123
+};
31023124
diff --git a/src/vs/server/node/protocol.ts b/src/vs/server/node/protocol.ts
31033125
new file mode 100644
3104-
index 0000000000000000000000000000000000000000..0d9310038c0ca378579652d89bc8ac84924213db
3126+
index 0000000000000000000000000000000000000000..57213f92828fafefcab0e3c401a1e8ede472c9cc
31053127
--- /dev/null
31063128
+++ b/src/vs/server/node/protocol.ts
31073129
@@ -0,0 +1,91 @@
@@ -3143,7 +3165,7 @@ index 0000000000000000000000000000000000000000..0d9310038c0ca378579652d89bc8ac84
31433165
+ return new Promise((resolve, reject) => {
31443166
+ const timeout = setTimeout(() => {
31453167
+ logger.error('Handshake timed out', field('token', this.options.reconnectionToken));
3146-
+ reject(new Error("timed out"));
3168+
+ reject(new Error('timed out'));
31473169
+ }, 10000); // Matches the client timeout.
31483170
+
31493171
+ const handler = this.onControlMessage((rawMessage) => {
@@ -3198,7 +3220,7 @@ index 0000000000000000000000000000000000000000..0d9310038c0ca378579652d89bc8ac84
31983220
+}
31993221
diff --git a/src/vs/server/node/server.ts b/src/vs/server/node/server.ts
32003222
new file mode 100644
3201-
index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb1261051c71e08b
3223+
index 0000000000000000000000000000000000000000..5521d51a92d1b1e3469e890bae41277b560d08a2
32023224
--- /dev/null
32033225
+++ b/src/vs/server/node/server.ts
32043226
@@ -0,0 +1,302 @@
@@ -3212,7 +3234,7 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
32123234
+import { getMachineId } from 'vs/base/node/id';
32133235
+import { ClientConnectionEvent, createChannelReceiver, IPCServer, IServerChannel } from 'vs/base/parts/ipc/common/ipc';
32143236
+import { LogsDataCleaner } from 'vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner';
3215-
+import { main } from "vs/code/node/cliProcessMain";
3237+
+import { main } from 'vs/code/node/cliProcessMain';
32163238
+import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
32173239
+import { ConfigurationService } from 'vs/platform/configuration/common/configurationService';
32183240
+import { ExtensionHostDebugBroadcastChannel } from 'vs/platform/debug/common/extensionHostDebugIpc';
@@ -3260,7 +3282,7 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
32603282
+import { Protocol } from 'vs/server/node/protocol';
32613283
+import { getUriTransformer } from 'vs/server/node/util';
32623284
+import { REMOTE_TERMINAL_CHANNEL_NAME } from 'vs/workbench/contrib/terminal/common/remoteTerminalChannel';
3263-
+import { REMOTE_FILE_SYSTEM_CHANNEL_NAME } from "vs/workbench/services/remote/common/remoteAgentFileSystemChannel";
3285+
+import { REMOTE_FILE_SYSTEM_CHANNEL_NAME } from 'vs/workbench/services/remote/common/remoteAgentFileSystemChannel';
32643286
+import { RemoteExtensionLogFileName } from 'vs/workbench/services/remote/common/remoteAgentService';
32653287
+
32663288
+export class Vscode {
@@ -3306,8 +3328,8 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
33063328
+ logLevel: getLogLevel(environment),
33073329
+ workspaceProvider: {
33083330
+ payload: [
3309-
+ ["userDataPath", environment.userDataPath],
3310-
+ ["enableProposedApi", JSON.stringify(options.args["enable-proposed-api"] || [])]
3331+
+ ['userDataPath', environment.userDataPath],
3332+
+ ['enableProposedApi', JSON.stringify(options.args['enable-proposed-api'] || [])]
33113333
+ ],
33123334
+ },
33133335
+ },
@@ -3407,7 +3429,7 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
34073429
+ const offline = Array.from(connections.values())
34083430
+ .filter((connection) => typeof connection.offline !== 'undefined');
34093431
+ for (let i = 0, max = offline.length - this.maxExtraOfflineConnections; i < max; ++i) {
3410-
+ logger.debug('Disposing offline connection', field("token", offline[i].token));
3432+
+ logger.debug('Disposing offline connection', field('token', offline[i].token));
34113433
+ offline[i].dispose();
34123434
+ }
34133435
+ }
@@ -3506,7 +3528,7 @@ index 0000000000000000000000000000000000000000..c10a5a3a6771a94b2cbcb699bb126105
35063528
+}
35073529
diff --git a/src/vs/server/node/util.ts b/src/vs/server/node/util.ts
35083530
new file mode 100644
3509-
index 0000000000000000000000000000000000000000..fa47e993b46802f1a26457649e9e8bc467a73bf2
3531+
index 0000000000000000000000000000000000000000..d76f655e36647b1c9d38d2f7986f2b78a4bcfb50
35103532
--- /dev/null
35113533
+++ b/src/vs/server/node/util.ts
35123534
@@ -0,0 +1,13 @@
@@ -3521,7 +3543,7 @@ index 0000000000000000000000000000000000000000..fa47e993b46802f1a26457649e9e8bc4
35213543
+ * preserves slashes so it can be edited by hand more easily.
35223544
+ */
35233545
+export const encodePath = (path: string): string => {
3524-
+ return path.split("/").map((p) => encodeURIComponent(p)).join("/");
3546+
+ return path.split('/').map((p) => encodeURIComponent(p)).join('/');
35253547
+};
35263548
diff --git a/src/vs/workbench/api/browser/extensionHost.contribution.ts b/src/vs/workbench/api/browser/extensionHost.contribution.ts
35273549
index a4df8523631563a498c9ab6e51105074616a481a..f03da094e9080544102bbd3f037a71b348e5bd83 100644
@@ -3692,7 +3714,7 @@ index b3c89e51cfc25a53293a352a2a8ad50d5f26d595..e21abe4e13bc25a5b72f556bbfb61085
36923714
registerSingleton(IExtHostTunnelService, ExtHostTunnelService);
36933715
+registerSingleton(IExtHostNodeProxy, class extends NotImplementedProxy<IExtHostNodeProxy>(String(IExtHostNodeProxy)) { whenReady = Promise.resolve(); });
36943716
diff --git a/src/vs/workbench/api/node/extHostCLIServer.ts b/src/vs/workbench/api/node/extHostCLIServer.ts
3695-
index b3857616f7006127c423dcef7020ae4653da5ff6..1c1b80a2767bf77f30ca5bfee715c337120d3625 100644
3717+
index b3857616f7006127c423dcef7020ae4653da5ff6..594cd75b546a4b845e56122c846f63e29dc5f948 100644
36963718
--- a/src/vs/workbench/api/node/extHostCLIServer.ts
36973719
+++ b/src/vs/workbench/api/node/extHostCLIServer.ts
36983720
@@ -11,6 +11,8 @@ import { IWindowOpenable, IOpenWindowOptions } from 'vs/platform/windows/common/
@@ -3709,7 +3731,7 @@ index b3857616f7006127c423dcef7020ae4653da5ff6..1c1b80a2767bf77f30ca5bfee715c337
37093731

37103732
private async setup(): Promise<string> {
37113733
+ // NOTE@coder: Write this out so we can get the most recent path.
3712-
+ fs.promises.writeFile(join(tmpdir(), "vscode-ipc"), this._ipcHandlePath).catch((error) => {
3734+
+ fs.promises.writeFile(join(tmpdir(), 'vscode-ipc'), this._ipcHandlePath).catch((error) => {
37133735
+ this.logService.error(error);
37143736
+ });
37153737
+
@@ -3734,7 +3756,7 @@ index 3843fdec386edc09a1d361b63de892a04e0070ed..8aac4df527857e964798362a69f5591b
37343756
registerSingleton(ILogService, ExtHostLogService);
37353757
+registerSingleton(IExtHostNodeProxy, ExtHostNodeProxy);
37363758
diff --git a/src/vs/workbench/api/worker/extHostExtensionService.ts b/src/vs/workbench/api/worker/extHostExtensionService.ts
3737-
index 021af6e0f8983c492f9cdd048ba2dcae7640bc1d..814dd0ff2fa7737e07833d8092c8f48953c73c47 100644
3759+
index 021af6e0f8983c492f9cdd048ba2dcae7640bc1d..4474a93beba03365709c3cda98b682131ad4745f 100644
37383760
--- a/src/vs/workbench/api/worker/extHostExtensionService.ts
37393761
+++ b/src/vs/workbench/api/worker/extHostExtensionService.ts
37403762
@@ -11,6 +11,7 @@ import { RequireInterceptor } from 'vs/workbench/api/common/extHostRequireInterc
@@ -3752,7 +3774,7 @@ index 021af6e0f8983c492f9cdd048ba2dcae7640bc1d..814dd0ff2fa7737e07833d8092c8f489
37523774
- return extensionDescription.browser;
37533775
+ // NOTE@coder: We can support regular Node modules as well. These will just
37543776
+ // require the root of the extension.
3755-
+ return extensionDescription.browser || ".";
3777+
+ return extensionDescription.browser || '.';
37563778
}
37573779

37583780
- protected async _loadCommonJSModule<T>(module: URI, activationTimesBuilder: ExtensionActivationTimesBuilder): Promise<T> {
@@ -3954,7 +3976,7 @@ index 85d83f37da179a1e39266cf72a02e971f590308e..0659738b36df1747c9afcabf8d9abf26
39543976
};
39553977

39563978
diff --git a/src/vs/workbench/services/environment/browser/environmentService.ts b/src/vs/workbench/services/environment/browser/environmentService.ts
3957-
index a8d43045ecc8cbe04b3f8440cff16d42aadbcad0..8e122c761ac7ddfee11f9dda2ac5e845b893cc28 100644
3979+
index a8d43045ecc8cbe04b3f8440cff16d42aadbcad0..d051473515e35b331672b780109bd40229153c8c 100644
39583980
--- a/src/vs/workbench/services/environment/browser/environmentService.ts
39593981
+++ b/src/vs/workbench/services/environment/browser/environmentService.ts
39603982
@@ -119,8 +119,25 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
@@ -3975,9 +3997,9 @@ index a8d43045ecc8cbe04b3f8440cff16d42aadbcad0..8e122c761ac7ddfee11f9dda2ac5e845
39753997
+ get userRoamingDataHome(): URI { return joinPath(URI.file(this.userDataPath).with({ scheme: Schemas.vscodeRemote }), 'User'); }
39763998
+ @memoize
39773999
+ get userDataPath(): string {
3978-
+ const dataPath = this.payload?.get("userDataPath");
4000+
+ const dataPath = this.payload?.get('userDataPath');
39794001
+ if (!dataPath) {
3980-
+ throw new Error("userDataPath was not provided to environment service");
4002+
+ throw new Error('userDataPath was not provided to environment service');
39814003
+ }
39824004
+ return dataPath;
39834005
+ }
@@ -4039,9 +4061,18 @@ index de7e301d3f0c67ce662827f61427a5a7b3616b9f..877ea8e11e6e6d34b9a8fe16287af309
40394061
}
40404062

40414063
diff --git a/src/vs/workbench/services/extensions/browser/extensionService.ts b/src/vs/workbench/services/extensions/browser/extensionService.ts
4042-
index 1dff19bf177eff24f722b748b79835a653241c4d..0f59ad290c82cc4c9d09c565c1018cc275ca0249 100644
4064+
index 1dff19bf177eff24f722b748b79835a653241c4d..01ce9bc00cc39c27e75db006425c359f813a4719 100644
40434065
--- a/src/vs/workbench/services/extensions/browser/extensionService.ts
40444066
+++ b/src/vs/workbench/services/extensions/browser/extensionService.ts
4067+
@@ -87,7 +87,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten
4068+
if (code === ExtensionHostExitCode.StartTimeout10s) {
4069+
this._notificationService.prompt(
4070+
Severity.Error,
4071+
- nls.localize('extensionService.startTimeout', "The Web Worker Extension Host did not start in 10s."),
4072+
+ nls.localize('extensionService.startTimeout', 'The Web Worker Extension Host did not start in 10s.'),
4073+
[]
4074+
);
4075+
return;
40454076
@@ -177,8 +177,10 @@ export class ExtensionService extends AbstractExtensionService implements IExten
40464077
this._remoteAgentService.getEnvironment(),
40474078
this._remoteAgentService.scanExtensions()
@@ -4050,10 +4081,19 @@ index 1dff19bf177eff24f722b748b79835a653241c4d..0f59ad290c82cc4c9d09c565c1018cc2
40504081
remoteExtensions = this._checkEnabledAndProposedAPI(remoteExtensions);
40514082
+ // NOTE@coder: Include remotely hosted extensions that should run locally.
40524083
+ localExtensions = this._checkEnabledAndProposedAPI(localExtensions)
4053-
+ .concat(remoteExtensions.filter(ext => !ext.browser && ext.extensionKind && (ext.extensionKind === "web" || ext.extensionKind.includes("web"))));
4084+
+ .concat(remoteExtensions.filter(ext => !ext.browser && ext.extensionKind && (ext.extensionKind === 'web' || ext.extensionKind.includes('web'))));
40544085

40554086
const remoteAgentConnection = this._remoteAgentService.getConnection();
40564087
this._runningLocation = this._runningLocationClassifier.determineRunningLocation(localExtensions, remoteExtensions);
4088+
@@ -188,7 +190,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten
4089+
4090+
const result = this._registry.deltaExtensions(remoteExtensions.concat(localExtensions), []);
4091+
if (result.removedDueToLooping.length > 0) {
4092+
- this._logOrShowMessage(Severity.Error, nls.localize('looping', "The following extensions contain dependency loops and have been disabled: {0}", result.removedDueToLooping.map(e => `'${e.identifier.value}'`).join(', ')));
4093+
+ this._logOrShowMessage(Severity.Error, nls.localize('looping', 'The following extensions contain dependency loops and have been disabled: {0}', result.removedDueToLooping.map(e => `'${e.identifier.value}'`).join(', ')));
4094+
}
4095+
4096+
if (remoteEnv && remoteAgentConnection) {
40574097
diff --git a/src/vs/workbench/services/extensions/common/extensionsUtil.ts b/src/vs/workbench/services/extensions/common/extensionsUtil.ts
40584098
index 65e532ee58dfc06ed944846d01b885cb8f260ebc..0b6282fde7ad03c7ea9872a777cbf487253abed1 100644
40594099
--- a/src/vs/workbench/services/extensions/common/extensionsUtil.ts

0 commit comments

Comments
 (0)
Please sign in to comment.