Skip to content

Commit af823e8

Browse files
committed
Merge remote-tracking branch 'upstream/master' into nielsen
2 parents faefac5 + 8bf1bf2 commit af823e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+4100
-2185
lines changed

.eslintrc.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ extends:
1919
- prettier/@typescript-eslint # Remove conflicts again.
2020

2121
rules:
22+
# Sometimes you need to add args to implement a function signature even
23+
# if they are unused.
24+
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }]
2225
# For overloads.
2326
no-dupe-class-members: off
2427
"@typescript-eslint/no-use-before-define": off
@@ -31,6 +34,8 @@ rules:
3134
import/order:
3235
[error, { alphabetize: { order: "asc" }, groups: [["builtin", "external", "internal"], "parent", "sibling"] }]
3336
no-async-promise-executor: off
37+
# This isn't a real module, just types, which apparently doesn't resolve.
38+
import/no-unresolved: [error, { ignore: ["express-serve-static-core"] }]
3439

3540
settings:
3641
# Does not work with CommonJS unfortunately.

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
* @code-asher @nhooyr
2+
3+
ci/helm-chart @Matthew-Beckett @alexgorbatchev

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ blank_issues_enabled: false
22
contact_links:
33
- name: Question
44
url: https://github.com/cdr/code-server/discussions/new?category_id=22503114
5-
about: Ask the community for help
5+
about: Ask the community for help on our GitHub Discussions board
6+
- name: Chat
7+
about: Need immediate help or just want to talk? Hop in our Slack
8+
url: https://cdr.co/join-community

ci/dev/fmt.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ main() {
1919
"*.yaml"
2020
"*.yml"
2121
)
22-
prettier --write --loglevel=warn $(git ls-files "${prettierExts[@]}")
22+
prettier --write --loglevel=warn $(
23+
git ls-files "${prettierExts[@]}" | grep -v 'helm-chart'
24+
)
2325

2426
doctoc --title '# FAQ' doc/FAQ.md > /dev/null
2527
doctoc --title '# Setup Guide' doc/guide.md > /dev/null

ci/dev/lint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ main() {
88
stylelint $(git ls-files "*.css")
99
tsc --noEmit
1010
shellcheck -e SC2046,SC2164,SC2154,SC1091,SC1090,SC2002 $(git ls-files "*.sh")
11+
if command -v helm && helm kubeval --help > /dev/null; then
12+
helm kubeval ci/helm-chart
13+
fi
1114
}
1215

1316
main "$@"

