Skip to content

Commit c5e3939

Browse files
authored
Merge branch 'main' into renovate/azure-setup-helm-2.x
2 parents d787c50 + c35bf13 commit c5e3939

15 files changed

+108
-29
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ jobs:
506506
fetch-depth: 0
507507

508508
- name: Run Trivy vulnerability scanner in repo mode
509-
uses: aquasecurity/trivy-action@40c4ca9e7421287d0c5576712fdff370978f9c3c
509+
uses: aquasecurity/trivy-action@2b30463ddb3d11724a04e760e020c7d9af24d8b3
510510
with:
511511
scan-type: "fs"
512512
scan-ref: "."

.github/workflows/docker.yaml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,15 @@ jobs:
3939
id: version
4040
run: echo "::set-output name=version::$(jq -r .version package.json)"
4141

42-
- name: Download artifact
43-
uses: dawidd6/action-download-artifact@v2
44-
id: download
42+
- name: Download release artifacts
43+
uses: robinraju/release-downloader@v1.3
4544
with:
46-
branch: v${{ steps.version.outputs.version }}
47-
workflow: ci.yaml
48-
workflow_conclusion: completed
49-
name: "release-packages"
50-
path: release-packages
51-
52-
- name: Run ./ci/steps/docker-buildx-push.sh
53-
run: ./ci/steps/docker-buildx-push.sh
45+
repository: "coder/code-server"
46+
tag: v${{ steps.version.outputs.version }}
47+
fileName: "*.deb"
48+
out-file-path: "release-packages"
49+
50+
- name: Publish to Docker
51+
run: yarn publish:docker
5452
env:
5553
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/trivy-docker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
uses: actions/checkout@v3
5252

5353
- name: Run Trivy vulnerability scanner in image mode
54-
uses: aquasecurity/trivy-action@40c4ca9e7421287d0c5576712fdff370978f9c3c
54+
uses: aquasecurity/trivy-action@2b30463ddb3d11724a04e760e020c7d9af24d8b3
5555
with:
5656
image-ref: "docker.io/codercom/code-server:latest"
5757
ignore-unfixed: true

CHANGELOG.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
1010
## [9.99.999] - 9090-09-09
1111
12-
VS Code v99.99.999
12+
Code v99.99.999
1313
14-
### Changed
1514
### Added
15+
### Changed
1616
### Deprecated
1717
### Removed
1818
### Fixed
1919
### Security
2020
2121
-->
2222

23+
## [4.3.0](https://github.com/coder/code-server/releases/tag/v4.3.0) - 2022-04-14
24+
25+
Code v1.65.2
26+
27+
### Changed
28+
29+
- Excluded .deb files from release Docker image which drops the compressed and
30+
uncompressed size by 58% and 34%.
31+
- Upgraded to Code 1.65.2.
32+
33+
### Added
34+
35+
- Added a new CLI flag called `--disable-file-downloads` which allows you to
36+
disable the "Download..." option that shows in the UI when right-clicking on a
37+
file. This can also set by running `CS_DISABLE_FILE_DOWNLOADS=1`.
38+
- Aligned the dependencies for binary and npm release artifacts.
39+
40+
### Fixed
41+
42+
- Fixed the code-server version from not displaying in the Help > About dialog.
43+
- Fixed issues with the TypeScript and JavaScript Language Features Extension
44+
failing to activate.
45+
- Fixed missing files in ipynb extension.
46+
- Fixed the homebrew release workflow.
47+
- Fixed the Docker release workflow from not always publishing version tags.
48+
2349
## [4.2.0](https://github.com/coder/code-server/releases/tag/v4.2.0) - 2022-03-22
2450

2551
Code v1.64.2

