mirror of
https://github.com/coder/code-server.git
synced 2026-09-20 06:21:29 +02:00
Compare commits
1 Commits
helm/4.138
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c51233dd1c |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -22,20 +22,6 @@ Code v99.99.999
|
||||
|
||||
## Unreleased
|
||||
|
||||
## [4.138.0](https://github.com/coder/code-server/releases/tag/v4.138.0) - 2026-09-19
|
||||
|
||||
Code v1.138.0
|
||||
|
||||
### Changed
|
||||
|
||||
- Update to Code 1.138.0
|
||||
|
||||
### Fixed
|
||||
|
||||
- Preserve the original path, query parameters, and fragment when rewriting
|
||||
localhost URLs through the port proxy. If `VSCODE_PROXY_URI` has any query
|
||||
parameters or fragments, those will be lost.
|
||||
|
||||
## [4.137.0](https://github.com/coder/code-server/releases/tag/v4.137.0) - 2026-09-11
|
||||
|
||||
Code v1.137.0
|
||||
|
||||
@@ -15,9 +15,9 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 3.53.0
|
||||
version: 3.52.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
appVersion: 4.138.0
|
||||
appVersion: 4.137.0
|
||||
|
||||
@@ -6,7 +6,7 @@ replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: codercom/code-server
|
||||
tag: '4.138.0'
|
||||
tag: '4.137.0'
|
||||
pullPolicy: Always
|
||||
|
||||
# Specifies one or more secrets to be used when pulling images from a
|
||||
|
||||
Submodule lib/vscode updated: 7debcd0e2a...645f29cc31
27
package-lock.json
generated
27
package-lock.json
generated
@@ -35,7 +35,7 @@
|
||||
"code-server": "out/node/entry.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^1.2.0",
|
||||
"@eslint/compat": "^2.1.1",
|
||||
"@eslint/eslintrc": "^3.1.0",
|
||||
"@eslint/js": "^9.12.0",
|
||||
"@types/compression": "^1.7.3",
|
||||
@@ -170,19 +170,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/compat": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.4.1.tgz",
|
||||
"integrity": "sha512-cfO82V9zxxGBxcQDr1lfaYB7wykTa0b00mGa36FrJl7iTFd0Z2cHfEYuxcBRP/iNijCsWsEkA+jzT8hGYmv33w==",
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-2.1.1.tgz",
|
||||
"integrity": "sha512-rMcy8GSrwNzcISX/BlTDY/GLB4eCopEuy9woIls3To+15OLxykZrxxq+WUcylCPCQ6F4MujjBM1DX5V1aqI3Vw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/core": "^0.17.0"
|
||||
"@eslint/core": "^1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.40 || 9"
|
||||
"eslint": "^8.40 || 9 || 10"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"eslint": {
|
||||
@@ -190,6 +190,19 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/compat/node_modules/@eslint/core": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz",
|
||||
"integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.15"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/config-array": {
|
||||
"version": "0.21.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz",
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
},
|
||||
"main": "out/node/entry.js",
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^1.2.0",
|
||||
"@eslint/compat": "^2.1.1",
|
||||
"@eslint/eslintrc": "^3.1.0",
|
||||
"@eslint/js": "^9.12.0",
|
||||
"@types/compression": "^1.7.3",
|
||||
|
||||
@@ -128,7 +128,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
|
||||
@@ -6,10 +6,10 @@
|
||||
import { Disposable } from '../../base/common/lifecycle.js';
|
||||
import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } from '../../platform/contextkey/common/contextkey.js';
|
||||
import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext, IsChromeOSContext } from '../../platform/contextkey/common/contextkeys.js';
|
||||
import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext } from '../../platform/contextkey/common/contextkeys.js';
|
||||
-import { SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SecondarySideBarVisibleContext, 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, AuxiliaryBarMaximizedContext, InAutomationContext, IsSessionsWindowContext } from '../common/contextkeys.js';
|
||||
+import { IsEnabledFileDownloads, IsEnabledFileUploads, SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SecondarySideBarVisibleContext, 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, AuxiliaryBarMaximizedContext, InAutomationContext, IsSessionsWindowContext } from '../common/contextkeys.js';
|
||||
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from '../services/editor/common/editorGroupsService.js';
|
||||
@@ -147,7 +147,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
|
||||
@IProductService private readonly productService: IProductService,
|
||||
@IEditorGroupsService private readonly editorGroupService: IEditorGroupsService,
|
||||
@IEditorService private readonly editorService: IEditorService,
|
||||
@@ -206,6 +206,10 @@ export class WorkbenchContextKeysHandler
|
||||
@@ -205,6 +205,10 @@ export class WorkbenchContextKeysHandler
|
||||
this.auxiliaryBarMaximizedContext = AuxiliaryBarMaximizedContext.bindTo(this.contextKeyService);
|
||||
this.auxiliaryBarMaximizedContext.set(this.layoutService.isAuxiliaryBarMaximized());
|
||||
|
||||
|
||||
@@ -216,13 +216,13 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
|
||||
@@ -6,7 +6,7 @@
|
||||
import { Disposable } from '../../base/common/lifecycle.js';
|
||||
import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } from '../../platform/contextkey/common/contextkey.js';
|
||||
import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext, IsChromeOSContext } from '../../platform/contextkey/common/contextkeys.js';
|
||||
import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext } from '../../platform/contextkey/common/contextkeys.js';
|
||||
-import { IsEnabledFileDownloads, IsEnabledFileUploads, SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SecondarySideBarVisibleContext, 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, AuxiliaryBarMaximizedContext, InAutomationContext, IsSessionsWindowContext } from '../common/contextkeys.js';
|
||||
+import { IsEnabledFileDownloads, IsEnabledFileUploads, IsEnabledCoderGettingStarted, SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SecondarySideBarVisibleContext, 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, AuxiliaryBarMaximizedContext, InAutomationContext, IsSessionsWindowContext } from '../common/contextkeys.js';
|
||||
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from '../services/editor/common/editorGroupsService.js';
|
||||
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
|
||||
import { IBrowserWorkbenchEnvironmentService } from '../services/environment/browser/environmentService.js';
|
||||
@@ -209,6 +209,7 @@ export class WorkbenchContextKeysHandler
|
||||
@@ -208,6 +208,7 @@ export class WorkbenchContextKeysHandler
|
||||
// code-server
|
||||
IsEnabledFileDownloads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileDownloads ?? true)
|
||||
IsEnabledFileUploads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileUploads ?? true)
|
||||
|
||||
@@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extens
|
||||
===================================================================
|
||||
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
|
||||
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
|
||||
@@ -321,6 +321,10 @@ function extensionDescriptionArrayToMap(
|
||||
@@ -324,6 +324,10 @@ function extensionDescriptionArrayToMap(
|
||||
}
|
||||
|
||||
export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean {
|
||||
|
||||
@@ -13,18 +13,12 @@ This has e2e tests.
|
||||
For the `asExternalUri` changes, you'll need to test manually by:
|
||||
1. running code-server with the test extension
|
||||
2. Command Palette > code-server: asExternalUri test
|
||||
3. input a url like http://localhost:3000/my/path?token=abc#section
|
||||
4. it should show a notification and show output as
|
||||
<code-server>/proxy/3000/my/path?token%3Dabc#section
|
||||
3. input a url like http://localhost:3000
|
||||
4. it should show a notification and show output as <code-server>/proxy/3000
|
||||
|
||||
Do the same thing but set `VSCODE_PROXY_URI: "https://{{port}}-main-workspace-name-user-name.coder.com"`
|
||||
and the output should replace `{{port}}` with port used in input url.
|
||||
|
||||
The rewritten URI must preserve the original path, query, and fragment (see
|
||||
#7668). Append the original path to the proxy path using URI components so
|
||||
encoded characters are not decoded or encoded twice. This also works with
|
||||
proxy templates that do not have a trailing slash.
|
||||
|
||||
This also enables the forwared ports view panel by default.
|
||||
|
||||
Lastly, it adds a tunnelProvider so that ports are forwarded using code-server's
|
||||
@@ -110,7 +104,7 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
|
||||
import type { IURLCallbackProvider } from '../../../workbench/services/url/browser/urlService.js';
|
||||
import { create } from '../../../workbench/workbench.web.main.internal.js';
|
||||
|
||||
@@ -612,6 +613,44 @@ class WorkspaceProvider implements IWork
|
||||
@@ -612,6 +613,39 @@ class WorkspaceProvider implements IWork
|
||||
settingsSyncOptions: config.settingsSyncOptions ? { enabled: config.settingsSyncOptions.enabled, } : undefined,
|
||||
workspaceProvider: WorkspaceProvider.create(config),
|
||||
urlCallbackProvider: new LocalStorageURLCallbackProvider(config.callbackRoute),
|
||||
@@ -122,12 +116,7 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
|
||||
+ const renderedTemplate = config.productConfiguration.proxyEndpointTemplate
|
||||
+ .replace('{{port}}', localhostMatch.port.toString())
|
||||
+ .replace('{{host}}', window.location.host)
|
||||
+ const proxyUri = URI.parse(new URL(renderedTemplate, window.location.href).toString())
|
||||
+ resolvedUri = proxyUri.with({
|
||||
+ path: proxyUri.path.replace(/\/$/, '') + uri.path,
|
||||
+ query: uri.query,
|
||||
+ fragment: uri.fragment,
|
||||
+ })
|
||||
+ resolvedUri = URI.parse(new URL(renderedTemplate, window.location.href).toString())
|
||||
+ } else {
|
||||
+ throw new Error(`Failed to resolve external URI: ${uri.toString()}. Could not determine base url because productConfiguration missing.`)
|
||||
+ }
|
||||
|
||||
@@ -15,56 +15,6 @@ function runTestExtensionTests() {
|
||||
const normalizedAddress = address.replace(/\/+$/, "")
|
||||
await expect(codeServerPage.page.getByText(`Info: proxyUri: ${normalizedAddress}/proxy/{{port}}/`)).toBeVisible()
|
||||
})
|
||||
|
||||
runExternalUriTests()
|
||||
}
|
||||
|
||||
function runExternalUriTests(proxyEndpointTemplate?: string) {
|
||||
const cases = [
|
||||
{
|
||||
name: "path",
|
||||
input: "http://127.0.0.1:1234/my/path",
|
||||
suffix: "/my/path",
|
||||
},
|
||||
{
|
||||
name: "query and fragment",
|
||||
input: "http://localhost:1234/my/path?token=abc&mode=preview#section",
|
||||
suffix: "/my/path?token%3Dabc%26mode%3Dpreview#section",
|
||||
},
|
||||
{
|
||||
name: "encoded components",
|
||||
input: "http://0.0.0.0:1234/my%20path/%23file?token=a%20b#my%20section",
|
||||
suffix: "/my%20path/%23file?token%3Da%20b#my%20section",
|
||||
},
|
||||
{
|
||||
name: "root path",
|
||||
input: "http://127.0.0.1:1234/",
|
||||
suffix: "/",
|
||||
},
|
||||
]
|
||||
|
||||
for (const { name, input, suffix } of cases) {
|
||||
test(`asExternalUri should preserve ${name}`, async ({ codeServerPage }) => {
|
||||
const address = await getMaybeProxiedCodeServer(codeServerPage)
|
||||
const normalizedAddress = address.replace(/\/+$/, "")
|
||||
const proxyBase = proxyEndpointTemplate
|
||||
? new URL(proxyEndpointTemplate.replace("{{port}}", "1234"), `${normalizedAddress}/`).toString()
|
||||
: `${normalizedAddress}/proxy/1234/`
|
||||
|
||||
await codeServerPage.waitForTestExtensionLoaded()
|
||||
await codeServerPage.executeCommandViaMenus("code-server: asExternalUri test")
|
||||
|
||||
const inputBox = codeServerPage.page.locator(".quick-input-widget input")
|
||||
await inputBox.fill(input)
|
||||
await inputBox.press("Enter")
|
||||
|
||||
// The test extension displays URI.toString(), which also encodes query delimiters.
|
||||
const output = `${proxyBase.replace(/\/$/, "")}${suffix}`
|
||||
await expect(
|
||||
codeServerPage.page.getByText(`Info: input: ${input} output: ${output}`, { exact: true }),
|
||||
).toBeVisible()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const flags = ["--disable-workspace-trust", "--extensions-dir", path.join(__dirname, "./extensions")]
|
||||
@@ -73,17 +23,6 @@ describe("Extensions", flags, {}, () => {
|
||||
runTestExtensionTests()
|
||||
})
|
||||
|
||||
for (const proxyEndpointTemplate of ["./proxy/{{port}}", "https://{{port}}-workspace.example.com"]) {
|
||||
describe(
|
||||
`Extensions with VSCODE_PROXY_URI=${proxyEndpointTemplate}`,
|
||||
flags,
|
||||
{ VSCODE_PROXY_URI: proxyEndpointTemplate },
|
||||
() => {
|
||||
runExternalUriTests(proxyEndpointTemplate)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
if (process.env.USE_PROXY !== "1") {
|
||||
describe("Extensions with --cert", [...flags, "--cert"], {}, () => {
|
||||
runTestExtensionTests()
|
||||
|
||||
Reference in New Issue
Block a user