Skip to content

Commit 34c6751

Browse files
authored
Update VS Code to 1.92.2 (#6941)
* Update VS Code to 1.92.2 * Use server-main.js to load VS Code It looks like the bootstrap files are now bundled so we can no longer require them. We could make them included again, but maybe it is better to go through the main entrypoint anyway because it includes some nls stuff which is maybe necessary. This also fixes what looks like a bug where we could create two servers if two requests came in. I am not sure what the practical consequences of that would be, but it will no longer do that. * Drop es2020 patch Unfortunately, VS Code will not load with this. It seems to be because `this` is being used in static properties, and it becomes `void 0` for some reason under the es2020 target. For example: static PREFIX_BY_CATEGORY = `${this.PREFIX}${this.SCOPE_PREFIX}`; becomes AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY = `${(void 0).PREFIX}${(void 0).SCOPE_PREFIX}`; Which, obviously, will not work. Older versions of Safari (and maybe other browsers) are likely affected. * Fix display language * Update Playwright I think maybe because of the dropped es2020 patch that Webkit is now failing because it is too old. * Do not wait for networkidle in e2e tests I am not sure what is going on but some tests on Webkit are timing out and it seems the page is loaded but something is still trying to download. Not good, but for now try to at least get the tests passing.
1 parent 461d4cb commit 34c6751

29 files changed

+352
-804
lines changed

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ Code v99.99.999
2222

2323
## Unreleased
2424

25+
Code v1.92.1
26+
27+
### Breaking changes
28+
29+
- Dropped a patch that changed the compile target from es2022 to es2020 because
30+
it no longer works with the way VS Code uses static properties. This may break
31+
older browsers, so those browsers will either have to be updated or use an
32+
older version of code-server.
33+
34+
### Changed
35+
36+
- Updated to Code 1.92.1.
37+
2538
## [4.91.0](https://github.com/coder/code-server/releases/tag/v4.91.0) - 2024-07-10
2639

2740
Code v1.91.0

lib/vscode

Submodule vscode updated 969 files

patches/base-path.diff

+23-21
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html
8686
<link data-name="vs/workbench/workbench.web.main" rel="stylesheet" href="{{WORKBENCH_WEB_BASE_URL}}/out/vs/workbench/workbench.web.main.css">
8787

8888
</head>
89-
@@ -38,7 +38,7 @@
90-
<script src="{{WORKBENCH_WEB_BASE_URL}}/out/vs/loader.js"></script>
91-
<script src="{{WORKBENCH_WEB_BASE_URL}}/out/vs/webPackagePaths.js"></script>
89+
@@ -40,7 +40,7 @@
9290
<script>
91+
92+
// Packages
9393
- const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();
9494
+ const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString();
9595
Object.keys(self.webPackagePaths).map(function (key, index) {
@@ -111,7 +111,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
111111
===================================================================
112112
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
113113
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
114-
@@ -270,16 +270,15 @@ export class WebClientServer {
114+
@@ -269,16 +269,15 @@ export class WebClientServer {
115115
return void res.end();
116116
}
117117

@@ -133,7 +133,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
133133
);
134134
if (!remoteAuthority) {
135135
return serveError(req, res, 400, `Bad request.`);
136-
@@ -306,8 +305,12 @@ export class WebClientServer {
136+
@@ -305,8 +304,12 @@ export class WebClientServer {
137137
scopes: [['user:email'], ['repo']]
138138
} : undefined;
139139

@@ -146,29 +146,39 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
146146
embedderIdentifier: 'server-distro',
147147
extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
148148
...this._productService.extensionsGallery,
149-
@@ -343,8 +346,10 @@ export class WebClientServer {
149+
@@ -335,7 +338,7 @@ export class WebClientServer {
150+
folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']),
151+
workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']),
152+
productConfiguration,
153+
- callbackRoute: this._callbackRoute
154+
+ callbackRoute: vscodeBase + this._callbackRoute
155+
};
156+
157+
const cookies = cookie.parse(req.headers.cookie || '');
158+
@@ -352,9 +355,11 @@ export class WebClientServer {
150159
const values: { [key: string]: string } = {
151160
WORKBENCH_WEB_CONFIGURATION: asJSON(workbenchWebConfiguration),
152161
WORKBENCH_AUTH_SESSION: authSessionInfo ? asJSON(authSessionInfo) : '',
153162
- WORKBENCH_WEB_BASE_URL: this._staticRoute,
154-
- WORKBENCH_NLS_BASE_URL: nlsBaseUrl ? `${nlsBaseUrl}${!nlsBaseUrl.endsWith('/') ? '/' : ''}${this._productService.commit}/${this._productService.version}/` : '',
155163
+ WORKBENCH_WEB_BASE_URL: vscodeBase + this._staticRoute,
156-
+ WORKBENCH_NLS_BASE_URL: vscodeBase + (nlsBaseUrl ? `${nlsBaseUrl}${!nlsBaseUrl.endsWith('/') ? '/' : ''}${this._productService.commit}/${this._productService.version}/` : ''),
164+
WORKBENCH_NLS_URL,
165+
- WORKBENCH_NLS_FALLBACK_URL: `${this._staticRoute}/out/nls.messages.js`
166+
+ WORKBENCH_NLS_FALLBACK_URL: `${vscodeBase}${this._staticRoute}/out/nls.messages.js`,
157167
+ BASE: base,
158168
+ VS_BASE: vscodeBase,
159169
};
160170

161171
if (useTestResolver) {
162-
@@ -371,7 +376,7 @@ export class WebClientServer {
172+
@@ -381,7 +386,7 @@ export class WebClientServer {
163173
'default-src \'self\';',
164174
'img-src \'self\' https: data: blob:;',
165175
'media-src \'self\';',
166-
- `script-src 'self' 'unsafe-eval' ${this._getScriptCspHashes(data).join(' ')} '${webWorkerExtensionHostIframeScriptSHA}' ${useTestResolver ? '' : `http://${remoteAuthority}`};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
167-
+ `script-src 'self' 'unsafe-eval' ${this._getScriptCspHashes(data).join(' ')} '${webWorkerExtensionHostIframeScriptSHA}' ${useTestResolver ? '' : ''};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
176+
- `script-src 'self' 'unsafe-eval' ${WORKBENCH_NLS_BASE_URL ?? ''} ${this._getScriptCspHashes(data).join(' ')} '${webWorkerExtensionHostIframeScriptSHA}' ${useTestResolver ? '' : `http://${remoteAuthority}`};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
177+
+ `script-src 'self' 'unsafe-eval' ${WORKBENCH_NLS_BASE_URL ?? ''} ${this._getScriptCspHashes(data).join(' ')} '${webWorkerExtensionHostIframeScriptSHA}' ${useTestResolver ? '' : ``};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
168178
'child-src \'self\';',
169179
`frame-src 'self' https://*.vscode-cdn.net data:;`,
170180
'worker-src \'self\' data: blob:;',
171-
@@ -444,3 +449,70 @@ export class WebClientServer {
181+
@@ -454,3 +459,70 @@ export class WebClientServer {
172182
return void res.end(data);
173183
}
174184
}
@@ -298,15 +308,7 @@ Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/ext
298308
===================================================================
299309
--- code-server.orig/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
300310
+++ code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
301-
@@ -16,7 +16,6 @@ import { getServiceMachineId } from 'vs/
302-
import { IStorageService } from 'vs/platform/storage/common/storage';
303-
import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry';
304-
import { getTelemetryLevel, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
305-
-import { RemoteAuthorities } from 'vs/base/common/network';
306-
import { TargetPlatform } from 'vs/platform/extensions/common/extensions';
307-
308-
const WEB_EXTENSION_RESOURCE_END_POINT_SEGMENT = '/web-extension-resource/';
309-
@@ -99,7 +98,7 @@ export abstract class AbstractExtensionR
311+
@@ -98,7 +98,7 @@ export abstract class AbstractExtensionR
310312
: version,
311313
path: 'extension'
312314
}));

patches/clipboard.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ Index: code-server/lib/vscode/src/vs/server/node/server.cli.ts
102102
===================================================================
103103
--- code-server.orig/lib/vscode/src/vs/server/node/server.cli.ts
104104
+++ code-server/lib/vscode/src/vs/server/node/server.cli.ts
105-
@@ -76,6 +76,7 @@ const isSupportedForPipe = (optionId: ke
105+
@@ -75,6 +75,7 @@ const isSupportedForPipe = (optionId: ke
106106
case 'verbose':
107107
case 'remote':
108108
case 'locate-shell-integration-path':
109109
+ case 'stdin-to-clipboard':
110110
return true;
111111
default:
112112
return false;
113-
@@ -293,6 +294,23 @@ export async function main(desc: Product
113+
@@ -292,6 +293,23 @@ export async function main(desc: Product
114114
}
115115
}
116116
} else {

patches/disable-builtin-ext-update.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
77
===================================================================
88
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
99
+++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
10-
@@ -287,6 +287,10 @@ export class Extension implements IExten
10+
@@ -299,6 +299,10 @@ export class Extension implements IExten
1111
if (this.type === ExtensionType.System && this.productService.quality === 'stable') {
1212
return false;
1313
}

0 commit comments

Comments
 (0)