ci/build/release-prep.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ main() {
8181
read -r -p "What version of code-server do you want to update to?"$'\n' CODE_SERVER_VERSION_TO_UPDATE
8282

8383
echo -e "Great! We'll prep a PR for updating to $CODE_SERVER_VERSION_TO_UPDATE\n"
84-
$CMD rg -g '!yarn.lock' -g '!*.svg' -g '!CHANGELOG.md' --files-with-matches --fixed-strings "${CODE_SERVER_CURRENT_VERSION}" | $CMD xargs sd "$CODE_SERVER_CURRENT_VERSION" "$CODE_SERVER_VERSION_TO_UPDATE"
84+
$CMD rg -g '!yarn.lock' -g '!*.svg' -g '!CHANGELOG.md' -g '!lib/vscode/**' --files-with-matches --fixed-strings "${CODE_SERVER_CURRENT_VERSION}" | $CMD xargs sd "$CODE_SERVER_CURRENT_VERSION" "$CODE_SERVER_VERSION_TO_UPDATE"
8585

8686
$CMD git commit --no-verify -am "chore(release): bump version to $CODE_SERVER_VERSION_TO_UPDATE"
8787

ci/helm-chart/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 2.3.0
18+
version: 2.4.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
23-
appVersion: 4.2.0
23+
appVersion: 4.3.0

ci/helm-chart/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ replicaCount: 1
66

77
image:
88
repository: codercom/code-server
9-
tag: '4.2.0'
9+
tag: '4.3.0'
1010
pullPolicy: Always
1111

1212
# Specifies one or more secrets to be used when pulling images from a

docs/MAINTAINING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ If you're the current release manager, follow these steps:
164164

165165
### Publishing a release
166166

167-
1. Create a new branch called `v0.0.0` (replace 0s with actual version aka v4.2.0)
167+
1. Create a new branch called `v0.0.0` (replace 0s with actual version aka v4.3.0)
168168
1. Run `yarn release:prep` and type in the new version (e.g., `3.8.1`)
169169
1. GitHub Actions will generate the `npm-package`, `release-packages` and
170170
`release-images` artifacts. You do not have to wait for this step to complete

docs/collaboration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ As `code-server` is based on VS Code, you can follow the steps described on Duck
6060
code-server --enable-proposed-api genuitecllc.codetogether
6161
```
6262

63-
Another option would be to add a value in code-server's [config file](https://coder.com/docs/code-server/v4.2.0/FAQ#how-does-the-config-file-work).
63+
Another option would be to add a value in code-server's [config file](https://coder.com/docs/code-server/v4.3.0/FAQ#how-does-the-config-file-work).
6464

6565
3. Refresh code-server and navigate to the CodeTogether icon in the sidebar to host or join a coding session.

docs/helm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# code-server Helm Chart
22

3-
[![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square)](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) [![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![AppVersion: 4.2.0](https://img.shields.io/badge/AppVersion-4.2.0-informational?style=flat-square)](https://img.shields.io/badge/AppVersion-4.2.0-informational?style=flat-square)
3+
[![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square)](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) [![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![AppVersion: 4.3.0](https://img.shields.io/badge/AppVersion-4.3.0-informational?style=flat-square)](https://img.shields.io/badge/AppVersion-4.3.0-informational?style=flat-square)
44

55
[code-server](https://github.com/coder/code-server) code-server is VS Code running
66
on a remote server, accessible through the browser.
@@ -73,7 +73,7 @@ and their default values.
7373
| hostnameOverride | string | `""` |
7474
| image.pullPolicy | string | `"Always"` |
7575
| image.repository | string | `"codercom/code-server"` |
76-
| image.tag | string | `"4.2.0"` |
76+
| image.tag | string | `"4.3.0"` |
7777
| imagePullSecrets | list | `[]` |
7878
| ingress.enabled | bool | `false` |
7979
| nameOverride | string | `""` |

docs/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"versions": ["v4.2.0"],
2+
"versions": ["v4.3.0"],
33
"routes": [
44
{
55
"title": "Home",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "code-server",
33
"license": "MIT",
4-
"version": "4.2.0",
4+
"version": "4.3.0",
55
"description": "Run VS Code on a remote server.",
66
"homepage": "https://github.com/coder/code-server",
77
"bugs": {
@@ -24,6 +24,7 @@
2424
"package": "./ci/build/build-packages.sh",
2525
"postinstall": "./ci/dev/postinstall.sh",
2626
"publish:npm": "./ci/steps/publish-npm.sh",
27+
"publish:docker": "./ci/steps/docker-buildx-push.sh",
2728
"_audit": "./ci/dev/audit.sh",
2829
"fmt": "./ci/dev/fmt.sh",
2930
"lint": "./ci/dev/lint.sh",

patches/base-path.diff

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,3 +303,24 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
303303

304304
// Create workbench
305305
create(document.body, {
306+
Index: code-server/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts
307+
===================================================================
308+
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts
309+
+++ code-server/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts
310+
@@ -16,7 +16,6 @@ import { getServiceMachineId } from 'vs/
311+
import { IStorageService } from 'vs/platform/storage/common/storage';
312+
import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry';
313+
import { getTelemetryLevel, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
314+
-import { RemoteAuthorities } from 'vs/base/common/network';
315+
316+
export const WEB_EXTENSION_RESOURCE_END_POINT = 'web-extension-resource';
317+
318+
@@ -72,7 +71,7 @@ export abstract class AbstractExtensionR
319+
public getExtensionGalleryResourceURL(galleryExtension: { publisher: string; name: string; version: string }, path?: string): URI | undefined {
320+
if (this._extensionGalleryResourceUrlTemplate) {
321+
const uri = URI.parse(format2(this._extensionGalleryResourceUrlTemplate, { publisher: galleryExtension.publisher, name: galleryExtension.name, version: galleryExtension.version, path: 'extension' }));
322+
- return this._isWebExtensionResourceEndPoint(uri) ? uri.with({ scheme: RemoteAuthorities.getPreferredWebSchema() }) : uri;
323+
+ return this._isWebExtensionResourceEndPoint(uri) ? URI.joinPath(URI.parse(window.location.href), uri.path) : uri;
324+
}
325+
return undefined;
326+
}

patches/webview.diff

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ self-hosted.
66
When doing this CSP will block resources (for example when viewing images) so
77
add 'self' to the CSP to fix that.
88

9+
Additionally the service worker defaults to handling *all* requests made to the
10+
current host but when self-hosting the webview this will end up including the
11+
webview HTML itself which means these requests will fail since the communication
12+
channel between the webview and the main thread has not been set up yet as the
13+
webview itself is not ready yet (it has no HTML and therefore no script either).
14+
Since this code exists only for the authentication case we can just skip it when
15+
it is served from the current host as authentication is not a problem if the
16+
request is not cross-origin.
17+
18+
To test, open a few types of webviews (images, markdown, extension details, etc).
19+
920
Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
1021
===================================================================
1122
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
@@ -44,3 +55,22 @@ Index: code-server/lib/vscode/src/vs/workbench/common/webview.ts
4455

4556
/**
4657
* Construct a uri that can load resources inside a webview
58+
Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/service-worker.js
59+
===================================================================
60+
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/service-worker.js
61+
+++ code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/service-worker.js
62+
@@ -188,9 +188,11 @@ sw.addEventListener('fetch', (event) =>
63+
}
64+
}
65+
66+
- // If we're making a request against the remote authority, we want to go
67+
- // back through VS Code itself so that we are authenticated properly
68+
- if (requestUrl.host === remoteAuthority) {
69+
+ // If we're making a request against the remote authority, we want to go back
70+
+ // through VS Code itself so that we are authenticated properly. If the
71+
+ // service worker is hosted on the same origin we will have cookies and
72+
+ // authentication will not be an issue.
73+
+ if (requestUrl.origin !== sw.origin && requestUrl.host === remoteAuthority) {
74+
switch (event.request.method) {
75+
case 'GET':
76+
case 'HEAD':

test/unit/node/update.test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ describe("update", () => {
145145

146146
await expect(settings().read()).resolves.toEqual({ update })
147147
expect(isNaN(update.checked)).toStrictEqual(false)
148-
expect(update.checked < now).toBe(true)
148+
expect(update.checked).toBeLessThan(now)
149149
expect(update.version).toStrictEqual("2.1.0")
150150
expect(spy).toEqual([])
151151
})
@@ -159,7 +159,8 @@ describe("update", () => {
159159

160160
await expect(settings().read()).resolves.toEqual({ update })
161161
expect(isNaN(update.checked)).toStrictEqual(false)
162-
expect(update.checked < Date.now() && update.checked >= now).toStrictEqual(true)
162+
expect(update.checked).toBeGreaterThanOrEqual(now)
163+
expect(update.checked).toBeLessThan(Date.now())
163164
expect(update.version).toStrictEqual("4.1.1")
164165
expect(spy).toStrictEqual(["/latest"])
165166
})
@@ -204,14 +205,16 @@ describe("update", () => {
204205
let now = Date.now()
205206
let update = await provider.getUpdate(true)
206207
expect(isNaN(update.checked)).toStrictEqual(false)
207-
expect(update.checked < Date.now() && update.checked >= now).toEqual(true)
208+
expect(update.checked).toBeGreaterThanOrEqual(now)
209+
expect(update.checked).toBeLessThan(Date.now())
208210
expect(update.version).toStrictEqual("unknown")
209211

210212
provider = new UpdateProvider("http://probably.invalid.dev.localhost/latest", settings())
211213
now = Date.now()
212214
update = await provider.getUpdate(true)
213215
expect(isNaN(update.checked)).toStrictEqual(false)
214-
expect(update.checked < Date.now() && update.checked >= now).toEqual(true)
216+
expect(update.checked).toBeGreaterThanOrEqual(now)
217+
expect(update.checked).toBeLessThan(Date.now())
215218
expect(update.version).toStrictEqual("unknown")
216219
})
217220

0 commit comments

Comments
 (0)