ci/dev/test.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ set -euo pipefail
44
main() {
55
cd "$(dirname "$0")/../.."
66

7-
mocha -r ts-node/register ./test/*.test.ts
7+
cd test/test-plugin
8+
make -s out/index.js
9+
cd "$OLDPWD"
10+
mocha -r ts-node/register ./test/*.test.ts "$@"
811
}
912

1013
main "$@"

ci/dev/vscode.patch

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,18 @@ index da4fa3e9d0443d679dfbab1000b434af2ae01afd..50f3e1144f8057883dea8b91ec2f7073
210210
}
211211

212212
function processLib() {
213+
diff --git a/extensions/typescript-language-features/src/utils/platform.ts b/extensions/typescript-language-features/src/utils/platform.ts
214+
index 2d754bf4054713f53beed030f9211b33532c1b4b..708b7e40a662e4ca93420992bf7a5af0c62ea5b2 100644
215+
--- a/extensions/typescript-language-features/src/utils/platform.ts
216+
+++ b/extensions/typescript-language-features/src/utils/platform.ts
217+
@@ -6,6 +6,6 @@
218+
import * as vscode from 'vscode';
219+
220+
export function isWeb(): boolean {
221+
- // @ts-expect-error
222+
+ // NOTE@coder: Remove unused ts-expect-error directive which causes tsc to error.
223+
return typeof navigator !== 'undefined' && vscode.env.uiKind === vscode.UIKind.Web;
224+
}
213225
diff --git a/package.json b/package.json
214226
index 770b44b0c1ff53d903b7680ede27715376df00f2..b27ab71647a3e7c4b6076ba4fdb8fde20fa73bb0 100644
215227
--- a/package.json
@@ -1366,7 +1378,7 @@ index 0000000000000000000000000000000000000000..56331ff1fc32bbd82e769aaecb551e42
13661378
+require('../../bootstrap-amd').load('vs/server/entry');
13671379
diff --git a/src/vs/server/ipc.d.ts b/src/vs/server/ipc.d.ts
13681380
new file mode 100644
1369-
index 0000000000000000000000000000000000000000..33b28cf2d53746ee9c50c056ac2e087dcee0a4e2
1381+
index 0000000000000000000000000000000000000000..6ce56bec114a6d8daf5dd3ded945ea78fc72a5c6
13701382
--- /dev/null
13711383
+++ b/src/vs/server/ipc.d.ts
13721384
@@ -0,0 +1,131 @@
@@ -1384,7 +1396,7 @@ index 0000000000000000000000000000000000000000..33b28cf2d53746ee9c50c056ac2e087d
13841396
+ options: VscodeOptions;
13851397
+}
13861398
+
1387-
+export type Query = { [key: string]: string | string[] | undefined };
1399+
+export type Query = { [key: string]: string | string[] | undefined | Query | Query[] };
13881400
+
13891401
+export interface SocketMessage {
13901402
+ type: 'socket';

ci/helm-chart/.helmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

ci/helm-chart/Chart.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: v2
2+
name: code-server
3+
description: A Helm chart for cdr/code-server
4+
5+
# A chart can be either an 'application' or a 'library' chart.
6+
#
7+
# Application charts are a collection of templates that can be packaged into versioned archives
8+
# to be deployed.
9+
#
10+
# Library charts provide useful utilities or functions for the chart developer. They're included as
11+
# a dependency of application charts to inject those utilities and functions into the rendering
12+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+
type: application
14+
15+
# This is the chart version. This version number should be incremented each time you make changes
16+
# to the chart and its templates, including the app version.
17+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18+
version: 1.0.0
19+
20+
# This is the version number of the application being deployed. This version number should be
21+
# incremented each time you make changes to the application. Versions are not expected to
22+
# follow Semantic Versioning. They should reflect the version the application is using.
23+
appVersion: 3.6.2

ci/helm-chart/README.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# code-server
2+
3+
![Version: 1.0.0](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) ![AppVersion: 3.6.2](https://img.shields.io/badge/AppVersion-3.6.2-informational?style=flat-square)
4+
5+
[code-server](https://github.com/cdr/code-server) code-server is VS Code running
6+
on a remote server, accessible through the browser.
7+
8+
This chart is community maintained by [@Matthew-Beckett](https://github.com/Matthew-Beckett) and [@alexgorbatchev](https://github.com/alexgorbatchev)
9+
10+
## TL;DR;
11+
12+
```console
13+
$ git clone https://github.com/cdr/code-server
14+
$ cd code-server
15+
$ helm upgrade --install code-server ci/helm-chart
16+
```
17+
18+
## Introduction
19+
20+
This chart bootstraps a code-server deployment on a
21+
[Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh)
22+
package manager.
23+
24+
## Prerequisites
25+
26+
- Kubernetes 1.6+
27+
28+
## Installing the Chart
29+
30+
To install the chart with the release name `code-server`:
31+
32+
```console
33+
$ git clone https://github.com/cdr/code-server
34+
$ cd code-server
35+
$ helm upgrade --install code-server ci/helm-chart
36+
```
37+
38+
The command deploys code-server on the Kubernetes cluster in the default
39+
configuration. The [configuration](#configuration) section lists the parameters
40+
that can be configured during installation.
41+
42+
> **Tip**: List all releases using `helm list`
43+
44+
## Uninstalling the Chart
45+
46+
To uninstall/delete the `code-server` deployment:
47+
48+
```console
49+
$ helm delete code-server
50+
```
51+
52+
The command removes all the Kubernetes components associated with the chart and
53+
deletes the release.
54+
55+
## Configuration
56+
57+
The following table lists the configurable parameters of the code-server chart
58+
and their default values.
59+
60+
## Values
61+
62+
| Key | Type | Default | Description |
63+
|-----|------|---------|-------------|
64+
| affinity | object | `{}` | |
65+
| extraArgs | list | `[]` | |
66+
| extraConfigmapMounts | list | `[]` | |
67+
| extraContainers | string | `""` | |
68+
| extraSecretMounts | list | `[]` | |
69+
| extraVars | list | `[]` | |
70+
| extraVolumeMounts | list | `[]` | |
71+
| fullnameOverride | string | `""` | |
72+
| hostnameOverride | string | `""` | |
73+
| image.pullPolicy | string | `"Always"` | |
74+
| image.repository | string | `"codercom/code-server"` | |
75+
| image.tag | string | `"3.5.0"` | |
76+
| imagePullSecrets | list | `[]` | |
77+
| ingress.enabled | bool | `false` | |
78+
| nameOverride | string | `""` | |
79+
| nodeSelector | object | `{}` | |
80+
| persistence.accessMode | string | `"ReadWriteOnce"` | |
81+
| persistence.annotations | object | `{}` | |
82+
| persistence.enabled | bool | `true` | |
83+
| persistence.size | string | `"1Gi"` | |
84+
| podAnnotations | object | `{}` | |
85+
| podSecurityContext | object | `{}` | |
86+
| replicaCount | int | `1` | |
87+
| resources | object | `{}` | |
88+
| securityContext.enabled | bool | `true` | |
89+
| securityContext.fsGroup | int | `1000` | |
90+
| securityContext.runAsUser | int | `1000` | |
91+
| service.port | int | `8443` | |
92+
| service.type | string | `"ClusterIP"` | |
93+
| serviceAccount.create | bool | `true` | |
94+
| serviceAccount.name | string | `nil` | |
95+
| tolerations | list | `[]` | |
96+
| volumePermissions.enabled | bool | `true` | |
97+
| volumePermissions.securityContext.runAsUser | int | `0` | |
98+
99+
Specify each parameter using the `--set key=value[,key=value]` argument to `helm
100+
install`. For example,
101+
102+
```console
103+
$ helm upgrade --install code-server \
104+
ci/helm-chart \
105+
--set persistence.enabled=false
106+
```
107+
108+
The above command sets the the persistence storage to false.
109+
110+
Alternatively, a YAML file that specifies the values for the above parameters
111+
can be provided while installing the chart. For example,
112+
113+
```console
114+
$ helm upgrade --install code-server ci/helm-chart -f values.yaml
115+
```
116+
117+
> **Tip**: You can use the default [values.yaml](values.yaml)

0 commit comments

Comments
 (0)