Skip to content

Commit d796cc2

Browse files
authored
chore(Code): upgrade to 1.65 (#5047)
* docs(CONTRIBUTING): update Code workflow * chore: update vscode to release/1.65 * chore(quilt): ignore patch backup files * chore: refresh/update patches for 1.65
1 parent 0fceb12 commit d796cc2

19 files changed

+40
-63
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ test/test-results
2222

2323
# Quilt's internal data.
2424
/.pc
25+
/patches/*.diff~

docs/CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ re-apply the patches.
9696
### Version updates to Code
9797

9898
1. Update the `lib/vscode` submodule to the desired upstream version branch.
99-
2. From the code-server **project root**, run `yarn install`.
100-
3. Apply the patches (`quilt push -a`) or restore your stashed changes. At this
99+
2. Apply the patches (`quilt push -a`) or restore your stashed changes. At this
101100
stage you may need to resolve conflicts. For example use `quilt push -f`,
102101
manually apply the rejected portions, then `quilt refresh`.
102+
3. From the code-server **project root**, run `yarn install`.
103103
4. Test code-server locally to make sure everything works.
104104
5. Check the Node.js version that's used by Electron (which is shipped with VS
105105
Code. If necessary, update your version of Node.js to match.

lib/vscode

Submodule vscode updated 2032 files

patches/base-path.diff

+6-6
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
185185
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
186186
productConfiguration: <Partial<IProductConfiguration>>{
187187
+ rootEndpoint: base,
188+
embedderIdentifier: 'server-distro',
188189
extensionsGallery: this._webExtensionResourceUrlTemplate ? {
189190
...this._productService.extensionsGallery,
190-
'resourceUrlTemplate': this._webExtensionResourceUrlTemplate.with({
191-
@@ -289,7 +295,9 @@ export class WebClientServer {
191+
@@ -290,7 +296,9 @@ export class WebClientServer {
192192
} : undefined
193193
}
194194
})))
@@ -199,7 +199,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
199199

200200
const cspDirectives = [
201201
'default-src \'self\';',
202-
@@ -368,3 +376,70 @@ export class WebClientServer {
202+
@@ -369,3 +377,70 @@ export class WebClientServer {
203203
return res.end(data);
204204
}
205205
}
@@ -286,19 +286,19 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
286286
===================================================================
287287
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.ts
288288
+++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
289-
@@ -504,6 +504,7 @@ function doCreateUri(path: string, query
289+
@@ -482,6 +482,7 @@ function doCreateUri(path: string, query
290290
});
291291
}
292292

293293
+ path = (window.location.pathname + "/" + path).replace(/\/\/+/g, "/")
294294
return URI.parse(window.location.href).with({ path, query });
295295
}
296296

297-
@@ -515,7 +516,7 @@ function doCreateUri(path: string, query
297+
@@ -493,7 +494,7 @@ function doCreateUri(path: string, query
298298
if (!configElement || !configElementAttribute) {
299299
throw new Error('Missing web configuration element');
300300
}
301-
- const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents, workspaceUri?: UriComponents } = JSON.parse(configElementAttribute);
301+
- const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents } = JSON.parse(configElementAttribute);
302302
+ const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents, workspaceUri?: UriComponents } = { ...JSON.parse(configElementAttribute), remoteAuthority: location.host }
303303

304304
// Create workbench

patches/display-language.diff

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
66
===================================================================
77
--- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts
88
+++ code-server/lib/vscode/src/vs/server/node/serverServices.ts
9-
@@ -198,6 +198,9 @@ export async function setupServerService
9+
@@ -188,6 +188,9 @@ export async function setupServerService
1010
const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority));
1111
socketServer.registerChannel('extensions', channel);
1212

@@ -20,7 +20,7 @@ Index: code-server/lib/vscode/src/vs/base/common/platform.ts
2020
===================================================================
2121
--- code-server.orig/lib/vscode/src/vs/base/common/platform.ts
2222
+++ code-server/lib/vscode/src/vs/base/common/platform.ts
23-
@@ -83,6 +83,17 @@ if (typeof navigator === 'object' && !is
23+
@@ -84,6 +84,17 @@ if (typeof navigator === 'object' && !is
2424
_isWeb = true;
2525
_locale = navigator.language;
2626
_language = _locale;
@@ -185,7 +185,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
185185
const data = (await util.promisify(fs.readFile)(filePath)).toString()
186186
.replace('{{WORKBENCH_WEB_CONFIGURATION}}', escapeAttribute(JSON.stringify({
187187
remoteAuthority,
188-
@@ -301,7 +304,8 @@ export class WebClientServer {
188+
@@ -302,7 +305,8 @@ export class WebClientServer {
189189
})))
190190
.replace('{{WORKBENCH_AUTH_SESSION}}', () => authSessionInfo ? escapeAttribute(JSON.stringify(authSessionInfo)) : '')
191191
.replace(/{{BASE}}/g, base)
@@ -252,7 +252,7 @@ Index: code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts
252252
===================================================================
253253
--- code-server.orig/lib/vscode/src/vs/workbench/workbench.web.main.ts
254254
+++ code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts
255-
@@ -109,6 +109,10 @@ registerSingleton(ICustomEndpointTelemet
255+
@@ -111,6 +111,10 @@ registerSingleton(IDiagnosticsService, N
256256

257257
//#region --- workbench contributions
258258

patches/integration.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
174174
===================================================================
175175
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.main.ts
176176
+++ code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
177-
@@ -69,6 +69,7 @@ import { ICredentialsService } from 'vs/
178-
import { IndexedDB } from 'vs/base/browser/indexedDB';
177+
@@ -69,6 +69,7 @@ import { IndexedDB } from 'vs/base/brows
179178
import { BrowserCredentialsService } from 'vs/workbench/services/credentials/browser/credentialsService';
180179
import { IWorkspace } from 'vs/workbench/services/host/browser/browserHostService';
180+
import { WebFileSystemAccess } from 'vs/platform/files/browser/webFileSystemAccess';
181181
+import { CodeServerClient } from 'vs/workbench/browser/client';
182182

183183
export class BrowserMain extends Disposable {

patches/last-opened.diff

-24
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,3 @@ respect it here then remove our own redirction code that handles this.
66

77
Our version might be better anyway since it puts the workspace in the URL.
88

9-
Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
10-
===================================================================
11-
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.ts
12-
+++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
13-
@@ -410,19 +410,6 @@ class WorkspaceProvider implements IWork
14-
workspace = { folderUri: URI.revive(config.folderUri) };
15-
} else if (config.workspaceUri) {
16-
workspace = { workspaceUri: URI.revive(config.workspaceUri) };
17-
- } else {
18-
- workspace = (() => {
19-
- const lastWorkspaceRaw = window.localStorage.getItem(WorkspaceProvider.LAST_WORKSPACE_STORAGE_KEY);
20-
- if (lastWorkspaceRaw) {
21-
- try {
22-
- return parse(lastWorkspaceRaw); // use marshalling#parse() to revive potential URIs
23-
- } catch (error) {
24-
- // Ignore
25-
- }
26-
- }
27-
-
28-
- return undefined;
29-
- })();
30-
}
31-
}
32-

patches/local-storage.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi
4848
===================================================================
4949
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
5050
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
51-
@@ -126,7 +126,14 @@ export class BrowserWorkbenchEnvironment
51+
@@ -52,7 +52,14 @@ export class BrowserWorkbenchEnvironment
5252
get logFile(): URI { return joinPath(this.logsHome, 'window.log'); }
5353

5454
@memoize

patches/logout.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
4545
rootEndpoint: base,
4646
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
4747
+ logoutEndpoint: this._environmentService.args['auth'] ? base + '/logout' : undefined,
48+
embedderIdentifier: 'server-distro',
4849
extensionsGallery: {
4950
...this._productService.extensionsGallery,
50-
'resourceUrlTemplate': this._webExtensionResourceUrlTemplate ? this._webExtensionResourceUrlTemplate.with({
5151
Index: code-server/lib/vscode/src/vs/workbench/browser/client.ts
5252
===================================================================
5353
--- code-server.orig/lib/vscode/src/vs/workbench/browser/client.ts

patches/marketplace.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
3232
===================================================================
3333
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
3434
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
35-
@@ -285,14 +285,14 @@ export class WebClientServer {
36-
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
35+
@@ -286,14 +286,14 @@ export class WebClientServer {
3736
productConfiguration: <Partial<IProductConfiguration>>{
3837
rootEndpoint: base,
38+
embedderIdentifier: 'server-distro',
3939
- extensionsGallery: this._webExtensionResourceUrlTemplate ? {
4040
+ extensionsGallery: {
4141
...this._productService.extensionsGallery,

patches/node-version.diff

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
1111
===================================================================
1212
--- code-server.orig/lib/vscode/build/gulpfile.reh.js
1313
+++ code-server/lib/vscode/build/gulpfile.reh.js
14-
@@ -122,9 +122,7 @@ const serverWithWebEntryPoints = [
14+
@@ -124,9 +124,7 @@ const serverWithWebEntryPoints = [
1515
];
1616

1717
function getNodeVersion() {
@@ -71,7 +71,7 @@ Index: code-server/lib/vscode/build/lib/util.ts
7171
===================================================================
7272
--- code-server.orig/lib/vscode/build/lib/util.ts
7373
+++ code-server/lib/vscode/build/lib/util.ts
74-
@@ -371,9 +371,7 @@ export function streamToPromise(stream:
74+
@@ -371,9 +371,7 @@ export function streamToPromise(stream:
7575
}
7676

7777
export function getElectronVersion(): string {
@@ -91,10 +91,11 @@ Index: code-server/lib/vscode/remote/.yarnrc
9191
===================================================================
9292
--- code-server.orig/lib/vscode/remote/.yarnrc
9393
+++ /dev/null
94-
@@ -1,3 +0,0 @@
94+
@@ -1,4 +0,0 @@
9595
-disturl "http://nodejs.org/dist"
9696
-target "14.16.0"
9797
-runtime "node"
98+
-build_from_source "true"
9899
Index: code-server/lib/vscode/.yarnrc
99100
===================================================================
100101
--- code-server.orig/lib/vscode/.yarnrc

patches/proposed-api.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/abstra
99
===================================================================
1010
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts
1111
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts
12-
@@ -1134,7 +1134,7 @@ class ProposedApiController {
12+
@@ -1163,7 +1163,7 @@ class ProposedApiController {
1313

1414
this._envEnabledExtensions = new Set((_environmentService.extensionEnabledProposedApi ?? []).map(id => ExtensionIdentifier.toKey(id)));
1515

@@ -22,7 +22,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extens
2222
===================================================================
2323
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
2424
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
25-
@@ -135,10 +135,7 @@ export interface IExtensionHost {
25+
@@ -134,10 +134,7 @@ export interface IExtensionHost {
2626
}
2727

2828
export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean {

patches/proxy-uri.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
7373
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
7474
logoutEndpoint: this._environmentService.args['auth'] ? base + '/logout' : undefined,
7575
+ proxyEndpointTemplate: base + '/proxy/{{port}}',
76+
embedderIdentifier: 'server-distro',
7677
extensionsGallery: {
7778
...this._productService.extensionsGallery,
78-
'resourceUrlTemplate': this._webExtensionResourceUrlTemplate ? this._webExtensionResourceUrlTemplate.with({
7979
Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
8080
===================================================================
8181
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.main.ts
@@ -93,7 +93,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalE
9393
===================================================================
9494
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
9595
+++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
96-
@@ -388,7 +388,7 @@ export function createTerminalEnvironmen
96+
@@ -390,7 +390,7 @@ export function createTerminalEnvironmen
9797

9898
// Sanitize the environment, removing any undesirable VS Code and Electron environment
9999
// variables

patches/series

-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ post-install.diff
1616
log-level.diff
1717
local-storage.diff
1818
service-worker.diff
19-
last-opened.diff
2019
connection-type.diff
2120
sourcemaps.diff

patches/service-worker.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
2121
===================================================================
2222
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
2323
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
24-
@@ -296,6 +296,10 @@ export class WebClientServer {
25-
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
24+
@@ -297,6 +297,10 @@ export class WebClientServer {
2625
logoutEndpoint: this._environmentService.args['auth'] ? base + '/logout' : undefined,
2726
proxyEndpointTemplate: base + '/proxy/{{port}}',
27+
embedderIdentifier: 'server-distro',
2828
+ serviceWorker: {
2929
+ scope: vscodeBase + '/',
3030
+ path: base + '/_static/out/browser/serviceWorker.js',

patches/sourcemaps.diff

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
1010
===================================================================
1111
--- code-server.orig/lib/vscode/build/gulpfile.reh.js
1212
+++ code-server/lib/vscode/build/gulpfile.reh.js
13-
@@ -195,8 +195,7 @@ function packageTask(type, platform, arc
13+
@@ -197,8 +197,7 @@ function packageTask(type, platform, arc
1414

1515
const src = gulp.src(sourceFolderName + '/**', { base: '.' })
1616
.pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + sourceFolderName), 'out'); }))
@@ -20,7 +20,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
2020

2121
const workspaceExtensionPoints = ['debuggers', 'jsonValidation'];
2222
const isUIExtension = (manifest) => {
23-
@@ -235,9 +234,9 @@ function packageTask(type, platform, arc
23+
@@ -237,9 +236,9 @@ function packageTask(type, platform, arc
2424
.map(name => `.build/extensions/${name}/**`);
2525

2626
const extensions = gulp.src(extensionPaths, { base: '.build', dot: true });
@@ -32,7 +32,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
3232

3333
let version = packageJson.version;
3434
const quality = product.quality;
35-
@@ -363,7 +362,7 @@ function packageTask(type, platform, arc
35+
@@ -374,7 +373,7 @@ function tweakProductForServerWeb(produc
3636
const minifyTask = task.define(`minify-vscode-${type}`, task.series(
3737
optimizeTask,
3838
util.rimraf(`out-vscode-${type}-min`),

patches/unique-db.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Index: code-server/lib/vscode/src/vs/platform/storage/browser/storageService.ts
2121
@@ -13,6 +13,7 @@ import { InMemoryStorageDatabase, isStor
2222
import { ILogService } from 'vs/platform/log/common/log';
2323
import { AbstractStorageService, IS_NEW_KEY, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
24-
import { IWorkspaceInitializationPayload } from 'vs/platform/workspaces/common/workspaces';
24+
import { IAnyWorkspaceIdentifier } from 'vs/platform/workspace/common/workspace';
2525
+import { hash } from 'vs/base/common/hash';
2626

2727
export class BrowserStorageService extends AbstractStorageService {

patches/update-check.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
105105
productConfiguration: <Partial<IProductConfiguration>>{
106106
rootEndpoint: base,
107107
+ updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
108+
embedderIdentifier: 'server-distro',
108109
extensionsGallery: {
109110
...this._productService.extensionsGallery,
110-
'resourceUrlTemplate': this._webExtensionResourceUrlTemplate ? this._webExtensionResourceUrlTemplate.with({
111111
Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
112112
===================================================================
113113
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts

patches/webview.diff

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi
1010
===================================================================
1111
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
1212
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
13-
@@ -240,7 +240,7 @@ export class BrowserWorkbenchEnvironment
13+
@@ -176,7 +176,7 @@ export class BrowserWorkbenchEnvironment
1414

1515
@memoize
1616
get webviewExternalEndpoint(): string {
@@ -31,11 +31,11 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
3131
_wrapWebWorkerExtHostInIframe,
3232
developmentOptions: { enableSmokeTestDriver: this._environmentService.driverHandle === 'web' ? true : undefined },
3333
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
34-
Index: code-server/lib/vscode/src/vs/workbench/api/common/shared/webview.ts
34+
Index: code-server/lib/vscode/src/vs/workbench/common/webview.ts
3535
===================================================================
36-
--- code-server.orig/lib/vscode/src/vs/workbench/api/common/shared/webview.ts
37-
+++ code-server/lib/vscode/src/vs/workbench/api/common/shared/webview.ts
38-
@@ -25,7 +25,7 @@ export const webviewResourceBaseHost = '
36+
--- code-server.orig/lib/vscode/src/vs/workbench/common/webview.ts
37+
+++ code-server/lib/vscode/src/vs/workbench/common/webview.ts
38+
@@ -24,7 +24,7 @@ export const webviewResourceBaseHost = '
3939

4040
export const webviewRootResourceAuthority = `vscode-resource.${webviewResourceBaseHost}`;
4141

0 commit comments

Comments
 (0)