From f87b82ea788b274f4374c5734a5086e726883d1b Mon Sep 17 00:00:00 2001 From: Olivier Benz Date: Thu, 6 Jun 2024 10:59:33 +0200 Subject: [PATCH] Update Code to 1.90.0 - Update Node to 20.11.1 - Update documentation --- .node-version | 2 +- ci/build/npm-postinstall.sh | 4 ++-- docs/CONTRIBUTING.md | 2 +- docs/android.md | 2 +- docs/npm.md | 4 ++-- docs/termux.md | 2 +- lib/vscode | 2 +- package.json | 6 ++--- patches/base-path.diff | 6 ++--- patches/disable-builtin-ext-update.diff | 2 +- patches/display-language.diff | 14 +++++------ patches/external-file-actions.diff | 31 ++++++++++++------------- patches/getting-started.diff | 8 +++---- patches/integration.diff | 4 ++-- patches/logout.diff | 2 +- patches/marketplace.diff | 6 ++--- patches/proxy-uri.diff | 2 +- patches/service-worker.diff | 2 +- patches/telemetry.diff | 4 ++-- patches/update-check.diff | 4 ++-- 20 files changed, 54 insertions(+), 55 deletions(-) diff --git a/.node-version b/.node-version index 87ec8842b..2dbbe00e6 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -18.18.2 +20.11.1 diff --git a/ci/build/npm-postinstall.sh b/ci/build/npm-postinstall.sh index 0f99a0449..5db03fc45 100755 --- a/ci/build/npm-postinstall.sh +++ b/ci/build/npm-postinstall.sh @@ -76,8 +76,8 @@ main() { echo "USE AT YOUR OWN RISK!" fi - if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-18}" ]; then - echo "ERROR: code-server currently requires node v18." + if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-20}" ]; then + echo "ERROR: code-server currently requires node v20." if [ -n "$FORCE_NODE_VERSION" ]; then echo "However, you have overrided the version check to use v$FORCE_NODE_VERSION." fi diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index fcd755697..79da7cbca 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -37,7 +37,7 @@ for [VS Code](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites). Here is what is needed: -- `node` v18.x +- `node` v20.x - `git` v2.x or greater - [`git-lfs`](https://git-lfs.github.com) - [`yarn`](https://classic.yarnpkg.com/en/) diff --git a/docs/android.md b/docs/android.md index 8107be873..00909f975 100644 --- a/docs/android.md +++ b/docs/android.md @@ -11,7 +11,7 @@ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash ``` 6. Exit the terminal using `exit` and then reopen the terminal -7. Install and use Node.js 18: +7. Install and use Node.js 20: ```shell nvm install 18 diff --git a/docs/npm.md b/docs/npm.md index 4f3341249..46fa5d02f 100644 --- a/docs/npm.md +++ b/docs/npm.md @@ -30,7 +30,7 @@ includes installing instructions based on your operating system. ## Node.js version We use the same major version of Node.js shipped with Code's remote, which is -currently `18.x`. VS Code also [lists Node.js +currently `20.x`. VS Code also [lists Node.js requirements](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites). Using other versions of Node.js [may lead to unexpected @@ -79,7 +79,7 @@ Proceed to [installing](#installing) ## FreeBSD ```sh -pkg install -y git python npm-node18 pkgconf +pkg install -y git python npm-node20 pkgconf pkg install -y libinotify ``` diff --git a/docs/termux.md b/docs/termux.md index d6ea8c7bb..84dcec076 100644 --- a/docs/termux.md +++ b/docs/termux.md @@ -57,7 +57,7 @@ npm config set python python3 node -v ``` -you will get Node version `v18` +you will get Node version `v20` 5. Now install code-server following our guide on [installing with npm](./npm.md) diff --git a/lib/vscode b/lib/vscode index dc96b837c..89de5a8d4 160000 --- a/lib/vscode +++ b/lib/vscode @@ -1 +1 @@ -Subproject commit dc96b837cf6bb4af9cd736aa3af08cf8279f7685 +Subproject commit 89de5a8d4d6205e5b11647eb6a74844ca23d2573 diff --git a/package.json b/package.json index 1876caf3a..250efd0db 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@types/express": "^4.17.17", "@types/http-proxy": "1.17.7", "@types/js-yaml": "^4.0.6", - "@types/node": "^18.0.0", + "@types/node": "20.x", "@types/pem": "^1.14.1", "@types/proxy-from-env": "^1.0.1", "@types/safe-compare": "^1.1.0", @@ -88,7 +88,7 @@ "xdg-basedir": "^4.0.0" }, "resolutions": { - "@types/node": "^18.0.0" + "@types/node": "20.x" }, "bin": { "code-server": "out/node/entry.js" @@ -103,7 +103,7 @@ "remote-development" ], "engines": { - "node": "18" + "node": "20" }, "jest": { "transform": { diff --git a/patches/base-path.diff b/patches/base-path.diff index 49e219cfa..6705ec088 100644 --- a/patches/base-path.diff +++ b/patches/base-path.diff @@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/base/common/network.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/base/common/network.ts +++ code-server/lib/vscode/src/vs/base/common/network.ts -@@ -205,7 +205,9 @@ class RemoteAuthoritiesImpl { +@@ -212,7 +212,9 @@ class RemoteAuthoritiesImpl { return URI.from({ scheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource, authority: `${host}:${port}`, @@ -140,11 +140,11 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts + const base = relativeRoot(getOriginalUrl(req)) + const vscodeBase = relativePath(getOriginalUrl(req)) + - const productConfiguration = >{ + const productConfiguration = { codeServerVersion: this._productService.codeServerVersion, + rootEndpoint: base, embedderIdentifier: 'server-distro', - extensionsGallery: this._webExtensionResourceUrlTemplate ? { + extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? { ...this._productService.extensionsGallery, @@ -343,8 +346,10 @@ export class WebClientServer { const values: { [key: string]: string } = { diff --git a/patches/disable-builtin-ext-update.diff b/patches/disable-builtin-ext-update.diff index 8c88d3263..c251a49a2 100644 --- a/patches/disable-builtin-ext-update.diff +++ b/patches/disable-builtin-ext-update.diff @@ -7,7 +7,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts -@@ -284,6 +284,10 @@ export class Extension implements IExten +@@ -285,6 +285,10 @@ export class Extension implements IExten if (this.type === ExtensionType.System && this.productService.quality === 'stable') { return false; } diff --git a/patches/display-language.diff b/patches/display-language.diff index f36e8b1ba..c64efe8c5 100644 --- a/patches/display-language.diff +++ b/patches/display-language.diff @@ -23,14 +23,14 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts +++ code-server/lib/vscode/src/vs/server/node/serverServices.ts @@ -11,7 +11,7 @@ import * as path from 'vs/base/common/pa import { IURITransformer } from 'vs/base/common/uriIpc'; - import { getMachineId, getSqmMachineId } from 'vs/base/node/id'; + import { getMachineId, getSqmMachineId, getdevDeviceId } from 'vs/base/node/id'; import { Promises } from 'vs/base/node/pfs'; -import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, StaticRouter } from 'vs/base/parts/ipc/common/ipc'; +import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, ProxyChannel, StaticRouter } from 'vs/base/parts/ipc/common/ipc'; import { ProtocolConstants } from 'vs/base/parts/ipc/common/ipc.net'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ConfigurationService } from 'vs/platform/configuration/common/configurationService'; -@@ -237,6 +237,9 @@ export async function setupServerService +@@ -238,6 +238,9 @@ export async function setupServerService const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)); socketServer.registerChannel('extensions', channel); @@ -348,7 +348,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts -@@ -342,9 +342,6 @@ export class InstallAction extends Exten +@@ -341,9 +341,6 @@ export class InstallAction extends Exten if (this.extension.isBuiltin) { return; } @@ -358,7 +358,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens if (this.extension.state === ExtensionState.Uninstalled && await this.extensionsWorkbenchService.canInstall(this.extension)) { this.enabled = this.options.installPreReleaseVersion ? this.extension.hasPreReleaseVersion : this.extension.hasReleaseVersion; this.updateLabel(); -@@ -615,7 +612,7 @@ export abstract class InstallInOtherServ +@@ -614,7 +611,7 @@ export abstract class InstallInOtherServ } if (isLanguagePackExtension(this.extension.local.manifest)) { @@ -367,7 +367,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens } // Prefers to run on UI -@@ -1843,17 +1840,6 @@ export class SetLanguageAction extends E +@@ -1848,17 +1845,6 @@ export class SetLanguageAction extends E update(): void { this.enabled = false; this.class = SetLanguageAction.DisabledClass; @@ -385,7 +385,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens } override async run(): Promise { -@@ -1870,7 +1856,6 @@ export class ClearLanguageAction extends +@@ -1875,7 +1861,6 @@ export class ClearLanguageAction extends private static readonly DisabledClass = `${ClearLanguageAction.EnabledClass} disabled`; constructor( @@ -393,7 +393,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens @ILocaleService private readonly localeService: ILocaleService, ) { super(ClearLanguageAction.ID, ClearLanguageAction.TITLE.value, ClearLanguageAction.DisabledClass, false); -@@ -1880,17 +1865,6 @@ export class ClearLanguageAction extends +@@ -1885,17 +1870,6 @@ export class ClearLanguageAction extends update(): void { this.enabled = false; this.class = ClearLanguageAction.DisabledClass; diff --git a/patches/external-file-actions.diff b/patches/external-file-actions.diff index bc9b6b913..2f84d7ca6 100644 --- a/patches/external-file-actions.diff +++ b/patches/external-file-actions.diff @@ -125,31 +125,30 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/browser/contextkeys.ts +++ code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts -@@ -7,12 +7,12 @@ import { Event } from 'vs/base/common/ev +@@ -7,11 +7,11 @@ import { Event } from 'vs/base/common/ev import { Disposable } from 'vs/base/common/lifecycle'; import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } from 'vs/platform/contextkey/common/contextkey'; import { InputFocusedContext, IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext } from 'vs/platform/contextkey/common/contextkeys'; --import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, MainEditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, ActiveEditorCanToggleReadonlyContext, applyAvailableEditorIds, TitleBarVisibleContext, TitleBarStyleContext, MultipleEditorGroupsContext, IsAuxiliaryWindowFocusedContext, ActiveCompareEditorCanSwapContext } from 'vs/workbench/common/contextkeys'; -+import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, MainEditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, ActiveEditorCanToggleReadonlyContext, applyAvailableEditorIds, TitleBarVisibleContext, TitleBarStyleContext, MultipleEditorGroupsContext, IsAuxiliaryWindowFocusedContext, ActiveCompareEditorCanSwapContext, IsEnabledFileDownloads, IsEnabledFileUploads } from 'vs/workbench/common/contextkeys'; - import { TEXT_DIFF_EDITOR_ID, EditorInputCapabilities, SIDE_BY_SIDE_EDITOR_ID, EditorResourceAccessor, SideBySideEditor } from 'vs/workbench/common/editor'; +-import { SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext } from 'vs/workbench/common/contextkeys'; ++import { SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, IsEnabledFileDownloads, IsEnabledFileUploads } from 'vs/workbench/common/contextkeys'; import { trackFocus, addDisposableListener, EventType, onDidRegisterWindow, getActiveWindow } from 'vs/base/browser/dom'; import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; +import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService'; - import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { WorkbenchState, IWorkspaceContextService, isTemporaryWorkspace } from 'vs/platform/workspace/common/workspace'; import { IWorkbenchLayoutService, Parts, positionToString } from 'vs/workbench/services/layout/browser/layoutService'; -@@ -88,7 +88,7 @@ export class WorkbenchContextKeysHandler + import { getRemoteName } from 'vs/platform/remote/common/remoteHosts'; +@@ -70,7 +70,7 @@ export class WorkbenchContextKeysHandler @IContextKeyService private readonly contextKeyService: IContextKeyService, @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, @IConfigurationService private readonly configurationService: IConfigurationService, - @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService, + @IBrowserWorkbenchEnvironmentService private readonly environmentService: IBrowserWorkbenchEnvironmentService, @IProductService private readonly productService: IProductService, + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, @IEditorService private readonly editorService: IEditorService, - @IEditorResolverService private readonly editorResolverService: IEditorResolverService, -@@ -225,6 +225,10 @@ export class WorkbenchContextKeysHandler +@@ -197,6 +197,10 @@ export class WorkbenchContextKeysHandler this.auxiliaryBarVisibleContext = AuxiliaryBarVisibleContext.bindTo(this.contextKeyService); this.auxiliaryBarVisibleContext.set(this.layoutService.isVisible(Parts.AUXILIARYBAR_PART)); @@ -168,12 +167,12 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions import { AutoSaveAfterShortDelayContext } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService'; import { WorkbenchListDoubleSelection } from 'vs/platform/list/browser/listService'; import { Schemas } from 'vs/base/common/network'; --import { DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext } from 'vs/workbench/common/contextkeys'; -+import { DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, IsEnabledFileDownloads, IsEnabledFileUploads } from 'vs/workbench/common/contextkeys'; +-import { DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, MultipleEditorsSelectedInGroupContext, TwoEditorsSelectedInGroupContext } from 'vs/workbench/common/contextkeys'; ++import { DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, MultipleEditorsSelectedInGroupContext, TwoEditorsSelectedInGroupContext, IsEnabledFileDownloads, IsEnabledFileUploads } from 'vs/workbench/common/contextkeys'; import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { ThemeIcon } from 'vs/base/common/themables'; -@@ -553,13 +553,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo +@@ -561,13 +561,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo id: DOWNLOAD_COMMAND_ID, title: DOWNLOAD_LABEL }, @@ -197,7 +196,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions ) })); -@@ -571,6 +574,7 @@ MenuRegistry.appendMenuItem(MenuId.Explo +@@ -579,6 +582,7 @@ MenuRegistry.appendMenuItem(MenuId.Explo title: UPLOAD_LABEL, }, when: ContextKeyExpr.and( @@ -282,15 +281,15 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/views/explo =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts -@@ -68,6 +68,7 @@ import { HoverPosition } from 'vs/base/b +@@ -65,6 +65,7 @@ import { timeout } from 'vs/base/common/ import { IFilesConfigurationService } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService'; import { mainWindow } from 'vs/base/browser/window'; import { IExplorerFileContribution, explorerFileContribRegistry } from 'vs/workbench/contrib/files/browser/explorerFileContrib'; +import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService'; - import type { IHoverWidget } from 'vs/base/browser/ui/hover/hover'; export class ExplorerDelegate implements IListVirtualDelegate { -@@ -1080,7 +1081,8 @@ export class FileDragAndDrop implements + +@@ -1001,7 +1002,8 @@ export class FileDragAndDrop implements @IConfigurationService private configurationService: IConfigurationService, @IInstantiationService private instantiationService: IInstantiationService, @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService, @@ -300,7 +299,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/views/explo ) { const updateDropEnablement = (e: IConfigurationChangeEvent | undefined) => { if (!e || e.affectsConfiguration('explorer.enableDragAndDrop')) { -@@ -1305,15 +1307,17 @@ export class FileDragAndDrop implements +@@ -1226,15 +1228,17 @@ export class FileDragAndDrop implements // External file DND (Import/Upload file) if (data instanceof NativeDragAndDropData) { diff --git a/patches/getting-started.diff b/patches/getting-started.diff index c2eb9002d..cb9568ef9 100644 --- a/patches/getting-started.diff +++ b/patches/getting-started.diff @@ -217,12 +217,12 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts import { Disposable } from 'vs/base/common/lifecycle'; import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } from 'vs/platform/contextkey/common/contextkey'; import { InputFocusedContext, IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext } from 'vs/platform/contextkey/common/contextkeys'; --import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, MainEditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, ActiveEditorCanToggleReadonlyContext, applyAvailableEditorIds, TitleBarVisibleContext, TitleBarStyleContext, MultipleEditorGroupsContext, IsAuxiliaryWindowFocusedContext, ActiveCompareEditorCanSwapContext, IsEnabledFileDownloads, IsEnabledFileUploads } from 'vs/workbench/common/contextkeys'; -+import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, MainEditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, ActiveEditorCanToggleReadonlyContext, applyAvailableEditorIds, TitleBarVisibleContext, TitleBarStyleContext, MultipleEditorGroupsContext, IsAuxiliaryWindowFocusedContext, ActiveCompareEditorCanSwapContext, IsEnabledFileDownloads, IsEnabledFileUploads, IsEnabledCoderGettingStarted, } from 'vs/workbench/common/contextkeys'; - import { TEXT_DIFF_EDITOR_ID, EditorInputCapabilities, SIDE_BY_SIDE_EDITOR_ID, EditorResourceAccessor, SideBySideEditor } from 'vs/workbench/common/editor'; +-import { SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, IsEnabledFileDownloads, IsEnabledFileUploads } from 'vs/workbench/common/contextkeys'; ++import { SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, IsEnabledFileDownloads, IsEnabledFileUploads, IsEnabledCoderGettingStarted, } from 'vs/workbench/common/contextkeys'; import { trackFocus, addDisposableListener, EventType, onDidRegisterWindow, getActiveWindow } from 'vs/base/browser/dom'; import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; -@@ -228,6 +228,7 @@ export class WorkbenchContextKeysHandler + import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +@@ -200,6 +200,7 @@ export class WorkbenchContextKeysHandler // code-server IsEnabledFileDownloads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileDownloads ?? true) IsEnabledFileUploads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileUploads ?? true) diff --git a/patches/integration.diff b/patches/integration.diff index 3c104cae2..b3ed7bcaa 100644 --- a/patches/integration.diff +++ b/patches/integration.diff @@ -267,8 +267,8 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts @@ -307,6 +307,7 @@ export class WebClientServer { } : undefined; - const productConfiguration = >{ + const productConfiguration = { + codeServerVersion: this._productService.codeServerVersion, embedderIdentifier: 'server-distro', - extensionsGallery: this._webExtensionResourceUrlTemplate ? { + extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? { ...this._productService.extensionsGallery, diff --git a/patches/logout.diff b/patches/logout.diff index 558df0f6e..6840d198f 100644 --- a/patches/logout.diff +++ b/patches/logout.diff @@ -47,7 +47,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts + logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/logout' : undefined, embedderIdentifier: 'server-distro', extensionsGallery: this._productService.extensionsGallery, - }; + } satisfies Partial; Index: code-server/lib/vscode/src/vs/workbench/browser/client.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/browser/client.ts diff --git a/patches/marketplace.diff b/patches/marketplace.diff index 9f5c9f52d..d46509e8c 100644 --- a/patches/marketplace.diff +++ b/patches/marketplace.diff @@ -53,16 +53,16 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts codeServerVersion: this._productService.codeServerVersion, rootEndpoint: base, embedderIdentifier: 'server-distro', -- extensionsGallery: this._webExtensionResourceUrlTemplate ? { +- extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? { - ...this._productService.extensionsGallery, -- 'resourceUrlTemplate': this._webExtensionResourceUrlTemplate.with({ +- resourceUrlTemplate: this._webExtensionResourceUrlTemplate.with({ - scheme: 'http', - authority: remoteAuthority, - path: `${this._webExtensionRoute}/${this._webExtensionResourceUrlTemplate.authority}${this._webExtensionResourceUrlTemplate.path}` - }).toString(true) - } : undefined + extensionsGallery: this._productService.extensionsGallery, - }; + } satisfies Partial; if (!this._environmentService.isBuilt) { Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts diff --git a/patches/proxy-uri.diff b/patches/proxy-uri.diff index eb05cf12c..cd3177537 100644 --- a/patches/proxy-uri.diff +++ b/patches/proxy-uri.diff @@ -78,7 +78,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts + proxyEndpointTemplate: process.env.VSCODE_PROXY_URI ?? base + '/proxy/{{port}}/', embedderIdentifier: 'server-distro', extensionsGallery: this._productService.extensionsGallery, - }; + } satisfies Partial; Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts diff --git a/patches/service-worker.diff b/patches/service-worker.diff index 6da55abc4..f60cfa5fc 100644 --- a/patches/service-worker.diff +++ b/patches/service-worker.diff @@ -64,4 +64,4 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts + }, embedderIdentifier: 'server-distro', extensionsGallery: this._productService.extensionsGallery, - }; + } satisfies Partial; diff --git a/patches/telemetry.diff b/patches/telemetry.diff index 11ebed2f4..52d2e2287 100644 --- a/patches/telemetry.diff +++ b/patches/telemetry.diff @@ -20,7 +20,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts import { NullPolicyService } from 'vs/platform/policy/common/policy'; import { OneDataSystemAppender } from 'vs/platform/telemetry/node/1dsAppender'; import { LoggerService } from 'vs/platform/log/node/loggerService'; -@@ -146,11 +147,23 @@ export async function setupServerService +@@ -147,11 +148,23 @@ export async function setupServerService const requestService = new RequestService(configurationService, environmentService, logService, loggerService); services.set(IRequestService, requestService); @@ -118,7 +118,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts + telemetryEndpoint: this._productService.telemetryEndpoint, embedderIdentifier: 'server-distro', extensionsGallery: this._productService.extensionsGallery, - }; + } satisfies Partial; Index: code-server/lib/vscode/src/vs/base/common/product.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/base/common/product.ts diff --git a/patches/update-check.diff b/patches/update-check.diff index e67d6a7a1..ef9c53ad9 100644 --- a/patches/update-check.diff +++ b/patches/update-check.diff @@ -106,13 +106,13 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts @@ -311,6 +311,7 @@ export class WebClientServer { - const productConfiguration = >{ + const productConfiguration = { codeServerVersion: this._productService.codeServerVersion, rootEndpoint: base, + updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined, embedderIdentifier: 'server-distro', extensionsGallery: this._productService.extensionsGallery, - }; + } satisfies Partial; Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts