Archived
1
0

Compare commits

...
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.

624 Commits
v4.1.0 ... main

Author SHA1 Message Date
a8836a4c15 Merge pull request 'main' (#3) from Upstream/code-server:main into main
Some checks failed
ci/woodpecker/push/ci Pipeline failed
Reviewed-on: #3
2024-07-29 10:55:17 +02:00
Asher
31bc0c6b1a
Fix dangling links in standalone release
The fix will now run both to the GitHub and npm release instead of only
for the npm releases.

Closes #5157.
2024-07-25 09:16:15 -08:00
Asher
0f9436e7b9
Remove Ranger for now
- We have a labeling bot that is marking issues as upstream (so far
  correctly) now Ranger is closing them right away and it felt too
  aggressive to me.
- It keeps posting its comment twice.  Not sure how to fix that.
2024-07-19 10:51:31 -08:00
Olivier Benz
1962f48b7f
Update Code to 1.91.1 (#6900) 2024-07-15 09:57:32 -08:00
Asher
6467c60166
Remove section about VS Code Remote
It has nothing to do with code-server and will not connect to or use
code-server in any way.

Closes #5613.
2024-07-12 17:02:40 -08:00
Asher
d9812a5970
Use version in npm install
Closes #4832.
2024-07-12 16:23:29 -08:00
Asher
f2c326147d
Fix login page assets over proxy domain 2024-07-12 15:06:44 -08:00
Asher
37a72ce63b
Enforce yarn version
Closes https://github.com/coder/code-server/issues/6695.
2024-07-12 14:49:10 -08:00
Asher
6a14070664
Add faq entry about web views
Closes #5671.
2024-07-11 11:52:23 -08:00
Asher
a9eb923790
Remove unused audit-ci dependency
There is a `yarn ci` script which was using audit-ci but this does not
appear to be called anywhere.

The security worflow uses `yarn audit` and `npm audit` which seem fine
enough anyway.
2024-07-10 13:23:24 -08:00
dependabot[bot]
2b33ca8a3f
chore: bump aquasecurity/trivy-action from 0.21.0 to 0.24.0 (#6894)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.21.0 to 0.24.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](fd25fed697...6e7b7d1fd3)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 13:10:01 -08:00
dependabot[bot]
8accfcc8ec
chore: bump prettier from 3.2.4 to 3.3.2 (#6878)
Bumps [prettier](https://github.com/prettier/prettier) from 3.2.4 to 3.3.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.2.4...3.3.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 13:09:41 -08:00
dependabot[bot]
2e098a2b90
chore: bump typescript from 5.4.3 to 5.5.2 (#6873)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.3 to 5.5.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.3...v5.5.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 13:09:11 -08:00
dependabot[bot]
97bcc3b934
chore: bump robinraju/release-downloader from 1.10 to 1.11 (#6875)
Bumps [robinraju/release-downloader](https://github.com/robinraju/release-downloader) from 1.10 to 1.11.
- [Release notes](https://github.com/robinraju/release-downloader/releases)
- [Commits](https://github.com/robinraju/release-downloader/compare/v1.10...v1.11)

---
updated-dependencies:
- dependency-name: robinraju/release-downloader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 13:08:52 -08:00
dependabot[bot]
c86c4e8bb6
chore: bump dawidd6/action-download-artifact from 3 to 6 (#6876)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 3 to 6.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v3...v6)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 19:26:02 +00:00
Muhammad Atif Ali
3031f8599c
ci: updates actionlint to 1.7.1 version (#6887) 2024-07-10 18:39:03 +00:00
Asher
d83ba4b46f
Release v4.91.0 2024-07-09 23:23:16 -08:00
Asher
fb3e3e1546
Log custom extensions gallery 2024-07-09 12:47:24 -08:00
Asher
901191e0f9
Update changelog 2024-07-08 17:51:47 -08:00
Asher
dd79446b00
Remove display language test
It is not working.  I test this manually anyway so for now just remove
the test, but I think maybe we have to watch for code-server to extract
the language files, and then reload the page, or maybe we have to
install the language from the UI.

Ideally we can drop our patch in the future anyway...
2024-07-08 17:50:08 -08:00
Asher
090e0fad76
Update to Code 1.91.0 (#6885) 2024-07-08 14:10:34 -08:00
f0b6d8c97b use local agent
Some checks failed
ci/woodpecker/push/ci Pipeline failed
2024-07-04 09:52:35 +02:00
Asher
6514ba4bf3
Update contributing docs 2024-07-03 13:33:02 -08:00
dependabot[bot]
250281d071
chore: bump braces from 3.0.2 to 3.0.3 (#6843)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-26 13:28:34 -08:00
dependabot[bot]
93f31e6a74
chore: bump ws from 7.5.6 to 7.5.10 in /test (#6845)
Bumps [ws](https://github.com/websockets/ws) from 7.5.6 to 7.5.10.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.6...7.5.10)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-26 13:27:58 -08:00
dependabot[bot]
603e467f38
chore: bump ws from 8.17.0 to 8.17.1 (#6851)
Bumps [ws](https://github.com/websockets/ws) from 8.17.0 to 8.17.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.17.0...8.17.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-26 13:27:36 -08:00
Asher
c7d88abf9f
v4.90.3 2024-06-21 11:01:16 -08:00
Asher
26c763485b
Update JSON parse error matcher
Looks like this text changed?
2024-06-21 09:52:42 -08:00
Asher
d431c9cd9d
Fix log file path
The first argument is a file name, not a path.  When the log gets
rotated it prepends the date which ends up creating a path in the
current working directory.
2024-06-21 09:47:44 -08:00
Olivier Benz
c26ac35b25
Update Code to 1.90.2 (#6853) 2024-06-20 14:14:21 -08:00
dependabot[bot]
d449729e18
chore: bump braces from 3.0.2 to 3.0.3 in /test (#6844)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-17 10:43:23 -08:00
Asher
ed069310a4
v4.90.2 2024-06-17 10:42:09 -08:00
Olivier Benz
dce1d6e172
Update Code to 1.90.1 (#6840) 2024-06-14 11:31:58 -08:00
Asher
a73549539b
Cache unchanging telemetry data
Might make sense to cache the rest as well, and evict from the cache
periodically.  For now this is enough to fix a hang I often see in our
deployment of Coder.  Might only be surfacing now because new telemetry
calls were added to startup.
2024-06-12 15:09:45 -08:00
Asher
e7ca9cd6ac
Fix changelog heading indentation 2024-06-12 13:05:41 -08:00
Asher
9da9f2029c
v4.90.0 2024-06-12 13:03:51 -08:00
Asher
0c802ba165
Remove node-gyp install (#6831)
Seems to install fine without it now.
2024-06-08 20:07:51 -08:00
Asher
1bd2b9cf08
Fix segfault in CI (#6830)
Setting DISABLE_V8_COMPILE_CACHE=1 seems to fix it.
2024-06-08 20:07:24 -08:00
Asher
3b467dec95
Update changelog for 1.90.0 2024-06-06 15:05:12 -08:00
Olivier Benz
6d9530aa6b
Update Code to 1.90.0 (#6824)
Additionally:

- Update Node to 20.11.1
- Update documentation
- Disable extension signature verification

This works around an issue where the Open VSX is not returning the
expected zip.  Verification is skipped later anyway because
@vscode/vsce-sign is missing in the OSS version.
2024-06-06 15:02:13 -08:00
dependabot[bot]
fc47b4f1c5
chore: bump aquasecurity/trivy-action from 0.19.0 to 0.21.0 (#6819)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.19.0 to 0.21.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](d710430a67...fd25fed697)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 10:44:54 -08:00
dependabot[bot]
479eb5bfa5
chore: bump @typescript-eslint/eslint-plugin from 6.21.0 to 7.0.0 (#6818)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.21.0 to 7.0.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.0.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 10:44:33 -08:00
Paweł Wiśniewski
095c072a43
Add Ubuntu Noble image (#6812) 2024-05-24 20:02:32 +00:00
XiaoZhang
4ff509d8db
Allow emptyDir type volume mounts (#6803) 2024-05-22 10:52:42 -08:00
Simon Merschjohann
efc6edf536
Support copying to clipboard from CLI (#6807)
Use --stdin-to-clipboard or -c to pass stdin to clipboard
2024-05-21 10:39:36 -08:00
Asher
3b6ad479a6
Release v4.89.1 and v4.89.0 2024-05-14 10:17:35 -08:00
Olivier Benz
effc6e95b4
Update Code to 1.89.1 (#6796) 2024-05-13 10:41:25 -08:00
4885b407fe Update .woodpecker/ci.yml
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
2024-05-10 12:08:00 +02:00
4a07c3abc0 Update .woodpecker/ci.yml
Some checks failed
ci/woodpecker/push/ci Pipeline failed
2024-05-10 07:18:03 +02:00
71770cfb12 Update .woodpecker/ci.yml
Some checks failed
ci/woodpecker/push/ci Pipeline failed
2024-05-08 16:18:37 +02:00
d111af4b28 Update .woodpecker/ci.yml
Some checks failed
ci/woodpecker/push/ci Pipeline failed
2024-05-08 13:53:43 +02:00
d21e097f29 Update .woodpecker/ci.yml
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
2024-05-08 12:10:00 +02:00
140ac0cf75 Update .woodpecker/ci.yml
Some checks failed
ci/woodpecker/push/ci Pipeline failed
2024-05-08 10:13:19 +02:00
daf6750c44 Update .woodpecker/ci.yml
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
2024-05-08 07:19:07 +02:00
Asher
ab4b36f573
Fix setuptools install on macOS
This is erroring now with "This environment is externally managed".
2024-05-07 13:41:21 -08:00
Asher
0f4791b816
Add remote machine ID to telemetry 2024-05-07 11:35:01 -08:00
197419945f Update .woodpecker/ci.yml
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/manual/ci Pipeline was successful
2024-05-07 11:47:09 +02:00
bde2fab134 Update .woodpecker/ci.yml
Some checks failed
ci/woodpecker/push/ci Pipeline failed
2024-05-07 11:45:11 +02:00
d2576171c2 Update .woodpecker/ci.yml
Some checks failed
ci/woodpecker/push/ci Pipeline failed
2024-05-07 11:30:53 +02:00
243a4d459c Update .woodpecker/ci.yml
Some checks failed
ci/woodpecker/push/ci Pipeline failed
2024-05-07 11:05:04 +02:00
3c7e146133 Update .woodpecker/ci.yml
Some checks failed
ci/woodpecker/push/ci Pipeline failed
2024-05-07 10:37:15 +02:00
4c9f4eb2a5 Update .woodpecker/ci.yml
Some checks failed
ci/woodpecker/push/ci Pipeline failed
2024-05-07 10:15:29 +02:00
18dbcf7c7b Add .woodpecker/ci.yml
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/manual/ci Pipeline failed
2024-05-07 09:56:13 +02:00
Asher
97653152dd
Flush telemetry appender on dispose 2024-05-06 19:36:52 -08:00
Asher
2633bca30b
Move telemetry endpoint to product service
This will let us use it in the client.
2024-05-06 18:39:39 -08:00
Asher
125a972c81
Do not add extra args in toCodeArgs
It should only convert the args that are passed in.
2024-05-06 18:39:22 -08:00
Asher
7050002fb6
Add missing semicolon 2024-05-06 18:39:21 -08:00
Asher
4563517d90
Add isContainer property to telemetry 2024-05-06 18:37:41 -08:00
dependabot[bot]
b8cdab2184
chore: bump ws and @types/ws (#6775)
Bumps [ws](https://github.com/websockets/ws) and [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws). These dependencies needed to be updated together.

Updates `ws` from 8.14.2 to 8.17.0
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.14.2...8.17.0)

Updates `@types/ws` from 8.5.5 to 8.5.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: "@types/ws"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 14:17:49 -08:00
dependabot[bot]
264e023ab8
chore: bump eslint from 8.53.0 to 8.57.0 (#6776)
Bumps [eslint](https://github.com/eslint/eslint) from 8.53.0 to 8.57.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.53.0...v8.57.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 14:17:30 -08:00
dependabot[bot]
ea815df22d
chore: bump semver and @types/semver (#6777)
Bumps [semver](https://github.com/npm/node-semver) and [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver). These dependencies needed to be updated together.

Updates `semver` from 7.5.4 to 7.6.0
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.5.4...v7.6.0)

Updates `@types/semver` from 7.5.2 to 7.5.8
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: "@types/semver"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 14:17:15 -08:00
dependabot[bot]
6757907c8b
chore: bump i18next from 23.10.1 to 23.11.3 (#6778)
Bumps [i18next](https://github.com/i18next/i18next) from 23.10.1 to 23.11.3.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.10.1...v23.11.3)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 14:16:54 -08:00
dependabot[bot]
2adb215d03
chore: bump robinraju/release-downloader from 1.9 to 1.10 (#6779)
Bumps [robinraju/release-downloader](https://github.com/robinraju/release-downloader) from 1.9 to 1.10.
- [Release notes](https://github.com/robinraju/release-downloader/releases)
- [Commits](https://github.com/robinraju/release-downloader/compare/v1.9...v1.10)

---
updated-dependencies:
- dependency-name: robinraju/release-downloader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 14:16:27 -08:00
dependabot[bot]
1a7265b392
chore: bump azure/setup-helm from 3.5 to 4 (#6780)
Bumps [azure/setup-helm](https://github.com/azure/setup-helm) from 3.5 to 4.
- [Release notes](https://github.com/azure/setup-helm/releases)
- [Changelog](https://github.com/Azure/setup-helm/blob/main/CHANGELOG.md)
- [Commits](https://github.com/azure/setup-helm/compare/v3.5...v4)

---
updated-dependencies:
- dependency-name: azure/setup-helm
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 14:16:06 -08:00
Olivier Benz
e6dd7fe228
Update Code to 1.89.0 (#6783) 2024-05-06 14:14:53 -08:00
Asher
fb2afbd9d6
Handle undefined body
In the latest Express it seems the body is undefined when no data is
passed (instead of being empty).
2024-04-16 11:29:12 -08:00
Asher
3d8d544f89
Refactor VS Code routes to match others 2024-04-16 11:00:33 -08:00
Asher
323a1f3234
Only require unsafe-perm if you are root
Remove it from the docs, as the error message should be sufficient and
it seems weird to recommend unsafe-perm by default.
2024-04-16 10:48:46 -08:00
Asher
b8d830b826
Update path syntax for Express
It seems that * matches a literal * now, so we have to use a regular
expression.

Parentheses around a parameter no longer works (it causes it to match on
the parameter name literally) and I am not sure why we had it anyway as
it had no effect previously.

Matching with a leading / does not appear to work either, but we do not
need the leading / anyway since the proxy logic was changed to use the
whole path.  Consequently it will never be / anymore from what I can
tell but I left that check in just in case.  I turned it into a named
parameter as well, because that seems better.
2024-04-16 09:54:33 -08:00
Asher
417c1f36cb
Release 4.23.1 2024-04-15 16:37:01 -08:00
Asher
3eb9cf7a08
Update express and qs
It does not appear we have to pin qs anymore.
2024-04-15 16:32:52 -08:00
dependabot[bot]
f81fe3030a
chore: bump tar from 6.2.0 to 6.2.1 (#6753)
Bumps [tar](https://github.com/isaacs/node-tar) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.2.0...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 16:25:27 -08:00
dependabot[bot]
4bc9956537
chore: bump tar from 6.1.11 to 6.2.1 in /test (#6752)
Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.11 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.1.11...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 16:25:04 -08:00
Olivier Benz
9a28bc29db
Update Code to 1.88.1 (#6754)
* Update Code to 1.88.1
* Install node-gyp

---------

Co-authored-by: Asher <ash@coder.com>
2024-04-15 15:00:21 -08:00
Asher
deebb21345
Release 4.23.0 2024-04-08 13:24:39 -08:00
Asher
73e615da4e
Fix extension installation test
This throws now that the exit is non-zero.
2024-04-05 17:39:21 -08:00
Asher
bec6ab2678
Fix masking exit code
Addresses the part of #6367 that we can fix.
2024-04-05 16:31:58 -08:00
dependabot[bot]
ebd79ed958
chore: bump aquasecurity/trivy-action from 0.18.0 to 0.19.0 (#6739)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.18.0 to 0.19.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](062f259268...d710430a67)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:24:18 -08:00
dependabot[bot]
30d343c0bd
chore: bump follow-redirects from 1.15.4 to 1.15.6 (#6725)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:22:50 -08:00
dependabot[bot]
71780f6f00
chore: bump typescript from 5.3.3 to 5.4.3 (#6736)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.3.3 to 5.4.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.3.3...v5.4.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:22:30 -08:00
dependabot[bot]
93f9dfcb1d
chore: bump i18next from 23.8.2 to 23.10.1 (#6738)
Bumps [i18next](https://github.com/i18next/i18next) from 23.8.2 to 23.10.1.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.8.2...v23.10.1)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:22:07 -08:00
dependabot[bot]
1abb2ee567
chore: bump softprops/action-gh-release from 1 to 2 (#6740)
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:21:48 -08:00
dependabot[bot]
1c5bfeeb99
chore: bump tj-actions/changed-files from 42 to 44 (#6741)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 42 to 44.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v42...v44)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:21:27 -08:00
Puneeth Rai
bae68548d0
Update Node to 18.18.2 (#6676) 2024-04-05 14:21:01 -08:00
Olivier Benz
0cca7c67a4
Update Code to 1.88.0 (#6745) 2024-04-05 14:20:28 -08:00
Asher
45e96ec3b0
Shorten bug dropdown descriptions 2024-03-14 12:19:13 -08:00
Asher
66364429e3
Release 4.22.1 2024-03-14 12:16:35 -08:00
Asher
0e384d5442
Tweak issue templates
- Remove the redundant title prefix.
- Remove outdated assignees.
- Improve reproduction step description (trying to get folks to submit
  more specific/detailed reproductions).
- Render logs with shell (not sure if this actually changes anything).
- Use dropdowns for testing in VS Code and Codespaces.  I think the
  existing checkboxes are still confusing so hopefully this sorts it.
2024-03-14 12:16:33 -08:00
Olivier Benz
760d1318e9
Update Code to 1.87.2 (#6721) 2024-03-12 19:30:02 +00:00
Asher
c65b1f2870
Continue release drafting on Codecov failure 2024-03-12 09:41:21 -08:00
Asher
132f7d1470
Default keepAlive to true for proxy agent 2024-03-11 14:13:21 -08:00
Olivier Benz
8c65ff8d0d
Update Code to 1.87.1 (#6714) 2024-03-11 12:51:08 -08:00
dependabot[bot]
f9c0624f85
chore: bump @typescript-eslint/eslint-plugin from 6.20.0 to 6.21.0 (#6701)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.20.0 to 6.21.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.21.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 11:04:03 -09:00
dependabot[bot]
4c4c566d86
chore: bump proxy-agent from 6.3.1 to 6.4.0 (#6702)
Bumps [proxy-agent](https://github.com/TooTallNate/proxy-agents/tree/HEAD/packages/proxy-agent) from 6.3.1 to 6.4.0.
- [Release notes](https://github.com/TooTallNate/proxy-agents/releases)
- [Changelog](https://github.com/TooTallNate/proxy-agents/blob/main/packages/proxy-agent/CHANGELOG.md)
- [Commits](https://github.com/TooTallNate/proxy-agents/commits/proxy-agent@6.4.0/packages/proxy-agent)

---
updated-dependencies:
- dependency-name: proxy-agent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 11:03:16 -09:00
dependabot[bot]
720d14db3e
chore: bump rotating-file-stream from 3.1.1 to 3.2.1 (#6704)
Bumps [rotating-file-stream](https://github.com/iccicci/rotating-file-stream) from 3.1.1 to 3.2.1.
- [Changelog](https://github.com/iccicci/rotating-file-stream/blob/master/CHANGELOG.md)
- [Commits](https://github.com/iccicci/rotating-file-stream/compare/v3.1.1...v3.2.1)

---
updated-dependencies:
- dependency-name: rotating-file-stream
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 10:32:06 -09:00
dependabot[bot]
5453d02872
chore: bump aquasecurity/trivy-action from 0.16.1 to 0.18.0 (#6705)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.16.1 to 0.18.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](d43c1f16c0...062f259268)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 10:20:04 -09:00
dependabot[bot]
9f2c776a77
chore: bump prettier-plugin-sh from 0.13.1 to 0.14.0 (#6700)
Bumps [prettier-plugin-sh](https://github.com/un-ts/prettier) from 0.13.1 to 0.14.0.
- [Release notes](https://github.com/un-ts/prettier/releases)
- [Changelog](https://github.com/un-ts/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/un-ts/prettier/compare/prettier-plugin-sh@0.13.1...prettier-plugin-sh@0.14.0)

---
updated-dependencies:
- dependency-name: prettier-plugin-sh
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 10:18:02 -09:00
dependabot[bot]
66c7f7d8b1
chore: bump @typescript-eslint/parser from 6.17.0 to 6.21.0 (#6703)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.17.0 to 6.21.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.21.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 10:17:25 -09:00
dependabot[bot]
107a3fd410
chore: bump codecov/codecov-action from 3 to 4 (#6706)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 10:15:42 -09:00
Asher
56b5992280
Pin Arch Linux action version
We are still getting the old one, I think?
2024-03-06 14:10:57 -09:00
Asher
275c130845
Update Arch Linux action username
This broke due to the username being changed, and GitHub does not appear
to put any redirects in place.
2024-03-06 14:04:32 -09:00
Asher
223ecf7c30
Release v4.22.0 2024-03-04 06:52:54 -09:00
Olivier Benz
e5d145fdf3
Update Code to 1.87.0 (#6697)
Fixes https://github.com/coder/code-server/issues/6694
2024-02-29 12:30:03 -09:00
Asher
2248c8bdd4
Correct changelog link 2024-02-28 14:56:38 -09:00
Asher
d2dfeedb2f
Release v4.21.2 2024-02-28 14:22:31 -09:00
Asher
460a4564c3
Revert "chore: bump codecov/codecov-action from 3 to 4 (#6652)"
This reverts commit 63beaaabd7.

It appears to be no longer capable of finding git.
2024-02-28 14:04:55 -09:00
Muhammad Atif Ali
963fcfc3a5
docs: add coder module as an installation method (#6692)
Co-authored-by: Asher <ash@coder.com>
2024-02-28 22:06:49 +00:00
dependabot[bot]
75611411b4
chore: bump ip from 1.1.5 to 1.1.9 in /test (#6682)
Bumps [ip](https://github.com/indutny/node-ip) from 1.1.5 to 1.1.9.
- [Commits](https://github.com/indutny/node-ip/compare/v1.1.5...v1.1.9)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21 13:50:59 -09:00
dependabot[bot]
1e5666b68e
chore: bump ip from 1.1.8 to 1.1.9 (#6681)
Bumps [ip](https://github.com/indutny/node-ip) from 1.1.8 to 1.1.9.
- [Commits](https://github.com/indutny/node-ip/compare/v1.1.8...v1.1.9)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21 13:50:49 -09:00
Olivier Benz
9d70cbc8b2
Update Code to 1.86.2 (#6677) 2024-02-15 22:12:56 +00:00
ckesc
853ab407de
Update FAQ: clarify about hashed pass and compose file (#6671) 2024-02-12 22:11:45 +00:00
Asher
c31d2a0e37
Release v4.21.1 2024-02-09 13:02:44 -09:00
Dmitry Sharshakov
45164bf749
Use rpm to install in Fedora image (#6670)
Dnf will pull caches if invoked for local file install and is also unnecessary
2024-02-09 12:56:57 -09:00
Dmitry Sharshakov
a2d35ad815
docker: add Fedora 39 and openSUSE Tumbleweed based images (#6669) 2024-02-08 12:31:50 -09:00
Olivier Benz
76e6f75758
Update Code to 1.86.1 (#6668) 2024-02-08 11:10:43 -09:00
Asher
413c47a86d
Update Node to 18.17.1
For https://github.com/coder/code-server/issues/6666.
2024-02-07 21:11:27 -09:00
Asher
5b62943216
Release v4.21.0 2024-02-05 09:41:51 -09:00
dependabot[bot]
84ca27278b
chore: bump eslint-config-prettier from 9.0.0 to 9.1.0 (#6648)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 9.0.0 to 9.1.0.
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v9.0.0...v9.1.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-02 02:14:33 +00:00
dependabot[bot]
1471a152ff
chore: bump i18next from 23.7.6 to 23.8.2 (#6645)
Bumps [i18next](https://github.com/i18next/i18next) from 23.7.6 to 23.8.2.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.7.6...v23.8.2)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:39:31 -09:00
dependabot[bot]
6adbfc461b
chore: bump @typescript-eslint/eslint-plugin from 6.16.0 to 6.20.0 (#6646)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.16.0 to 6.20.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.20.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:39:14 -09:00
dependabot[bot]
2a55212027
chore: bump prettier from 3.1.1 to 3.2.4 (#6647)
Bumps [prettier](https://github.com/prettier/prettier) from 3.1.1 to 3.2.4.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.1.1...3.2.4)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:39:00 -09:00
dependabot[bot]
b63fda4bf7
chore: bump eslint-plugin-prettier from 5.0.0 to 5.1.3 (#6649)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.0.0 to 5.1.3.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.0.0...v5.1.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:38:45 -09:00
dependabot[bot]
ab17495e3a
chore: bump actions/cache from 3 to 4 (#6650)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:38:25 -09:00
dependabot[bot]
53b0fda510
chore: bump robinraju/release-downloader from 1.8 to 1.9 (#6651)
Bumps [robinraju/release-downloader](https://github.com/robinraju/release-downloader) from 1.8 to 1.9.
- [Release notes](https://github.com/robinraju/release-downloader/releases)
- [Commits](https://github.com/robinraju/release-downloader/compare/v1.8...v1.9)

---
updated-dependencies:
- dependency-name: robinraju/release-downloader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:37:57 -09:00
dependabot[bot]
63beaaabd7
chore: bump codecov/codecov-action from 3 to 4 (#6652)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:37:42 -09:00
dependabot[bot]
2db0184c4a
chore: bump github/codeql-action from 2 to 3 (#6653)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:37:33 -09:00
dependabot[bot]
dd9cefab66
chore: bump tj-actions/changed-files from 41 to 42 (#6654)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 41 to 42.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v41...v42)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:37:09 -09:00
Olivier Benz
1d774d01bf
Update Code to 1.86.0 (#6655) 2024-02-01 16:36:47 -09:00
Asher
d6ef385de2
Release v4.20.1 2024-01-22 08:34:02 -09:00
Olivier Benz
e76afa4a2b
Update Code to 1.85.2 (#6631) 2024-01-19 22:30:16 +00:00
Asher
fdb46d3fe5
Exit with 1 when VS Code CLI errors
Addresses part of #6367.  The script bundled with VS Code still has the
same problem but it would be better to fix that one upstream.
2024-01-11 12:46:09 -09:00
Asher
d49b3bf159
Fix query string being double-encoding over path proxy
Instead of trying to piece together the original URL and re-encode what
needs to be re-encoded, strip out the base from the original URL.

Fixes #6307.
2024-01-11 12:26:06 -09:00
dependabot[bot]
e87499c301
chore: bump follow-redirects from 1.15.3 to 1.15.4 (#6624)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-11 02:32:57 +00:00
dependabot[bot]
cc68c0fb0f
chore: bump @typescript-eslint/parser from 6.9.1 to 6.17.0 (#6622)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.9.1 to 6.17.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.17.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:46:28 -09:00
dependabot[bot]
749e105cd9
chore: bump @types/node from 18.18.1 to 18.19.4 (#6613)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.18.1 to 18.19.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:33:10 -09:00
dependabot[bot]
94f759a53c
chore: bump actions/download-artifact from 3 to 4 (#6609)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:32:33 -09:00
dependabot[bot]
2786f60752
chore: bump actions/upload-artifact from 3 to 4 (#6610)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:32:10 -09:00
dependabot[bot]
aea28cb499
chore: bump dawidd6/action-download-artifact from 2 to 3 (#6612)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 2 to 3.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:29:50 -09:00
dependabot[bot]
2cabe799e2
chore: bump @typescript-eslint/parser from 6.9.1 to 6.16.0 (#6614)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.9.1 to 6.16.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.16.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:28:30 -09:00
dependabot[bot]
c1be39abc7
chore: bump prettier from 3.0.3 to 3.1.1 (#6615)
Bumps [prettier](https://github.com/prettier/prettier) from 3.0.3 to 3.1.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.0.3...3.1.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:28:15 -09:00
dependabot[bot]
21e798ccdf
chore: bump aquasecurity/trivy-action from 0.14.0 to 0.16.1 (#6621)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.14.0 to 0.16.1.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](2b6a709cf9...d43c1f16c0)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:28:00 -09:00
dependabot[bot]
871030e997
chore: bump typescript from 5.2.2 to 5.3.3 (#6616)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.2.2 to 5.3.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.2.2...v5.3.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:27:42 -09:00
dependabot[bot]
a143dcf111
chore: bump @typescript-eslint/eslint-plugin from 6.11.0 to 6.16.0 (#6617)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.11.0 to 6.16.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.16.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:27:25 -09:00
dependabot[bot]
5214555683
chore: bump tj-actions/changed-files from 40 to 41 in /.github/workflows (#6618)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 40 to 41.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v40...v41)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:27:05 -09:00
Merith
ff0fcf6cde
Fix non-functional Docker Hub link (#6595)
registry.hub.docker.com leads to an blank white page
removing "registry' from the URL fixes it and takes the user to the correct page
2024-01-05 11:22:33 -09:00
Asher
07901026a0
Release v4.20.0 2023-12-21 12:53:25 -09:00
Asher
d0215eca88
Tweak bug report template
These checkboxes keep getting checked despite the submitter using an
insecure context or not having tested upstream.  I think two things are
at play here:

1. Folks might be interpreting "cannot reproduce" as "did not
   reproduce" or "did not have time to reproduce".
2. The checkboxes are required to submit the issue so folks might be
   marking them just so they can get their issue submitted; maybe they
   are not even reading the checkboxes and are just seeing the error
   that they need to be marked and blindly marking them because while
   in some cases folks will add "I had to check this but it is not
   true", usually they say nothing.

In any case, hopefully these changes make the checkboxes more accurate,
and then if they are unchecked we can ask them to go reproduce in VS
Code or use a secure context or whatever the case may be.
2023-12-18 13:56:35 -09:00
Dov Benyomin Sohacheski
d6c5a4af9c
Add Debian bookworm config to bakefile (#6590) 2023-12-18 21:30:16 +00:00
Olivier Benz
0b84523121
Update Code to 1.85.1 (#6588) 2023-12-18 20:18:44 +00:00
Olivier Benz
45694d38c4
Update Code to 1.85.0 (#6573) 2023-12-15 12:38:01 -09:00
Dov Benyomin Sohacheski
d9fe46a6be
Update and organize release image packages, add wget (#6581) 2023-12-15 20:32:14 +00:00
Ammar Bandukwala
6f078a48a6
Improve README callout to coder/coder (#6579) 2023-12-12 14:23:54 -09:00
Dov Benyomin Sohacheski
7649b6e6ca
Update base release image to Debian:12 (#6574) 2023-12-12 11:37:17 -09:00
Jeff Miller
9622830518
Disable "Show Local" button, add --disable-file-uploads option and add file operation trace level logs (#6557) 2023-12-07 12:10:22 -09:00
Asher
26a3437849
Use debug instead of trace
Trace outputs stack traces which is entirely unnecessary for these two
log entries and makes the logs noisier than they need to be.
2023-12-06 13:19:36 -09:00
Evan Rush
1fac50d6f6
Fix Helm boolean environment variable (#6563) 2023-12-04 19:32:16 +00:00
Asher
3e8100b70e
Release v4.19.1 2023-11-29 12:23:25 -09:00
Asher
0c98611e6b
Ensure we only ever set workspace initialized to true
This is just a guard in case there are paths where the workspace is
already marked as initialized but the workspace configuration is not and
we end up actually un-initializing it.
2023-11-27 17:36:26 -09:00
Asher
73cb236535
Add back local storage patch
And fix the workspace bug.  It is caused by an issue with how some
global variables are being used asynchronously and is exacerbated by the
delay reading settings from the remote introduces.

1. The workspace is created and is marked as not initialized.
2. The configuration's change handler is triggered, and now
   initialization is complete.
3. The handler tries to set the global workspace variable to initialized
   but the workspace has not been set yet so we get an undefined error.
4. The workspace global is now set, but it is set to the old value with
   initialized still set to false.
5. Workspace is never marked as initialized until something else
   triggers the on change handler again.

Fixes #3061, and closes #6546.

My guess is this logic changed in one of the VS Code updates,
introducing this async bug but never getting caught probably because for
them the settings are always local thus minimal delay.
2023-11-27 17:25:38 -09:00
Asher
9ba66ec468
Use machine settings for e2e tests
User settings are browser-based so use machine settings instead.
2023-11-20 15:42:34 -09:00
Asher
09dd5fe44d
Delete local storage patch
The main goal of this patch was to make user settings stored on disk
instead of in the browser, but this stopped working some time ago.  Not
only that but it is causing a bug where a workspace will not fully open.

A secondary goal was to fix the Vim extension but the extension appears
to work just fine without this change now (both the server and browser
versions).

This patch is not useful anymore anyway because there are remote-level
settings that *do* get stored on disk and can be used instead of
user-level settings when necessary.

Fixes #3061, and possibly #6153.
2023-11-20 13:32:59 -09:00
Quentin Quaadgras
958c5203ec
Update Termux docs on how to enable keyboard shortcuts and tab key (#6539) 2023-11-20 08:16:17 -09:00
Asher
edf078d1d2
Release v4.19.0 2023-11-20 07:29:25 -09:00
Asher
984fb135dc
Fix node-gyp failure on macOS (#6537) 2023-11-16 10:10:36 -09:00
Olivier Benz
9658969084
Update Code to 1.84.2 (#6524) 2023-11-14 13:44:21 -09:00
Asher
da254c39ee
Set Node version in a single place (#6534)
This should make it much easier to update.  Also use 18.15.0
specifically since that is what VS Code ships with.

Additionally, it fixes the post-install script being skipped due to
a Yarn v1 bug that happens when Yarn installs node-gyp, which
it does because 18.18 onward stopped bundling node-gyp.
2023-11-14 12:45:56 -09:00
dependabot[bot]
239df56634
chore: bump @typescript-eslint/eslint-plugin from 6.7.2 to 6.11.0 (#6533)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.7.2 to 6.11.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.11.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:38:31 -09:00
dependabot[bot]
c285b99c74
chore: bump eslint from 8.49.0 to 8.53.0 (#6532)
Bumps [eslint](https://github.com/eslint/eslint) from 8.49.0 to 8.53.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.49.0...v8.53.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:36:26 -09:00
dependabot[bot]
f64bc022e9
chore: bump i18next from 23.5.1 to 23.7.6 (#6531)
Bumps [i18next](https://github.com/i18next/i18next) from 23.5.1 to 23.7.6.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.5.1...v23.7.6)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:27:30 -09:00
dependabot[bot]
22c54c3b2e
chore: bump eslint-plugin-import from 2.28.1 to 2.29.0 (#6507)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.28.1 to 2.29.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.28.1...v2.29.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:27:10 -09:00
dependabot[bot]
ae75f76e30
chore: bump aquasecurity/trivy-action from 0.13.1 to 0.14.0 (#6530)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.13.1 to 0.14.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](f78e9ecf42...2b6a709cf9)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:26:40 -09:00
dependabot[bot]
53d856d3c6
chore: bump @babel/traverse from 7.16.8 to 7.23.2 in /test (#6495)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.16.8 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:26:04 -09:00
dependabot[bot]
4e4d510238
chore: bump docker/setup-qemu-action from 2 to 3 (#6464)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:25:33 -09:00
dependabot[bot]
3a0f4a2773
chore: bump i18next from 23.5.1 to 23.6.0 (#6508)
Bumps [i18next](https://github.com/i18next/i18next) from 23.5.1 to 23.6.0.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.5.1...v23.6.0)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:24:53 -09:00
dependabot[bot]
cbc17516fd
chore: bump @typescript-eslint/parser from 6.7.2 to 6.9.1 (#6511)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.7.2 to 6.9.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.9.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:23:33 -09:00
dependabot[bot]
c4efcaf079
chore: bump actions/setup-node from 3 to 4 (#6512)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:23:05 -09:00
dependabot[bot]
f44b57393c
chore: bump docker/login-action from 2 to 3 (#6513)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:21:54 -09:00
dependabot[bot]
3fc30cae3e
chore: bump aquasecurity/trivy-action from 0.12.0 to 0.13.1 (#6514)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.12.0 to 0.13.1.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](fbd16365eb...f78e9ecf42)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:21:03 -09:00
dependabot[bot]
91f8ec6295
chore: bump tj-actions/changed-files from 39 to 40 (#6515)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 39 to 40.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v39...v40)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:20:36 -09:00
Asher
11e6e656c0
Release v4.18.0 2023-10-20 12:03:13 -08:00
Olivier Benz
d7a2b4936a
Update Code to 1.83.1 (#6488)
* Update Code to 1.83.1

* Patch out lookbehind for Safari support

Not sure why it needs a lookbehind unless a number followed by a capital
letter is not supposed to be considered a new word, which seems wrong to
me.  The tests do not contain any numbers so I can only guess.

---------

Co-authored-by: Asher <ash@coder.com>
2023-10-19 00:50:21 +00:00
Asher
c2d79d94f9
Use secure context in bug report template
Some folks run over localhost, which will work just fine for service
workers.
2023-10-11 17:19:19 -08:00
dependabot[bot]
9fec2d7cad
chore: bump docker/setup-buildx-action from 2 to 3 (#6463)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-11 15:51:24 -08:00
dependabot[bot]
80dfb2b2a9
chore: bump actions/checkout from 3 to 4 (#6462)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-04 15:50:11 -08:00
Asher
27e7b931e7
Remove mention of legacy extension API
We would like to shut this down.
2023-10-04 15:44:54 -08:00
liuxhit
db9f678477
Update default nginx config in guide.md (#6471)
update nginx config to avoid wss error when expose code-server using a custom domain and a custom port via nginx.

see also: 
[issue of code-server](https://github.com/coder/code-server/issues/4443)
[different between `$host` and `$http_host`](https://stackoverflow.com/a/76875724)
2023-10-04 10:41:35 -08:00
Olivier Benz
c095c26dbc
Update Code to 1.82.3 (#6472) 2023-10-04 17:17:27 +00:00
dependabot[bot]
262f66abf6
chore: bump @types/node from 18.17.18 to 18.18.1 (#6467)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.17.18 to 18.18.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 13:25:52 -08:00
dependabot[bot]
8ee45686b0
chore: bump aquasecurity/trivy-action from 0.11.2 to 0.12.0 (#6461)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.11.2 to 0.12.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](41f05d9ecf...fbd16365eb)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 13:24:45 -08:00
dependabot[bot]
512d97f22f
chore: bump tj-actions/changed-files from 38 to 39 (#6460)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 38 to 39.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v38...v39)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 13:24:15 -08:00
Daniel T. Lee
897e0ae1da
Modify manifest for window control overlay support (#6468)
Since the release of code-server v4.17.0 (Code 1.82), "Command Center" has become a default option. However, the current code-server PWA app lacks support for the Windows control overlay, resulting in an untidy appearance of the title bar. This commit introduces modifications to the manifest file to enable support for the window control overlay.
2023-10-02 18:03:37 +00:00
Asher
f4bf492051
Release v4.17.1 2023-09-29 15:21:48 -08:00
Asher
2eba7af117
Use code-server commit in product.json
Also remove github.com from the trusted domains.  This causes the
browser to block the popup instead (probably because the space between
interaction and popup is too great), which is difficult to notice in
Chromium.  Even in Firefox with the extra bar they add at the top it can
be easy to miss.
2023-09-29 13:58:01 -08:00
Asher
0dc59c0da2
Add trusted extension list
Also trust github.com to make the auth flow smoother.
2023-09-29 10:39:00 -08:00
Asher
6275520348
Fix incorrect argon2 target in arm builds (#6453)
* Fix building from source on arm

Not building from source causes argon2 to pull the wrong arch, so we
have to build from source.

But building from source is causing the new Kerberos module to fail on
arm64 and keytar to fail on both.

The latter has been very difficult to debug because the GitHub image
provides a different result to containers based on Ubuntu 20.04.
Because of this, use a container instead.

Use debian:buster as the container because it is easier to set up the
architecture sources (no need to modify the sources) and because it
seems to come with glibc 2.28 rather than 2.31.

Also use the exact version of Node (18.15.0) for reproducibility.

* Set owner and group during tar to zero

Otherwise you get IDs that can cause (benign) errors while extracting,
which might be confusing.  At the very least, I did not see these errors
from previous tars (although they seem to use 1001).

There is no guarantee what IDs might exist so 0 seems the most
reasonable.
2023-09-27 19:17:47 -08:00
Asher
2bb51a25a9
Refresh proxy URI patch 2023-09-26 12:19:13 -08:00
Asher
7a213161f2
Build from source on cross-compile step
The comment said the issue with argon2 was related to CentOS 7 but the
cross-compile steps never used CentOS 7 so maybe the real issue is with
the architecture.
2023-09-26 09:58:53 -08:00
Asher
a1131fadf2
Enable secret storage (#6450)
* Remove unused dependency patch

* Enable secret storage based on local storage

* Remove unnecessary GitHub auth patch

It works now without the patch.
2023-09-26 08:35:41 -08:00
Asher
468cf5c6ce
Update npm publish workflow to use v18 2023-09-22 17:53:56 -08:00
Asher
800bf364d6
Release v4.17.0 2023-09-22 17:49:40 -08:00
DevMirza
5428442628
feat(lang): Add Urdu Locale (#6444) 2023-09-22 17:16:51 -08:00
Dov Benyomin Sohacheski
020f280458
Add .local mount to example Docker command (#6419) 2023-09-22 17:07:07 -08:00
Asher
58f6e24a07
Fix installation of kerberos module on armv7l (#6442)
Also build with the same version of Node we will release with.
2023-09-22 00:54:14 -08:00
Asher
7868f4db23
Fix cross-compilation (#6441)
* Avoid packaging yarn.lock

Since the shrinkwrap is what we want everything to use.

* Build with npm

It seems we stuck with yarn because npm was giving us errors but I will try
sorting it out now so we can build with npm as originally intended.

* Remove build from source

Not using CentOS 7 anymore so based on the comment we no longer need
this.  Keytar seems to install fine now.

* Update missed Node version

These numbers are all over the place.

* npm_config_arch must be lowercase

* Patch out Kerberos

I am not sure exactly how it is used but I think it is not a path code-server
worries about, at least not right now.  Just going to patch it out rather than
figure out how to build it on armv7l but we can revisit later.
2023-09-21 23:21:01 -08:00
Asher
acc50a5d36
Update dependencies and force-update qs (#6440)
* Update dependencies and force-update qs

This is mainly an attempt to get rid of as many resolutions as possible
since it seems they are unnecessary except for qs (according to yarn/npm
audit).

For qs use 6.9.7 since Express is using 6.9.6 and that matches the most
closely.

Also add overrides since this is npm's version of yarn's resolutions and
we need it for the shrinkwrap to generate with the right dependencies.

Decided to keep pinning @types/node as well although I am not sure it is
necessary.  Express is pulling in v20 types.  Since this is
development-only we only need it in resolutions.

* Run formatter

Some rules seem to have changed with the dependency updates.

* Replace deprecated bodyParser.json() usage

* Audit npm shrinkwrap as well

* Skip installing dependencies in audit

It seems the tools only require the lock files.

* Fix tests when using ipv6

* Add missing openssl dependency to flake
2023-09-21 16:13:34 -08:00
Asher
47ee7ae670
Bump minimum glibc to 2.28 (#6439)
At least, for the standalone and for anyone running on default Node 18.

If support for 2.17 is needed then one would need to build Node 18 with 2.17 and then build code-server with that version (specifically, the native npm modules).
2023-09-21 13:42:17 -08:00
Asher
70d0c603cc
Update to VS Code 1.82.2 (#6436)
* Update VS Code to 1.82.2

* Add new libkrb5 dependency

* Update patches

The only changes were to context except:

- The URL callback provider uses a new _callbackRoute argument and moved
  locations.
- The telemetry provider gets passed the request service as the first
  argument now.
- CSP hash changed, as usual.

* Update Node to v18

* Revert back to es2020

es2022 is breaking Safari.
2023-09-20 15:33:28 -08:00
dependabot[bot]
2e29c233ea
chore: bump tj-actions/changed-files from 37 to 38 (#6417)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 37 to 38.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v37...v38)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 11:54:56 -08:00
dependabot[bot]
331a017309
chore: bump argon2 from 0.30.3 to 0.31.0 (#6415)
Bumps [argon2](https://github.com/ranisalt/node-argon2) from 0.30.3 to 0.31.0.
- [Release notes](https://github.com/ranisalt/node-argon2/releases)
- [Commits](https://github.com/ranisalt/node-argon2/compare/v0.30.3...v0.31.0)

---
updated-dependencies:
- dependency-name: argon2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 11:53:31 -08:00
dependabot[bot]
f915d1e2c8
chore: bump eslint from 8.44.0 to 8.48.0 (#6414)
Bumps [eslint](https://github.com/eslint/eslint) from 8.44.0 to 8.48.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.44.0...v8.48.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 11:52:54 -08:00
Kaoru Yamamoto
95bcf101d7
Add Japanese locale (#6433) 2023-09-18 17:23:03 +00:00
James MacDonald
d80568df20
Add pod annotations (#6432) 2023-09-16 00:31:05 +00:00
Asher
03dc8cd808
Propagate post-installation failures
pipefail might be ideal here but not sure how wide the support is yet
considering this may run on plain sh.
2023-09-11 09:27:29 -08:00
Asher
3e1c00e017
Run formatter
Not sure why CI missed these, will have to look into it.
2023-09-11 09:27:28 -08:00
Cyanoure
a76e5241b6
Add "CODE_SERVER_HOST" environment variable (#6423) 2023-09-08 22:50:11 +00:00
Asher
913fc30866
Upgrade @coder/logger (#6409)
This gets rid of the unused peer dependency that was pulling in
protobufjs.
2023-08-30 12:10:34 -08:00
Asher
eb498b0d6d
Remove humanPath (#6404)
The tilde is ambiguous and it can be helpful to know exactly what paths
code-server is trying to use, especially if it is running as a different
user than you expected.
2023-08-29 14:25:24 -08:00
Antoine
eb8099ff89
feat(helm): Don't create Secret if existingSecret is provided (#6397) 2023-08-28 11:01:11 -08:00
Efren
56d3548fa2
Add braces to Caddyfile example (#6382) 2023-08-10 00:44:23 +00:00
jothi prasath
2d335bd1ea
Update screenshots (#6372) 2023-08-07 19:02:54 +00:00
dependabot[bot]
291682e1c0
chore: bump i18next from 23.2.11 to 23.4.1 (#6362)
Bumps [i18next](https://github.com/i18next/i18next) from 23.2.11 to 23.4.1.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.2.11...v23.4.1)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 10:17:13 -08:00
dependabot[bot]
97aeb77abe
chore: bump eslint-plugin-import from 2.27.5 to 2.28.0 (#6363)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.27.5 to 2.28.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.27.5...v2.28.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 10:16:13 -08:00
dependabot[bot]
76fd2389e4
chore: bump proxy-agent from 6.2.1 to 6.3.0 (#6361)
Bumps [proxy-agent](https://github.com/TooTallNate/proxy-agents/tree/HEAD/packages/proxy-agent) from 6.2.1 to 6.3.0.
- [Release notes](https://github.com/TooTallNate/proxy-agents/releases)
- [Changelog](https://github.com/TooTallNate/proxy-agents/blob/main/packages/proxy-agent/CHANGELOG.md)
- [Commits](https://github.com/TooTallNate/proxy-agents/commits/proxy-agent@6.3.0/packages/proxy-agent)

---
updated-dependencies:
- dependency-name: proxy-agent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 09:51:46 -08:00
Asher
3cb92edc76
Release v4.16.1 2023-07-31 11:21:45 -08:00
Olivier Benz
94ef3776ad
Update Code to 1.80.2 (#6357) 2023-07-31 09:14:29 -08:00
Asher
a82f1ceaa5
Add missing FAQ table of contents entry 2023-07-28 17:46:36 -08:00
Asher
25254214fb
Release v4.16.0 2023-07-28 17:32:57 -08:00
Asher
feb5e6770c
Add entry for location of configuration
Closes #6324.
2023-07-28 17:32:48 -08:00
Asher
e37b35278d
Account for disabled proxy in startup logs 2023-07-27 09:26:11 -08:00
Asher
2ffbcfdfcb
Release v4.15.0 2023-07-21 15:30:03 -08:00
Ryan Brainard
74da5167a2
Add --disable-proxy option (#6349) 2023-07-21 15:23:21 -08:00
dependabot[bot]
daac46b3cf
chore: bump i18next from 22.5.1 to 23.2.11 (#6326)
Bumps [i18next](https://github.com/i18next/i18next) from 22.5.1 to 23.2.11.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v22.5.1...v23.2.11)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-20 14:03:21 -05:00
dependabot[bot]
ea3c79ffd1
chore: bump @typescript-eslint/eslint-plugin from 5.59.1 to 5.62.0 (#6327)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.59.1 to 5.62.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.62.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-20 13:31:37 -05:00
Alex Thillen
93e60f7b0e
add trusted-origins cli argument (#6319) 2023-07-19 14:04:03 -08:00
dependabot[bot]
7926647058
chore: bump tough-cookie from 4.0.0 to 4.1.3 in /test (#6318)
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.0.0...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 14:02:19 -08:00
dependabot[bot]
d27cd43dce
chore: bump @typescript-eslint/parser from 5.61.0 to 5.62.0 (#6328)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.61.0 to 5.62.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.62.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 14:01:32 -08:00
dependabot[bot]
1befd37310
chore: bump word-wrap from 1.2.3 to 1.2.4 (#6342)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 14:01:14 -08:00
dependabot[bot]
2b3b5e7051
chore: bump word-wrap from 1.2.3 to 1.2.4 in /test (#6343)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 14:00:56 -08:00
Olivier Benz
788da5d495
Update Code to 1.80.1 (#6340)
* Update Code to 1.80.1 (#6340)
* Give build workflow more time to run
2023-07-19 14:00:31 -08:00
dependabot[bot]
070a5a3179
chore: bump semver from 6.3.0 to 6.3.1 in /test (#6320)
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-14 13:52:42 -08:00
Michael Thomas
7cbb6a8b09
Add Svelte to guide (#6269)
Added a guide on proxying to a Svelte app since there wasn't one already. Used the vue and angular guides as a template and included a link to an issue post on sveltekits website which adds some context.
2023-07-13 16:17:25 -05:00
dependabot[bot]
7fb54073db
chore: bump @typescript-eslint/parser from 5.59.11 to 5.61.0 (#6312)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.59.11 to 5.61.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.61.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-13 16:04:32 -05:00
dependabot[bot]
e72e8bb6b5
chore: bump aquasecurity/trivy-action from 0.10.0 to 0.11.2 (#6303)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.10.0 to 0.11.2.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](e5f43133f6...41f05d9ecf)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-13 16:04:18 -05:00
dependabot[bot]
411846528b
chore: bump eslint from 8.39.0 to 8.44.0 (#6299)
Bumps [eslint](https://github.com/eslint/eslint) from 8.39.0 to 8.44.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.39.0...v8.44.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-13 16:03:55 -05:00
dependabot[bot]
7f024eda6e
chore: bump typescript from 5.0.4 to 5.1.6 (#6297)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.0.4 to 5.1.6.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 13:59:24 -05:00
dependabot[bot]
2617623ed6
chore: bump tj-actions/changed-files from 36 to 37 (#6302)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 36 to 37.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v36...v37)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 13:59:01 -05:00
Asher
70aa1b7722
Release v4.14.1 2023-06-26 10:21:35 -08:00
dependabot[bot]
90a4147381
chore: bump semver from 7.3.8 to 7.5.2 (#6287)
Bumps [semver](https://github.com/npm/node-semver) from 7.3.8 to 7.5.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.8...v7.5.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-26 12:12:45 -05:00
Asher
5c19962930
Set session socket into environment variable (#6282)
* Avoid spawning code-server with --reuse-window and --new-window

These flags mean the user explicitly wants to open in an existing
instance so if the socket is down it should error rather than try to
spawn code-server normally.

* Set session socket into environment variable

While I was at it I added a CLI flag to override the default.  I also
swapped the default to --user-data-dir.

The value is set on an environment variable so it can be used by the
extension host similar to VSCODE_IPC_HOOK_CLI.

* Add e2e test for opening files externally
2023-06-21 22:47:01 -08:00
Asher
56d10d82bf
Enforce Node binary permissions
In some cases it may have extra write permissions.
2023-06-21 11:23:40 -08:00
Asher
cef2aa22dc
Move session server log after HTTP server logs
The indented logs technically apply to the HTTP server so move the
session server log afterward to avoid making them look like they apply
to the session server.
2023-06-21 10:59:02 -08:00
Sean Lee
b5a9ef80e7
Use unique socket per user for managing editor sessions (#6278)
Also warn if editor session manager socket cannot be created rather than failing.
2023-06-21 13:39:25 -05:00
Asher
5d3c9edce4
Release v4.14.0 2023-06-16 13:38:21 -08:00
Asher
9955cd91a4
Update Code to 1.79.1 (#6264)
Mostly just the usual shifting or changing of the surrounding context
but I did refactor the getting started block we insert because it keeps
getting mangled on each update.  Instead of shifting things around the
columns I just prepend it to the right column.

Getting 404s on some vsda module but everything seems to work 
without it and I do not see it referenced in the package.json nor a
nywhere on npmjs.com so it seems to be optional.
2023-06-15 08:00:03 -08:00
dependabot[bot]
fdeaba9581
chore: bump proxy-agent from 5.0.0 to 6.2.1 (#6247)
* chore: bump proxy-agent from 5.0.0 to 6.2.1

Bumps [proxy-agent](https://github.com/TooTallNate/proxy-agents/tree/HEAD/packages/proxy-agent) from 5.0.0 to 6.2.1.
- [Release notes](https://github.com/TooTallNate/proxy-agents/releases)
- [Changelog](https://github.com/TooTallNate/proxy-agents/blob/main/packages/proxy-agent/CHANGELOG.md)
- [Commits](https://github.com/TooTallNate/proxy-agents/commits/proxy-agent@6.2.1/packages/proxy-agent)

---
updated-dependencies:
- dependency-name: proxy-agent
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update proxy-agent usage

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Asher <ash@coder.com>
2023-06-14 14:27:15 -08:00
dependabot[bot]
40ff2e6049
chore: bump @typescript-eslint/parser from 5.57.1 to 5.59.11 (#6262)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.57.1 to 5.59.11.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.11/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-14 14:08:39 -08:00
dependabot[bot]
73d42f7ea0
chore: bump i18next from 22.4.6 to 22.5.1 (#6261)
Bumps [i18next](https://github.com/i18next/i18next) from 22.4.6 to 22.5.1.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v22.4.6...v22.5.1)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-14 13:33:51 -08:00
Sean Lee
fb73742b2b
Prefer matching editor sessions when opening files. (#6191)
Signed-off-by: Sean Lee <freshdried@gmail.com>
2023-06-14 13:32:07 -08:00
Asher
ccb0d3a34f
Remove unused dependency split2
This was used with now-removed `--link`.
2023-06-13 10:38:13 -08:00
dependabot[bot]
4a121edd16
chore: bump tj-actions/changed-files from 35 to 36 (#6246)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 35 to 36.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v35...v36)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 18:28:24 +00:00
dependabot[bot]
f6db985712
chore: bump robinraju/release-downloader from 1.7 to 1.8 (#6245)
Bumps [robinraju/release-downloader](https://github.com/robinraju/release-downloader) from 1.7 to 1.8.
- [Release notes](https://github.com/robinraju/release-downloader/releases)
- [Commits](https://github.com/robinraju/release-downloader/compare/v1.7...v1.8)

---
updated-dependencies:
- dependency-name: robinraju/release-downloader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 12:47:40 -05:00
dependabot[bot]
6d00fc7f46
chore: bump typescript from 4.6.4 to 5.0.4 (#6182)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.4 to 5.0.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.4...v5.0.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 12:45:49 -05:00
Jonas
ee024f3f2d
docs: mention Termux extension workarounds (#6227) 2023-05-31 15:00:58 -08:00
Simon Merschjohann
0703ef008c
Allow {{host}} and {{port}} in domain proxy (#6225) 2023-05-31 16:31:30 -05:00
Asher
2109d1cf6a
Add new unreleased section to changelog 2023-05-22 12:21:30 -08:00
Asher
74af05dfbe
Release v4.13.0 2023-05-19 13:14:29 -08:00
dependabot[bot]
2798322b03
chore: bump vm2 from 3.9.17 to 3.9.19 (#6216)
Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.17 to 3.9.19.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patriksimek/vm2/compare/3.9.17...3.9.19)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 12:38:38 -08:00
Asher
b3b971480f
Support X-Forwarded-Host with multiple hosts
Closes #6215.
2023-05-17 11:51:05 -08:00
Asher
6745a46034
Fix extension install test
This is not a valid ID (to install a specific version you use @) and,
quite strangely, Code is now returning an "extension not found" error if
the ID is invalid, breaking the test since we expect it to error about
the marketplace not existing.
2023-05-15 20:54:37 -08:00
Asher
43ef50b404
Update to 1.78.2 (#6201)
* Update to 1.78.1

No changes needed in the patches other than moving some lines around and
updating the CSP hash as usual.

The flake had to be updated as it was using Node 16.16 and 16.17 is
required at minimum now.  Also python seems to install python2 which is
marked as deprecated so explicitly install python3.

* Update to 1.78.2

Patches applied without any conflicts.

* Update commit environment variable

This was causing the commit not to be set.  It broke display languages
since that has a hard dependency on the commit for directory names.
Possibly broke other things.
2023-05-15 15:44:03 -08:00
dependabot[bot]
45c89856fd
chore: bump eslint-config-prettier from 8.6.0 to 8.8.0 (#6179)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.6.0 to 8.8.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.6.0...v8.8.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 12:43:37 -08:00
Jim van Abkoude
5f4ae75431
Add nix-on-droid as an Android installation method (#6196) 2023-05-08 12:42:43 -08:00
易良
521ff44aed
fix: relative path in markdown (#6188)
Co-authored-by: jinjing.zzj <jinjing.zzj@alibaba-inc.com>
2023-05-08 12:38:52 -08:00
Asher
5708e6ce32
Format redacted arg lines
Pushing straight to main again.
2023-05-05 14:44:40 -08:00
Asher
3f7db15fde
Redact sensitive args from handshake debug log 2023-05-04 10:54:41 -08:00
Asher
8c99f41b90
Fix parent process log level 2023-05-04 10:48:32 -08:00
Asher
e02d56dbfd
Do not trace child process messages
All this does is add a stack trace which is not helpful here.
2023-05-04 10:48:31 -08:00
Asher
aac5efa046
Do not log < 500 on web sockets as errors
For example if someone spams a web socket without authentication we
should not log "forbidden".  Forbidden is normal/expected operation, not
an error.
2023-05-04 10:48:30 -08:00
dependabot[bot]
ff2764f7b1
chore: bump rotating-file-stream from 3.0.0 to 3.1.0 (#6183)
Bumps [rotating-file-stream](https://github.com/iccicci/rotating-file-stream) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/iccicci/rotating-file-stream/releases)
- [Changelog](https://github.com/iccicci/rotating-file-stream/blob/master/CHANGELOG.md)
- [Commits](https://github.com/iccicci/rotating-file-stream/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: rotating-file-stream
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-03 08:33:32 -08:00
dependabot[bot]
bda6b631ab
chore: bump @typescript-eslint/eslint-plugin from 5.57.1 to 5.59.1 (#6180)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.57.1 to 5.59.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-01 16:49:48 -08:00
dependabot[bot]
9bac70ea0d
chore: bump eslint from 8.26.0 to 8.39.0 (#6181)
Bumps [eslint](https://github.com/eslint/eslint) from 8.26.0 to 8.39.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.26.0...v8.39.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-01 16:49:18 -08:00
dependabot[bot]
7722ef1437
chore: bump aquasecurity/trivy-action from 0.9.2 to 0.10.0 (#6178)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.9.2 to 0.10.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](1f0aa582c8...e5f43133f6)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-01 11:17:06 -05:00
smalllady
951d8ac45e
Fix proxying non-ASCII (#6154)
This only affects the path proxy since `req.originalUrl` is in escaped format.
2023-04-25 11:41:33 -08:00
Asher
2e17735795
Release v4.12.0 (#6157) 2023-04-21 14:04:07 -05:00
dependabot[bot]
1da7cda39e
chore: bump vm2 from 3.9.15 to 3.9.17 (#6155)
Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.15 to 3.9.17.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patriksimek/vm2/compare/3.9.15...3.9.17)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-20 10:58:58 -08:00
Asher
c829d74203
Update to Code 1.77.3 (#6148) 2023-04-13 10:34:33 -08:00
Asher
39075b2cf3
Update to Code 1.77.2 (#6142)
No changes necessary.
2023-04-12 08:52:16 -08:00
dependabot[bot]
aed1fc0119
chore: bump cross-fetch from 3.1.4 to 3.1.5 in /test (#6087)
Bumps [cross-fetch](https://github.com/lquixada/cross-fetch) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/lquixada/cross-fetch/releases)
- [Commits](https://github.com/lquixada/cross-fetch/compare/v3.1.4...v3.1.5)

---
updated-dependencies:
- dependency-name: cross-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 14:17:03 -05:00
Asher
6e411adb01
Update Code to 1.77.1 (#6135) 2023-04-10 10:28:13 -08:00
dependabot[bot]
36ba646bcb
chore: bump json5 from 2.2.0 to 2.2.3 in /test (#6085)
Bumps [json5](https://github.com/json5/json5) from 2.2.0 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.0...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-10 09:45:09 -08:00
dependabot[bot]
278d0f2184
chore: bump vm2 from 3.9.11 to 3.9.15 (#6134)
Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.11 to 3.9.15.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patriksimek/vm2/compare/3.9.11...3.9.15)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 22:01:25 +00:00
dependabot[bot]
b954250018
chore: bump eslint-plugin-import from 2.26.0 to 2.27.5 (#6123)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.26.0 to 2.27.5.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.26.0...v2.27.5)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 21:40:43 +00:00
dependabot[bot]
2b72da22e6
chore: bump @typescript-eslint/parser from 5.41.0 to 5.57.1 (#6132)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.41.0 to 5.57.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.57.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 21:21:36 +00:00
dependabot[bot]
3c838e2d02
chore: bump @typescript-eslint/eslint-plugin from 5.56.0 to 5.57.1 (#6133)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.56.0 to 5.57.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.57.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 20:55:02 +00:00
dependabot[bot]
f8d563c49b
chore: bump split2 from 4.1.0 to 4.2.0 (#6121)
Bumps [split2](https://github.com/mcollina/split2) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/mcollina/split2/releases)
- [Commits](https://github.com/mcollina/split2/compare/v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: split2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 20:36:33 +00:00
dependabot[bot]
39e63af359
chore: bump ts-node from 10.1.0 to 10.9.1 (#6125)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.1.0 to 10.9.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Changelog](https://github.com/TypeStrong/ts-node/blob/main/development-docs/release-template.md)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.1.0...v10.9.1)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 12:17:22 -08:00
Asher
c995988b70
Set proxy URI to domain proxy when possible (#6115)
This will make the ports panel use it instead of the default path-based
proxy.
2023-03-30 12:01:49 -08:00
watchakorn-18k
a44bd71043
Add thai language i18n (#6103) 2023-03-30 13:00:58 -05:00
Asher
19bcd043d7
Add debug log for origin check (#6096)
Extracted host detection into a separate function to avoid multiple log
lines on each return and went with a thrown error to consolidate the
common log text.
2023-03-30 12:24:33 -05:00
dependabot[bot]
c32a31d802
chore: bump ws from 8.2.0 to 8.13.0 (#6100)
Bumps [ws](https://github.com/websockets/ws) from 8.2.0 to 8.13.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.2.0...8.13.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 14:08:53 -05:00
dependabot[bot]
45ca68c362
chore: bump jpeg-js from 0.4.3 to 0.4.4 in /test (#6086)
Bumps [jpeg-js](https://github.com/eugeneware/jpeg-js) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/eugeneware/jpeg-js/releases)
- [Commits](https://github.com/eugeneware/jpeg-js/compare/v0.4.3...v0.4.4)

---
updated-dependencies:
- dependency-name: jpeg-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 14:03:39 -05:00
dependabot[bot]
8f1a70339d
chore: bump node-fetch from 2.6.6 to 2.6.7 in /test (#6084)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 14:03:09 -05:00
dependabot[bot]
35209aa5b5
chore: bump minimatch from 3.0.4 to 3.1.2 in /test (#6083)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 14:02:52 -05:00
dependabot[bot]
87f44599e5
chore: bump audit-ci from 6.0.0 to 6.6.1 (#6040)
Bumps [audit-ci](https://github.com/IBM/audit-ci) from 6.0.0 to 6.6.1.
- [Release notes](https://github.com/IBM/audit-ci/releases)
- [Commits](https://github.com/IBM/audit-ci/compare/v6.0.0...v6.6.1)

---
updated-dependencies:
- dependency-name: audit-ci
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 14:02:41 -05:00
dependabot[bot]
71f01ec0f0
chore: bump @types/node from 16.11.41 to 16.18.18 (#6099)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.11.41 to 16.18.18.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 14:02:22 -05:00
dependabot[bot]
f8e2d00099
chore: bump @typescript-eslint/eslint-plugin from 5.51.0 to 5.56.0 (#6102)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.51.0 to 5.56.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.56.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 14:02:00 -05:00
dependabot[bot]
a485fec27c
chore: bump minimist from 1.2.5 to 1.2.8 in /test (#6095)
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.8.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.8)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 18:58:55 +00:00
dependabot[bot]
aa2276293a
chore: bump cookiejar from 2.1.3 to 2.1.4 in /test (#6094)
Bumps [cookiejar](https://github.com/bmeck/node-cookiejar) from 2.1.3 to 2.1.4.
- [Release notes](https://github.com/bmeck/node-cookiejar/releases)
- [Commits](https://github.com/bmeck/node-cookiejar/commits)

---
updated-dependencies:
- dependency-name: cookiejar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 18:11:42 +00:00
Felix K
72eae01684
Add information on using PWA with desktop Firefox (#6098)
Co-authored-by: Felix Kuhlmann <felix-kuhlmann@gmx.de>
2023-03-22 17:52:35 +00:00
Ahmed El-Sharnoby
bca733de3d
Allow app-name configuration to change the name of the PWA (#6093) 2023-03-22 01:02:31 +00:00
Asher
78282a1fd6
Make random formatting change to security.yaml
This is an attempt to set myself as the notification target.

Closes #6090.
2023-03-21 12:24:10 -08:00
Asher
dbdd2edb62
Fix proxy error on web sockets
Fixes #6088.
2023-03-21 12:24:09 -08:00
Asher
a9d61daa91
Release v4.11.0 2023-03-16 10:04:57 -08:00
Initial-heart
6c08466b05
Correct default shell docs for npm on Windows (#6078) 2023-03-16 12:46:11 -05:00
dependabot[bot]
85e083580d
chore: bump aquasecurity/trivy-action from 0.9.0 to 0.9.2 (#6075)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.9.0 to 0.9.2.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](cff3e9a7f6...1f0aa582c8)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 16:49:25 -05:00
Asher
b0431069a1
Replace CI deprecations (#6072)
* Replace deprecated set-output usage in CI

* Update tj-actions/changed-files

CI is saying it uses Node 12 and that Node 12 actions are deprecated.
2023-03-14 15:52:53 -05:00
Asher
f9cc07926b
Update Code to 1.76.1 (#6070)
* Update Code to 1.76.1

- worker-src already contains blob so we can avoid patching that.
- localeService moved.
- Remaining changes were just line changes.

* Make language extensions installable again

Still might want to look into making the native language support work
but for now it seems better not to break backwards compatibility since
the native implementation is quite different.

* Avoid "install in browser" for language packs

It will not work.

* Import correct locale service

I believe before the contributions imported this but now we have to do
it here.
2023-03-14 15:03:53 -05:00
Asher
be40eca5d9
Release v4.10.1 2023-03-03 22:24:54 -09:00
Asher
9ba08907da
Fix Node version failure in publish workflow
Looks like the images got updated to v18 so they started failing.  For
npm install v16 and for Docker just run the script directly, it seems
silly to waste time installing v16 just to run a script through yarn.
2023-03-03 22:23:21 -09:00
Asher
d477972c68
Add origin checks to web sockets (#6048)
* Move splitOnFirstEquals to util

I will be making use of this to parse the forwarded header.

* Type splitOnFirstEquals with two items

Also add some test cases.

* Check origin header on web sockets

* Update changelog with origin check

* Fix web sockets not closing with error code
2023-03-03 03:12:34 -06:00
Asher
a47cd81d8c
Update FAQ: code-server is not using a direct fork
Also the wrapper process is another major difference along with the
update notifications.
2023-02-27 14:29:55 -09:00
Asher
c9fbcffd53
Rewrite differences in FAQ
- Move differences to the Codespaces section since they apply to both
  Codespaces and OpenVSCode-Server
- Add some important missing differences
- Exclude settings sync (not being worked on)
- Exclude the plugin API (deprecated)
- Exclude certificate support (browsers these days are starting to
  require trusted certs so better not to recommend using this)
2023-02-27 14:21:11 -09:00
Michael Tinsley
befa76d09d
Fix extra prefix dashes in install.sh (#6028) 2023-02-27 22:57:57 +00:00
Asher
e0ece195c1
Update changelog and chart with new version 2023-02-15 11:16:09 -09:00
Asher
ac1fba8bde
Remove deprecated --link (#6018) 2023-02-13 16:52:48 -06:00
Blue
6d8ed77fb0
feat(helm-chart): Add support for extraSecretMounts subPath in helm-chart (#5961) 2023-02-13 13:01:32 -06:00
Samuel Walker
4fb87f920f
feature: add ability to attach ports to code server (#6015) 2023-02-13 12:56:05 -06:00
Asher
36daac3031
Update to 1.75.1 2023-02-13 07:45:24 -09:00
Asher
45aef719d3
Make sure heartbeat isActive resolves
This does not seem to actually cause an issue (not resolving ends up
with the same behavior as resolving with false) but I am not sure if the
hanging promises would be a memory leak so seems best to fix.
2023-02-08 11:43:40 -09:00
Asher
6d6c5e18d1
Fix watch script ignoring stdout
This was lost due to the change from fork to spawn.
2023-02-08 11:42:28 -09:00
Asher
17bca521af
Update changelog 2023-02-07 13:57:53 -09:00
Asher
82073743b1
Update release guide 2023-02-07 13:57:52 -09:00
Asher
71ff747c48
Update Code to 1.75.0 (#6004)
* Update Code to 1.75.0

- getting-started.diff: The way to get an icon's class changed
- proxy-uri.diff: The product service is passed in so we can get the
  proxy URI from that now instead of passing it in separately.

* Remove workspace trust test

Something in how/when Code displays the trust dialog appears to have
changed, failing the test.  I am not sure it makes sense for us to be
testing upstream code anyway.

* Use regular Node for watch

Since we spawn the watch script with ts-node it was using ts-node for
the web server spawn as well.  With latest Code there are for some
reason type errors (it cannot find @types/node) but this is already
compiled code which already passed type checks; any type errors here are
useless.  To fix spawn with regular Node.

* Fix some workers not loading
2023-02-07 16:22:06 -06:00
dependabot[bot]
e5a2537aee
chore: bump limiter from 1.1.5 to 2.1.0 (#6001)
* chore: bump limiter from 1.1.5 to 2.1.0

Bumps [limiter](https://github.com/jhurliman/node-rate-limiter) from 1.1.5 to 2.1.0.
- [Release notes](https://github.com/jhurliman/node-rate-limiter/releases)
- [Commits](https://github.com/jhurliman/node-rate-limiter/commits)

---
updated-dependencies:
- dependency-name: limiter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update limiter usage

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Asher <ash@coder.com>
2023-02-06 13:12:57 -06:00
dependabot[bot]
bce6239801
chore: bump @typescript-eslint/eslint-plugin from 5.41.0 to 5.51.0 (#6002)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.41.0 to 5.51.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.51.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 18:59:24 +00:00
dependabot[bot]
93589edb61
chore: bump eslint-config-prettier from 8.5.0 to 8.6.0 (#6003)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.5.0 to 8.6.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.5.0...v8.6.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 12:41:05 -06:00
Asher
bfcca5fcc0
Remove docs preview
This is failing CI on Dependabot PRs.  Opted to just remove it since
most (all?) PRs will be from forks and this workflow will not run
anyway.  If we figure out the secret situation we can add it back.
2023-02-06 09:07:34 -09:00
Asher
a76c0c5742
Remove PR npm package
It is causing CI to fail for Dependabot (no access to the token) and it
does not work with forks and currently there is no one who pushes
straight to the repo so this will never be used.

Can always add it back if we figure out how to make the secrets work.
2023-02-06 08:56:47 -09:00
renovate[bot]
6e1b9131e9
chore(deps): update aquasecurity/trivy-action digest to cff3e9a (#5994)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-06 11:36:05 -06:00
Dean Sheather
776d57b12b
chore: enable dependabot (#5997) 2023-02-06 11:32:52 -06:00
Asher
026879b78c
Update Code to 1.74.3 (#5989) 2023-02-06 10:24:37 -06:00
Joe Previte
401d423dfd
docs: add usage in Coder (#5975)
* docs: add difference between Coder

Add a short block explaining the difference between code-server and
Coder.

* docs: add new doc coder.md under Install

This adds a new doc explaining how to install code-server in a Coder
workspace using Terraform.
2023-01-27 17:14:54 +00:00
Joe Previte
96d9c5eb0f
docs: add port-forwarding (#5979) 2023-01-27 16:41:27 +00:00
Kyle Carberry
134e9b40b7
chore: fix requirements so it navigates to docs (#5973)
This was navigating to the relative markdown file,
which is confusing when some links go to the docs.
2023-01-17 17:09:24 +00:00
zhaozhiming
7c2aa8c417
feat: add i18n in login page (#5947)
* feat: add i18n in login page

* fix: add word space and put the app name into the title

* fix: remove duplicate replace title

* fix: prettier format code

* fix: fix typescript check warning

* fix: add zh-cn locale file code owner

* fix: use existing flag locale to the login page

Co-authored-by: Joe Previte <jjprevite@gmail.com>
2023-01-13 17:42:49 +00:00
Joe Previte
d40a9742c0
feat(ci): add lint-actions step to build.yaml (#5957)
* feat(ci): add lint-actions step to build.yaml

This adds a new job to the Build CI pipeline to lint our GitHub Actions.

By doing this, we can prevent typos from slipping in.

Fixes #5776

* fix: disable shellcheck in actionlint

I don't think we want to enable this for now.

* fix: ignore set-output warnings for now

It's deprecated but there isn't a reason to move away from using it yet.
2023-01-13 17:21:56 +00:00
renovate[bot]
67416b7b79
fix(deps): update dependency argon2 to v0.30.3 (#5937)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-05 08:27:11 -07:00
Joe Previte
9e266db379
chore: use matchUpdateTypes (#5942) 2023-01-04 23:08:39 +00:00
Joe Previte
834d16df2a
docs(CONTRIBUTING): add standalone release section (#5946)
* docs: update section in troubleshooting

* docs: add section on standalone release
2023-01-04 15:47:34 -07:00
Joe Previte
d835cb9865
docs: add new termux installation method (#5938)
* docs: add new termux installation method

* fixup: formatting
2023-01-04 17:16:23 +00:00
Joe Previte
9e9cbd846d
chore: update renovate to include peer deps (#5940) 2023-01-03 15:14:21 -07:00
Joe Previte
077a8f6a6b
chore: pin json5 to 1.0.2 (#5936)
* chore: pin json5 to 1.0.2

* fixup: formatting
2023-01-03 20:57:16 +00:00
Joe Previte
4e280811f9
chore: update renovate and deps (#5914)
* chore: update renovate.json ignoreDeps

ansi-regex, env-paths and limiter all switch to ESM which we can't
support at the moment so ignore updates for now.

* chore: update actions/cache@v3

* chore: update minor deps

* chore: add pretteir to renovate.json
2023-01-03 17:28:58 +00:00
Joe Previte
3eb35979f0
chore: update aur job in publish.yaml (#5915)
This uses the `env.VERSION` which should fix the issue with version being blank.
2022-12-22 13:58:20 -06:00
Joe Previte
8377bd23df
chore: upgrade Code to 1.74.1 (#5909)
* chore: upgrade Code to 1.74.1

* chore: remove require in integration.diff

I don't know what the impact of this is but in 192c67db71
they removed the usage of `require` in `server.main.ts`.

More details in PR: https://github.com/microsoft/vscode/pull/165831

* chore: update marketplace.diff

* chore: update sha hash in webview.diff

* chore: update disable-builtin-ext-update.diff

If my logic is right, then this patch is now simplified thanks to this:
https://github.com/microsoft/vscode/blob/1.74.1/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts#L1238

* chore: refresh proxy-uri patch

* chore: refresh local-storage.diff

* chore: refresh sourcemaps.diff

* chore: refresh disable-downloads.diff

* chore: refresh display-language.diff

* chore: refresh getting-started.diff

* docs: update testing notes for cli-window-open

* docs: update telemetry testing instructions

* fix: add GITHUB_TOKEN to build code-server job

Downloading @vscode/ripgrep is failing only in CI so adding this
environment variable to see if it increases the rate limit.

Ref: https://github.com/microsoft/vscode-ripgrep#github-api-limit-note

* refactor: use own cache key build code-server job

* temp: disable vscode test

* refactor: delete wrapper test

* Revert "refactor: delete wrapper test"

This reverts commit 3999279b73.

* refactor: move vscode tests to e2e (#5911)

* wip: migrate vscode tests to e2e

* feat: add codeWorkspace to global setup

* refactor: only use dir in spawn when we should

* wip: migrate more tests

* refactor: move all vscode tests to e2e

* refactor(ci): move unit to own job

* fixup: add codecov to unit test step

* Update test/e2e/models/CodeServer.ts

* Update test/e2e/models/CodeServer.ts

* docs: add note about intercept requests

* refactor: rm unused clean() calls

* refactor: delete duplicate test

* refactor: update 'should not redirect' test

* refactor: rm unused imports

* refactor: rm unnecessary navigate call in test

* fixup: formatting

* wip: update test

* refactor: modify assertion for proxy

* fixup: use REVERSE_PROXY_BASE_PATH

* refactor: add helper fn getMaybeProxiedPathname

* fixup: formatting

* fixup: rm unused import

* chore: increase playwright timeout

* Revert "chore: increase playwright timeout"

This reverts commit a059129252.

* chore: rm timeout
2022-12-22 10:25:28 -07:00
Toby Cm
930791d249
Added how to disable file downloads in faq (#5907) 2022-12-19 16:00:42 +00:00
Joe Previte
5c21015dbe
release: v4.9.1 (#5893)
* chore: add 4.9.1 to changelog

* chore: bump Helm to 4.9.1
2022-12-16 12:07:36 -07:00
Joe Previte
fa39d4761a
fix: dst path in nfpm (#5875)
* fix: dst path in nfpm

* trigger ci

* Update ci/README.md
2022-12-16 11:35:13 -07:00
Joe Previte
87f606db2a
chore(ci): update linux cross-compile runner 20.04 (#5896) 2022-12-16 08:54:23 -07:00
Joe Previte
06483bc59d
refactor: rm node_mods caching in release workflow (#5895) 2022-12-15 14:24:59 -07:00
Joe Previte
9012ddfe79
refactor: use separate cache key in release, run standalone after caching (#5859)
* refactor: remove keytar dep in cross-compile

* refactor: try other keytar package

* refactor: remove keytar step in cross-compile

* fix: manually remove keytar

* try this first

* I think this is it

* Revert "I think this is it"

This reverts commit 5c566b0c01.

* okay this is it

* fixup

* try legacy peer

* remove keytar before standalone

* wrong path

* maybe

* revert: change *npm* back to npm*

* revert: don't uninstall keytar

* fix: use npm run standalone-release

* fixup formatting

* Revert "refactor: remove yarn.lock steps (#5850)"

This reverts commit 907747d394.

* fixup: remove the --exclude

* refactor: remove yarn.lock check

* try ddd in postinstall

* refactor: cache before release:standalone

* refactor: add os to cache key in release

* chore: formatting

* Update ci/build/npm-postinstall.sh

* fixup: formatting
2022-12-12 22:03:07 +00:00
Joe Previte
1efc5f104e
fix: use npm and yarn consistently in build and release (#5852)
* refactor: remove keytar dep in cross-compile

* refactor: try other keytar package

* refactor: remove keytar step in cross-compile

* fix: manually remove keytar

* try this first

* I think this is it

* Revert "I think this is it"

This reverts commit 5c566b0c01.

* okay this is it

* fixup

* try legacy peer

* remove keytar before standalone

* wrong path

* maybe

* revert: change *npm* back to npm*

* revert: don't uninstall keytar

* fix: use npm run standalone-release

* fixup formatting

* Revert "refactor: remove yarn.lock steps (#5850)"

This reverts commit 907747d394.

* fixup: remove the --exclude

* refactor: remove yarn.lock check

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-12 21:41:29 +00:00
Joe Previte
ef5865f506
fix: add VERSION to env in publish.yaml (#5868)
When I did the last release, `VERSION` wasn't defined which lead to a
blank string in the PR title and the commit message here:

https://github.com/coder/code-server-aur/pull/24

This should fix that.
2022-12-12 21:24:06 +00:00
Joe Previte
48588ee542
chore: update download artifacts in release (#5841) 2022-12-12 17:47:27 +00:00
Geoffrey Huntley
ac6b5bd4e6
chore(nfpm): bump to latest version (#5860) 2022-12-12 08:52:33 -07:00
Joe Previte
0ca6620ee6
fix: add missing keytar deps (#5851)
* fix: add missing keytar deps

* fixup
2022-12-08 11:30:08 -07:00
Joe Previte
907747d394
refactor: remove yarn.lock steps (#5850) 2022-12-08 10:44:27 -07:00
Joe Previte
d8995ec0b8
refactor: use npm in build.yaml (#5849) 2022-12-08 10:37:42 -07:00
Joe Previte
c088e73063
fix: use proper npm casing postinstall (#5848)
* fix: use proper npm casing postinstall

* chore: add log for npm config user agent

* fixup
2022-12-08 10:22:40 -07:00
Joe Previte
83c3453f50
fix: quote VERSION in jq command in release (#5845) 2022-12-07 22:19:20 +00:00
Joe Previte
3182be634e
refactor: use npm in build steps and postinstall.sh (#5844)
* refactor: default to npm in postinstall.sh

yarn has a bug where it will try to update dependencies even if
`yarn.lock` is present. Therefore we're defaulting to `npm` to prevent
further issues.

* refactor: exclude yarn.lock in standalone

By excluding `yarn.lock`, we prevent issues where the user must use
`yarn` instead of `npm` to install code-server.
2022-12-07 15:04:50 -07:00
Joe Previte
1297e9ac88
chore: update qs version (#5840) 2022-12-07 14:57:08 -06:00
Joe Previte
1484bee621
release: 4.9.0 (#5772)
* wip: changelog

* fixup

* fix: add +x to product.json in build-vscode

While testing a pre-release, there seems to be a bug with the file
permissions for `product.json`. Adding `chmod +x` to see if that fixes
it.

* chore: increase timeout

* fix: keep product.json file permissions in release

When we added the change to modify the `package.json` version using `mv`
and `jq` we didn't account for lost file permissions.

This caused a bug only happening in CI.

This should fix it by giving it 755 via `chmod`.

* trigger ci

* chore: update package.json bust cache

* fixup!: fix: keep product.json file permissions in release

* Revert "fix: add +x to product.json in build-vscode"

This reverts commit fc4d2b532f.

* chore: pin ubuntu runner in build code-server

* chore: update prettierignore

* chore: add notes to changelog

* chore: use ubuntu-22.04 for e2e

* chore: pin all jobs in build to ubuntu 20.04

* feat(wrapper): add tests for isChild

* fixup: include description ts-expect-error comment

* chore: update CHANGELOG

* chore: update Helm chart

* fixup: use our childProcess

* Update CHANGELOG.md

Co-authored-by: Asher <ash@coder.com>

Co-authored-by: Asher <ash@coder.com>
2022-12-06 13:28:27 -07:00
Pfau, Sascha
f43082e142
fix installing code-server on manjaro image (#5834)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-12-05 15:43:22 -07:00
Geoffrey Huntley
b6adcf50c6
feat(securitytxt): add security.txt (#5827) 2022-12-05 15:43:00 -07:00
Joe Previte
df49838739
chore: add VERSION check in build-vscode.sh (#5823) 2022-12-01 11:51:07 -05:00
renovate[bot]
2cbb1135e1
chore(deps): update minor dependency updates (#5787)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-30 09:51:03 -07:00
Geoffrey Huntley
43e8c439bf
housekeeping(branding): update coder/coder branding (#5781) 2022-11-14 12:28:42 -06:00
Joe Previte
74edfe7c43
chore: fix typo in release.yaml (#5774) 2022-11-10 13:48:56 -07:00
Joe Previte
69d469b714
chore: update Code to 1.73.1 (#5769) 2022-11-10 12:46:21 -07:00
Joe Previte
e2f585f368
docs: add --edge to install section (#5767)
This adds documentation for the flag `--edge` which we've had for a
while but forgot to document.

Fixes #5717

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-11-10 11:50:37 -07:00
Joe Previte
3367e1ad4e
chore: upgrade Code to 1.73.0 (#5751)
* chore: upgrade Code to 1.73.0

This upgrades Code to 1.73.0 via the tag.

* chore: refresh integration patch

* chore: clean up base-path patch

Only change here was they moved
lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts

so I had to update it. Code still looks the same though.

* chore: refresh proposed-api patch

* chore: update marketplace patch

Simlar to a previous patch, the location of
lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
changed so I had to update this patch.

No changes to code itself.

* chore: update hash in webview patch

I believe there was only one to update but I may have missed one.

* chore: refresh disable-builtin-ext-update.diff

* chore: refresh update-check

quilt couldn't apply it so I had to add one change in manually to
lib/vscode/src/vs/server/node/serverEnvironmentService.ts

* chore: refresh logout patch

* chore: refresh proxy-uri patch

* chore: refresh local-storage patch

* chore: refresh sourcemaps patch

* chore: refresh disable-downloads patch

* chore: refresh telemetry patch

* refactor: re-apply display-language patch

This kinda got removed but I added it back in.

* refactor: drop exec-argv patch

This was accepted upstream! :tada

* chore: refresh getting-started patch

* fixup: add missing slash in marketplace

* fixup: update notes proposed-api patch

* fixup: support this.args.log as string

Seems like upstream now uses a string[] for this. For now, support
string.

See
2b50ab06b1

* Revert "fixup: support this.args.log as string"

This reverts commit 78c02a1f13.

* fixup!: add log to toCodeArgs

This was changed upstream from `string` to `string[]` so now we convert
to an array in `toCodeArgs`.

See 78c02a1f13

* fixup: update telemetry description
2022-11-09 22:10:03 +00:00
renovate[bot]
c885c96644
chore(deps): update minor dependency updates (#5720)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-09 14:03:07 -07:00
Joe Previte
b978655c07
refactor: get version dynamically (#5753)
* refactor: get version dynamically

* chore: remove version

* fixup: missing quotes

* refactor: drop global VERSION

* wip: updating ersion in publish

* refactor: update publish.yaml with version changes

* refactor: release.yaml with new version changes

* refactor: update build.yaml with version changes

* chore: update maintainer

* fixup: update version in build-vscode

* fixup: fix github env version

* try macos only

* try again

* last resort

* joe again

* this oneee

* fixup: this should work

* try using inputs

* docs: update release notes

* fixup!: use env.VERSION in docker step

* fixup!: comment get and set version

* fixup!: remove compress release package comment

* fixup!: use $VERSION in npm-version

* refactor: set VERSION in build VS Code step

* refactor: use 0.0.0 in package.json version

* refactor: delete release-prep script

* Update ci/build/build-vscode.sh

* fixup!: remove extra VERSION set in aur
2022-11-08 22:45:01 +00:00
Joe Previte
5a8bb2b8e8
release: v4.8.3 (#5762)
* chore: update version to 4.8.3

* chore: update CHANGELOG

* fixup!: update chart version

* fixup: update changelog
2022-11-07 19:47:40 +00:00
Kyle Carberry
77c3cd3aa1
Improve getting started Coder CTA (#5752)
* Improve getting started Coder CTA

This wasn't very standout-ish before, and I think it's
wise for us to experiment with directing users to Coder.

* Update nix flake

* Update diff

* Add advert to code-server install

* Fix patch to reset columns if getting started is disabled

* Update text for advert
2022-11-07 11:06:51 -07:00
KevinZønda
ff8ea36b27
feat: install script support arch-like (#5757) 2022-11-07 17:48:21 +00:00
Joe Previte
f56ce5b66d
feat: add test for markdown webview (#5740)
* feat: add test for markdown webview

* fixup!: use frameLocator
2022-11-03 15:08:12 -07:00
Joe Previte
2530a0d265
release: 4.8.2 (#5743)
* chore: bump version to 4.8.2

* chore: update CHANGELOG

* docs: add back line in publishing release

See https://github.com/coder/code-server/pull/5732#discussion_r1010685933

* Revert "chore: bump version to 4.8.2"

This reverts commit 5d70994f22.

* fixup: use 4.8.2-rc.1

* docs: add release candidate notes

* refactor: warn plugin range incompatibble

* chore: bump version 4.8.2
2022-11-02 14:34:38 -07:00
Joe Previte
a432a0d697
docs: update faq for getting started (#5731) 2022-11-01 17:48:32 +00:00
Joe Previte
505f07a9bc
fix: minor fixes related to release (#5732)
* fix: use * for test plugin engines

This removes the need to update this version with every version change.

* refactor: use npm-package in release assets

This adds a new job to `release.yaml` to upload the `npm-package` to the
release assets which will also allow us to download it in the
`publish.yaml` workflow.

* docs: update release instructions

* fixup!: use package.tar.gz
2022-11-01 10:16:30 -07:00
Joe Previte
ee47293cf6
Revert "Test branch (#5733)" (#5734)
This reverts commit 5c751f26ee.
2022-10-28 13:48:36 -07:00
Joe Previte
5c751f26ee
Test branch (#5733)
* fix: use * for test plugin engines

This removes the need to update this version with every version change.

* refactor: use npm-package in release assets

This adds a new job to `release.yaml` to upload the `npm-package` to the
release assets which will also allow us to download it in the
`publish.yaml` workflow.

* docs: update release instructions
2022-10-28 13:43:21 -07:00
Joe Previte
7c0c0b0c29
fix: merge in master from coder/code-server-aur (#5730)
This ensures that the branch is up-to-date with coder/code-server-aur
before opening a PR.
2022-10-28 10:44:00 -07:00
Joe Previte
649985af8e
feat: customize getting started page (#5707)
* feat: add getting-started patch

This modifies the text on the Getting Started page to promote
coder/coder.

* feat: add --disable-getting-started-override

This adds a new CLI flag to code-server called
`--disable-getting-started` which will be used in Code to not use
Coder's custom Getting Started text.

* refactor: conditionally show coder getting started

This modifies the getting started patch changes to work with the new
`--disable-getting-started-override`.

The flag is false by default meaning the Coder getting started is shown.
By passing the flag to code-server, it will not be shown.

* docs: update faq for getting started override

* docs: update getting-started patch description

* fixup!: update patch

* fixup!: unit test

* feat: add more tests

* fixup!: use correct env var in tests

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-28 16:59:24 +00:00
Joe Previte
ca182b9fb5
chore: prettierignore updates and setup-helm upgrade (#5721)
* chore: update prettierignore

* chore: upgrade setup-helm 3.4
2022-10-28 16:15:19 +00:00
Joe Previte
cc8ce3b3c6
release: 4.8.1 (#5722)
* chore(release): bump version to 4.8.1

* chore: bump helm-chart

* chore: update CHANGELOG
2022-10-28 08:55:45 -07:00
Joe Previte
ba44f6cc97
release: 4.8.1-rc.1 (#5713)
* chore(release): bump version to 4.8.1

* fixup

* revert: don't change to 4.8.1
2022-10-26 18:50:08 +00:00
Joe Previte
e6d2d72f9c
fix: CSP and webview errors (#5712)
* fix: update hashes in webview patch

We missed a hash update and also had the wrong hash for another HTML
file which caused issues in 4.8.0.

* refactor: move parent-origin into webview
2022-10-26 11:20:11 -07:00
Joe Previte
005fa87699
chore(deps): downgrade argon2 to 0.29.0 (#5704)
Not sure why but we were seeing argon2/node-gyp issues after this
upgrade while running `yarn release:standalone`. For now, downgrading to
0.29.0 seems to fix the issue when testing locally.

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-25 16:56:13 +00:00
Joe Previte
b19996176e
chore(deps): update prettier and eslint (#5700)
* chore(deps): update eslint/prettier deps

* refactor(cli): only import load from js-yaml

* chore(deps): remove minimatch resolution

* fixup! update yarn lock
2022-10-25 16:39:06 +00:00
Joe Previte
1134ee1c79
fix: pin helm to v3.10.1 (#5703)
Due to https://github.com/Azure/setup-helm/issues/99, this pins the
version to v3.10.1 as a temporary fix.
2022-10-25 16:24:53 +00:00
renovate[bot]
606811fbfd
chore(deps): update aquasecurity/trivy-action digest to e55de85 (#5702)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-25 08:32:55 -07:00
Joe Previte
2f583b082e
release: 4.8.0 (#5698)
* chore(release): bump version to 4.8.0

* chore: update changelog

* chore: bump helm chart

* Update CHANGELOG.md

Co-authored-by: Asher <ash@coder.com>

* Update CHANGELOG.md

Co-authored-by: Asher <ash@coder.com>

* fixup!: cleanup changelog

Co-authored-by: Asher <ash@coder.com>
2022-10-24 16:23:03 -07:00
Joe Previte
59ef715d8b
chore: update minimatch (#5697) 2022-10-24 13:55:54 -07:00
Wei HU
bbf18cc6b0
feat: add docker image release for Ubuntu based image (#5688) 2022-10-24 18:41:19 +00:00
Joe Previte
031e903979
feat: enable forwarded ports using built-in proxy (#5673)
* feat: enable ports panel in proxy-uri patch

This makes the forwarded ports panel enabled by default.

* feat: add tunnelProvider in proxy-uri patch

This adds a `tunnelProvider` along with a `tunnelFactory` so that ports
are forwarded and use code-server's built-in proxy.

* fixup!: update import

* fix: skip uri modification if authority host match

This adds a check in our `resolveExternalUri` patch to skip modifying if
the `authority` and the `location.host` match to prevent
`localhost:<port>/proxy/<port>` from being modified.

* fixup!: refresh patch

* fixup!: move authority check up

* fixup!: remove comment

* fixup!: add trailing slash
2022-10-24 18:11:44 +00:00
Kyle Carberry
430b567e69
fix: Enable the BROWSER environment variable (#5695)
This was breaking the automatic opening of links in GIT_ASKPASS
on a git clone. I've tried to execute this script manually, and
it does indeed work!
2022-10-24 11:26:36 -05:00
Joe Previte
efce00582b
chore: update Code to 1.72.2 (#5650)
* chore: update Code to 1.72.2

* chore: refresh integration patch

* chore: refresh base-path

* chore: refresh proposed-api patch

* chore: refresh marketplace patch

* chore: refresh webview patch

* chore: refresh disable-builtin patch

* chore: refresh logout, update-check patches

* chor: refresh proxy-uri patch

* fix: delete unique-db patch

This was supposed to be removed in https://github.com/coder/code-server/pull/5519

Looks like I didn't update the series or actually delete the patch.

* fix: drop log-level patch

This was merged upstream!

* chore: refresh local-storage patch

* chore: refresh service-worker patch

* chore: refresh sourcemaps patch

* chore: refresh disable-downloads patch

* chore: refresh telemetry patch

* chore: refresh language patch

* chore: refresh cli-window-open patch

* Revert "fix: delete unique-db patch"

This reverts commit ca0506c5f6.

* fixup!: rm extra spaces integration patch

* fixup: space

* fixup! update unique-db patch

* fixup!: update hash in webview patch

* fixup! update marketplace patch

* fixup!: remove comma
2022-10-17 16:30:39 -07:00
renovate[bot]
4a06d97f84
chore(deps): update dependency doctoc to v2.2.1 (#5648)
* chore(deps): update dependency doctoc to v2.2.1

* chore: update doctoc version in build.yaml

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-10-14 22:59:21 +00:00
renovate[bot]
514dbf315e
chore(deps): update dependency normalize-package-data to v5 (#5649)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-14 09:36:56 -07:00
Joe Previte
690e0aff45
fix: add handle for resolveExternalUri (#5624)
* fix: add handle for resolveExternalUri

This adds a fix to properly handle `resolveExternalUri` which is used by
extensions like Tabnine.

* fixup!: update patch

* fixup!: force update proxy patch

* fixup!: use proxyEndpointTemplate else manually add

* fixup!: throw error if productConfiguration missing

* feat(testing): add asExternalUri

This modifies the test extension used in e2e test by registering a new
command for testing `asExternalUri`.

* feat: add e2e test for asExternalUri

* docs: update playwright setup comments

* feat: add support for VSCODE_PROXY_URI

* chore: refresh patches

* feat: add test for VSCODE_PROXY_URI

* chore: add metadata to lang extension

* fixup!: fix part of service-worker patch

* fixup!: remove e2e test, update patch notes

* fixup!: refresh disable-downloads

* fixup!: formatting
2022-10-14 16:08:58 +00:00
Alwin Lohrie
714afe0cc7
feat: add customization options for the login page (#5633)
* add customization options for the login page

* add unit tests

* add test for correct welcome text when none is set but app-name is

Signed-off-by: niwla23 <46248939+niwla23@users.noreply.github.com>

* add test for no app-name set and check in title too

Signed-off-by: niwla23 <46248939+niwla23@users.noreply.github.com>

Signed-off-by: niwla23 <46248939+niwla23@users.noreply.github.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-10-13 22:32:20 +00:00
Joe Previte
71a127a62b
refactor: update prettier and doctoc (#5605)
* docs: add toc to CODE OF CONDUCT

* chore: add prettier ignore blocks to docs

* chore: update styles for Dockerfile

* refactor: separate prettier, doctoc

This does a couple things:
- update `.prettierignore`
- split `prettier` and `doctoc` commands. you can still run with `yarn
  fmt`
- delete `fmt.sh` and add `doctoc.sh`

By doing so, we can run tasks in parallel in CI and we should also have
less false positives than before with `yarn fmt` locally.

* refactor: update prettier job, add doctoc

This modifies the prettier job to use actionsx/prettier. It also adds a
job for `doctoc`.

* chore: upgrade to prettier 2.7.1

* chore: pin doctoc to 2.0.0

* fixup!: add .pc to prettierignore

* feat: add --cache to prettier cmd
2022-10-13 22:16:55 +00:00
renovate[bot]
d4707d1d24
fix(deps): update dependency argon2 to ^0.30.0 (#5647)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-10-13 20:10:23 +00:00
kotborealis
f61ec4a41c
add CLI argument --disable-workspace-trust (#5638)
Add CLI flag to disable workspace trust feature, as
described in documentation:
https://code.visualstudio.com/docs/editor/workspace-trust

Add test for workspace trust argument.
2022-10-13 19:57:04 +00:00
Merith
ba68656353
fix potential typo for "installing with npm" (#5630)
the link for installing with NPM on line 103 was written as

[installing with npm][./npm.md](./npm.md) `[installing with npm][./npm.md](./npm.md)`
I fixed it to look like
[installing with npm](./npm.md) `[installing with npm](./npm.md)`
2022-10-10 17:55:56 +00:00
Möbius
b2f043ab41
Update guide.md (#5614)
Co-authored-by: Mobius <ELXIAGHT@outlook.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-10-07 18:04:22 +00:00
Daniil Gentili
b562d4a880
Allow opening files at a specific line and column (fixes #5619) (#5620)
* Allow opening files at a specific line and column (fixes #5619)

* Add isDirectory test
2022-10-06 11:12:21 -07:00
unknowndevQwQ
3a9eb312b1
feat: add doas support (#5600)
Some people may have some reason to drop sudo and switch to doas
2022-10-04 16:45:25 +00:00
Joe Previte
77bbed4831
release: 4.7.1 (#5607)
* chore(release): bump version to 4.7.1

* docs: update MAINTAINING

* chore: update release_template

* chore: update CHANGELOG

* chore: bump helm chart version

* Update ci/helm-chart/Chart.yaml

Co-authored-by: Asher <ash@coder.com>

* fixup!: changelog

Co-authored-by: Asher <ash@coder.com>
2022-09-30 14:44:45 -07:00
Joe Previte
3ac2307b5c
fix: add node to path (#5598)
* fix: remove deprecated symlink

* refactor: remove deprecation notice

* fixup! refactor: remove deprecation notice

* fix: add node to path

* fixup: shellcheck

* Update src/node/wrapper.ts

Co-authored-by: Asher <ash@coder.com>

* fixup!: fix: remove deprecated symlink

* Update ci/build/build-vscode.sh

Co-authored-by: Asher <ash@coder.com>

* Update ci/build/build-vscode.sh

Co-authored-by: Asher <ash@coder.com>

* fixup: use NODE_EXEC_PATh

* Update ci/build/build-vscode.sh

Co-authored-by: Asher <ash@coder.com>

Co-authored-by: Asher <ash@coder.com>
2022-09-29 18:02:53 -05:00
Joe Previte
8629d6a474
refactor: run security on package.json changes (#5602)
* refactor: run security on package.json changes

* fixup: add to main push too
2022-09-29 14:46:48 -05:00
Joe Previte
7f0c4d785f
chore: update vm2 to 3.9.11 (#5601) 2022-09-29 10:05:14 -07:00
unknowndevQwQ
b6aeb4bfab
fix: fix can't run it as expected in freebsd (#5595)
In freebsd, su -c expects a login class argument instead of a command, if -c is preceded by a username, then -c and the arguments that follow will be passed as shell arguments
2022-09-28 21:06:24 +00:00
Joe Previte
acdbefb986
docs: update telemetry patch (#5596)
This adds instructions on how to test the telemetry patch. Eventually we
will add a test for it but for now, this makes it 10x easier to test.
2022-09-27 14:09:53 -07:00
Joe Previte
05289d3eb6
chore(ci): move platform steps to release (#5587)
* refactor: move platform steps build -> release

* fixup! refactor: move platform steps build -> release

* refactor: download npm package

* refactor: upload release-packages to draft

* refactor: remove draft step

* refactor: e2e rely on build now

* refactor: use npm package in e2e

* fix: update release workflow

* fixup: update cache key

* fixup: checkout submodules in e2e steps

* fixup: try install in release dir

* fix: copy node to release package

* docs: add notes about test for terminal

* fixup

* try cp instead

* try this

* fixup: clean it all up

* fixup: update names

* fixup: add proxy back

* fixup: add comment
2022-09-27 11:46:37 -07:00
Shawn Weeks
3264187419
Set RPM Upgrade Flag (#5588) 2022-09-26 13:04:36 -07:00
Joe Previte
3256157a3f
chore: update code to 1.71.2 (#5580)
* chore: update code to 1.71.2

* chore: update telemetry patch

It appears part of the fix has been implemented upstream.

* refactor: drop safari-console patch

This has been fixed upstream.
2022-09-23 22:51:41 +00:00
Joe Previte
fdec34cf85
refactor: drop connection-type patch (#5585) 2022-09-23 20:51:44 +00:00
Asher
7e98628167
fix: installer tests (#5578)
Also rename from yml to yaml.
2022-09-23 00:15:26 +00:00
renovate[bot]
42c21c9684
chore(deps): update tj-actions/changed-files action to v26 (#5579)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-22 19:57:54 +00:00
Joe Previte
51677f0819
feat(ci): refactor build workflow (#5572)
* refactor: remove stylelint

* refactor: move shellcheck to separate job

* refactor: add helm script and job

* refactor: add eslint job and yarn script

* fix(test/tsconfig): exclude test-plugin

* refactor: delete lint, add typecheck job

* refactor: remove prebuild

* wip: add notes about unit test refactor

* refactor: delete buggy socket test

This test was really added to in get cover specific lines but it's buggy
and only passes sometimes locally. I think it's okay to remove because:
- it's an implementation detail (not user facing)
- not preventing any specific regressions

* refactor: move test-plugin to integration suite

This seems more appropriate given this tests how a plugin might work
within code-server.

* wip

* wip: refactor vscode integration tests

* refactor: move unit tests to separate job

* fix: formatting

* Revert "wip: refactor vscode integration tests"

This reverts commit 13286bf4c9.

* Revert "refactor: move unit tests to separate job"

This reverts commit 6c87b540b4.

* feat: collect codecov integration tests

* fixup! feat: collect codecov integration tests

* fixup! feat: collect codecov integration tests

* fixup!: move helm step

* fixup!: update ids for caching

* trigger ci

* trigger ci

* chore: clean up names in security.yaml

* fixup!: remove .tsx

* fixup!: change to src/**"

* fixup!: move helm cmd to yaml

* fixup!: always build test plugin

* fixup!: fix plugin typings

* fixup! add back flakey test

* fixup!: only install helm deps if changes

* fixup!: revert node mod caching

* dont keep, test for asher

* fixup!: add make to centos

* refactor: add test:native

This adds a new script to run native tests (i.e. --help which should run
in ci on all platforms).

* try updating glibc

* try 2.25

* Revert "refactor: move test-plugin to integration suite"

This reverts commit bc02005dc0.

I couldn't get past some GLIBC errors in CI so moving back to unit
tests.

* Revert "try updating glibc"

This reverts commit 02ed560f22.

* fixup!

* asher: again

* try this for ts changes

* fixup

* refactor: scripts.yml -> scripts.yaml

* fixup!: move lint-sh to scripts.yaml

* fixup!: use apk for lint scripts

* fixup! fixup!: use apk for lint scripts

* fixup!: remove typecheck step

* fix: pattern for lint ts files

* test: lint should fail

* fixup! fixup!: use apk for lint scripts

* Revert "test: lint should fail"

This reverts commit 158c64db04.

* fixup!: skip cancel workflow on forks

Looks like the cancel action workflow can't run on forks due to secrets.

See https://github.com/andymckay/cancel-action/issues/4

* fixup: remove cancel-workflow

* fixup! fixup! fixup!: use apk for lint scripts

* fixup! fixup! fixup!: use apk for lint scripts

* fixup!: fix yarn key

* fixup!: add fetch-depth 0
2022-09-22 12:33:32 -07:00
Joe Previte
4223cf6e2b
refactor(ci): fix fetch-depth and add some caching (#5563)
* refactor: rename ci -> build.yaml

* feat: add build.yaml

* feat: add node caching to platform jobs

* trigger ci
2022-09-19 11:56:34 -05:00
Joe Previte
987c68a32a
feat: add release workflow (#5560)
* feat(ci): add draft release workflow

* refactor: delete old release-github workflows

* fixup! refactor: delete old release-github workflows

* fixup! refactor: delete old release-github workflows

* Update .github/workflows/release.yaml

* fixup!: remove release-notes.txt

* fixup!: change branch to current
2022-09-16 15:14:28 +00:00
Joe Previte
7ecfb95569
chore: update Code to 1.71.1 (#5558)
* chore: update Code to 1.71.1

* chore: refresh patches

* docs: add quilt refresh tip
2022-09-15 16:49:28 -05:00
Joe Previte
309a3b2c6e
chore: move security workflows (#5553)
* refactor: move security jobs to security.yaml

* fixup! refactor: move security jobs to security.yaml
2022-09-14 06:31:13 -07:00
renovate[bot]
b440054613
chore(deps): update codercom/code-server docker tag to v4.7.0 (#5551)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-12 11:08:24 -07:00
Joe Previte
dbe87c5494
fix(ci): specify ref in aur publish job (#5550) 2022-09-09 22:50:21 +00:00
Joe Previte
04f1080451
release: 4.7.0 (#5546)
* docs: update MAINTAINING

* refactor: use branch name in release-prep

This makes a minor improvement to the `release-prep.sh` script to grab
the version to update to from the branch name.

* chore(release): bump version to 4.7.0

* fixup: bump version

* docs: use latest instead of version

* fixup: bump Chart version

* chore: update CHANGELOG

* chore: add license to test package.json

* chore: bump @coder/logging to 3.0.0

* fix: change level to Warn
2022-09-09 15:15:39 -07:00
Joe Previte
5028169e63
refactor: heartbeat patch (#5545) 2022-09-09 17:47:57 +00:00
Joe Previte
3fb38414dd
docs: update patch testing instructions (#5543)
* docs: explain how to test exec-argv

* docs: explain how to test telemetry patch
2022-09-09 17:05:30 +00:00
Florian Ritterhoff
b486354d6e
Update to 1.71 (#5535)
* chore: update upstream code

* update patches for vs 1.71.0

the cli fix seems to be fixed in upstream, the telemtry patch requires (again) some fixing and adjustments.

* add safari fix.

* increase ci timeout

Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-09-09 16:28:54 +00:00
Devin Jeanpierre
a1cf4b9ea5
Fix deb install instructions: ${VERSION}_foo (#5542)
The install instructions weren't copy-pastable: `$VERSION_foo` is the same as `${VERSION_foo}`, not `${VERSION}_foo`.

```sh
$ VERSION=4.6.1
$ curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_$VERSION_amd64.deb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     9    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
$ echo curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_$VERSION_amd64.deb
curl -fOL https://github.com/coder/code-server/releases/download/v4.6.1/code-server_.deb
```
2022-09-07 16:23:36 -07:00
Joe Previte
64822d0f64
docs: add comment to npm-postinstall.sh (#5541) 2022-09-06 13:34:34 -07:00
renovate[bot]
74017ecc65
chore(deps): update robinraju/release-downloader action to v1.5 (#5538)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-06 13:34:04 -07:00
Joe Previte
da03a648c2
fix(npm): use correct flags and update version for npm (#5533)
* fix: update npm-postinstall.sh script

Add --legacy-peer-deps to deal with weird npm issue with vscode
dependencies.

See: https://stackoverflow.com/a/66620869/3015595

* fix: use npm in release-standalone

* chore: update package.json

* chore: bump plugin engine for tests
2022-09-06 11:03:27 -07:00
Joe Previte
6742e945cc
docs: fix typo in install.md (#5529) 2022-09-06 09:38:55 -07:00
Joe Previte
4e9ed56580
release: 4.6.1 (#5522)
* chore(release): bump version to 4.6.1

* chore: update reviewers in release-prep

* chore: update CHANGELOG

* chore: bump Helm chart
2022-08-31 14:53:14 -07:00
Joe Previte
8a227d9fa1
feat: add displayLang test (#5495)
* feat(e2e): add language extension to setup

This adds a slimmed-down version of the Spanish Language Pack and also
adds a `languagepacks.json` to the e2e `workspaceDir` which allows use
to run a test suite passing the `--locale es` flags to simulate a
different display language.

* feat: add e2e test for display language patch

This tests loading code-server in Spanish using the `--locale` flag.

* fixup!: use JSON.stringify for readability

* fixup!: add comment about langaugepacks temp fix

* fixup!: slim down translations

* fixup!: slim down package.json for lang. ext
2022-08-31 13:28:36 -07:00
Joe Previte
f9bfd58cf4
refactor: drop db migration patch (#5519)
* refactor: remove database migration patch & test

Drop migration code since it's been 6 months since 4.0.2 and we no
longer need this.

See: https://github.com/coder/code-server/issues/5482#issuecomment-1222608635

* chore: refresh patches
2022-08-30 23:14:21 +00:00
Edouard Vincent
ef3f4e82b2
docs: remove references to installing with yarn in favor of npm (#5518) 2022-08-30 12:00:11 -05:00
Asher
6262c7a0bf
fix: propagate execArgv (#5510)
* Use fork instead of spawn

We no longer do in-place updating so no need for the spawn.  The
advantage of a fork is that it preserves flags like --prof which you can
use to profile code-server.

Also I am not sure the comment about not being able to reload in place
with fork was even true to begin with.

* Refresh heartbeat patch

Seems to have gotten out of date a little.

* Propagate execArgv to extension host

This will let us profile the extension host.
2022-08-30 10:19:19 -05:00
Asher
101d4ee4ad
chore: add flake for development with Nix (#5509) 2022-08-29 09:41:29 -07:00
Joe Previte
d1acfad2a8
chore: fix npm publish logic (#5493)
* chore: clean up logging in npm script

* fix: catch error if npm version missing

npm changed the way the `npm view` command handles missing versions.
Before it exited with a non-error. Now it errors.

Ref: https://github.com/npm/cli/pull/5035

This modifies the script logic to handle those new changes.
2022-08-23 11:36:24 -07:00
renovate[bot]
ccbf0bebb7
fix(deps): update dependency argon2 to ^0.29.0 (#5492)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-08-23 16:18:52 +00:00
Joe Previte
f5a1e3a3fa
Update publish.yaml (#5490) 2022-08-23 08:29:22 -07:00
Joe Previte
3db08fdf51
Update CODEOWNERS (#5491) 2022-08-23 08:28:44 -07:00
Florian Ritterhoff
bc05a2f3b9
chore: update code (#5485)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-08-22 16:18:23 -07:00
Edouard Vincent
90f603549a
fix: generate shrinkwrap file for deterministic dependencies (#5071) 2022-08-22 16:07:57 -05:00
Joe Previte
8352a22e33
fix(testing): reduce flakiness in extension e2e tests (#5481) 2022-08-22 12:47:36 -07:00
Asher
33ee184ed7
release: 4.6.0 (#5469) 2022-08-19 14:08:39 -05:00
Joe Previte
6a7c3220b0
refactor(ci): combine publish workflows (#5471)
* refactor(ci): combine publish workflows

* fixup! refactor(ci): combine publish workflows
2022-08-19 08:40:00 -07:00
Joe Previte
9d8588b2ed
feat(ci): add aur job to npm-brew.yaml (#5462)
This adds a new job called aur which checkouts code-server-aur, updates
the files with the new version then opens a PR into the repo.

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-08-18 09:22:09 -07:00
renovate[bot]
61e2a9ac41
chore(deps): update aquasecurity/trivy-action digest to d63413b (#5473)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-18 01:38:36 +00:00
renovate[bot]
61673b5918
chore(deps): update aquasecurity/trivy-action digest to 1db49f5 (#5466)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-17 18:44:19 +00:00
Florian Ritterhoff
2bfe15b3e9
chore: update Code to 1.70 (#5422)
* Update upstream Code to 1.70

* Update CSP hashes

* Update comment on remote authority

Also remove it from script-src since it is invalid anyway.

* Use absolute path for disable download patch

Just to keep it consistent with the other imports.  We initially added
the patch like this so it was not part of the upgrade but might as well
fix it now.

* Fix inability to change language while code-server is running

Co-authored-by: Asher <ash@coder.com>
2022-08-16 20:27:23 -05:00
renovate[bot]
bef78e6a41
chore(deps): update aquasecurity/trivy-action digest to 12814ff (#5460)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-16 00:17:22 +00:00
Asher
6037468e0f
release: 4.5.2 (#5447) 2022-08-15 16:21:10 -05:00
Joe Previte
ba6b8da76b
docs: add proxying to angular app (#5457)
* docs(guide): add proxying to Angular app

* fixup: formatting

* fixup: formatting

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-08-15 19:27:50 +00:00
Asher
43b87edc72
fix: socket disconnections behind reverse proxies (#5451) 2022-08-15 18:23:23 +00:00
Anton Korzhuk
b091b00406
Sidebar icons (#5444) 2022-08-14 03:00:46 +00:00
Asher
17aaa8b347
fix: logout appearing with auth=none (#5449) 2022-08-11 13:26:47 -05:00
Rafael Calpena Rodrigues
2ec1e2de34
fix: authentication check in path proxy (#5442)
`proxy` should `await` for result of `authenticated` call otherwise since otherwise it will always appear to be authenticated as the promise is truthy.

Co-authored-by: Asher <ash@coder.com>
2022-08-11 00:05:49 +00:00
Joe Previte
c69f2c69f6
chore(testing): remove install/list tests (#5441)
Now that we have a test for `--help` which checks to make sure native
modules are working as expected, we don't need the `--install-extension`
test or the `--list-extensions` test.

We can also remove the `.vsix` fixture since we're not using that
either.
2022-08-10 22:59:36 +00:00
renovate[bot]
91589fd106
chore(deps): update dependency @types/node to v16 (#5170)
* Update Node types to 16

* Update Express core types

Fixes a number of conflicts it has with Node 16.

* Fix websocket router types

It seems req was `any` before so now we have to handle the types.  Also
it seems the socket is of type `stream.Duplex`, not `net.Socket`.

The ws types had to be updated to support the new type.

Unfortunately Code still uses the old type so cast for now.

In the web socket router just use a cast for the extra properties we
add.  We could add the types to the Express namespace but I am not sure
we really want these commonly accessible so keep with the casts for now.
Likely we should use Express's `locals` or something instead.

* Add missing return

Not sure why it only just now started complaining though.

Co-authored-by: Asher <ash@coder.com>
2022-08-10 16:15:52 -05:00
Joe Previte
3335d0a456
chore(ci): fix when npm job runs (#5440) 2022-08-10 11:43:28 -07:00
Joe Previte
6d8f30d579
feat: add --help integration test (#5434)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-08-10 15:23:24 +00:00
Joe Previte
11b2ef9846
feat: add test for EXTENSIONS_GALLERY (#5432)
* refactor: add env arg to runCodeServerCommand

This allows yous to pass environment variables to code-server's helper
when running integration tests.

* feat: add EXTENSIONS_GALLERY integration test

This test ensures EXTENSIONS_GALLERY is read when set and using the
`--install-extension` flag.

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-08-09 20:41:37 +00:00
DH Kim
a51c94190f
feat: add lifecycle hook to helm chart (#5397) 2022-08-09 14:40:05 -05:00
Joe Previte
5c18e3556b
docs: clarify cpus are virtual (#5428) 2022-08-09 14:17:18 -05:00
Mr. Blogger
6b9bb89f43
docs: add yarn installation method for termux (#5286) 2022-08-09 14:15:49 -05:00
SIGSEGV
7bb35af04f
docs: add OpenRC example (#5266)
Co-authored-by: SIGSEGV <bluenerd@protonmail.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
Co-authored-by: Asher <ash@coder.com>
2022-08-09 13:31:28 -05:00
Joe Previte
f178f0400b
feat(e2e): add support running behind proxy (#5348)
* docs: update maintaining

* chore(e2e): add maxFailures to playwright

* fix(ci): skip submodule in e2e job

We don't need the submodules for the e2e job. This will speed up the
checkout step.

* feat(ci): add test-e2e-proxy job

This adds a new job to CI to run our tests behind Caddy and simulate
code-server running against a reverse-proxy.

* refactor: make e2e work with reverse proxy

This refactors the e2e test in a couple ways:
- remove setting cookie in localStorage (instead we pass --auth none)
- refactor address() method to account for reverse proxy logic

* Update test/e2e/models/CodeServer.ts

* Update test/playwright.config.ts

* Update test/utils/constants.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/utils/helpers.ts

Co-authored-by: Asher <ash@coder.com>

Co-authored-by: Asher <ash@coder.com>
2022-08-09 18:24:37 +00:00
Marshall Walker
efb5baec83
refactor: simplify manifest route (#5219)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-08-09 12:54:00 -05:00
Joe Previte
45e222b3c1
chore(ci): run npm job on pr merge (#5429) 2022-08-09 10:31:23 -07:00
renovate[bot]
04ff8c355b
chore(deps): update dependency alpine to v3.16 (#5426)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-08 22:32:43 +00:00
Kyle Carberry
ca8ed8e35b
chore: Improve coder/coder advertisement in README (#5425) 2022-08-08 19:21:55 +00:00
Asher
9087e0c091
fix: invoking code-server in integrated terminal (#5360)
* Include bin scripts for all platforms

These will get symlinked as part of the postinstall.  These scripts
provide everything ours does inside the integrated terminal plus more.

* Improve OS detection

Specifically for Windows although we do not yet support Windows.

Also standardize the duplicate arch functions since they had drifted
from each other bit.

* Remove duplicate asar symlink

Since standalone releases run the postinstall they will get the asar
symlink there.  That means the symlink will not exist for the npm
package and we will not need to ignore it.

The symlink portion is split out so it can be re-used for other
symlinks (for example linking bin scripts).

* Add symlinks to bin scripts

* Add test for opening a file from the terminal

* Add global Playwright timeout

Otherwise it will exceed the Actions timeout and get rudely killed
without any output.

* Make sed work on macOS

* Fix Node path in bin scripts

* Disable shellcheck expansion error

* Make scripts executable

* Remove .bak files created by sed

* Include Code build script in cache hash

Otherwise if we change the script it will not rebuild Code.

* Make sure the terminal opens

The selector was timing out even though it matched more than one element
but matching on the focused one appears to work.

In addition add a loop so it can keep trying to open the terminal
if something goes wrong with the focus.
2022-08-04 16:03:28 +00:00
renovate[bot]
0022473744
chore(deps): update aquasecurity/trivy-action digest to 0d7cf2d (#5401)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-04 04:08:37 +00:00
Anton Korzhuk
b2ed6b8461
replace inline svgs with icon_path (#5395)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-08-01 20:20:39 +00:00
Jiwon
da9e72cb69
Add #5174 comment on rsp install (#5294)
Fix typo
2022-08-01 16:04:41 +00:00
Kain
3054f09838
docs: define extraInitContainers (#5385)
Otherwise custom values will not be picked up by Flux/Helm
2022-08-01 10:31:20 -05:00
1submarine
de042173b2
docs: correct trial length (#5396) 2022-08-01 10:20:55 -05:00
renovate[bot]
f772d7bd13
chore(deps): update aquasecurity/trivy-action digest to 5144f05 (#5388)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-01 10:19:32 -05:00
renovate[bot]
23a84e156e
chore(deps): update minor dependency updates (#5377)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-27 12:44:52 -05:00
Raúl Martín
cb09650d7c
Update caddy installation steps (#5384)
The official installation instructions have changed again.
2022-07-27 12:44:12 -05:00
renovate[bot]
0e9ec02bef
chore(deps): update aquasecurity/trivy-action digest to 503d3ab (#5370)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-22 19:21:30 +00:00
Joe Previte
e79f6f3ad2
chore(ci): only run docs preview on docs changes (#5368) 2022-07-21 22:36:11 +00:00
renovate[bot]
40b650b7c7
chore(deps): update azure/setup-helm action to v3.1 (#5331)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-20 09:23:34 -07:00
Joe Previte
0659e565d0
fix: update branch for release assets download (#5359) 2022-07-19 23:25:53 +00:00
Joe Previte
f4fc2ebecf
release: 4.5.1 (#5354)
* chore(release): bump version to 4.5.1

* chore: bump helm chart

* chore: update CHANGELOG

* Revert "chore: bump helm chart"

This reverts commit 703b03b665.

* chore: bump helm chart to 3.0.0

* revert: remove bad change to manifes.json icon

* fix(ci): add package.json.version to code cachekey

Before this, creating a release sometimes prevented vscode from
rebuilding and using the cache instead. Now we use the
package.json.version in the cache key to "bust" the cache if the
package.json version is updated (aka a release).

Fixes #5316

* Update .github/workflows/ci.yaml

Co-authored-by: Asher <ash@coder.com>

* fixup: formatting

* Revert "refactor: remove version check e2e test"

This reverts commit b23c398b7d.

Co-authored-by: Asher <ash@coder.com>
2022-07-19 12:34:01 -07:00
strowk
de317a09fe
Allow more comprehensive affinity config (#5285)
Co-authored-by: Timur Sultanaev <t.sultanaev@reply.de>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-07-18 14:38:21 -07:00
Joe Previte
23a18786de
refactor(ci): use release in branch release name (#5352) 2022-07-18 14:38:07 -07:00
Joe Previte
033cdf2357
chore(ci): update glob-parent (#5353) 2022-07-18 14:37:54 -07:00
Asher
592973c1bb
fix: remove default memory limit (#5355)
Having NODE_OPTIONS set is unexpected and although the later flag should
override the previous flag it is not certain that will always be the
case.

Also some users are having issues with the 2 GB limit.
2022-07-18 14:37:35 -07:00
Tim Bordemann
530bb66d7c
Allow setting priorityClassName via helm chart (#5255)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-07-18 19:27:54 +00:00
Joe Previte
19f486b672
chore(prettier): ignore lib/vscode (#5347)
We were using an overrides command in our `.prettierrc.yaml` which
quickly became out of sync with Code's Prettier styles.

Instead, we simply tell Prettier to ignore `lib/vscode`.

This way, if you have `formatOnSave` on and you save inside
`lib/vscode`, you won't convert the file to use code-server's styles.
2022-07-15 21:13:13 +00:00
Joe Previte
907dd835e8
docs: add troubleshooting section (#5313) 2022-07-15 19:30:03 +00:00
Asher
646f2436b0
fix: output lost after hotswapping (#5346)
I think the pipe was closing the other streams when the child stream
closed so instead just write it one way.
2022-07-15 18:44:27 +00:00
bbbboom
714257b3c5
Update display-language.diff (#5317)
"vscode-remote-resource" not under "{{WORKBENCH_WEB_BASE_URL}}", It needs to access the upper level path.

Co-authored-by: Asher <ash@coder.com>
2022-07-15 18:00:05 +00:00
Asher
97af08b9e5
fix: file/directory opens from terminal (#5340) 2022-07-15 16:51:03 +00:00
Joe Previte
e189435a6a
feat: add message to brew publish (#5341) 2022-07-15 16:24:33 +00:00
Joe Previte
f79b38d25a
fix(workbench): use window.location without origin (#5332)
When using `window.location.origin` to create a new URL for loading
web packages, it constructs a URL that is not relative, leading to the
terminal breaking when code-server is served not via the root (i.e. /ide
instead of /).
2022-07-14 09:25:48 -07:00
Joe Previte
9ad0d9e6ad
release: 4.5.0 (#5308)
* chore(release): bump version to 4.5.0

* chore: update CHANGELOG

* chore: bump chart version

* docs: update MAINTAINING

* fix: add VSCODE_DEV=1 to e2e script

I'm not sure what changed in the latest version but without setting
VSCODE_DEV=1, code-server won't load. This fixes that.

* Revert "fix: add VSCODE_DEV=1 to e2e script"

This reverts commit 58c4826af8.

* fix: try setting VSCODE_DEV=1

* Revert "fix: try setting VSCODE_DEV=1"

This reverts commit 902f5f2f30.

* refactor: remove version check e2e test

I am not sure why this is passing locally and failing CI. I need to
further investigate this since it fails depending on where you test.
2022-07-01 13:45:36 -07:00
renovate[bot]
55cfba8168
chore(deps): update aquasecurity/trivy-action digest to 0105373 (#5310)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-30 10:16:12 -07:00
renovate[bot]
4f0d5566c3
chore(deps): update minor dependency updates (#5301)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-29 16:25:52 +00:00
renovate[bot]
79e96a99d3
chore(deps): update codecov/codecov-action action to v3 (#5305)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-29 08:55:44 -07:00
renovate[bot]
c99f4cef25
chore(deps): update azure/setup-helm action to v3 (#5302)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-28 12:57:29 -07:00
Joe Previte
1296848afc
refactor: switch to codecov-uploader GitHub Action (#5303)
* refactor: switch to codecov-uploader GitHub Action

codecov deprecated their Node wrapper for uploading coverage reports.

This removes that and uses their new uploaded along with the v2 GitHub
Action they maintain.

* fix: update broken integration test
2022-06-28 10:04:35 -07:00
Joe Previte
c51ff3bce1
refactor: move integration tests to Jest (#5275)
* feat: add installExtension integration test

This adds a new helper function called `runCodeServerCommand` along with
a test for `--install-extension`. We can use this approach for writing
integration tests (i.e. testing a real code-server build, CLI commands,
etc).

* refactor: s/ test:standalone with test:integration

This replaces our integration approach to use Jest instead of a single
bash script. By doing this, we will be able to easily maintain and add
to our integration test suite.

* refactor: filter unit tests

Now that our integration tests also use Jest, we need to update our unit
test script to ignore `test/integration`.

* refactor: add SKIP_SUBMODULE_DEPS to postinstall

* refactor: add SKIP_SUBMODULE_DEPS to postinstall

* fixup!: skip submod deps

* refactor: move runCodeServerCommand into sep. file

When Jest runs a test, it loads all the files and imports for that test.
This means you might be "requiring" code that's unrelated to your tests.

This leads to unexpected errors depending on where the code runs.

Moved this file to avoid GLIBC and other errors relaed to argon2 when
running integration tests in CI.

* fizup: formatting

* fizup: increase timeout

* refactor: use fixture in installExtension test

Instead of relying on a network to install an extension, we use a
fixture - vsix file in the repo. This is also faster.

* feat: add integration test for listExtensions

* chore: ignore integration fixtures

* fixup: formatting

* fixup: remove custom-hacks.css

* fixup: formatting

* Update test/integration/installExtension.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/installExtension.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* fixup: contributing integration tests section

* fixup: update ci/readme

* fixup: use RELEASE_PATH in test-integration.sh

* refactor: unzip vsix for listExtensions

* refactor: use exec instead of spawn

* Update docs/CONTRIBUTING.md

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* refactor: use different default binary path

* fixup!: formatting

Co-authored-by: Asher <ash@coder.com>
2022-06-24 16:33:38 +00:00
renovate[bot]
a879844c2d
chore(deps): update aquasecurity/trivy-action digest to 7b7aa26 (#5289)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-22 20:05:22 +00:00
renovate[bot]
f2693d366c
chore(deps): update minor dependency updates (#5276)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-06-22 16:26:20 +00:00
Asher
5ce99f8d1c
chore: update Code to 1.68 (#5263)
* chore: update Code to 1.67

Was able to remove our changes to common/webview.ts since they are
upstream now.

Other than that no serious changes, just context diffs.

* chore: update Code to 1.68

- Upstream moved the web socket endpoint so change the Express route
  from / to *.  That will let web sockets work at any endpoint.
- Everything in the workbench config is basically the same but
  de-indented (upstream extracted it into a separate object which
  resulted in a de-indent), the ordering is slightly different, and
  instead of vscodeBase we now need vscodeBase + this._staticRoute since
  everything is served from a sub-path now.
- Move manifest link back to the root since that is where we host our
  manifest.
- Change RemoteAuthoritiesImpl to use the same path building method as
  in other places (+ instead of using URI.parse/join).
- Use existing host/port in RemoteAuthoritiesImpl and
  BrowserSocketFactory instead of patching them to use window.location
  (these are set from window.location to begin with so it should be the
  same result but with less patching).
- Since BrowserSocketFactory includes a sub-path now (endpoints were
  changed upstream to serve from /quality/commit instead of from the
  root) the patch there has changed to prepend the base to that
  path (instead of using the base directly).
- The workbench HTML now natively supports a base URL in the form of
  WORKBENCH_WEB_BASE_URL so no need for VS_BASE patches there anymore.
- Upstream added type="image/x-icon" so I did as well.
- Move the language patch to the end of the series so it is easier to
  eventually remove.
- Remove the existing NLS config in favor of one that supports
  extensions.
- Upstream deleted webview main.js and inlined it into the HTML so move
  that code (the parent origin check) into both those HTML files
  (index.html and index-no-csp.html).
- The remaining diff is from changes to the surrounding context or a
  line was changed slightly by upstream (for example renamed files or
  new arguments like to the remote authority resolver).

* fix: modify product.json before building

Code injects this into the client during the build process so it needs
to be updated before we build.

* fix: update inline script nonces

* Update HTML base path test

* fix: missing commit

Code overrides it with nothing.

The date is also already injected.

* fix: web extensions breaking when the commit changes

By just using the marketplace directly instead of going through the
backend.  I am not sure what the point is when searching extensions
already goes directly to the marketplace anyway.

But also remove the prefix that breaks this as well because otherwise
existing installations will break.
2022-06-21 21:51:46 +00:00
Joe Previte
eb314ff727
chore: only download .deb in docker release (#5277)
* Update docker.yaml

* Update docker.yaml
2022-06-17 08:02:33 -07:00
Joe Previte
61138b4a61
refactor: open function (#5257)
* refactor: fix type annotations in open

There was no clear reason as to why we needed to use type assertions
when initializing both `args` and `options` in `open` so I refactored
them both.

* refactor: create constructOpenOptions

* refactor: add urlSearch and remove options

* feat: add tests for constructOpenOptions
2022-06-15 20:53:07 +00:00
renovate[bot]
113ad85b37
chore(deps): update minor dependency updates (#5244)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-15 13:29:52 -07:00
Ben Potter
a2bfcfcc78
chore: update Coder messaging on README (#5268)
* chore: update Coder messaging

* use our shortlink
2022-06-15 09:49:49 -05:00
Joe Previte
a96162d075
feat: add tests for node/util.open (#5256) 2022-06-13 21:16:46 +00:00
Joe Previte
744b301c7a
Update bug-report.yml (#5262) 2022-06-13 20:18:51 +00:00
Joe Previte
ba990668a5
chore: update bug report template (#5261)
* chore: update bug report template

Add an additional checkbox to the bug report template

* Update .github/ISSUE_TEMPLATE/bug-report.yml
2022-06-13 12:51:30 -07:00
Joe Previte
2c1cf0259e
feat: add tests for isWsl (#5251)
* refactor: add docs to isWsl and make easier to test

* feat: add tests for isWsl

* fixup!: refactor isWsl and tests

* Update test/unit/node/util.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/unit/node/util.test.ts

Co-authored-by: Asher <ash@coder.com>

Co-authored-by: Asher <ash@coder.com>
2022-06-10 20:00:20 +00:00
Joe Previte
d75883bcc6
feat: add additional test for handlePasswordValidation (#5243) 2022-06-06 11:20:22 -07:00
renovate[bot]
792e954937
chore(deps): update aquasecurity/trivy-action digest to df3fb7d (#5239)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-06 08:51:15 -07:00
Asher
5d47282ea5
fix: install nfpm straight from GitHub (#5214)
* fix: install nfpm straight from GitHub

install.goreleaser.com appears to no longer be available.

* Add -f to curl commands

This might have made it so we got the right error rather than erroring
on the envsubst step.
2022-05-20 12:39:54 -07:00
Petar Petrov
d3f58f9b7d
Fix caddy installation docs (#5209)
Applies Caddy installations documentation fixes and also resolves the following issue when trying to install Caddy:

    W: GPG error: https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ABA1F9B8875A6661

See:

 - 930109ec33
 - 2e255b1ee3
 - 0f4885e592
2022-05-19 22:36:06 +00:00
Feng Yu
1e304b1e7d
chore(deps): upgrade typescript to v4.6 (#5202) 2022-05-13 16:57:50 +00:00
djarbz
5276e41606
Allow user Entrypoint scripts (#5194)
* Allow user Entrypoint scripts

* Variable encapsulation

Co-authored-by: Asher <ash@coder.com>

* Check if Entrypoint Dir exists & run all executable

* Don't create entrypoint.d by default

* yarn fmt

* yarn fmt

* Fix for SC2044

* Revert "yarn fmt"

This reverts commit 5ca347f361.

Co-authored-by: Asher <ash@coder.com>
2022-05-11 22:10:04 +00:00
Feng Yu
dedd770a78
docs: rename master to main in all github doc links (#5190)
* docs: correct link master -> main

* fix missing ]
2022-05-11 14:39:57 -07:00
Joe Previte
a02f47714e refactor: remove unused code enumToArray 2022-05-10 23:26:04 +00:00
Joe Previte
b13849ded0
refactor: remove dead code (#5188)
* refactor: delete unused code

* refactor: move onLine to test helpers

* Revert "refactor: move onLine to test helpers"

This reverts commit 32cc27b213.

* fixup! refactor: delete unused code
2022-05-10 22:44:54 +00:00
Devin Buhl
7a8d487729
chore: push code-server image to GHCR (#5187) 2022-05-10 16:11:06 -05:00
renovate[bot]
1788537cce
chore(deps): update minor dependency updates (#5181)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-10 21:01:13 +00:00
renovate[bot]
0155a12500
chore(deps): update docker/setup-qemu-action action to v2 (#5166)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-05-10 20:35:25 +00:00
renovate[bot]
53b5d41271
chore(deps): update docker/setup-buildx-action action to v2 (#5164)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-05-10 13:13:45 -07:00
renovate[bot]
55006ccb5a
chore(deps): update docker/login-action action to v2 (#5163)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-10 12:37:05 -07:00
Joe Previte
cd78f32dc0
refactor(util): remove unused isObject function (#5183) 2022-05-10 00:24:25 +00:00
Joe Previte
3207bfd4ad
feat: add test for isFile when error (#5182)
This adds an additional test for the `isFile` utility function to ensure
it returns `false` in the event of an error.
2022-05-09 23:24:40 +00:00
Joe Previte
7c1a45a8d8
chore: update --help for disable-file-downloads (#5176)
* chore: update --help for disable-file-downloads

* fixup: formatting
2022-05-06 23:08:25 +00:00
Joe Previte
60dd8ab374
chore: configure git globally for brew publish (#5173) 2022-05-06 22:31:03 +00:00
Asher
6cf607eab9
fix: Docker push (#5175)
The action actually does not support wildcards but it does support * for
downloading all artifacts.
2022-05-06 16:57:22 -05:00
Joe Previte
f735c87ac7
release: 4.4.0 (#5169)
* chore(release): bump version to 4.4.0

* chore: update CHANGELOG with v4.4.0

* chore: bump version to 2.5.0 in Chart.yaml
2022-05-06 13:45:49 -07:00
Joe Previte
5a5798e45f
fix(update): add OrEqual to update.checked test (#5171)
* fix(update): add OrEqual to update.checked test

* fixup!: change all instances to OrEqual

* fixup!: add missing equals

* fixup!: consistency
2022-05-06 16:51:44 +00:00
Feng Yu
66a364358a
chore: upgrade developmemt node version to v16 (#5167)
Co-authored-by: yufeng.freeman <yufeng.freeman@bytedance.com>
2022-05-06 09:57:19 -05:00
Asher
ef0d76bc16
fix: patch telemetry (#5158)
This seems to have been dropped in the rewrite.
2022-05-04 18:32:12 -05:00
Joe Previte
88e971c609
refactor(heart): bind class methods and make beat async (#5142)
* feat: set up new test for beat twice

* refactor: make Heart.beat() async

This allows us to properly await heart.beat() in our tests and remove
the HACK I added before.

* refactor: bind heart methods .beat and .alive

This allows the functions to maintain access to the Heart instance (or
`this`) even when they are passed to other functions. We do this because
we pass both `isActive` and `beat` to `heartbeatTimer`.

* feat(heart): add test to ensure no warnings called

* fixup!: revert setTimeout for heartbeatTimer

* fixup!: return promise in beat
2022-05-04 16:05:48 -07:00
Joe Previte
7027ec7d60
chore: upgrade Code to 1.66 (#5135)
* chore: upgrade Code to 1.66

* docs: update docs for Code upgrades

* fixup!: docs

* chore: update vscode submodule

* chore: update integration patch

* chore: update node-version patch

* chore: update github-auth patch

They completely changed how auth is handled for GitHub in
https://github.com/microsoft/vscode/pull/145424 so our patch may not
work. Will need to test and revisit.

* refactor: remove postinstall patch

It appears they renamed postinstall.js to postinstall.mjs and removed
the use of `rimraf` which means our patch is no longer needed! 🎉

b0e8554cce

* chore: refresh local-storage patch

* chore: refresh service-worker patch

* chore: bulk refresh patches

* fixup!: docs formatting

* refactor: remove unused last-opened patch

* fixup!: formatting docs

* fixup!: formatting docs

* refactor: remove rsync postinstall

* Revert "refactor: remove rsync postinstall"

This reverts commit 8d6b613e9d.

* refactor: update postinstall.js to .mjs

* feat(patches): add parent-origin bypass

* docs(patches): add notes for testing store-socket

* docs(patches): update testing info for node-version

* refactor(patches): delete github-auth.diff patch

* docs(patches): add notes for testing connection-type

* fixup!: delete github-auth patch

* fixup!: update connection type testing

* docs(patches): add notes to insecure-notification.diff

* docs(patches): add nots for update-check.diff

* fixup!: remove comma in integration patch

* fix(e2e): disable workspace trust

* refactor: add --no-default-rc for yarn install

* feat(patches): remove yarnrc in presinstall

* fixup!: silly mistake

* docs: add note about KEEP_MODULES=1

* docs(patches): add testing notes for node-version

* refactor(patches): remove node-version

It appears this is no longer needed due to the `remote/package.json` now which
targets node rather than electron.

* fixup!: add cd ../.. to code upgrade instructions

* fixup!: add note to yarn --production flag

* fixup!: make parent-origin easier to upstream

* Revert "refactor(patches): delete github-auth.diff patch"

This reverts commit 31a354a343.

* Revert "fixup!: delete github-auth patch"

This reverts commit bdeb5212e8.

* Merge webview origin patch into webview patch

* Remove unused post-install patch

* Prevent builtin extensions from updating

* Refresh sourcemaps patch

* Update Node to v16

This matches the version in ./lib/vscode/remote/.yarnrc.

I changed the engine to exactly 16 since if you use any different
version it will just not work since the modules will have been built for
16 (due to the .yarnrc).

* Replace fs.rmdir with fs.rm

Node is showing a deprecation warning about it.

* Update github-auth patch

The local credentials provider is no longer used when there is a remote
so this code moved into the backend web credential provider.

* Prevent fs.rm from erroring about non-existent files

We were using fs.rmdir which presumably did not have the same behavior
in v14 (in v16 fs.rmdir also errors).

* Install Python 3 in CentOS CI container

Co-authored-by: Asher <ash@coder.com>
2022-05-04 21:58:49 +00:00
Asher
4e93db5b95
feat: relaunch on SIGUSR2 (#4979)
This is because Node uses SIGUSR1 to enable the debug listener so even
if you just want to restart code-server you end up enabling the debug
listener as well.

Opted to leave the SIGUSR1 handler in to avoid breaking existing
workflows even though it does mean even if you only want to enable the
debug listener you will end up restarting code-server as well.  We could
consider removing it after a transition phase.
2022-04-27 10:10:48 -05:00
renovate[bot]
fc75db6edc
chore(deps): update azure/setup-helm action to v2 (#5088)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-04-26 21:48:39 +00:00
Joe Previte
e3c8bd692c
feat(cli): support true for CS_DISABLE_FILE_DOWNLOADS (#5134)
After some feedback, we realized it is more intuitive to disable file
downloads by setting the environment variable
`CS_DISABLE_FILE_DOWNLOADS` to `true` than `1`. This commit adds support
for both.
2022-04-26 20:09:53 +00:00
mooff
a0b36147ea
fix: listening on IPv6 address not possible (#5133)
Wrap IPv6 addresses in square brackets when making URL in ensureAddress,
fixing regression (#1582)
2022-04-26 19:33:51 +00:00
Joe Previte
683412cb01
refactor: add timeout for race condition in heart test (#5131)
* refactor: add timeout for race condition in heart test

* fixup!: set mtime to 0 and check for update

* fixup!: use utimes directly instead of file open

* fixup!: remove import
2022-04-26 17:39:37 +00:00
Joe Previte
18ff99693b
feat: add tests for node/heart.ts (#5122)
* refactor(heart): extract logic into heartbeatTimer fn

To make it easier to test, I extract heartbeatTimer into it's own
function.

* feat(testing): add tests for heart.ts

* fixup

* fixup!: remove unneeded heart call

* Update src/node/heart.ts

Co-authored-by: Asher <ash@coder.com>

* fixup!: use mockResolvedValue everywhere

* fixup!: add stat test for timestamp check

Co-authored-by: Asher <ash@coder.com>
2022-04-26 16:35:40 +00:00
renovate[bot]
ed7bd2e65b
chore(deps): update github/codeql-action action to v2 (#5129)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-25 15:39:32 -07:00
Asher
c35bf1311e
chore: provide details when update.checked tests fail (#5115)
Using the toBe* functions will let us know what the actual values are
rather than just telling us true does not equal false.
2022-04-19 15:46:23 -05:00
renovate[bot]
7780a13cce
chore(deps): update aquasecurity/trivy-action digest to 2b30463 (#5098)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-19 11:37:47 -07:00
Joe Previte
dea6a40ea8
chore: attempt to fix docker (#5106)
* chore: attempt to fix docker

* Update .github/workflows/docker.yaml

Co-authored-by: Asher <ash@coder.com>

* chore: add publish:docker to scripts

Co-authored-by: Asher <ash@coder.com>
2022-04-15 00:02:03 +00:00
Joe Previte
09fc64a4f0
v4.3.0 (#5099)
* chore(release): bump version to 4.3.0

* fix(release-prep.sh): ignore lib/vscode

* docs(CHANGELOG): add 4.3.0

* chore: bump chart version

* fixup!: remove change in postinstall

* fixup!: bullets in CHANGELOG

* fixup!: formatting

* fixup! typo in changelog

* fixup!: update date in changelog

Co-authored-by: Asher <ash@coder.com>
2022-04-14 15:37:25 -07:00
Asher
fd42b95164
fix: use current location for web extension resource endpoint (#5104)
This makes it work behind a rewriting proxy as well as make it use the
correct remote authority.
2022-04-14 21:00:10 +00:00
Asher
b62a68ac37
fix: webviews failing to load the iframe HTML (#5103)
Code added in 1.65.0 broke webviews when you are hosting them from the
same domain.
2022-04-14 18:02:52 +00:00
Joe Previte
e7e6c163ed
revert(docs): partially revert 326a1d1862 (#5095)
We tried to switch from `yarn` to `npm` because `yarn` ignores lockfiles
but learned that we missed a few key things.

For now, we are reverting docs and a few other changes that suggested
using `npm` instead of `yarn` until we fully remove `yarn` from the
codebase.
t Please enter the commit message for your changes. Lines starting
2022-04-13 17:15:21 +00:00
Joe Previte
0e1f396645
feat: add option for disabling file downloads (#5055)
* feat(cli): add disable-file-downloads to cli

* feat(e2e): add download test

* feat(e2e): add downloads disabled test

* refactor(e2e): explain how to debug unexpected close

* feat(patches): add disable file downloads

* wip: update diff

* Update src/node/cli.ts

Co-authored-by: Asher <ash@coder.com>

* fixup! add missing common/contextkeys file to patch

* fixup!: update patch

* fixup!: default disable-file-downloads undefined

* fixup!: combine e2e tests

* fixup!: use different test names

* feat: add CS_DISABLE_FILE_DOWNLOADS

* fixup!: make explicit and cleanup test

* fixup!: use beforeEach

Co-authored-by: Asher <ash@coder.com>
2022-04-13 09:39:05 -07:00
renovate[bot]
c05b727c61
chore(deps): update minor dependency updates (#5060)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-04-12 16:39:58 -07:00
Joseph Reiter
3bf470f19c
docs: simplify termux installation process (#5078)
* Update termux.md

1) Updated information to use PRoot (simpler than Andronix and the way supported by Termux) to create and access the Debian distro.
2) Added helpful information on using PRoot with your dev environment.
3) Cleaned up spelling, grammar, and made documentation more consistent between sections.

* docs: Termux correct packages to install

Updated some erroneously missing packages (vim and sudo) necessary for multi-user setup.

* docs: cleaned up verbiage

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* docs: corrected punctuation

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* docs: correct punctuation

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* docs: clarify pkg command shorthand

* Ran yarn fmt on docs

Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-04-12 15:42:22 -07:00
neilnaveen
f4569f0b48
Set permissions for GitHub actions (#5090)
- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

 Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>

Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-04-12 18:59:11 +00:00
Riley Calhoun
fd2a031c21
Update ios.md (#5079) 2022-04-12 11:32:49 -07:00
Asher
3ba3caa8a6
docs: link upstream sync section in MAINTAINING to CONTRIBUTING (#5075)
* Link upstream sync section in MAINTAINING to CONTRIBUTING

* Update MAINTAINING.md table of contents

Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-04-07 13:15:30 -07:00
Joe Previte
f0bfd3b450
chore: remove file ext. from LICENSE (#5070)
* chore: remove file ext. from LICENSE

* fixup!: update LICENSE in missing places

* Revert "fixup!: update LICENSE in missing places"

This reverts commit baa47b68e6.

* fixup!: update LICENSE in build-release
2022-04-07 10:36:33 -07:00
David Wahler
38e57a355b
Exclude .deb files from release Docker image (#5068) 2022-04-06 15:45:06 -07:00
Asher
5bc26e90cb
fix: version in about dialog (#5057)
* Fix code-server version not appearing in other languages

It needs to be separate from the localize call since the language
version of that string is used and it will not include a spot for the
code-server version.

I also moved the "v" so we do not get "vUnknown".

* Add code-server version to product configuration

Before 1.64 the entire product configuration was sent to the client but
that was removed so we have to add anything we want to use on the
client, like the code-server version (used in the about dialog).

Fixes #5027.

* Refresh patches

* Change version test to look for specific version

This will catch if we are not sending the actual version to the client.
2022-03-31 16:14:03 -05:00
Joe Previte
d796cc20e0
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
2022-03-30 18:33:58 -05:00
Joe Previte
0fceb128f7
fix(npm): write npm package name to file (#5049) 2022-03-30 18:11:11 -05:00
renovate[bot]
d5d7c519e8
chore(deps): update dependency minimist to v2.2.1 (#5013)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-30 15:41:26 -07:00
Joe Previte
7f884203f0
chore(ci): disable docs-preview on forks (#5046) 2022-03-30 13:45:35 -07:00
Joe Previte
cd6d740dc3
chore(rennovate): ignore updates for express (#5044) 2022-03-30 13:25:37 -07:00
cjtim
9c4f41d784
docs(helm): add example env required for docker-in-docker (#5045)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-03-30 11:19:58 -07:00
Joe Previte
5341294d2d
fix(workflows): docs-preview and npm job (#5042)
* fix(ci): add GITHUB_TOKEN to docs-preview workflow

* feat(ci): comment npm dev build instructions on PR
2022-03-30 10:47:46 -07:00
Asher
06e36b42bb
fix: add missing package.json and source maps (#5040)
* Use --exclude to skip node_modules

Instead of copying and then deleting them.  This will also catch some
node_modules directories that were missed.

* Remove per-extension dependency install

Code packages all the dependencies using webpack for each extension so
there are no dependencies to install.

* Include source maps

I also moved this to its own patch because it feels sufficiently
standalone.

Fixes #5026.

* Refresh language patch

The base is slightly different so it needed to be refreshed.

* Add missing package.json

This was caused by switching to Code's package step which does not
include the package.json.

Fixes #5019.

* Include keytar

It seems this actually is used now.
2022-03-30 10:35:22 -05:00
Joe Previte
be0fe10a6a
docs(README): point docs to website (#5041)
* docs(README): point docs to website

* Update docs/README.md
2022-03-30 08:26:59 -07:00
Joe Previte
8316a27da4
refactor(brew-bump): fix homebrew bump script (#5025)
* fix: source lib.sh in docker-buildx-push for tagging version

* chore: use ubuntu and update git config homebrew job

* refactor: simplify brew-bump.sh script

* Revert "fix: source lib.sh in docker-buildx-push for tagging version"

This reverts commit 2f7a3610cb.
2022-03-29 16:58:34 -07:00
Asher
18e19d29e6
fix: minor build fixes (#5039)
* Regenerate last opened patch

The lines were a bit off.

* Remove packaged .gitignore files

Fixes #4964.

* Remove extra Node binary

This gets overidden in the standalone but it was getting uselessly
included in the npm package.
2022-03-29 13:13:56 -05:00
Edouard Vincent
326a1d1862
feat: Add a shrinkwrap file to the NPM release (#5010) 2022-03-29 12:33:56 -05:00
Joe Previte
e1c1ba8b36
fix: source lib.sh in docker-buildx-push for tagging version (#5024) 2022-03-24 09:33:39 -07:00
Joe Previte
ba1ddbd181
fix: use -r with jq and add workflow for artifacts (#5016) 2022-03-22 16:45:59 -07:00
Joe Previte
cf7cff0f72
release: 4.2.0 (#5014)
* chore(release): bump version to 4.2.0

* chore: update CHANGELOG

* chore: bump helm chart version
2022-03-22 16:34:29 -07:00
Asher
a1af9e2a56
chore: move to patches (#4997)
* Move integration types into code-server

This will be easier to maintain than to have it as a patch.

* Disable connection token

Using a flag means we will not need to patch it out.  I think this is
new from 1.64?

* Add product.json to build process

This way we do not have to patch it.

* Ship with remote agent package.json

Instead of the root one.  This contains fewer dependencies.

* Let Code handle errors

This way we will not have to patch Code to make this work and I think it
makes sense to let Code handle the request.

If we do want to handle errors we can do it cleanly by patching their
error handler to throw instead.

* Move manifest override into code-server

This way we will not have to patch it.

* Move to patches

- Switch submodule to track upstream
- Add quilt to the process
- Add patches

The node-* ignore was ignoring one of the diffs so I removed it.  This
was added when we were curling Node as node-v{version}-darwin-x64 for
the macOS build but this no longer happens (we use the Node action to
install a specific version now so we just use the system-wide Node).

* Use pre-packaged Code
2022-03-22 15:07:14 -05:00
Joe Previte
be727871f6
refactor: checkout homebrew-core in action instead of script (#4996)
* refactor: checkout homebrew-core in action instead of script

This moves the git clone step from the `brew-bump.sh` script into the
`npm-brew.yaml` as part of the job using actions/checkout instead.

* refactor: clean up brew-bump.sh script

* fixup

* fixup!: remove step to clean up homebrew repo

* fixup!: use correct ./ci path steps-lib.sh

* fixup!: add exit code 0 for duplicate PRs
2022-03-21 16:57:36 -07:00
Joe Previte
60ebf2f851
chore: update to minimist-list (#5006) 2022-03-21 16:18:32 -07:00
renovate[bot]
815c4cf1f0
chore(deps): update actions/cache action to v3 (#5003)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-21 14:31:02 -07:00
Joe Previte
5afb26fb60
fix(ci): correctly download npm/docker artifacts (#4995)
* fix(ci): correctly download npm artifact

* fixup! fix(ci): correctly download npm artifact

* docs: update MAINTAINING

* fixup! docs: update MAINTAINING

* fixup! Merge branch 'main' into 4949-chore-fix-npm-workflow

* chore: get ci to run

* refactor: use vVERSION branch name instead of release

* refactor: use new download artifact in docker workflow

* refactor: clean up release-github-assets script

* fixup: remove extra v

* fixup! fixup: remove extra v
2022-03-17 11:52:39 -07:00
Joe Previte
a0561c7685
feat(ci): publish dev builds to @coder/code-server-pr (#4972)
* feat(npm): use DEV_PACKAGE_NAME for development

* feat(ci): use npm v7 in npm job

* fixup: add npm version

* fixup: always set package name

* wip

* fix: check for npm and npm v7

* fixup

* fixup: move after release dir created

* fixup: use jq

* fixup: use jq correctly
2022-03-15 16:59:40 -07:00
renovate[bot]
d22f312cab
chore(deps): update dependency normalize-package-data to v4 (#4991)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-15 09:27:04 -07:00
Asher
21c74802e8
chore: move Code to a submodule (#4990)
* Move Code to a submodule

Closes #4901.

* Base Code cache on hash and re-enable node_modules cache

The current setup appears to only rebuild VS Code if the dependencies
change but we need to rebuild it if anything changes.

I also re-enabled the commented out node_modules caches.  They look like
they should work to me with the submodule method.  I think the problem
occurred because Code itself was being installed in the yarn step.
2022-03-14 21:37:29 -05:00
renovate[bot]
184ef68147
chore(deps): update dependency audit-ci to v6 (#4986)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-14 14:48:12 -07:00
Joe Previte
86c8590bd5
feat(testing): add test for app > listen (#4971)
* feat(testing): add test for app > listen

* Update test/unit/node/app.test.ts

* refactor: modernize listen fn in app

* wip

* fix: update error message

* fixup: remove console.log

* fixup: use clearAllMocks once in beforeAll

* fix: move chmod after socket listen

* fixup: formatting

* Update src/node/app.ts

Co-authored-by: Jonathan Yu <jonathan@coder.com>

* Update src/node/app.ts

Co-authored-by: Asher <ash@coder.com>

Co-authored-by: Jonathan Yu <jonathan@coder.com>
Co-authored-by: Asher <ash@coder.com>
2022-03-11 16:54:59 -07:00
Joe Previte
91cabbc246
feat(testing): add test for optionDescriptions (#4970)
* feat(testing): add test for optionDescriptions

* refactor(cli): optional arg in optionDescriptions

* feat: add more tests for optionDescriptions
2022-03-11 13:27:19 -07:00
azriel-stephen
77296c7187
Update guide.md (#4981)
Grammatical mistake
2022-03-11 09:49:12 -07:00
Bruno Quaresma
52eaea9f7a
docs: update docs preview (#4968)
* docs: update docs preview

* Fix Ubuntu  deps

* Fix formatting
2022-03-10 13:44:27 -07:00
Joe Previte
03e0bdac03
chore: update vscode to 1.64 (#4902)
* chore: update vscode server files

* chore: update code to 1.64

* refactor: clean up code in constants.ts

* chore: keep package.json vscode cache

* fixup!: formatting

* feat(ci): add VSCODE_CACHE_VERSION

* fix(ci): add package.json for e2e tests

* fix: TS errors

* refactor: remove isConnected e2e tests
2022-03-09 14:28:52 -07:00
Joe Previte
3b93a86f25
chore: add permissions trivy-docker (#4957)
* chore: add permissions trivy-docker

* Update .github/workflows/trivy-docker.yaml
2022-03-08 13:19:57 -07:00
Joe Previte
643ef1392f
testing: add new test for logLevels (#4953)
* feat: add new test for logLevels

* wip

* feat: add test for valid log level env var
2022-03-07 16:08:07 -07:00
Joe Previte
3c6f85c282
fix: re-enable trivvy docker scan (#4943)
* fix: re-enable trivvy docker scan

* wip

* fixup

* fixup

* fixup
2022-03-04 15:59:29 -07:00
renovate[bot]
f0faa22ee9
chore(deps): update actions/upload-artifact action to v3 (#4944)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-04 09:25:12 -07:00
Asher
7aa087ae34
release: v4.1.0 (#4946)
* release: bump version to 4.1.0

* Rename VS Code to Code in changelog

* Catch up changelog

* Add release as valid semantic tag
2022-03-03 14:46:17 -06:00
221 changed files with 12584 additions and 8270 deletions

6
.github/CODEOWNERS vendored
View File

@ -1,3 +1,7 @@
* @coder/code-server-reviewers
* @coder/code-server
ci/helm-chart/ @Matthew-Beckett @alexgorbatchev
docs/install.md @GNUxeava
src/node/i18n/locales/zh-cn.json @zhaozhiming

View File

@ -1,6 +1,5 @@
name: Bug report
description: File a bug report
title: "[Bug]: "
labels: ["bug", "triage"]
body:
- type: checkboxes
@ -10,6 +9,7 @@ body:
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: OS/Web Information
@ -28,56 +28,82 @@ body:
- `code-server --version`:
validations:
required: true
- type: textarea
attributes:
label: Steps to Reproduce
description: |
1. open code-server
2. install extension
3. run command
Please describe exactly how to reproduce the bug. For example:
1. Open code-server in Firefox
2. Install extension `foo.bar` from the extensions sidebar
3. Run command `foo.bar.baz`
value: |
1.
2.
3.
validations:
required: true
- type: textarea
attributes:
label: Expected
description: What should happen?
validations:
required: true
- type: textarea
attributes:
label: Actual
description: What actually happens?
validations:
required: true
- type: textarea
id: logs
attributes:
label: Logs
description: Run code-server with the --verbose flag and then paste any relevant logs from the server, from the browser console and/or the browser network tab. For issues with installation, include installation logs (i.e. output of `yarn global add code-server`).
render: shell
- type: textarea
attributes:
label: Screenshot/Video
description: Please include a screenshot, gif or screen recording of your issue.
validations:
required: false
- type: dropdown
attributes:
label: Does this bug reproduce in native VS Code?
description: If the bug reproduces in native VS Code, submit the issue upstream instead (https://github.com/microsoft/vscode).
options:
- Yes, this is also broken in native VS Code
- No, this works as expected in native VS Code
- This cannot be tested in native VS Code
- I did not test native VS Code
validations:
required: true
- type: dropdown
attributes:
label: Does this bug reproduce in GitHub Codespaces?
description: If the bug reproduces in GitHub Codespaces, submit the issue upstream instead (https://github.com/microsoft/vscode).
options:
- Yes, this is also broken in GitHub Codespaces
- No, this works as expected in GitHub Codespaces
- This cannot be tested in GitHub Codespaces
- I did not test GitHub Codespaces
validations:
required: true
- type: checkboxes
attributes:
label: Does this issue happen in VS Code?
description: Please try reproducing this issue in VS Code
label: Are you accessing code-server over a secure context?
description: code-server relies on service workers (which only work in secure contexts) for many features. Double-check that you are using a secure context like HTTPS or localhost.
options:
- label: I cannot reproduce this in VS Code.
required: true
- type: checkboxes
attributes:
label: Are you accessing code-server over HTTPS?
description: code-server relies on service workers for many features. Double-check that you are using HTTPS.
options:
- label: I am using HTTPS.
required: true
- label: I am using a secure context.
required: false
- type: textarea
attributes:
label: Notes

View File

@ -1,9 +1,7 @@
---
name: Documentation improvement
about: Suggest a documentation improvement
title: "[Docs]: "
labels: "docs"
assignees: "@jsjoeio"
---
## What is your suggestion?

View File

@ -1,9 +1,7 @@
---
name: Feature request
about: Suggest an idea to improve code-server
title: "[Feat]: "
labels: enhancement
assignees: ""
---
## What is your suggestion?

View File

@ -12,5 +12,6 @@ Follow "Publishing a release" steps in `ci/README.md`
<!-- Note some of these steps below are redundant since they're listed in the "Publishing a release" docs -->
- [ ] publish release and merge PR
- [ ] update the AUR package
- [ ] update `CHANGELOG.md`
- [ ] manually run "Draft release" workflow after merging this PR
- [ ] merge PR opened in [code-server-aur](https://github.com/coder/code-server-aur)

31
.github/dependabot.yaml vendored Normal file
View File

@ -0,0 +1,31 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
time: "06:00"
timezone: "America/Chicago"
labels: []
commit-message:
prefix: "chore"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
time: "06:00"
timezone: "America/Chicago"
commit-message:
prefix: "chore"
labels: []
ignore:
# Ignore patch updates for all dependencies
- dependency-name: "*"
update-types:
- version-update:semver-patch
# Ignore major updates to Node.js types, because they need to
# correspond to the Node.js engine version
- dependency-name: "@types/node"
update-types:
- version-update:semver-major

29
.github/ranger.yml vendored
View File

@ -1,29 +0,0 @@
# Configuration for the repo ranger bot
# See docs: https://www.notion.so/Documentation-8d7627bb1f3c42b7b1820e8d6f157a57#9879d1374fab4d1f9c607c230fd5123d
default:
close:
# Default time to wait before closing the label. Can either be a number in milliseconds
# or a string specified by the `ms` package (https://www.npmjs.com/package/ms)
delay: "2 days"
# Default comment to post when an issue is first marked with a closing label
comment: "⚠️ This issue has been marked $LABEL and will be closed in $DELAY."
labels:
duplicate: close
wontfix: close
"squash when passing": merge
"rebase when passing": merge
"merge when passing": merge
"new contributor":
action: comment
delay: 5s
message: "Thanks for making your first contribution! :slightly_smiling_face:"
"upstream:vscode":
action: close
delay: 5s
comment: >
This issue has been marked as 'upstream:vscode'.
Please file this upstream: [link to open issue](https://github.com/microsoft/vscode/issues/new/choose)
This issue will automatically close in $DELAY.

View File

@ -61,3 +61,6 @@ types:
# implementations. For example, if a commit adds a fix + test, it's a fix
# commit. If a commit is simply bumping coverage, it's a test commit.
- test
# A new release.
- release

430
.github/workflows/build.yaml vendored Normal file
View File

@ -0,0 +1,430 @@
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
# Cancel in-progress runs for pull requests when developers push
# additional changes, and serialize builds in branches.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Note: if: success() is used in several jobs -
# this ensures that it only executes if all previous jobs succeeded.
# if: steps.cache-node-modules.outputs.cache-hit != 'true'
# will skip running `yarn install` if it successfully fetched from cache
jobs:
prettier:
name: Format with Prettier
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Run prettier with actionsx/prettier
uses: actionsx/prettier@v3
with:
args: --check --loglevel=warn .
doctoc:
name: Doctoc markdown files
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
docs/**
- name: Install Node.js
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: "yarn"
- name: Install doctoc
run: yarn global add doctoc@2.2.1
- name: Run doctoc
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn doctoc
lint-helm:
name: Lint Helm chart
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
ci/helm-chart/**
- name: Install helm
if: steps.changed-files.outputs.any_changed == 'true'
uses: azure/setup-helm@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install helm kubeval plugin
if: steps.changed-files.outputs.any_changed == 'true'
run: helm plugin install https://github.com/instrumenta/helm-kubeval
- name: Lint Helm chart
if: steps.changed-files.outputs.any_changed == 'true'
run: helm kubeval ci/helm-chart
lint-ts:
name: Lint TypeScript files
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
**/*.ts
**/*.js
files_ignore: |
lib/vscode/**
- name: Install Node.js
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Fetch dependencies from cache
if: steps.changed-files.outputs.any_changed == 'true'
id: cache-node-modules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-build-
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true' && steps.cache-node-modules.outputs.cache-hit != 'true'
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
- name: Lint TypeScript files
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn lint:ts
lint-actions:
name: Lint GitHub Actions
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Check workflow files
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.1
./actionlint -color -shellcheck= -ignore "set-output"
shell: bash
test-unit:
name: Run unit tests
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
**/*.ts
files_ignore: |
lib/vscode/**
- name: Install Node.js
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Fetch dependencies from cache
if: steps.changed-files.outputs.any_changed == 'true'
id: cache-node-modules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-build-
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true' && steps.cache-node-modules.outputs.cache-hit != 'true'
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
- name: Run unit tests
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn test:unit
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: success()
build:
name: Build code-server
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
DISABLE_V8_COMPILE_CACHE: 1
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: true
- name: Install system dependencies
run: sudo apt update && sudo apt install -y libkrb5-dev
- name: Install quilt
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: quilt
version: 1.0
- name: Patch Code
run: quilt push -a
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Fetch dependencies from cache
id: cache-node-modules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: yarn-build-code-server-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-build-code-server-
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- name: Build code-server
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn build
# Get Code's git hash. When this changes it means the content is
# different and we need to rebuild.
- name: Get latest lib/vscode rev
id: vscode-rev
run: echo "rev=$(git rev-parse HEAD:./lib/vscode)" >> $GITHUB_OUTPUT
# We need to rebuild when we have a new version of Code, when any of
# the patches changed, or when the code-server version changes (since
# it gets embedded into the code). Use VSCODE_CACHE_VERSION to
# force a rebuild.
- name: Fetch prebuilt Code package from cache
id: cache-vscode
uses: actions/cache@v4
with:
path: lib/vscode-reh-web-*
key: vscode-reh-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff', 'ci/build/build-vscode.sh') }}
- name: Build vscode
env:
VERSION: "0.0.0"
if: steps.cache-vscode.outputs.cache-hit != 'true'
run: yarn build:vscode
# The release package does not contain any native modules
# and is neutral to architecture/os/libc version.
- name: Create release package
run: yarn release
if: success()
# https://github.com/actions/upload-artifact/issues/38
- name: Compress release package
run: tar -czf package.tar.gz release
- name: Upload npm package artifact
uses: actions/upload-artifact@v4
with:
name: npm-package
path: ./package.tar.gz
test-e2e:
name: Run e2e tests
needs: build
runs-on: ubuntu-20.04
timeout-minutes: 25
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install system dependencies
run: sudo apt update && sudo apt install -y libkrb5-dev
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Fetch dependencies from cache
id: cache-node-modules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-build-
- name: Download npm package
uses: actions/download-artifact@v4
with:
name: npm-package
- name: Decompress npm package
run: tar -xzf package.tar.gz
- name: Install release package dependencies
run: cd release && npm install --unsafe-perm --omit=dev
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
- name: Install Playwright OS dependencies
run: |
./test/node_modules/.bin/playwright install-deps
./test/node_modules/.bin/playwright install
- name: Run end-to-end tests
run: CODE_SERVER_TEST_ENTRY=./release yarn test:e2e
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: failed-test-videos
path: ./test/test-results
- name: Remove release packages and test artifacts
run: rm -rf ./release ./test/test-results
test-e2e-proxy:
name: Run e2e tests behind proxy
needs: build
runs-on: ubuntu-20.04
timeout-minutes: 25
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install system dependencies
run: sudo apt update && sudo apt install -y libkrb5-dev
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Fetch dependencies from cache
id: cache-node-modules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-build-
- name: Download npm package
uses: actions/download-artifact@v4
with:
name: npm-package
- name: Decompress npm package
run: tar -xzf package.tar.gz
- name: Install release package dependencies
run: cd release && npm install --unsafe-perm --omit=dev
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
- name: Install Playwright OS dependencies
run: |
./test/node_modules/.bin/playwright install-deps
./test/node_modules/.bin/playwright install
- name: Cache Caddy
uses: actions/cache@v4
id: caddy-cache
with:
path: |
~/.cache/caddy
key: cache-caddy-2.5.2
- name: Install Caddy
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: steps.caddy-cache.outputs.cache-hit != 'true'
run: |
gh release download v2.5.2 --repo caddyserver/caddy --pattern "caddy_2.5.2_linux_amd64.tar.gz"
mkdir -p ~/.cache/caddy
tar -xzf caddy_2.5.2_linux_amd64.tar.gz --directory ~/.cache/caddy
- name: Start Caddy
run: sudo ~/.cache/caddy/caddy start --config ./ci/Caddyfile
- name: Run end-to-end tests
run: CODE_SERVER_TEST_ENTRY=./release yarn test:e2e:proxy --global-timeout 840000
- name: Stop Caddy
if: always()
run: sudo ~/.cache/caddy/caddy stop --config ./ci/Caddyfile
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: failed-test-videos-proxy
path: ./test/test-results
- name: Remove release packages and test artifacts
run: rm -rf ./release ./test/test-results

View File

@ -1,480 +0,0 @@
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
# Cancel in-progress runs for pull requests when developers push
# additional changes, and serialize builds in branches.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Note: if: success() is used in several jobs -
# this ensures that it only executes if all previous jobs succeeded.
# if: steps.cache-yarn.outputs.cache-hit != 'true'
# will skip running `yarn install` if it successfully fetched from cache
jobs:
prebuild:
name: Pre-build checks
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install Node.js v14
uses: actions/setup-node@v3
with:
node-version: "14"
- name: Install helm
uses: azure/setup-helm@v1.1
# NOTE@jsjoeio
# disabling this until we can audit the build process
# and the usefulness of this step
# See: https://github.com/coder/code-server/issues/4287
# - name: Fetch dependencies from cache
# id: cache-yarn
# uses: actions/cache@v2
# with:
# path: "**/node_modules"
# key: yarn-build-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# yarn-build-
- name: Install dependencies
# if: steps.cache-yarn.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- name: Run yarn fmt
run: yarn fmt
if: success()
- name: Run yarn lint
run: yarn lint
if: success()
audit-ci:
name: Run audit-ci
needs: prebuild
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install Node.js v14
uses: actions/setup-node@v3
with:
node-version: "14"
- name: Fetch dependencies from cache
id: cache-yarn
uses: actions/cache@v2
with:
path: "**/node_modules"
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-build-
- name: Install dependencies
if: steps.cache-yarn.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- name: Audit for vulnerabilities
run: yarn _audit
if: success()
build:
name: Build
needs: prebuild
runs-on: ubuntu-latest
timeout-minutes: 30
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Node.js v14
uses: actions/setup-node@v3
with:
node-version: "14"
# TODO@Teffen investigate why this omits code-oss-dev/node_modules
# - name: Fetch dependencies from cache
# id: cache-yarn
# uses: actions/cache@v2
# with:
# path: |
# "**/node_modules"
# "**/vendor/modules"
# "**/vendor/modules/code-oss-dev/node_modules"
# key: yarn-build-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/vendor/yarn.lock') }}
# restore-keys: |
# yarn-build-
- name: Install dependencies
# if: steps.cache-yarn.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- name: Build code-server
run: yarn build
# Parse the hash of the latest commit inside vendor/modules/code-oss-dev
# use this to avoid rebuilding it if nothing changed
# How it works: the `git log` command fetches the hash of the last commit
# that changed a file inside `vendor/modules/code-oss-dev`. If a commit changes any file in there,
# the hash returned will change, and we rebuild vscode. If the hash did not change,
# (for example, a change to `src/` or `docs/`), we reuse the same build as last time.
# This saves a lot of time in CI, as compiling VSCode can take anywhere from 5-10 minutes.
- name: Get latest vendor/modules/code-oss-dev rev
id: vscode-rev
run: echo "::set-output name=rev::$(jq -r '.devDependencies["code-oss-dev"]' vendor/package.json | sed -r 's|.*#(.*)$|\1|')"
- name: Attempt to fetch vscode build from cache
id: cache-vscode
uses: actions/cache@v2
with:
path: |
vendor/modules/code-oss-dev/.build
vendor/modules/code-oss-dev/out-build
vendor/modules/code-oss-dev/out-vscode-reh-web
vendor/modules/code-oss-dev/out-vscode-reh-web-min
key: vscode-reh-build-${{ steps.vscode-rev.outputs.rev }}
- name: Build vscode
if: steps.cache-vscode.outputs.cache-hit != 'true'
run: yarn build:vscode
# Our code imports code from VS Code's `out` directory meaning VS Code
# must be built before running these tests.
# TODO: Move to its own step?
- name: Run code-server unit tests
run: yarn test:unit
if: success()
- name: Upload coverage report to Codecov
run: yarn coverage
if: success()
# The release package does not contain any native modules
# and is neutral to architecture/os/libc version.
- name: Create release package
run: yarn release
if: success()
# https://github.com/actions/upload-artifact/issues/38
- name: Compress release package
run: tar -czf package.tar.gz release
- name: Upload npm package artifact
uses: actions/upload-artifact@v2
with:
name: npm-package
path: ./package.tar.gz
npm:
# the npm-package gets uploaded as an artifact in Build
# so we need that to complete before this runs
needs: build
# This environment "npm" requires someone from
# coder/code-server-reviewers to approve the PR before this job runs.
environment: npm
# Only run if PR comes from base repo
# Reason: forks cannot access secrets and this will always fail
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
id: download
with:
name: "npm-package"
path: release-npm-package
- name: Run ./ci/steps/publish-npm.sh
run: yarn publish:npm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# NOTE@jsjoeio
# NPM_ENVIRONMENT intentionally not set here.
# Instead, itis determined in publish-npm.sh script
# using GITHUB environment variables
# TODO: cache building yarn --production
# possibly 2m30s of savings(?)
# this requires refactoring our release scripts
package-linux-amd64:
name: x86-64 Linux build
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
container: "centos:7"
steps:
- uses: actions/checkout@v3
- name: Install Node.js v14
uses: actions/setup-node@v3
with:
node-version: "14"
- name: Install development tools
run: |
yum install -y epel-release centos-release-scl
yum install -y devtoolset-9-{make,gcc,gcc-c++} jq rsync
- name: Install nfpm and envsubst
run: |
curl -sfL https://install.goreleaser.com/github.com/goreleaser/nfpm.sh | sh -s -- -b ~/.local/bin v2.3.1
curl -L https://github.com/a8m/envsubst/releases/download/v1.1.0/envsubst-`uname -s`-`uname -m` -o envsubst
chmod +x envsubst
mv envsubst ~/.local/bin
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install yarn
run: npm install -g yarn
- name: Download npm package
uses: actions/download-artifact@v3
with:
name: npm-package
- name: Decompress npm package
run: tar -xzf package.tar.gz
# NOTE: && here is deliberate - GitHub puts each line in its own `.sh`
# file when running inside a docker container.
- name: Build standalone release
run: source scl_source enable devtoolset-9 && yarn release:standalone
- name: Sanity test standalone release
run: yarn test:standalone-release
- name: Build packages with nfpm
run: yarn package
- name: Upload release artifacts
uses: actions/upload-artifact@v2
with:
name: release-packages
path: ./release-packages
# NOTE@oxy:
# We use Ubuntu 16.04 here, so that our build is more compatible
# with older libc versions. We used to (Q1'20) use CentOS 7 here,
# but it has a full update EOL of Q4'20 and a 'critical security'
# update EOL of 2024. We're dropping full support a few years before
# the final EOL, but I don't believe CentOS 7 has a large arm64 userbase.
# It is not feasible to cross-compile with CentOS.
# Cross-compile notes: To compile native dependencies for arm64,
# we install the aarch64/armv7l cross toolchain and then set it as the default
# compiler/linker/etc. with the AR/CC/CXX/LINK environment variables.
# qemu-user-static on ubuntu-16.04 currently doesn't run Node correctly,
# so we just build with "native"/x86_64 node, then download arm64/armv7l node
# and then put it in our release. We can't smoke test the cross build this way,
# but this means we don't need to maintain a self-hosted runner!
# NOTE@jsjoeio:
# We used to use 16.04 until GitHub deprecated it on September 20, 2021
# See here: https://github.com/actions/virtual-environments/pull/3862/files
package-linux-cross:
name: Linux cross-compile builds
needs: build
runs-on: ubuntu-18.04
timeout-minutes: 15
strategy:
matrix:
include:
- prefix: aarch64-linux-gnu
arch: arm64
- prefix: arm-linux-gnueabihf
arch: armv7l
env:
AR: ${{ format('{0}-ar', matrix.prefix) }}
CC: ${{ format('{0}-gcc', matrix.prefix) }}
CXX: ${{ format('{0}-g++', matrix.prefix) }}
LINK: ${{ format('{0}-g++', matrix.prefix) }}
NPM_CONFIG_ARCH: ${{ matrix.arch }}
NODE_VERSION: v14.17.4
steps:
- uses: actions/checkout@v3
- name: Install Node.js v14
uses: actions/setup-node@v3
with:
node-version: "14"
- name: Install nfpm
run: |
curl -sfL https://install.goreleaser.com/github.com/goreleaser/nfpm.sh | sh -s -- -b ~/.local/bin v2.3.1
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install cross-compiler
run: sudo apt update && sudo apt install $PACKAGE
env:
PACKAGE: ${{ format('g++-{0}', matrix.prefix) }}
- name: Download npm package
uses: actions/download-artifact@v3
with:
name: npm-package
- name: Decompress npm package
run: tar -xzf package.tar.gz
- name: Build standalone release
run: yarn release:standalone
- name: Replace node with cross-compile equivalent
run: |
wget https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-${NPM_CONFIG_ARCH}.tar.xz
tar -xf node-${NODE_VERSION}-linux-${NPM_CONFIG_ARCH}.tar.xz node-${NODE_VERSION}-linux-${NPM_CONFIG_ARCH}/bin/node --strip-components=2
mv ./node ./release-standalone/lib/node
- name: Build packages with nfpm
run: yarn package ${NPM_CONFIG_ARCH}
- name: Upload release artifacts
uses: actions/upload-artifact@v2
with:
name: release-packages
path: ./release-packages
package-macos-amd64:
name: x86-64 macOS build
needs: build
runs-on: macos-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- name: Install Node.js v14
uses: actions/setup-node@v3
with:
node-version: "14"
- name: Install nfpm
run: |
curl -sfL https://install.goreleaser.com/github.com/goreleaser/nfpm.sh | sh -s -- -b ~/.local/bin v2.3.1
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Download npm package
uses: actions/download-artifact@v3
with:
name: npm-package
- name: Decompress npm package
run: tar -xzf package.tar.gz
- name: Build standalone release
run: yarn release:standalone
- name: Sanity test standalone release
run: yarn test:standalone-release
- name: Build packages with nfpm
run: yarn package
- name: Upload release artifacts
uses: actions/upload-artifact@v2
with:
name: release-packages
path: ./release-packages
test-e2e:
name: End-to-end tests
needs: package-linux-amd64
runs-on: ubuntu-latest
timeout-minutes: 15
env:
# Since we build code-server we might as well run tests from the release
# since VS Code will load faster due to the bundling.
CODE_SERVER_TEST_ENTRY: "./release-packages/code-server-linux-amd64"
steps:
- uses: actions/checkout@v3
- name: Install Node.js v14
uses: actions/setup-node@v3
with:
node-version: "14"
- name: Fetch dependencies from cache
id: cache-yarn
uses: actions/cache@v2
with:
path: "**/node_modules"
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-build-
- name: Download release packages
uses: actions/download-artifact@v3
with:
name: release-packages
path: ./release-packages
- name: Untar code-server release
run: |
cd release-packages
tar -xzf code-server*-linux-amd64.tar.gz
mv code-server*-linux-amd64 code-server-linux-amd64
- name: Install dependencies
if: steps.cache-yarn.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- name: Install Playwright OS dependencies
run: |
./test/node_modules/.bin/playwright install-deps
./test/node_modules/.bin/playwright install
- name: Run end-to-end tests
run: yarn test:e2e
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: failed-test-videos
path: ./test/test-results
- name: Remove release packages and test artifacts
run: rm -rf ./release-packages ./test/test-results
trivy-scan-repo:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run Trivy vulnerability scanner in repo mode
#Commit SHA for v0.0.17
uses: aquasecurity/trivy-action@296212627a1e693efa09c00adc3e03b2ba8edf18
with:
scan-type: "fs"
scan-ref: "."
ignore-unfixed: true
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-repo-results.sarif"
severity: "HIGH,CRITICAL"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: "trivy-repo-results.sarif"

View File

@ -1,40 +0,0 @@
name: "Code Scanning"
on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
schedule:
# Runs every Monday morning PST
- cron: "17 15 * * 1"
# Cancel in-progress runs for pull requests when developers push
# additional changes, and serialize builds in branches.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
analyze:
name: Analyze
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
config-file: ./.github/codeql-config.yml
languages: javascript
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@ -1,41 +0,0 @@
name: Publish on Docker
on:
# Shows the manual trigger in GitHub UI
# helpful as a back-up in case the GitHub Actions Workflow fails
workflow_dispatch:
release:
types:
- released
# Cancel in-progress runs for pull requests when developers push
# additional changes, and serialize builds in branches.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
docker-images:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Run ./ci/steps/docker-buildx-push.sh
run: ./ci/steps/docker-buildx-push.sh
env:
GITHUB_TOKEN: ${{ github.token }}

View File

@ -1,105 +0,0 @@
name: Docs preview
on:
pull_request:
branches:
- main
permissions:
actions: none
checks: none
contents: read
deployments: none
issues: none
packages: none
pull-requests: write
repository-projects: none
security-events: none
statuses: none
# Cancel in-progress runs for pull requests when developers push
# additional changes, and serialize builds in branches.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
preview:
name: Docs preview
runs-on: ubuntu-20.04
environment: CI
# Only run if PR comes from base repo
# Reason: forks cannot access secrets and this will always fail
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
- name: Checkout m
uses: actions/checkout@v3
with:
repository: coder/m
ref: refs/heads/master
ssh-key: ${{ secrets.READONLY_M_DEPLOY_KEY }}
submodules: true
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Cache Node Modules
uses: actions/cache@v2
with:
path: "/node_modules"
key: node-${{ hashFiles('yarn.lock') }}
- name: Create Deployment
id: deployment
run: ./ci/scripts/github_deployment.sh create
env:
GITHUB_TOKEN: ${{ github.token }}
DEPLOY_ENVIRONMENT: codercom-preview-docs
- name: Deploy Preview to Vercel
id: preview
run: ./ci/scripts/deploy_vercel.sh
env:
VERCEL_ORG_ID: team_tGkWfhEGGelkkqUUm9nXq17r
VERCEL_PROJECT_ID: QmZRucMRh3GFk1817ZgXjRVuw5fhTspHPHKct3JNQDEPGd
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
CODE_SERVER_DOCS_MAIN_BRANCH: ${{ github.event.pull_request.head.sha }}
- name: Install node_modules
run: yarn install
- name: Check docs
run: yarn ts-node ./product/coder.com/site/scripts/checkDocs.ts
env:
BASE_URL: ${{ steps.preview.outputs.url }}
- name: Update Deployment
# If we don't specify always, it won't run this check if failed.
# This means the deployment would be stuck pending.
if: always()
run: ./ci/scripts/github_deployment.sh update
env:
GITHUB_DEPLOYMENT: ${{ steps.deployment.outputs.id }}
GITHUB_TOKEN: ${{ github.token }}
DEPLOY_STATUS: ${{ steps.preview.outcome }}
DEPLOY_URL: ${{ steps.preview.outputs.url }}
- name: Comment Credentials
uses: marocchino/sticky-pull-request-comment@v2
if: always()
with:
header: codercom-preview-docs
message: |
✨ Coder.com for PR #${{ github.event.number }} deployed! It will be updated on every commit.
* _Host_: ${{ steps.preview.outputs.url }}/docs/code-server
* _Last deploy status_: ${{ steps.preview.outcome }}
* _Commit_: ${{ github.event.pull_request.head.sha }}
* _Workflow status_: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

View File

@ -6,11 +6,13 @@ on:
- main
paths:
- "install.sh"
- ".github/workflows/installer.yaml"
pull_request:
branches:
- main
paths:
- "install.sh"
- ".github/workflows/installer.yaml"
# Cancel in-progress runs for pull requests when developers push
# additional changes, and serialize builds in branches.
@ -19,27 +21,30 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
ubuntu:
name: Test installer on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install code-server
run: ./install.sh
- name: Test code-server
run: yarn test:standalone-release code-server
- name: Test code-server was installed globally
run: code-server --help
alpine:
name: Test installer on Alpine
runs-on: ubuntu-latest
container: "alpine:3.14"
container: "alpine:3.17"
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install curl
run: apk add curl
@ -51,16 +56,21 @@ jobs:
- name: Test standalone to a non-existent prefix
run: su coder -c "./install.sh --method standalone --prefix /tmp/does/not/yet/exist"
# We do not actually have Alpine standalone builds so running code-server
# will not work.
- name: Test code-server was installed to prefix
run: test -f /tmp/does/not/yet/exist/bin/code-server
macos:
name: Test installer on macOS
runs-on: macos-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install code-server
run: ./install.sh
- name: Test code-server
run: yarn test:standalone-release code-server
- name: Test code-server was installed globally
run: code-server --help

View File

@ -1,60 +0,0 @@
name: Publish on npm and brew
on:
# Shows the manual trigger in GitHub UI
# helpful as a back-up in case the GitHub Actions Workflow fails
workflow_dispatch:
release:
types: [released]
# Cancel in-progress runs for pull requests when developers push
# additional changes, and serialize builds in branches.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
# NOTE: this job requires curl, jq and yarn
# All of them are included in ubuntu-latest.
npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
id: download
with:
name: "npm-package"
path: release-npm-package
- name: Publish npm package and tag with "latest"
run: yarn publish:npm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_ENVIRONMENT: "production"
homebrew:
# The newest version of code-server needs to be available on npm when this runs
# otherwise, it will 404 and won't open a PR to bump version on homebrew/homebrew-core
needs: npm
runs-on: macos-latest
steps:
# Ensure things are up to date
# Suggested by homebrew maintainers
# https://github.com/Homebrew/discussions/discussions/1532#discussioncomment-782633
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- uses: actions/checkout@v3
- name: Configure git
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Bump code-server homebrew version
env:
HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
run: ./ci/steps/brew-bump.sh

206
.github/workflows/publish.yaml vendored Normal file
View File

@ -0,0 +1,206 @@
name: Publish code-server
on:
# Shows the manual trigger in GitHub UI
# helpful as a back-up in case the GitHub Actions Workflow fails
workflow_dispatch:
inputs:
version:
description: The version to publish (include "v", i.e. "v4.9.1").
type: string
required: true
release:
types: [released]
# Cancel in-progress runs for pull requests when developers push
# additional changes, and serialize builds in branches.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
# NOTE: this job requires curl, jq and yarn
# All of them are included in ubuntu-latest.
npm:
runs-on: ubuntu-latest
steps:
- name: Checkout code-server
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: "yarn"
- name: Download npm package from release artifacts
uses: robinraju/release-downloader@v1.11
with:
repository: "coder/code-server"
tag: ${{ github.event.inputs.version || github.ref_name }}
fileName: "package.tar.gz"
out-file-path: "release-npm-package"
# NOTE@jsjoeio - we do this so we can strip out the v
# i.e. v4.9.1 -> 4.9.1
- name: Get and set VERSION
run: |
TAG="${{ github.event.inputs.version || github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Publish npm package and tag with "latest"
run: yarn publish:npm
env:
VERSION: ${{ env.VERSION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_ENVIRONMENT: "production"
homebrew:
needs: npm
runs-on: ubuntu-latest
steps:
# Ensure things are up to date
# Suggested by homebrew maintainers
# https://github.com/Homebrew/discussions/discussions/1532#discussioncomment-782633
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Checkout code-server
uses: actions/checkout@v4
- name: Configure git
run: |
git config --global user.name cdrci
git config --global user.email opensource@coder.com
# NOTE@jsjoeio - we do this so we can strip out the v
# i.e. v4.9.1 -> 4.9.1
- name: Get and set VERSION
run: |
TAG="${{ github.event.inputs.version || github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Bump code-server homebrew version
env:
VERSION: ${{ env.VERSION }}
HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
run: ./ci/steps/brew-bump.sh
aur:
needs: npm
runs-on: ubuntu-latest
timeout-minutes: 10
env:
GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
steps:
# We need to checkout code-server so we can get the version
- name: Checkout code-server
uses: actions/checkout@v4
with:
fetch-depth: 0
path: "./code-server"
- name: Checkout code-server-aur repo
uses: actions/checkout@v4
with:
repository: "cdrci/code-server-aur"
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
ref: "master"
- name: Merge in master
run: |
git remote add upstream https://github.com/coder/code-server-aur.git
git fetch upstream
git merge upstream/master
- name: Configure git
run: |
git config --global user.name cdrci
git config --global user.email opensource@coder.com
# NOTE@jsjoeio - we do this so we can strip out the v
# i.e. v4.9.1 -> 4.9.1
- name: Get and set VERSION
run: |
TAG="${{ github.event.inputs.version || github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Validate package
uses: heyhusen/archlinux-package-action@v2.2.1
env:
VERSION: ${{ env.VERSION }}
with:
pkgver: ${{ env.VERSION }}
updpkgsums: true
srcinfo: true
- name: Open PR
# We need to git push -u otherwise gh will prompt
# asking where to push the branch.
env:
VERSION: ${{ env.VERSION }}
run: |
git checkout -b update-version-${{ env.VERSION }}
git add .
git commit -m "chore: updating version to ${{ env.VERSION }}"
git push -u origin $(git branch --show)
gh pr create --repo coder/code-server-aur --title "chore: bump version to ${{ env.VERSION }}" --body "PR opened by @$GITHUB_ACTOR" --assignee $GITHUB_ACTOR
docker:
runs-on: ubuntu-20.04
steps:
- name: Checkout code-server
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# NOTE@jsjoeio - we do this so we can strip out the v
# i.e. v4.9.1 -> 4.9.1
- name: Get and set VERSION
run: |
TAG="${{ github.event.inputs.version || github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Download deb artifacts
uses: robinraju/release-downloader@v1.11
with:
repository: "coder/code-server"
tag: v${{ env.VERSION }}
fileName: "*.deb"
out-file-path: "release-packages"
- name: Download rpm artifacts
uses: robinraju/release-downloader@v1.11
with:
repository: "coder/code-server"
tag: v${{ env.VERSION }}
fileName: "*.rpm"
out-file-path: "release-packages"
- name: Publish to Docker
run: ./ci/steps/docker-buildx-push.sh
env:
VERSION: ${{ env.VERSION }}
GITHUB_TOKEN: ${{ github.token }}

325
.github/workflows/release.yaml vendored Normal file
View File

@ -0,0 +1,325 @@
name: Draft release
on:
workflow_dispatch:
inputs:
version:
description: The version to publish (include "v", i.e. "v4.9.1").
type: string
required: true
permissions:
contents: write # For creating releases.
discussions: write # For creating a discussion.
# Cancel in-progress runs for pull requests when developers push
# additional changes
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
# TODO: cache building yarn --production
# possibly 2m30s of savings(?)
# this requires refactoring our release scripts
package-linux-amd64:
name: x86-64 Linux build
runs-on: ubuntu-latest
timeout-minutes: 15
needs: npm-version
container: "centos:8"
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Install development tools
run: |
cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
yum install -y gcc-c++ make jq rsync python3 libsecret-devel krb5-devel
- name: Install nfpm and envsubst
run: |
mkdir -p ~/.local/bin
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.22.2/nfpm_2.22.2_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
curl -sSfL https://github.com/a8m/envsubst/releases/download/v1.1.0/envsubst-`uname -s`-`uname -m` -o envsubst
chmod +x envsubst
mv envsubst ~/.local/bin
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install yarn
run: npm install -g yarn
- name: Download npm package
uses: actions/download-artifact@v4
with:
name: npm-release-package
- name: Decompress npm package
run: tar -xzf package.tar.gz
- name: Build standalone release
run: npm run release:standalone
- name: Install test dependencies
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
- name: Run integration tests on standalone release
run: yarn test:integration
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: success()
continue-on-error: true
# NOTE@jsjoeio - we do this so we can strip out the v
# i.e. v4.9.1 -> 4.9.1
- name: Get and set VERSION
run: |
TAG="${{ inputs.version || github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Build packages with nfpm
env:
VERSION: ${{ env.VERSION }}
run: yarn package
- uses: softprops/action-gh-release@v2
with:
draft: true
discussion_category_name: "📣 Announcements"
files: ./release-packages/*
package-linux-cross:
name: Linux cross-compile builds
runs-on: ubuntu-latest
timeout-minutes: 15
needs: npm-version
container: "debian:buster"
strategy:
matrix:
include:
- prefix: aarch64-linux-gnu
npm_arch: arm64
apt_arch: arm64
- prefix: arm-linux-gnueabihf
npm_arch: armv7l
apt_arch: armhf
env:
AR: ${{ format('{0}-ar', matrix.prefix) }}
AS: ${{ format('{0}-as', matrix.prefix) }}
CC: ${{ format('{0}-gcc', matrix.prefix) }}
CPP: ${{ format('{0}-cpp', matrix.prefix) }}
CXX: ${{ format('{0}-g++', matrix.prefix) }}
FC: ${{ format('{0}-gfortran', matrix.prefix) }}
LD: ${{ format('{0}-ld', matrix.prefix) }}
STRIP: ${{ format('{0}-strip', matrix.prefix) }}
PKG_CONFIG_PATH: ${{ format('/usr/lib/{0}/pkgconfig', matrix.prefix) }}
TARGET_ARCH: ${{ matrix.apt_arch }}
npm_config_arch: ${{ matrix.npm_arch }}
# Not building from source results in an x86_64 argon2, as if
# npm_config_arch is being ignored.
npm_config_build_from_source: true
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Install cross-compiler and system dependencies
run: |
dpkg --add-architecture $TARGET_ARCH
apt-get update && apt-get install -y --no-install-recommends \
crossbuild-essential-$TARGET_ARCH \
libx11-dev:$TARGET_ARCH \
libx11-xcb-dev:$TARGET_ARCH \
libxkbfile-dev:$TARGET_ARCH \
libsecret-1-dev:$TARGET_ARCH \
libkrb5-dev:$TARGET_ARCH \
ca-certificates \
curl wget rsync gettext-base
- name: Install nfpm
run: |
mkdir -p ~/.local/bin
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Download npm package
uses: actions/download-artifact@v4
with:
name: npm-release-package
- name: Decompress npm package
run: tar -xzf package.tar.gz
- name: Build standalone release
run: npm run release:standalone
- name: Replace node with cross-compile equivalent
run: |
node_version=$(node --version)
wget https://nodejs.org/dist/${node_version}/node-${node_version}-linux-${npm_config_arch}.tar.xz
tar -xf node-${node_version}-linux-${npm_config_arch}.tar.xz node-${node_version}-linux-${npm_config_arch}/bin/node --strip-components=2
mv ./node ./release-standalone/lib/node
# NOTE@jsjoeio - we do this so we can strip out the v
# i.e. v4.9.1 -> 4.9.1
- name: Get and set VERSION
run: |
TAG="${{ inputs.version || github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Build packages with nfpm
env:
VERSION: ${{ env.VERSION }}
run: npm run package ${npm_config_arch}
- uses: softprops/action-gh-release@v2
with:
draft: true
discussion_category_name: "📣 Announcements"
files: ./release-packages/*
package-macos-amd64:
name: x86-64 macOS build
runs-on: macos-latest
timeout-minutes: 15
needs: npm-version
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Install nfpm
run: |
mkdir -p ~/.local/bin
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
echo "$HOME/.local/bin" >> $GITHUB_PATH
# The version of node-gyp we use depends on distutils but it was removed
# in Python 3.12. It seems to be fixed in the latest node-gyp so when we
# next update Node we can probably remove this. For now, install
# setuptools since it contains distutils.
- name: Install Python utilities
run: brew install python-setuptools
- name: Download npm package
uses: actions/download-artifact@v4
with:
name: npm-release-package
- name: Decompress npm package
run: tar -xzf package.tar.gz
- name: Build standalone release
run: npm run release:standalone
- name: Install test dependencies
run: SKIP_SUBMODULE_DEPS=1 yarn install
- name: Run native module tests on standalone release
run: yarn test:native
# NOTE@jsjoeio - we do this so we can strip out the v
# i.e. v4.9.1 -> 4.9.1
- name: Get and set VERSION
run: |
TAG="${{ inputs.version || github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Build packages with nfpm
env:
VERSION: ${{ env.VERSION }}
run: yarn package
- uses: softprops/action-gh-release@v2
with:
draft: true
discussion_category_name: "📣 Announcements"
files: ./release-packages/*
npm-package:
name: Upload npm package
runs-on: ubuntu-latest
timeout-minutes: 15
needs: npm-version
steps:
- name: Download npm package
uses: actions/download-artifact@v4
with:
name: npm-release-package
- uses: softprops/action-gh-release@v2
with:
draft: true
discussion_category_name: "📣 Announcements"
files: ./package.tar.gz
npm-version:
name: Modify package.json version
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v6
id: download
with:
branch: ${{ github.ref }}
workflow: build.yaml
workflow_conclusion: completed
name: npm-package
check_artifacts: false
if_no_artifact_found: fail
- name: Decompress npm package
run: tar -xzf package.tar.gz
# NOTE@jsjoeio - we do this so we can strip out the v
# i.e. v4.9.1 -> 4.9.1
- name: Get and set VERSION
run: |
TAG="${{ inputs.version || github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Modify version
env:
VERSION: ${{ env.VERSION }}
run: |
echo "Updating version in root package.json"
npm version --prefix release "$VERSION"
echo "Updating version in lib/vscode/product.json"
tmp=$(mktemp)
jq ".codeServerVersion = \"$VERSION\"" release/lib/vscode/product.json > "$tmp" && mv "$tmp" release/lib/vscode/product.json
# Ensure it has the same permissions as before
chmod 644 release/lib/vscode/product.json
- name: Compress release package
run: tar -czf package.tar.gz release
- name: Upload npm package artifact
uses: actions/upload-artifact@v4
with:
name: npm-release-package
path: ./package.tar.gz

View File

@ -38,10 +38,10 @@ jobs:
name: Run script unit tests
runs-on: ubuntu-latest
# This runs on Alpine to make sure we're testing with actual sh.
container: "alpine:3.14"
container: "alpine:3.17"
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install test utilities
run: apk add bats checkbashisms
@ -51,3 +51,17 @@ jobs:
- name: Run script unit tests
run: ./ci/dev/test-scripts.sh
lint:
name: Lint shell files
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install lint utilities
run: sudo apt install shellcheck
- name: Lint shell files
run: ./ci/dev/lint-scripts.sh

96
.github/workflows/security.yaml vendored Normal file
View File

@ -0,0 +1,96 @@
name: Security
on:
push:
branches: [main]
paths:
- "package.json"
pull_request:
paths:
- "package.json"
schedule:
# Runs every Monday morning PST
- cron: "17 15 * * 1"
# Cancel in-progress runs for pull requests when developers push additional
# changes, and serialize builds in branches.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
audit:
name: Audit node modules
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Audit yarn for vulnerabilities
run: yarn audit
if: success()
- name: Audit npm for vulnerabilities
run: npm shrinkwrap && npm audit
if: success()
trivy-scan-repo:
name: Scan repo with Trivy
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8
with:
scan-type: "fs"
scan-ref: "."
ignore-unfixed: true
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-repo-results.sarif"
severity: "HIGH,CRITICAL"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-repo-results.sarif"
codeql-analyze:
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
name: Analyze with CodeQL
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
config-file: ./.github/codeql-config.yml
languages: javascript
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

65
.github/workflows/trivy-docker.yaml vendored Normal file
View File

@ -0,0 +1,65 @@
name: Trivy Nightly Docker Scan
on:
# Run scans if the workflow is modified, in order to test the
# workflow itself. This results in some spurious notifications,
# but seems okay for testing.
pull_request:
branches:
- main
paths:
- .github/workflows/trivy-docker.yaml
# Run scans against master whenever changes are merged.
push:
branches:
- main
paths:
- .github/workflows/trivy-docker.yaml
schedule:
# Run at 10:15 am UTC (3:15am PT/5:15am CT)
# Run at 0 minutes 0 hours of every day.
- cron: "15 10 * * *"
workflow_dispatch:
permissions:
actions: none
checks: none
contents: read
deployments: none
issues: none
packages: none
pull-requests: none
repository-projects: none
security-events: write
statuses: none
# Cancel in-progress runs for pull requests when developers push
# additional changes, and serialize builds in branches.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
trivy-scan-image:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner in image mode
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8
with:
image-ref: "docker.io/codercom/code-server:latest"
ignore-unfixed: true
format: "sarif"
output: "trivy-image-results.sarif"
severity: "HIGH,CRITICAL"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-image-results.sarif"

10
.gitignore vendored
View File

@ -8,12 +8,18 @@ release-packages/
release-gcp/
release-images/
node_modules
vendor/modules
node-*
/plugins
/lib/coder-cloud-agent
.home
coverage
**/.DS_Store
# Code packages itself here.
/lib/vscode-reh-web-*
# Failed e2e test videos are saved here
test/test-results
# Quilt's internal data.
/.pc
/patches/*.diff~

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "lib/vscode"]
path = lib/vscode
url = https://github.com/microsoft/vscode

View File

@ -1 +1 @@
14
20.11.1

9
.prettierignore Normal file
View File

@ -0,0 +1,9 @@
lib/vscode
lib/vscode-reh-web-linux-x64
release-standalone
release-packages
release
helm-chart
test/scripts
test/e2e/extensions/test-extension
.pc

View File

@ -4,14 +4,3 @@ trailingComma: all
arrowParens: always
singleQuote: false
useTabs: false
overrides:
# Attempt to keep VScode's existing code style intact.
- files: "vendor/modules/code-oss-dev/**/*.ts"
options:
# No limit defined upstream.
printWidth: 10000
semi: true
singleQuote: true
useTabs: true
arrowParens: avoid

View File

@ -1,2 +0,0 @@
extends:
- stylelint-config-recommended

View File

@ -50,7 +50,7 @@
{
"file": "src/node/heart.ts",
"line": 7,
"description": "code-server's heart beats to indicate recent activity.\n\nAlso documented here: [https://github.com/coder/code-server/blob/master/docs/FAQ.md#heartbeat-file](https://github.com/coder/code-server/blob/master/docs/FAQ.md#heartbeat-file)"
"description": "code-server's heart beats to indicate recent activity.\n\nAlso documented here: [https://github.com/coder/code-server/blob/main/docs/FAQ.md#heartbeat-file](https://github.com/coder/code-server/blob/main/docs/FAQ.md#heartbeat-file)"
},
{
"file": "src/node/socket.ts",
@ -80,12 +80,12 @@
{
"file": "src/node/routes/domainProxy.ts",
"line": 18,
"description": "code-server provides a built-in proxy to help in developing web-based applications. This is the code for the domain-based proxy.\n\nAlso documented here: [https://github.com/coder/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services](https://github.com/coder/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services)"
"description": "code-server provides a built-in proxy to help in developing web-based applications. This is the code for the domain-based proxy.\n\nAlso documented here: [https://github.com/coder/code-server/blob/main/docs/FAQ.md#how-do-i-securely-access-web-services](https://github.com/coder/code-server/blob/main/docs/FAQ.md#how-do-i-securely-access-web-services)"
},
{
"file": "src/node/routes/pathProxy.ts",
"line": 19,
"description": "Here is the path-based version of the proxy.\n\nAlso documented here: [https://github.com/coder/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services](https://github.com/coder/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services)"
"description": "Here is the path-based version of the proxy.\n\nAlso documented here: [https://github.com/coder/code-server/blob/main/docs/FAQ.md#how-do-i-securely-access-web-services](https://github.com/coder/code-server/blob/main/docs/FAQ.md#how-do-i-securely-access-web-services)"
},
{
"file": "src/node/proxy.ts",
@ -95,7 +95,7 @@
{
"file": "src/node/routes/health.ts",
"line": 5,
"description": "A simple endpoint that lets you see if code-server is up.\n\nAlso documented here: [https://github.com/coder/code-server/blob/master/docs/FAQ.md#healthz-endpoint](https://github.com/coder/code-server/blob/master/docs/FAQ.md#healthz-endpoint)"
"description": "A simple endpoint that lets you see if code-server is up.\n\nAlso documented here: [https://github.com/coder/code-server/blob/main/docs/FAQ.md#healthz-endpoint](https://github.com/coder/code-server/blob/main/docs/FAQ.md#healthz-endpoint)"
},
{
"file": "src/node/routes/login.ts",
@ -143,9 +143,9 @@
"description": "Static images and the manifest live here in `src/browser/media` (see the explorer)."
},
{
"directory": "vendor/modules/code-oss-dev",
"directory": "lib/vscode",
"line": 1,
"description": "code-server makes use of VS Code's frontend web/remote support. Most of the modifications implement the remote server since that portion of the code is closed source and not released with VS Code.\n\nWe also have a few bug fixes and have added some features (like client-side extensions). See [https://github.com/coder/code-server/blob/master/docs/CONTRIBUTING.md#modifications-to-vs-code](https://github.com/coder/code-server/blob/master/docs/CONTRIBUTING.md#modifications-to-vs-code) for a list.\n\nWe make an effort to keep the modifications as few as possible."
"description": "code-server makes use of VS Code's frontend web/remote support. Most of the modifications implement the remote server since that portion of the code is closed source and not released with VS Code.\n\nWe also have a few bug fixes and have added some features (like client-side extensions). See [https://github.com/coder/code-server/blob/main/docs/CONTRIBUTING.md#modifications-to-vs-code](https://github.com/coder/code-server/blob/main/docs/CONTRIBUTING.md#modifications-to-vs-code) for a list.\n\nWe make an effort to keep the modifications as few as possible."
}
]
}

View File

@ -5,7 +5,7 @@
{
"file": "package.json",
"line": 31,
"description": "## Commands\n\nTo start developing, make sure you have Node 14+ and the [required dependencies](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites) installed. Then, run the following commands:\n\n1. Install dependencies:\n>> yarn\n\n3. Start development mode (and watch for changes):\n>> yarn watch"
"description": "## Commands\n\nTo start developing, make sure you have Node 16+ and the [required dependencies](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites) installed. Then, run the following commands:\n\n1. Install dependencies:\n>> yarn\n\n3. Start development mode (and watch for changes):\n>> yarn watch"
},
{
"file": "src/node/app.ts",
@ -20,7 +20,7 @@
{
"file": "src/node/app.ts",
"line": 62,
"description": "## That's it!\n\n\nThat's all there is to it! When this tour ends, your terminal session may stop, but just use `yarn watch` to start developing from here on out!\n\n\nIf you haven't already, be sure to check out these resources:\n- [Tour: Contributing](command:codetour.startTourByTitle?[\"Contributing\")\n- [Docs: FAQ.md](https://github.com/coder/code-server/blob/master/docs/FAQ.md)\n- [Docs: CONTRIBUTING.md](https://github.com/coder/code-server/blob/master/docs/CONTRIBUTING.md)\n- [Community: GitHub Discussions](https://github.com/coder/code-server/discussions)\n- [Community: Slack](https://community.coder.com)"
"description": "## That's it!\n\n\nThat's all there is to it! When this tour ends, your terminal session may stop, but just use `yarn watch` to start developing from here on out!\n\n\nIf you haven't already, be sure to check out these resources:\n- [Tour: Contributing](command:codetour.startTourByTitle?[\"Contributing\"])\n- [Docs: FAQ.md](https://github.com/coder/code-server/blob/main/docs/FAQ.md)\n- [Docs: CONTRIBUTING.md](https://github.com/coder/code-server/blob/main/docs/CONTRIBUTING.md)\n- [Community: GitHub Discussions](https://github.com/coder/code-server/discussions)\n- [Community: Slack](https://community.coder.com)"
}
]
}

47
.woodpecker/ci.yml Normal file
View File

@ -0,0 +1,47 @@
labels:
realm: lab
when:
- event: [push, tag, manual, pull_request]
steps:
build:
#image: node:lts
image: node:18.20.2
commands:
- |
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
apt-get update
apt-get install -y nfpm
apt-get install -y build-essential \
ca-certificates \
curl \
dbus \
g++ \
gettext\
git \
gnupg \
jq \
libgbm1 \
libgtk-3-0 \
libkrb5-dev \
libsecret-1-dev \
libx11-dev \
libxkbfile-dev \
libxss1 \
pkg-config \
python-is-python3 \
python3 \
rsync \
xvfb
- yarn install
- yarn build
- export VERSION='0.0.0' && yarn build:vscode
- yarn release
- yarn release:standalone
- yarn package
- ls -la
- ls -la release/*
- ls -la release-standalone/*
- ls -la release-packages/*
- ls -la out/*

View File

@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [9.99.999] - 9090-09-09
VS Code v99.99.999
Code v99.99.999
### Changed
### Added
@ -20,17 +20,741 @@ VS Code v99.99.999
-->
## [Unreleased](https://github.com/coder/code-server/releases)
## Unreleased
VS Code v0.00.0
## [4.91.0](https://github.com/coder/code-server/releases/tag/v4.91.0) - 2024-07-10
Code v1.91.0
### Changed
- Add here
- Updated to Code 1.91.0.
## [4.90.3](https://github.com/coder/code-server/releases/tag/v4.90.3) - 2024-06-21
Code v1.90.2
### Changed
- Updated to Code 1.90.2.
### Fixed
- When the log gets rotated it will no longer incorrectly be moved to a new
directory created in the current working directory named with a date.
Instead, the file itself is prepended with the date and kept in the same
directory, as originally intended.
## [4.90.2](https://github.com/coder/code-server/releases/tag/v4.90.2) - 2024-06-14
Code v1.90.1
### Changed
- Updated to Code 1.90.1.
## [4.90.1](https://github.com/coder/code-server/releases/tag/v4.90.1) - 2024-06-12
Code v1.90.0
### Fixed
- Cache a call to get CPU information used in telemetry that could result in a
lack responsiveness if it was particularly slow.
## [4.90.0](https://github.com/coder/code-server/releases/tag/v4.90.0) - 2024-06-11
Code v1.90.0
### Changed
- Updated to Code 1.90.0.
- Updated Node to 20.11.1.
### Added
- Send contents to the clipboard in the integrated terminal by piping to
`code-server --stdin-to-clipboard` or `code-server -c`.
You may want to make this an alias:
```
alias xclip="code-server --stdin-to-clipboard"
echo -n "hello world" | xclip
```
## [4.89.1](https://github.com/coder/code-server/releases/tag/v4.89.1) - 2024-04-14
Code v1.89.1
### Changed
- Updated to Code 1.89.1.
## [4.89.0](https://github.com/coder/code-server/releases/tag/v4.89.0) - 2024-04-08
Code v1.89.0
### Changed
- Updated to Code 1.89.0.
## [4.23.1](https://github.com/coder/code-server/releases/tag/v4.23.1) - 2024-04-15
Code v1.88.1
### Changed
- Updated to Code 1.88.1.
## [4.23.0](https://github.com/coder/code-server/releases/tag/v4.23.0) - 2024-04-08
Code v1.88.0
### Changed
- Updated to Code 1.88.0.
- Updated Node to 18.18.2.
### Fixed
- Fix masking the exit code when failing to install extensions on the command
line outside the integrated terminal. Installing extensions inside the
integrated terminal still masks the exit code and is an upstream bug.
## [4.22.1](https://github.com/coder/code-server/releases/tag/v4.22.1) - 2024-03-14
Code v1.87.2
### Changed
- Updated to Code 1.87.2.
- Enable keep-alive for proxy agent.
## [4.22.0](https://github.com/coder/code-server/releases/tag/v4.22.0) - 2024-03-03
Code v1.87.0
### Changed
- Updated to Code 1.87.0.
## [4.21.2](https://github.com/coder/code-server/releases/tag/v4.21.2) - 2024-02-28
Code v1.86.2
### Changed
- Updated to Code 1.86.2.
## [4.21.1](https://github.com/coder/code-server/releases/tag/v4.21.1) - 2024-02-09
Code v1.86.1
### Changed
- Updated to Code 1.86.1.
- Updated to Node 18.17.1.
### Added
- Docker images for Fedora and openSUSE.
## [4.21.0](https://github.com/coder/code-server/releases/tag/v4.21.0) - 2024-02-05
Code v1.86.0
### Changed
- Updated to Code 1.86.0.
## [4.20.1](https://github.com/coder/code-server/releases/tag/v4.20.1) - 2024-01-22
Code v1.85.2
### Changed
- Updated to Code 1.85.2.
### Fixed
- Query variables are no longer double-encoded when going over the path proxy.
## [4.20.0](https://github.com/coder/code-server/releases/tag/v4.20.0) - 2023-12-21
Code v1.85.1
### Added
- New flag `--disable-file-uploads` to disable uploading files to the remote by
drag and drop and to disable opening local files via the "show local" button
in the file open prompt. Note that you can still open local files by drag and
dropping the file onto the editor pane.
- Added `wget` to the release image.
### Changed
- Updated to Code 1.85.1.
- The `--disable-file-downloads` flag will now disable the "show local" button
in the file save prompt as well.
- Debian release image updated to use Bookworm.
## [4.19.1](https://github.com/coder/code-server/releases/tag/v4.19.1) - 2023-11-29
Code v1.84.2
### Fixed
- Fixed an issue where parts of the editor would not load (like the file
explorer, source control, etc) when using a workspace file.
## [4.19.0](https://github.com/coder/code-server/releases/tag/v4.19.0) - 2023-11-18
Code v1.84.2
### Changed
- Updated to Code 1.84.2.
## [4.18.0](https://github.com/coder/code-server/releases/tag/v4.18.0) - 2023-10-20
Code v1.83.1
### Changed
- Updated to Code 1.83.1.
## [4.17.1](https://github.com/coder/code-server/releases/tag/v4.17.1) - 2023-09-29
Code v1.82.2
### Fixed
- Make secret storage persistent. For example, logging in with GitHub should
persist between browser refreshes and code-server restarts.
- Issues with argon2 on arm builds should be fixed now.
## [4.17.0](https://github.com/coder/code-server/releases/tag/v4.17.0) - 2023-09-22
Code v1.82.2
### Added
- Japanese locale.
- `CODE_SERVER_HOST` environment variable.
### Changed
- Update to Code 1.82.2. This includes an update to Node 18, which also means
that the minimum glibc is now 2.28. If you need to maintain a lower glibc then
you can take a version of Node 18 that is compiled with a lower glibc and use
that to build code-server (or at a minimum rebuild the native modules).
- Display paths to config files in full rather than abbreviated. If you have
trouble with the password not working please update and make sure the
displayed config paths are what you expect.
### Fixed
- Fix some dependency issues for the standalone arm64 and armv7l releases. If
you had issues with missing or failing modules please try these new builds.
## [4.16.1](https://github.com/coder/code-server/releases/tag/v4.16.1) - 2023-07-31
Code v1.80.2
### Changed
- Updated to Code 1.80.2.
## [4.16.0](https://github.com/coder/code-server/releases/tag/v4.16.0) - 2023-07-28
Code v1.80.1
### Added
- `--disable-proxy` flag. This disables the domain and path proxies but it does
not disable the ports panel in Code. That can be disabled by using
`remote.autoForwardPorts=false` in your settings.
## [4.15.0](https://github.com/coder/code-server/releases/tag/v4.15.0) - 2023-07-21
Code v1.80.1
### Changed
- Updated to Code 1.80.1.
### Added
- `--trusted-origin` flag for specifying origins that you trust but do not
control (for example a reverse proxy).
Code v1.79.2
## [4.14.1](https://github.com/coder/code-server/releases/tag/v4.14.1) - 2023-06-26
Code v1.79.2
### Security
- Remove extra write permissions on the Node binary bundled with the linux-amd64
tarball. If you extract the tar without a umask this could mean the Node
binary would be unexpectedly writable.
### Fixed
- Inability to launch multiple instances of code-server for different users.
### Added
- `--session-socket` CLI flag to configure the location of the session socket.
By default it will be placed in `<user data dir>/code-server-ipc.sock`.
## [4.14.0](https://github.com/coder/code-server/releases/tag/v4.14.0) - 2023-06-16
Code v1.79.2
### Added
- `--domain-proxy` now supports `{{port}}` and `{{host}}` template variables.
### Changed
- Updated to Code 1.79.2
- Files opened from an external terminal will now open in the most closely
related window rather than in the last opened window.
## [4.13.0](https://github.com/coder/code-server/releases/tag/v4.13.0) - 2023-05-19
Code v1.78.2
### Changed
- Updated to Code 1.78.2.
### Fixed
- Proxying files that contain non-ASCII characters.
- Origin check when X-Forwarded-Host contains comma-separated hosts.
## [4.12.0](https://github.com/coder/code-server/releases/tag/v4.12.0) - 2023-04-21
Code v1.77.3
### Changed
- Updated to Code 1.77.3
- Ports panel will use domain-based proxy (instead of the default path-based
proxy) when set via --proxy-domain.
- Apply --app-name to the PWA title.
### Added
- Thai translation for login page.
- Debug logs around the origin security check. If you are getting forbidden
errors on web sockets please run code-server with `--log debug` to see why the
requests are being blocked.
## [4.11.0](https://github.com/coder/code-server/releases/tag/v4.11.0) - 2023-03-16
Code v1.76.1
### Changed
- Updated to Code 1.76.1
## [4.10.1](https://github.com/coder/code-server/releases/tag/v4.10.1) - 2023-03-04
Code v1.75.1
### Security
Added an origin check to web sockets to prevent cross-site hijacking attacks on
users using older or niche browser that do not support SameSite cookies and
attacks across sub-domains that share the same root domain.
The check requires the host header to be set so if you use a reverse proxy
ensure it forwards that information otherwise web sockets will be blocked.
## [4.10.0](https://github.com/coder/code-server/releases/tag/v4.10.0) - 2023-02-15
Code v1.75.1
### Changed
- Updated to Code 1.75.1
### Removed
- Removed `--link` (was deprecated over thirteen months ago in 4.0.1).
## [4.9.1](https://github.com/coder/code-server/releases/tag/v4.9.1) - 2022-12-15
Code v1.73.1
### Changed
- Updated a couple steps in the build and release process to ensure we're using
`npm` and `yarn` consistently depending on the step.
### Fixed
- Fixed an issue with code-server version not displaying in the Help > About window.
- Fixed terminal not loading on macOS clients.
## [4.9.0](https://github.com/coder/code-server/releases/tag/v4.9.0) - 2022-12-06
Code v1.73.1
### Changed
- Upgraded to Code 1.73.1
### Added
- `/security.txt` added as a route with info on our security policy information thanks to @ghuntley
### Fixed
- Installing on majaro images should now work thanks to @MrPeacockNLB for
adding the `--noconfirm` flag in `install.sh`
### Known Issues
- `--cert` on Ubuntu 22.04: OpenSSL v3 is used which breaks `pem` meaning the
`--cert` feature will not work. [Reference](https://github.com/adobe/fetch/pull/318#issuecomment-1306070259)
## [4.8.3](https://github.com/coder/code-server/releases/tag/v4.8.3) - 2022-11-07
Code v1.72.1
### Added
- install script now supports arch-like (i.e. manjaro, endeavourous, etc.)
architectures
### Changed
- Updated text in the Getting Started page.
## [4.8.2](https://github.com/coder/code-server/releases/tag/v4.8.2) - 2022-11-02
Code v1.72.1
### Added
- New text in the Getting Started page with info about
`coder/coder`. This is enabled by default but can be disabled by passing the CLI
flag `--disable-getting-started-override` or setting
`CS_DISABLE_GETTING_STARTED_OVERRIDE=1` or
`CS_DISABLE_GETTING_STARTED_OVERRIDE=true`.
## [4.8.1](https://github.com/coder/code-server/releases/tag/v4.8.1) - 2022-10-28
Code v1.72.1
### Fixed
- Fixed CSP error introduced in 4.8.0 that caused issues with webviews and most
extensions.
## [4.8.0](https://github.com/coder/code-server/releases/tag/v4.8.0) - 2022-10-24
Code v1.72.1
### Added
- Support for the Ports panel which leverages code-server's built-in proxy. It
also uses `VSCODE_PROXY_URI` where `{{port}}` is replace when forwarding a port.
Example: `VSCODE_PROXY_URI=https://{{port}}.kyle.dev` would forward an
application running on localhost:3000 to https://3000.kyle.dev
- Support for `--disable-workspace-trust` CLI flag
- Support for `--goto` flag to open file @ line:column
- Added Ubuntu-based images for Docker releases. If you run into issues with
`PATH` being overwritten in Docker please try the Ubuntu image as this is a
problem in the Debian base image.
### Changed
- Updated Code to 1.72.1
### Fixed
- Enabled `BROWSER` environment variable
- Patched `asExternalUri` to work so now extensions run inside code-server can use it
## [4.7.1](https://github.com/coder/code-server/releases/tag/v4.7.1) - 2022-09-30
Code v1.71.2
### Changed
- Updated Code to 1.71.2
### Fixed
- Fixed install script not upgrading code-server when already installed on RPM-based machines
- Fixed install script failing to gain root permissions on FreeBSD
## [4.7.0](https://github.com/coder/code-server/releases/tag/v4.7.0) - 2022-09-09
Code v1.71.0
### Changed
- Updated Code to 1.71.0
### Removed
- Dropped heartbeat patch because it was implemented upstream
### Fixed
- Add flags --unsafe-perm --legacy-peer-deps in `npm-postinstall.sh` which ensures installing with npm works correctly
## [4.6.1](https://github.com/coder/code-server/releases/tag/v4.6.1) - 2022-09-31
Code v1.70.2
### Changed
- Updated Code to 1.70.2
- Updated `argon2` to 0.29.0 which should fix issues on FreeBSD
- Updated docs to suggest using `npm` instead of `yarn`
### Removed
- Dropped database migration patch affected to 4.0.2 versions and earlier.
### Fixed
- Fixed preservation of `process.execArgv` which means you can pass `--prof` to profile code-server
## [4.6.0](https://github.com/coder/code-server/releases/tag/v4.6.0) - 2022-08-17
Code v1.70.1
### Changed
- Updated Code to 1.70.1.
### Added
- Added a heartbeat to sockets. This should prevent them from getting closed by
reverse proxy timeouts when idle like NGINX's default 60-second timeout.
### Fixed
- Fixed logout option appearing even when authentication is disabled.
## [4.5.2](https://github.com/coder/code-server/releases/tag/v4.5.2) - 2022-08-15
Code v1.68.1
### Security
- Fixed the proxy route not performing authentication. For example if you were
to run a development HTTP server using `python -m http.server 8000` then it
would be accessible at `my.domain/proxy/8000/` without any authentication.
If all of the following apply to you please update as soon as possible:
- You run code-server with the built-in password authentication.
- You run unprotected HTTP services on ports accessible by code-server.
### Changed
- Invoking `code-server` in the integrated terminal will now use the script that
comes with upstream Code. This means flags like `--wait` will be
automatically supported now. However the upstream script only has the ability
to interact with the running code-server and cannot spawn new instances. If
you need to spawn a new code-server from the integrated terminal please
specify the full path to code-server's usual script (for example
`/usr/bin/code-server`).
### Fixed
- Invoking `code-server` in the integrated terminal will now work instead of
erroring about not finding Node.
## [4.5.1](https://github.com/coder/code-server/releases/tag/v4.5.1) - 2022-07-18
Code v1.68.1
### Changed
- We now use `release/v<0.0.0>` for the release branch name so it doesn't
conflict with the tag name
- Added `.prettierignore` to ignore formatting files in `lib/vscode`
### Added
- Allow more comprehensive affinity config in Helm chart
- Added custom message in Homebrew PR to make sure code-server maintainers are
tagged
- Allow setting `priorityClassName` via Helm chart
- Added troubleshooting docs to `CONTRIBUTING.md`
### Fixed
- Removed default memory limit which was set via `NODE_OPTIONS`
- Changed output in pipe to make it easier to debug code-server when doing live
edits
- Fixed display-language patch to use correct path which broke in 4.5.0
- Fixed multiple code-server windows opening when using the code-server CLI in
the Integrated Terminal
- Fixed Integrated Terminal not working when web base was not the root path
### Security
- Updated `glob-parent` version in dependencies
## [4.5.0](https://github.com/coder/code-server/releases/tag/v4.5.0) - 2022-06-29
Code v1.68.1
### Changed
- Updated codecov to use codecov uploader
- Moved integration tests to Jest
- Fixed docker release to only download .deb
- Upgraded to Code 1.68.1
- Install `nfpm` from GitHub
- Upgraded to TypeScript 4.6
### Added
- Added tests for `open`, `isWsl`, `handlePasswordValidation`
- Provided alternate image registry to dockerhub
- Allowed users to have scripts run on container with `ENTRYPOINTD` environment
variable
### Fixed
- Fixed open CLI command to work on macOS
## [4.4.0](https://github.com/coder/code-server/releases/tag/v4.4.0) - 2022-05-06
Code v1.66.2
### Changed
- Refactored methods in `Heart` class and made `Heart.beat()` async to make
testing easier.
- Upgraded to Code 1.66.2.
### Added
- Added back telemetry patch which was removed in the Code reachitecture.
- Added support to use `true` for `CS_DISABLE_FILE_DOWNLOADS` environment
variable. This means you can disable file downloads by setting
`CS_DISABLE_FILE_DOWNLOADS` to `true` or `1`.
- Added tests for `Heart` class.
### Fixed
- Fixed installation issue in AUR after LICENSE rename.
- Fixed issue with listening on IPv6 addresses.
- Fixed issue with Docker publish action not being able to find artifacts. Now
it downloads the release assets from the release.
## [4.3.0](https://github.com/coder/code-server/releases/tag/v4.3.0) - 2022-04-14
Code v1.65.2
### Changed
- Excluded .deb files from release Docker image which drops the compressed and
uncompressed size by 58% and 34%.
- Upgraded to Code 1.65.2.
### Added
- Added a new CLI flag called `--disable-file-downloads` which allows you to
disable the "Download..." option that shows in the UI when right-clicking on a
file. This can also set by running `CS_DISABLE_FILE_DOWNLOADS=1`.
- Aligned the dependencies for binary and npm release artifacts.
### Fixed
- Fixed the code-server version from not displaying in the Help > About dialog.
- Fixed issues with the TypeScript and JavaScript Language Features Extension
failing to activate.
- Fixed missing files in ipynb extension.
- Fixed the homebrew release workflow.
- Fixed the Docker release workflow from not always publishing version tags.
## [4.2.0](https://github.com/coder/code-server/releases/tag/v4.2.0) - 2022-03-22
Code v1.64.2
### Added
- Added tests for `handleArgsSocketCatchError`, `setDefaults` and
`optionDescriptions`.
### Changed
- We switched from using the fork `coder/vscode` to a submodule of
`microsoft/vscode` + patches managed by `quilt` for how Code sits inside the
code-server codebase.
- Upgraded to Code 1.64.2.
### Fixed
- Update popup notification through `--disable-update-check` is now fixed.
- Fixed PWA icons not loading on iPad
- Fixed the homebrew release process. Our `cdrci` bot should now automatically
update the version as part of the release pipeline.
- Fixed titleBar color setting being ignored in PWA.
### Security
- Updated to `minimist-list`.
- Updated `cloud-agent` to `v0.2.4` which uses `nhooyr.io/webscoket` `v1.8.7`.
## [4.1.0](https://github.com/coder/code-server/releases/tag/v4.1.0) - 2022-03-03
Code v1.63.0
### Added
- Support for injecting GitHub token into Code so extensions can make use of it.
This can be done with the `GITHUB_TOKEN` environment variable or `github-auth`
in the config file.
- New flag `--socket-mode` allows setting the mode (file permissions) of the
socket created when using `--socket`.
- The version of Code bundled with code-server now appears when using the
`--version` flag. For example: `4.0.2 5cdfe74686aa73e023f8354a9a6014eb30caa7dd with Code 1.63.0`.
If you have been parsing this flag for the version you might want to use
`--version --json` instead as doing that will be more stable.
### Changed
- The workspace or folder passed on the CLI will now use the same redirect
method that the last opened workspace or folder uses. This means if you use
something like `code-server /path/to/dir` you will now get a query parameter
added (like so: `my-domain.tld?folder=/path/to/dir`), making it easier to edit
by hand and making it consistent with the last opened and menu open behaviors.
- The folder/workspace query parameter no longer has encoded slashes, making
them more readable and editable by hand. This was only affecting the last
opened behavior, not opens from the menu.
### Fixed
- Fix web sockets not connecting when using `--cert`.
- Prevent workspace state collisions when opening a workspace that shares the
same file path with another workspace on a different machine that shares the
same domain. This was causing files opened in one workspace to be "re-"opened
in the other workspace when the other workspace is opened.
- Pin the Express version which should make installing from npm work again.
- Propagate signals to code-server in the Docker image which means it should
stop more quickly and gracefully.
- Fix missing argon binaries in the standalone releases on arm machines.
## [4.0.2](https://github.com/coder/code-server/releases/tag/v4.0.2) - 2022-01-27
VS Code v1.63.0
Code v1.63.0
### Fixed
@ -41,7 +765,7 @@ VS Code v1.63.0
## [4.0.1](https://github.com/coder/code-server/releases/tag/v4.0.1) - 2022-01-04
VS Code v1.63.0
Code v1.63.0
code-server has been rebased on upstream's newly open-sourced server
implementation (#4414).
@ -57,7 +781,7 @@ implementation (#4414).
settings file (we rely on the already-existing query object instead).
- The marketplace override environment variables `SERVICE_URL` and `ITEM_URL`
have been replaced with a single `EXTENSIONS_GALLERY` variable that
corresponds to `extensionsGallery` in VS Code's `product.json`.
corresponds to `extensionsGallery` in Code's `product.json`.
### Added
@ -79,11 +803,11 @@ implementation (#4414).
## [3.12.0](https://github.com/coder/code-server/releases/tag/v3.12.0) - 2021-09-15
VS Code v1.60.0
Code v1.60.0
### Changed
- Upgrade VS Code to 1.60.0.
- Upgrade Code to 1.60.0.
### Fixed
@ -99,7 +823,7 @@ Undocumented (see releases page).
## [3.10.2](https://github.com/coder/code-server/releases/tag/v3.10.2) - 2021-05-21
VS Code v1.56.1
Code v1.56.1
### Added
@ -115,7 +839,7 @@ VS Code v1.56.1
## [3.10.1](https://github.com/coder/code-server/releases/tag/v3.10.1) - 2021-05-17
VS Code v1.56.1
Code v1.56.1
### Fixed
@ -129,13 +853,13 @@ VS Code v1.56.1
## [3.10.0](https://github.com/coder/code-server/releases/tag/v3.10.0) - 2021-05-10
VS Code v1.56.0
Code v1.56.0
### Changed
- Update to VS Code 1.56.0 (#3269).
- Update to Code 1.56.0 (#3269).
- Minor connections refactor (#3178). Improves connection stability.
- Use ptyHostService (#3308). This brings us closer to upstream VS Code.
- Use ptyHostService (#3308). This brings us closer to upstream Code.
### Added

15
ci/Caddyfile Normal file
View File

@ -0,0 +1,15 @@
{
admin localhost:4444
}
:8000 {
@portLocalhost path_regexp port ^/([0-9]+)\/ide
handle @portLocalhost {
uri strip_prefix {re.port.1}/ide
reverse_proxy localhost:{re.port.1}
}
handle {
respond "Bad hostname" 400
}
}

View File

@ -24,12 +24,10 @@ This directory contains scripts used for the development of code-server.
- Runs unit tests.
- [./ci/dev/test-e2e.sh](./dev/test-e2e.sh) (`yarn test:e2e`)
- Runs end-to-end tests.
- [./ci/dev/ci.sh](./dev/ci.sh) (`yarn ci`)
- Runs `yarn fmt`, `yarn lint` and `yarn test`.
- [./ci/dev/watch.ts](./dev/watch.ts) (`yarn watch`)
- Starts a process to build and launch code-server and restart on any code changes.
- Example usage in [./docs/CONTRIBUTING.md](../docs/CONTRIBUTING.md).
- [./ci/dev/gen_icons.sh](./ci/dev/gen_icons.sh) (`yarn icons`)
- [./ci/dev/gen_icons.sh](./dev/gen_icons.sh) (`yarn icons`)
- Generates the various icons from a single `.svg` favicon in
`src/browser/media/favicon.svg`.
- Requires [imagemagick](https://imagemagick.org/index.php)
@ -45,9 +43,6 @@ You can disable minification by setting `MINIFY=`.
- Builds vscode into `./lib/vscode/out-vscode`.
- [./ci/build/build-release.sh](./build/build-release.sh) (`yarn release`)
- Bundles the output of the above two scripts into a single node module at `./release`.
- [./ci/build/build-standalone-release.sh](./build/build-standalone-release.sh) (`yarn release:standalone`)
- Requires a node module already built into `./release` with the above script.
- Will build a standalone release with node and node_modules bundled into `./release-standalone`.
- [./ci/build/clean.sh](./build/clean.sh) (`yarn clean`)
- Removes all build artifacts.
- Useful to do a clean build.
@ -78,7 +73,7 @@ You can disable minification by setting `MINIFY=`.
This directory contains the release docker container image.
- [./ci/steps/build-docker-buildx-push.sh](./ci/steps/docker-buildx-push.sh)
- [./ci/steps/build-docker-buildx-push.sh](./steps/docker-buildx-push.sh)
- Builds the release containers with tags `codercom/code-server-$ARCH:$VERSION` for amd64 and arm64 with `docker buildx` and pushes them.
- Assumes debian releases are ready in `./release-packages`.
@ -97,6 +92,8 @@ Helps avoid clobbering the CI configuration.
- Runs `yarn lint`.
- [./steps/test-unit.sh](./steps/test-unit.sh)
- Runs `yarn test:unit`.
- [./steps/test-integration.sh](./steps/test-integration.sh)
- Runs `yarn test:integration`.
- [./steps/test-e2e.sh](./steps/test-e2e.sh)
- Runs `yarn test:e2e`.
- [./steps/release.sh](./steps/release.sh)

View File

@ -14,22 +14,6 @@ main() {
sed -i.bak "1s;^;#!/usr/bin/env node\n;" out/node/entry.js && rm out/node/entry.js.bak
chmod +x out/node/entry.js
fi
# for arch; we do not use OS from lib.sh and get our own.
# lib.sh normalizes macos to darwin - but cloud-agent's binaries do not
source ./ci/lib.sh
OS="$(uname | tr '[:upper:]' '[:lower:]')"
mkdir -p ./lib
if ! [ -f ./lib/coder-cloud-agent ]; then
echo "Downloading the cloud agent..."
set +e
curl -fsSL "https://github.com/coder/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent
chmod +x ./lib/coder-cloud-agent
set -e
fi
}
main "$@"

View File

@ -27,7 +27,7 @@ main() {
release_archive() {
local release_name="code-server-$VERSION-$OS-$ARCH"
if [[ $OS == "linux" ]]; then
tar -czf "release-packages/$release_name.tar.gz" --transform "s/^\.\/release-standalone/$release_name/" ./release-standalone
tar -czf "release-packages/$release_name.tar.gz" --owner=0 --group=0 --transform "s/^\.\/release-standalone/$release_name/" ./release-standalone
else
tar -czf "release-packages/$release_name.tar.gz" -s "/^release-standalone/$release_name/" release-standalone
fi

View File

@ -15,8 +15,10 @@ main() {
source ./ci/lib.sh
VSCODE_SRC_PATH="vendor/modules/code-oss-dev"
VSCODE_OUT_PATH="$RELEASE_PATH/vendor/modules/code-oss-dev"
VSCODE_SRC_PATH="lib/vscode"
VSCODE_OUT_PATH="$RELEASE_PATH/lib/vscode"
create_shrinkwraps
mkdir -p "$RELEASE_PATH"
@ -24,8 +26,8 @@ main() {
bundle_vscode
rsync ./docs/README.md "$RELEASE_PATH"
rsync LICENSE.txt "$RELEASE_PATH"
rsync ./vendor/modules/code-oss-dev/ThirdPartyNotices.txt "$RELEASE_PATH"
rsync LICENSE "$RELEASE_PATH"
rsync ./lib/vscode/ThirdPartyNotices.txt "$RELEASE_PATH"
}
bundle_code_server() {
@ -54,63 +56,81 @@ bundle_code_server() {
}
EOF
) > "$RELEASE_PATH/package.json"
rsync yarn.lock "$RELEASE_PATH"
mv npm-shrinkwrap.json "$RELEASE_PATH"
rsync ci/build/npm-postinstall.sh "$RELEASE_PATH/postinstall.sh"
if [ "$KEEP_MODULES" = 1 ]; then
rsync node_modules/ "$RELEASE_PATH/node_modules"
mkdir -p "$RELEASE_PATH/lib"
rsync ./lib/coder-cloud-agent "$RELEASE_PATH/lib"
fi
}
bundle_vscode() {
mkdir -p "$VSCODE_OUT_PATH"
rsync "$VSCODE_SRC_PATH/yarn.lock" "$VSCODE_OUT_PATH"
rsync "$VSCODE_SRC_PATH/out-vscode-reh-web${MINIFY:+-min}/" "$VSCODE_OUT_PATH/out"
rsync "$VSCODE_SRC_PATH/.build/extensions/" "$VSCODE_OUT_PATH/extensions"
if [ "$KEEP_MODULES" = 0 ]; then
rm -Rf "$VSCODE_OUT_PATH/extensions/node_modules"
else
rsync "$VSCODE_SRC_PATH/node_modules/" "$VSCODE_OUT_PATH/node_modules"
local rsync_opts=()
if [[ ${DEBUG-} = 1 ]]; then
rsync_opts+=(-vh)
fi
rsync "$VSCODE_SRC_PATH/extensions/package.json" "$VSCODE_OUT_PATH/extensions"
rsync "$VSCODE_SRC_PATH/extensions/yarn.lock" "$VSCODE_OUT_PATH/extensions"
rsync "$VSCODE_SRC_PATH/extensions/postinstall.js" "$VSCODE_OUT_PATH/extensions"
mkdir -p "$VSCODE_OUT_PATH/resources/"
rsync "$VSCODE_SRC_PATH/resources/" "$VSCODE_OUT_PATH/resources/"
# Some extensions have a .gitignore which excludes their built source from the
# npm package so exclude any .gitignore files.
rsync_opts+=(--exclude .gitignore)
# TODO: We should look into using VS Code's packaging task (see
# gulpfile.reh.js). For now copy this directory into the right spot (for some
# reason VS Code uses a different path in production).
mkdir -p "$VSCODE_OUT_PATH/bin/helpers"
rsync "$VSCODE_SRC_PATH/resources/server/bin/helpers/" "$VSCODE_OUT_PATH/bin/helpers"
chmod +x "$VSCODE_OUT_PATH/bin/helpers/browser.sh"
# Exclude Node as we will add it ourselves for the standalone and will not
# need it for the npm package.
rsync_opts+=(--exclude /node)
# Add the commit and date and enable telemetry. This just makes telemetry
# available; telemetry can still be disabled by flag or setting.
jq --slurp '.[0] * .[1]' "$VSCODE_SRC_PATH/product.json" <(
cat << EOF
{
"enableTelemetry": true,
"commit": "$(cd "$VSCODE_SRC_PATH" && git rev-parse HEAD)",
"quality": "stable",
"date": $(jq -n 'now | todate'),
"codeServerVersion": "$VERSION"
}
EOF
) > "$VSCODE_OUT_PATH/product.json"
# Exclude Node modules.
if [[ $KEEP_MODULES = 0 ]]; then
rsync_opts+=(--exclude node_modules)
fi
# We remove the scripts field so that later on we can run
# yarn to fetch node_modules if necessary without build scripts running.
# We cannot use --no-scripts because we still want dependent package scripts to run.
jq 'del(.scripts)' < "$VSCODE_SRC_PATH/package.json" > "$VSCODE_OUT_PATH/package.json"
rsync "${rsync_opts[@]}" ./lib/vscode-reh-web-*/ "$VSCODE_OUT_PATH"
pushd "$VSCODE_OUT_PATH"
symlink_asar
# Use the package.json for the web/remote server. It does not have the right
# version though so pull that from the main package.json.
jq --slurp '.[0] * {version: .[1].version}' \
"$VSCODE_SRC_PATH/remote/package.json" \
"$VSCODE_SRC_PATH/package.json" > "$VSCODE_OUT_PATH/package.json"
mv "$VSCODE_SRC_PATH/remote/npm-shrinkwrap.json" "$VSCODE_OUT_PATH/npm-shrinkwrap.json"
# Include global extension dependencies as well.
rsync "$VSCODE_SRC_PATH/extensions/package.json" "$VSCODE_OUT_PATH/extensions/package.json"
mv "$VSCODE_SRC_PATH/extensions/npm-shrinkwrap.json" "$VSCODE_OUT_PATH/extensions/npm-shrinkwrap.json"
rsync "$VSCODE_SRC_PATH/extensions/postinstall.mjs" "$VSCODE_OUT_PATH/extensions/postinstall.mjs"
}
create_shrinkwraps() {
# yarn.lock or package-lock.json files (used to ensure deterministic versions of dependencies) are
# not packaged when publishing to the NPM registry.
# To ensure deterministic dependency versions (even when code-server is installed with NPM), we create
# an npm-shrinkwrap.json file from the currently installed node_modules. This ensures the versions used
# from development (that the yarn.lock guarantees) are also the ones installed by end-users.
# These will include devDependencies, but those will be ignored when installing globally (for code-server), and
# because we use --omit=dev when installing vscode.
# We first generate the shrinkwrap file for code-server itself - which is the current directory
create_shrinkwrap_keeping_yarn_lock
# Then the shrinkwrap files for the bundled VSCode
pushd "$VSCODE_SRC_PATH/remote/"
create_shrinkwrap_keeping_yarn_lock
popd
pushd "$VSCODE_SRC_PATH/extensions/"
create_shrinkwrap_keeping_yarn_lock
popd
}
create_shrinkwrap_keeping_yarn_lock() {
# HACK@edvincent: Generating a shrinkwrap alters the yarn.lock which we don't want (with NPM URLs rather than the Yarn URLs)
# But to generate a valid shrinkwrap, it has to exist... So we copy it to then restore it
cp yarn.lock yarn.lock.temp
npm shrinkwrap
cp yarn.lock.temp yarn.lock
rm yarn.lock.temp
}
main "$@"

View File

@ -1,10 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
# This is due to an upstream issue with RHEL7/CentOS 7 comptability with node-argon2
# See: https://github.com/cdr/code-server/pull/3422#pullrequestreview-677765057
export npm_config_build_from_source=true
main() {
cd "$(dirname "${0}")/../.."
@ -13,28 +9,26 @@ main() {
rsync "$RELEASE_PATH/" "$RELEASE_PATH-standalone"
RELEASE_PATH+=-standalone
# We cannot find the path to node from $PATH because yarn shims a script to ensure
# we use the same version it's using so we instead run a script with yarn that
# will print the path to node.
# We cannot get the path to Node from $PATH (for example via `which node`)
# because Yarn shims a script called `node` and we would end up just copying
# that script. Instead we run Node and have it print its actual path.
local node_path
node_path="$(yarn -s node <<< 'console.info(process.execPath)')"
node_path="$(node <<< 'console.info(process.execPath)')"
mkdir -p "$RELEASE_PATH/bin"
mkdir -p "$RELEASE_PATH/lib"
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"
rsync "$node_path" "$RELEASE_PATH/lib/node"
ln -s "./bin/code-server" "$RELEASE_PATH/code-server"
ln -s "./lib/node" "$RELEASE_PATH/node"
chmod 755 "$RELEASE_PATH/lib/node"
cd "$RELEASE_PATH"
yarn --production --frozen-lockfile
# HACK: the version of Typescript vscode 1.57 uses in extensions/
# leaves a few stray symlinks. Clean them up so nfpm does not fail.
# Remove this line when its no longer needed.
rm -fr "$RELEASE_PATH/vendor/modules/code-oss-dev/extensions/node_modules/.bin"
pushd "$RELEASE_PATH"
npm install --unsafe-perm --omit=dev
# Code deletes some files from the extension node_modules directory which
# leaves broken symlinks in the corresponding .bin directory. nfpm will fail
# on these broken symlinks so clean them up.
rm -fr "./lib/vscode/extensions/node_modules/.bin"
popd
}
main "$@"

View File

@ -1,18 +1,147 @@
#!/usr/bin/env bash
set -euo pipefail
# Builds vscode into vendor/modules/code-oss-dev/out-vscode.
# Builds vscode into lib/vscode/out-vscode.
# MINIFY controls whether a minified version of vscode is built.
MINIFY=${MINIFY-true}
delete-bin-script() {
rm -f "lib/vscode-reh-web-linux-x64/bin/$1"
}
copy-bin-script() {
local script="$1"
local dest="lib/vscode-reh-web-linux-x64/bin/$script"
cp "lib/vscode/resources/server/bin/$script" "$dest"
sed -i.bak "s/@@VERSION@@/$(vscode_version)/g" "$dest"
sed -i.bak "s/@@COMMIT@@/$BUILD_SOURCEVERSION/g" "$dest"
sed -i.bak "s/@@APPNAME@@/code-server/g" "$dest"
# Fix Node path on Darwin and Linux.
# We do not want expansion here; this text should make it to the file as-is.
# shellcheck disable=SC2016
sed -i.bak 's/^ROOT=\(.*\)$/VSROOT=\1\nROOT="$(dirname "$(dirname "$VSROOT")")"/g' "$dest"
sed -i.bak 's/ROOT\/out/VSROOT\/out/g' "$dest"
# We do not want expansion here; this text should make it to the file as-is.
# shellcheck disable=SC2016
sed -i.bak 's/$ROOT\/node/${NODE_EXEC_PATH:-$ROOT\/lib\/node}/g' "$dest"
# Fix Node path on Windows.
sed -i.bak 's/^set ROOT_DIR=\(.*\)$/set ROOT_DIR=%~dp0..\\..\\..\\..\r\nset VSROOT_DIR=\1/g' "$dest"
sed -i.bak 's/%ROOT_DIR%\\out/%VSROOT_DIR%\\out/g' "$dest"
chmod +x "$dest"
rm "$dest.bak"
}
main() {
cd "$(dirname "${0}")/../.."
cd vendor/modules/code-oss-dev
source ./ci/lib.sh
# Any platform works since we have our own packaging step (for now).
# Set the commit Code will embed into the product.json. We need to do this
# since Code tries to get the commit from the `.git` directory which will fail
# as it is a submodule.
#
# Also, we use code-server's commit rather than VS Code's otherwise it would
# not update when only our patch files change, and that will cause caching
# issues where the browser keeps using outdated code.
export BUILD_SOURCEVERSION
BUILD_SOURCEVERSION=$(git rev-parse HEAD)
pushd lib/vscode
if [[ ! ${VERSION-} ]]; then
echo "VERSION not set. Please set before running this script:"
echo "VERSION='0.0.0' yarn build:vscode"
exit 1
fi
# Add the date, our name, links, enable telemetry (this just makes telemetry
# available; telemetry can still be disabled by flag or setting), and
# configure trusted extensions (since some, like github.copilot-chat, never
# ask to be trusted and this is the only way to get auth working).
#
# This needs to be done before building as Code will read this file and embed
# it into the client-side code.
git checkout product.json # Reset in case the script exited early.
cp product.json product.original.json # Since jq has no inline edit.
jq --slurp '.[0] * .[1]' product.original.json <(
cat << EOF
{
"enableTelemetry": true,
"quality": "stable",
"codeServerVersion": "$VERSION",
"nameShort": "code-server",
"nameLong": "code-server",
"applicationName": "code-server",
"dataFolderName": ".code-server",
"win32MutexName": "codeserver",
"licenseUrl": "https://github.com/coder/code-server/blob/main/LICENSE",
"win32DirName": "code-server",
"win32NameVersion": "code-server",
"win32AppUserModelId": "coder.code-server",
"win32ShellNameShort": "c&ode-server",
"darwinBundleIdentifier": "com.coder.code.server",
"linuxIconName": "com.coder.code.server",
"reportIssueUrl": "https://github.com/coder/code-server/issues/new",
"documentationUrl": "https://go.microsoft.com/fwlink/?LinkID=533484#vscode",
"keyboardShortcutsUrlMac": "https://go.microsoft.com/fwlink/?linkid=832143",
"keyboardShortcutsUrlLinux": "https://go.microsoft.com/fwlink/?linkid=832144",
"keyboardShortcutsUrlWin": "https://go.microsoft.com/fwlink/?linkid=832145",
"introductoryVideosUrl": "https://go.microsoft.com/fwlink/?linkid=832146",
"tipsAndTricksUrl": "https://go.microsoft.com/fwlink/?linkid=852118",
"newsletterSignupUrl": "https://www.research.net/r/vsc-newsletter",
"linkProtectionTrustedDomains": [
"https://open-vsx.org"
],
"trustedExtensionAuthAccess": [
"vscode.git", "vscode.github",
"github.vscode-pull-request-github",
"github.copilot", "github.copilot-chat"
],
"aiConfig": {
"ariaKey": "code-server"
}
}
EOF
) > product.json
# Any platform here works since we will do our own packaging. We have to do
# this because we have an NPM package that could be installed on any platform.
# The correct platform dependencies and scripts will be installed as part of
# the post-install during `npm install` or when building a standalone release.
yarn gulp "vscode-reh-web-linux-x64${MINIFY:+-min}"
# Reset so if you develop after building you will not be stuck with the wrong
# commit (the dev client will use `oss-dev` but the dev server will still use
# product.json which will have `stable-$commit`).
git checkout product.json
popd
pushd lib/vscode-reh-web-linux-x64
# Make sure Code took the version we set in the environment variable. Not
# having a version will break display languages.
if ! jq -e .commit product.json; then
echo "'commit' is missing from product.json"
exit 1
fi
popd
# These provide a `code-server` command in the integrated terminal to open
# files in the current instance.
delete-bin-script remote-cli/code-server
copy-bin-script remote-cli/code-darwin.sh
copy-bin-script remote-cli/code-linux.sh
copy-bin-script remote-cli/code.cmd
# These provide a way for terminal applications to open browser windows.
delete-bin-script helpers/browser.sh
copy-bin-script helpers/browser-darwin.sh
copy-bin-script helpers/browser-linux.sh
copy-bin-script helpers/browser.cmd
}
main "$@"

View File

@ -11,14 +11,6 @@ _realpath() {
cd "$(dirname "$script")"
while [ -L "$(basename "$script")" ]; do
if [ -L "./node" ] && [ -L "./code-server" ] \
&& [ -f "package.json" ] \
&& cat package.json | grep -q '^ "name": "code-server",$'; then
echo "***** Please use the script in bin/code-server instead!" >&2
echo "***** This script will soon be removed!" >&2
echo "***** See the release notes at https://github.com/coder/code-server/releases/tag/v3.4.0" >&2
fi
script="$(readlink "$(basename "$script")")"
cd "$(dirname "$script")"
done

View File

@ -4,7 +4,7 @@ platform: "linux"
version: "v${VERSION}"
section: "devel"
priority: "optional"
maintainer: "Anmol Sethi <hi@nhooyr.io>"
maintainer: "Joe Previte <joe@coder.com>"
description: |
Run VS Code in the browser.
vendor: "Coder"
@ -22,4 +22,4 @@ contents:
dst: /usr/lib/systemd/user/code-server.service
- src: ./release-standalone/*
dst: /usr/lib/code-server/
dst: /usr/lib/code-server

View File

@ -1,26 +1,69 @@
#!/usr/bin/env sh
set -eu
# Copied from arch() in ci/lib.sh.
detect_arch() {
case "$(uname -m)" in
aarch64)
echo arm64
;;
x86_64 | amd64)
echo amd64
;;
*)
# This will cause the download to fail, but is intentional
uname -m
;;
# Copied from ../lib.sh except we do not rename Darwin and we do not need to
# detect Alpine.
os() {
osname=$(uname | tr '[:upper:]' '[:lower:]')
case $osname in
cygwin* | mingw*) osname="windows" ;;
esac
echo "$osname"
}
# Create a symlink at $2 pointing to $1 on any platform. Anything that
# currently exists at $2 will be deleted.
symlink() {
source="$1"
dest="$2"
rm -rf "$dest"
case $OS in
windows) mklink /J "$dest" "$source" ;;
*) ln -s "$source" "$dest" ;;
esac
}
ARCH="${NPM_CONFIG_ARCH:-$(detect_arch)}"
# This is due to an upstream issue with RHEL7/CentOS 7 comptability with node-argon2
# See: https://github.com/cdr/code-server/pull/3422#pullrequestreview-677765057
export npm_config_build_from_source=true
# VS Code bundles some modules into an asar which is an archive format that
# works like tar. It then seems to get unpacked into node_modules.asar.
#
# I don't know why they do this but all the dependencies they bundle already
# exist in node_modules so just symlink it. We have to do this since not only
# Code itself but also extensions will look specifically in this directory for
# files (like the ripgrep binary or the oniguruma wasm).
symlink_asar() {
symlink node_modules node_modules.asar
}
# Make a symlink at bin/$1/$3 pointing to the platform-specific version of the
# script in $2. The extension of the link will be .cmd for Windows otherwise it
# will be whatever is in $4 (or no extension if $4 is not set).
symlink_bin_script() {
oldpwd="$(pwd)"
cd "bin/$1"
source="$2"
dest="$3"
ext="${4-}"
case $OS in
windows) symlink "$source.cmd" "$dest.cmd" ;;
darwin | macos) symlink "$source-darwin.sh" "$dest$ext" ;;
*) symlink "$source-linux.sh" "$dest$ext" ;;
esac
cd "$oldpwd"
}
command_exists() {
if [ ! "$1" ]; then return 1; fi
command -v "$@" > /dev/null
}
is_root() {
if command_exists id && [ "$(id -u)" = 0 ]; then
return 0
fi
return 1
}
OS="$(os)"
main() {
# Grabs the major version of node from $npm_config_user_agent which looks like
@ -33,8 +76,8 @@ main() {
echo "USE AT YOUR OWN RISK!"
fi
if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-14}" ]; then
echo "ERROR: code-server currently requires node v14."
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
@ -44,31 +87,24 @@ main() {
exit 1
fi
case "${npm_config_user_agent-}" in npm*)
# We are running under npm.
if [ "${npm_config_unsafe_perm-}" != "true" ]; then
echo "Please pass --unsafe-perm to npm to install code-server"
echo "Otherwise the postinstall script does not have permissions to run"
echo "See https://docs.npmjs.com/misc/config#unsafe-perm"
echo "See https://stackoverflow.com/questions/49084929/npm-sudo-global-installation-unsafe-perm"
exit 1
fi
;;
esac
OS="$(uname | tr '[:upper:]' '[:lower:]')"
mkdir -p ./lib
if curl -fsSL "https://github.com/coder/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent; then
chmod +x ./lib/coder-cloud-agent
else
echo "Failed to download cloud agent; --link will not work"
# Under npm, if we are running as root, we need --unsafe-perm otherwise
# post-install scripts will not have sufficient permissions to do their thing.
if is_root; then
case "${npm_config_user_agent-}" in npm*)
if [ "${npm_config_unsafe_perm-}" != "true" ]; then
echo "Please pass --unsafe-perm to npm to install code-server"
echo "Otherwise post-install scripts will not have permissions to run"
echo "See https://docs.npmjs.com/misc/config#unsafe-perm"
echo "See https://stackoverflow.com/questions/49084929/npm-sudo-global-installation-unsafe-perm"
exit 1
fi
;;
esac
fi
if ! vscode_yarn; then
if ! vscode_install; then
echo "You may not have the required dependencies to build the native modules."
echo "Please see https://github.com/coder/code-server/blob/master/docs/npm.md"
echo "Please see https://github.com/coder/code-server/blob/main/docs/npm.md"
exit 1
fi
@ -79,33 +115,49 @@ main() {
fi
}
# This is a copy of symlink_asar in ../lib.sh. Look there for details.
symlink_asar() {
rm -rf node_modules.asar
if [ "${WINDIR-}" ]; then
mklink /J node_modules.asar node_modules
else
ln -s node_modules node_modules.asar
fi
install_with_yarn_or_npm() {
echo "User agent: ${npm_config_user_agent-none}"
# NOTE@edvincent: We want to keep using the package manager that the end-user was using to install the package.
# This also ensures that when *we* run `yarn` in the development process, the yarn.lock file is used.
case "${npm_config_user_agent-}" in
npm*)
# HACK: NPM's use of semver doesn't like resolving some peerDependencies that vscode (upstream) brings in the form of pre-releases.
# The legacy behavior doesn't complain about pre-releases being used, falling back to that for now.
# See https://github.com//pull/5071
if ! npm install --unsafe-perm --legacy-peer-deps --omit=dev; then
return 1
fi
;;
yarn*)
if ! yarn --production --frozen-lockfile --no-default-rc; then
return 1
fi
;;
*)
echo "Could not determine which package manager is being used to install code-server"
exit 1
;;
esac
return 0
}
vscode_yarn() {
echo 'Installing vendor dependencies...'
cd vendor/modules/code-oss-dev
yarn --production --frozen-lockfile
vscode_install() {
echo 'Installing Code dependencies...'
cd lib/vscode
if ! install_with_yarn_or_npm; then
return 1
fi
symlink_asar
symlink_bin_script remote-cli code code-server
symlink_bin_script helpers browser browser .sh
cd extensions
yarn --production --frozen-lockfile
if ! install_with_yarn_or_npm; then
return 1
fi
for ext in */; do
ext="${ext%/}"
echo "extensions/$ext: installing dependencies"
cd "$ext"
yarn --production --frozen-lockfile
cd "$OLDPWD"
done
return 0
}
main "$@"

View File

@ -1,19 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
# Downloads the release artifacts from CI for the current
# commit and then uploads them to the release with the version
# in package.json.
# You will need $GITHUB_TOKEN set.
main() {
cd "$(dirname "$0")/../.."
source ./ci/lib.sh
download_artifact release-packages ./release-packages
local assets=(./release-packages/code-server*"$VERSION"*{.tar.gz,.deb,.rpm})
EDITOR=true gh release upload "v$VERSION" "${assets[@]}" --clobber
}
main "$@"

View File

@ -1,50 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
# Creates a draft release with the template for the version in package.json
main() {
cd "$(dirname "$0")/../.."
source ./ci/lib.sh
gh release create "v$VERSION" \
--notes-file - \
--target "$(git rev-parse HEAD)" \
--draft << EOF
v$VERSION
VS Code v$(vscode_version)
Upgrading is as easy as installing the new version over the old one. code-server
maintains all user data in \`~/.local/share/code-server\` so that it is preserved in between
installations.
## New Features
⭐ Summarize new features here with references to issues
- item
## Bug Fixes
⭐ Summarize bug fixes here with references to issues
- item
## Documentation
⭐ Summarize doc changes here with references to issues
- item
## Development
⭐ Summarize development/testing changes here with references to issues
- item
Cheers! 🍻
EOF
}
main "$@"

View File

@ -1,99 +0,0 @@
#!/usr/bin/env bash
# Description: This is a script to make the release process easier
# Run it with `yarn release:prep` and it will do the following:
# 1. Check that you have gh installed and that you're signed in
# 2. Update the version of code-server (package.json, docs, etc.)
# 3. Update the code coverage badge in the README
# 4. Open a draft PR using the release_template.md and view in browser
# If you want to perform a dry run of this script run DRY_RUN=1 yarn release:prep
set -euo pipefail
main() {
if [ "${DRY_RUN-}" = 1 ]; then
echo "Performing a dry run..."
CMD="echo"
else
CMD=''
fi
cd "$(dirname "$0")/../.."
# Check that gh is installed
if ! command -v gh &> /dev/null; then
echo "gh could not be found."
echo "We use this with the release-github-draft.sh and release-github-assets.sh scripts."
echo -e "See docs here: https://github.com/cli/cli#installation"
exit
fi
# Check that they have jq installed
if ! command -v jq &> /dev/null; then
echo "jq could not be found."
echo "We use this to parse the package.json and grab the current version of code-server."
echo -e "See docs here: https://stedolan.github.io/jq/download/"
exit
fi
# Check that they have rg installed
if ! command -v rg &> /dev/null; then
echo "rg could not be found."
echo "We use this when updating files across the codebase."
echo -e "See docs here: https://github.com/BurntSushi/ripgrep#installation"
exit
fi
# Check that they have node installed
if ! command -v node &> /dev/null; then
echo "node could not be found."
echo "That's surprising..."
echo "We use it in this script for getting the package.json version"
echo -e "See docs here: https://nodejs.org/en/download/"
exit
fi
# Check that gh is authenticated
if ! gh auth status -h github.com &> /dev/null; then
echo "gh isn't authenticated to github.com."
echo "This is needed for our scripts that use gh."
echo -e "See docs regarding authentication: https://cli.github.com/manual/gh_auth_login"
exit
fi
# Note: we need to set upstream as well or the gh pr create step will fail
# See: https://github.com/cli/cli/issues/575
CURRENT_BRANCH=$(git branch | grep '\*' | cut -d' ' -f2-)
if [[ -z $(git config "branch.${CURRENT_BRANCH}.remote") ]]; then
echo "Doesn't look like you've pushed this branch to remote"
# Note: we need to set upstream as well or the gh pr create step will fail
# See: https://github.com/cli/cli/issues/575
echo "Please set the upstream and then run the script"
exit 1
fi
# credit to jakwuh for this solution
# https://gist.github.com/DarrenN/8c6a5b969481725a4413#gistcomment-1971123
CODE_SERVER_CURRENT_VERSION=$(node -pe "require('./package.json').version")
# Ask which version we should update to
# In the future, we'll automate this and determine the latest version automatically
echo "Current version: ${CODE_SERVER_CURRENT_VERSION}"
# The $'\n' adds a line break. See: https://stackoverflow.com/a/39581815/3015595
read -r -p "What version of code-server do you want to update to?"$'\n' CODE_SERVER_VERSION_TO_UPDATE
echo -e "Great! We'll prep a PR for updating to $CODE_SERVER_VERSION_TO_UPDATE\n"
$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"
$CMD git commit --no-verify -am "chore(release): bump version to $CODE_SERVER_VERSION_TO_UPDATE"
# This runs from the root so that's why we use this path vs. ../../
RELEASE_TEMPLATE_STRING=$(cat ./.github/PULL_REQUEST_TEMPLATE/release_template.md)
echo -e "\nOpening a draft PR on GitHub"
# To read about these flags, visit the docs: https://cli.github.com/manual/gh_pr_create
$CMD gh pr create --base main --title "release: $CODE_SERVER_VERSION_TO_UPDATE" --body "$RELEASE_TEMPLATE_STRING" --reviewer @coder/code-server-reviewers --repo coder/code-server --draft --assignee "@me"
# Open PR in browser
$CMD gh pr view --web
}
main "$@"

View File

@ -1,33 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
# Make sure a code-server release works. You can pass in the path otherwise it
# will use release-standalone in the current directory.
#
# This is to make sure we don't have Node version errors or any other
# compilation-related errors.
main() {
cd "$(dirname "${0}")/../.."
local EXTENSIONS_DIR
EXTENSIONS_DIR="$(mktemp -d)"
local path=${1:-./release-standalone/bin/code-server}
echo "Testing standalone release in $path."
# NOTE: using a basic theme extension because it doesn't update often and is more reliable for testing
"$path" --extensions-dir "$EXTENSIONS_DIR" --install-extension wesbos.theme-cobalt2
local installed_extensions
installed_extensions="$("$path" --extensions-dir "$EXTENSIONS_DIR" --list-extensions 2>&1)"
# We use grep as wesbos.theme-cobalt2 may have dependency extensions that change.
if ! echo "$installed_extensions" | grep -q "wesbos.theme-cobalt2"; then
echo "Unexpected output from listing extensions:"
echo "$installed_extensions"
exit 1
fi
echo "Standalone release works correctly."
}
main "$@"

View File

@ -1,12 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
main() {
cd "$(dirname "$0")/../.."
# Prevents integration with moderate or higher vulnerabilities
# Docs: https://github.com/IBM/audit-ci#options
yarn audit-ci --moderate
}
main "$@"

View File

@ -1,13 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
main() {
cd "$(dirname "$0")/../.."
yarn fmt
yarn lint
yarn _audit
yarn test:unit
}
main "$@"

View File

@ -4,24 +4,6 @@ set -euo pipefail
main() {
cd "$(dirname "$0")/../.."
local prettierExts
prettierExts=(
"*.js"
"*.ts"
"*.tsx"
"*.html"
"*.json"
"*.css"
"*.md"
"*.toml"
"*.yaml"
"*.yml"
"*.sh"
)
prettier --write --loglevel=warn $(
git ls-files "${prettierExts[@]}" | grep -v "lib/vscode" | grep -v "vendor/modules/code-oss-dev" | grep -v 'helm-chart'
)
doctoc --title '# FAQ' docs/FAQ.md > /dev/null
doctoc --title '# Setup Guide' docs/guide.md > /dev/null
doctoc --title '# Install' docs/install.md > /dev/null
@ -32,12 +14,11 @@ main() {
doctoc --title '# iPad' docs/ipad.md > /dev/null
doctoc --title '# Termux' docs/termux.md > /dev/null
# TODO: replace with a method that generates fewer false positives.
if [[ ${CI-} && $(git ls-files --other --modified --exclude-standard) ]]; then
echo "Files need generation or are formatted incorrectly:"
git -c color.ui=always status | grep --color=no '\[31m'
echo "Please run the following locally:"
echo " yarn fmt"
echo " yarn doctoc"
exit 1
fi
}

9
ci/dev/lint-scripts.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
main() {
cd "$(dirname "$0")/../.."
shellcheck -e SC2046,SC2164,SC2154,SC1091,SC1090,SC2002 $(git ls-files '*.sh' | grep -v 'lib/vscode')
}
main "$@"

View File

@ -1,18 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
main() {
cd "$(dirname "$0")/../.."
eslint --max-warnings=0 --fix $(git ls-files "*.ts" "*.tsx" "*.js" | grep -v "vendor/modules/code-oss-dev" | grep -v "lib/vscode")
stylelint $(git ls-files "*.css" | grep -v "vendor/modules/code-oss-dev" | grep -v "lib/vscode")
tsc --noEmit --skipLibCheck
shellcheck -e SC2046,SC2164,SC2154,SC1091,SC1090,SC2002 $(git ls-files "*.sh" | grep -v "vendor/modules/code-oss-dev" | grep -v "lib/vscode")
if command -v helm && helm kubeval --help > /dev/null; then
helm kubeval ci/helm-chart
fi
cd "$OLDPWD"
}
main "$@"

View File

@ -1,50 +1,39 @@
#!/usr/bin/env bash
set -euo pipefail
# Install dependencies in $1.
install-deps() {
local args=(install)
if [[ ${CI-} ]]; then
args+=(--frozen-lockfile)
fi
if [[ "$1" == "lib/vscode" ]]; then
args+=(--no-default-rc)
fi
# If there is no package.json then yarn will look upward and end up installing
# from the root resulting in an infinite loop (this can happen if you have not
# checked out the submodule yet for example).
if [[ ! -f "$1/package.json" ]]; then
echo "$1/package.json is missing; did you run git submodule update --init?"
exit 1
fi
pushd "$1"
echo "Installing dependencies for $PWD"
yarn "${args[@]}"
popd
}
main() {
cd "$(dirname "$0")/../.."
source ./ci/lib.sh
pushd test
echo "Installing dependencies for $PWD"
yarn install
popd
local args=(install)
if [[ ${CI-} ]]; then
args+=(--frozen-lockfile)
install-deps test
install-deps test/e2e/extensions/test-extension
# We don't need these when running the integration tests
# so you can pass SKIP_SUBMODULE_DEPS
if [[ ! ${SKIP_SUBMODULE_DEPS-} ]]; then
install-deps lib/vscode
fi
pushd test
echo "Installing dependencies for $PWD"
yarn "${args[@]}"
popd
pushd test/e2e/extensions/test-extension
echo "Installing dependencies for $PWD"
yarn "${args[@]}"
popd
pushd vendor
echo "Installing dependencies for $PWD"
# We install in 'modules' instead of 'node_modules' because VS Code's
# extensions use a webpack config which cannot differentiate between its own
# node_modules and itself being in a directory with the same name.
args+=(--modules-folder modules)
# We ignore scripts because NPM/Yarn's default behavior is to assume that
# devDependencies are not needed, and that even git repo based packages are
# assumed to be compiled. Because the default behavior for VS Code's
# `postinstall` assumes we're also compiled, this needs to be ignored.
args+=(--ignore-scripts)
yarn "${args[@]}"
# Finally, run the vendor `postinstall`
yarn run postinstall
popd
}
main "$@"

View File

@ -37,7 +37,7 @@ main() {
exit 1
fi
if [[ ! -d $dir/vendor/modules/code-oss-dev/out ]]; then
if [[ ! -d $dir/lib/vscode/out ]]; then
echo >&2 "No VS Code build detected"
help
exit 1

39
ci/dev/test-integration.sh Executable file
View File

@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -euo pipefail
help() {
echo >&2 " You can build the standalone release with 'yarn release:standalone'"
echo >&2 " Or you can pass in a custom path."
echo >&2 " CODE_SERVER_PATH='/var/tmp/coder/code-server/bin/code-server' yarn test:integration"
}
# Make sure a code-server release works. You can pass in the path otherwise it
# will look for release-standalone in the current directory.
#
# This is to make sure we don't have Node version errors or any other
# compilation-related errors.
main() {
cd "$(dirname "$0")/../.."
source ./ci/lib.sh
local path="$RELEASE_PATH-standalone/bin/code-server"
if [[ ! ${CODE_SERVER_PATH-} ]]; then
echo "Set CODE_SERVER_PATH to test another build of code-server"
else
path="$CODE_SERVER_PATH"
fi
echo "Running tests with code-server binary: '$path'"
if [[ ! -f $path ]]; then
echo >&2 "No code-server build detected"
echo >&2 "Looked in $path"
help
exit 1
fi
CODE_SERVER_PATH="$path" CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest "$@" --coverage=false --testRegex "./test/integration" --testPathIgnorePatterns "./test/integration/fixtures"
}
main "$@"

39
ci/dev/test-native.sh Executable file
View File

@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -euo pipefail
help() {
echo >&2 " You can build the standalone release with 'yarn release:standalone'"
echo >&2 " Or you can pass in a custom path."
echo >&2 " CODE_SERVER_PATH='/var/tmp/coder/code-server/bin/code-server' yarn test:integration"
}
# Make sure a code-server release works. You can pass in the path otherwise it
# will look for release-standalone in the current directory.
#
# This is to make sure we don't have Node version errors or any other
# compilation-related errors.
main() {
cd "$(dirname "$0")/../.."
source ./ci/lib.sh
local path="$RELEASE_PATH-standalone/bin/code-server"
if [[ ! ${CODE_SERVER_PATH-} ]]; then
echo "Set CODE_SERVER_PATH to test another build of code-server"
else
path="$CODE_SERVER_PATH"
fi
echo "Running tests with code-server binary: '$path'"
if [[ ! -f $path ]]; then
echo >&2 "No code-server build detected"
echo >&2 "Looked in $path"
help
exit 1
fi
CODE_SERVER_PATH="$path" ./test/node_modules/.bin/jest "$@" --coverage=false --testRegex "./test/integration/help.test.ts"
}
main "$@"

View File

@ -11,20 +11,10 @@ main() {
make -s out/index.js
popd
# Our code imports from `out` in order to work during development but if you
# have only built for production you will have not have this directory. In
# that case symlink `out` to a production build directory.
local vscode="vendor/modules/code-oss-dev"
local link="$vscode/out"
local target="out-build"
if [[ ! -e $link ]] && [[ -d $vscode/$target ]]; then
ln -s "$target" "$link"
fi
# We must keep jest in a sub-directory. See ../../test/package.json for more
# information. We must also run it from the root otherwise coverage will not
# include our source files.
CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest "$@"
CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest "$@" --testRegex "./test/unit/.*ts" --testPathIgnorePatterns "./test/unit/node/test-plugin"
}
main "$@"

View File

@ -1,4 +1,4 @@
import { spawn, fork, ChildProcess } from "child_process"
import { spawn, ChildProcess } from "child_process"
import * as path from "path"
import { onLine, OnLineCallback } from "../../src/node/util"
@ -14,7 +14,7 @@ class Watcher {
private rootPath = path.resolve(process.cwd())
private readonly paths = {
/** Path to uncompiled VS Code source. */
vscodeDir: path.join(this.rootPath, "vendor", "modules", "code-oss-dev"),
vscodeDir: path.join(this.rootPath, "lib/vscode"),
pluginDir: process.env.PLUGIN_DIR,
}
@ -30,12 +30,13 @@ class Watcher {
// Pass CLI args, save for `node` and the initial script name.
const args = process.argv.slice(2)
this.webServer = fork(path.join(this.rootPath, "out/node/entry.js"), args)
this.webServer = spawn("node", [path.join(this.rootPath, "out/node/entry.js"), ...args])
onLine(this.webServer, (line) => console.log("[code-server]", line))
const { pid } = this.webServer
this.webServer.on("exit", () => console.log("[Code Server]", `Web process ${pid} exited`))
this.webServer.on("exit", () => console.log("[code-server]", `Web process ${pid} exited`))
console.log("\n[Code Server]", `Spawned web server process ${pid}`)
console.log("\n[code-server]", `Spawned web server process ${pid}`)
}
//#endregion
@ -82,10 +83,10 @@ class Watcher {
private parseVSCodeLine: OnLineCallback = (strippedLine, originalLine) => {
if (!strippedLine.length) return
console.log("[VS Code]", originalLine)
console.log("[Code OSS]", originalLine)
if (strippedLine.includes("Finished compilation with")) {
console.log("[VS Code] ✨ Finished compiling! ✨", "(Refresh your web browser ♻️)")
console.log("[Code OSS] ✨ Finished compiling! ✨", "(Refresh your web browser ♻️)")
this.reloadWebServer()
}
}
@ -93,10 +94,10 @@ class Watcher {
private parseCodeServerLine: OnLineCallback = (strippedLine, originalLine) => {
if (!strippedLine.length) return
console.log("[Compiler][Code Server]", originalLine)
console.log("[Compiler][code-server]", originalLine)
if (strippedLine.includes("Watching for file changes")) {
console.log("[Compiler][Code Server]", "Finished compiling!", "(Refresh your web browser ♻️)")
console.log("[Compiler][code-server]", "Finished compiling!", "(Refresh your web browser ♻️)")
this.reloadWebServer()
}
}

View File

@ -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: 2.1.0
version: 3.22.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.0.2
appVersion: 4.91.0

View File

@ -20,11 +20,17 @@ spec:
labels:
app.kubernetes.io/name: {{ include "code-server.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.podAnnotations }}
annotations: {{- toYaml .Values.podAnnotations | nindent 8 }}
{{- end }}
spec:
imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 8 }}
{{- if .Values.hostnameOverride }}
hostname: {{ .Values.hostnameOverride }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
@ -59,6 +65,17 @@ spec:
securityContext:
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
{{- if .Values.lifecycle.enabled }}
lifecycle:
{{- if .Values.lifecycle.postStart }}
postStart:
{{ toYaml .Values.lifecycle.postStart | nindent 14 }}
{{- end }}
{{- if .Values.lifecycle.preStop }}
preStop:
{{ toYaml .Values.lifecycle.preStop | nindent 14 }}
{{- end }}
{{- end }}
env:
{{- if .Values.extraVars }}
{{ toYaml .Values.extraVars | indent 10 }}
@ -88,6 +105,7 @@ spec:
{{- range .Values.extraSecretMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
subPath: {{ .subPath | default "" }}
readOnly: {{ .readOnly }}
{{- end }}
{{- range .Values.extraVolumeMounts }}
@ -100,6 +118,11 @@ spec:
- name: http
containerPort: 8080
protocol: TCP
{{- range .Values.extraPorts }}
- name: {{ .name }}
containerPort: {{ .port }}
protocol: {{ .protocol }}
{{- end }}
livenessProbe:
httpGet:
path: /
@ -116,7 +139,7 @@ spec:
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- tpl . $ | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
@ -154,9 +177,12 @@ spec:
{{- if .existingClaim }}
persistentVolumeClaim:
claimName: {{ .existingClaim }}
{{- else }}
{{- else if .hostPath }}
hostPath:
path: {{ .hostPath }}
type: Directory
{{- else }}
emptyDir:
{{- toYaml .emptyDir | nindent 10 }}
{{- end }}
{{- end }}

View File

@ -1,3 +1,4 @@
{{- if not .Values.existingSecret }}
apiVersion: v1
kind: Secret
metadata:
@ -11,8 +12,9 @@ metadata:
app.kubernetes.io/managed-by: {{ .Release.Service }}
type: Opaque
data:
{{ if .Values.password }}
{{- if .Values.password }}
password: "{{ .Values.password | b64enc }}"
{{ else }}
{{- else }}
password: "{{ randAlphaNum 24 | b64enc }}"
{{ end }}
{{- end }}
{{- end }}

View File

@ -14,6 +14,12 @@ spec:
targetPort: http
protocol: TCP
name: http
{{- range .Values.extraPorts }}
- port: {{ .port }}
targetPort: {{ .port }}
protocol: {{ .protocol }}
name: {{ .name }}
{{- end }}
selector:
app.kubernetes.io/name: {{ include "code-server.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}

View File

@ -6,7 +6,7 @@ replicaCount: 1
image:
repository: codercom/code-server
tag: '4.0.2'
tag: '4.91.0'
pullPolicy: Always
# Specifies one or more secrets to be used when pulling images from a
@ -33,6 +33,8 @@ podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
priorityClassName: ""
service:
type: ClusterIP
port: 8080
@ -69,7 +71,9 @@ extraArgs: []
# Optional additional environment variables
extraVars: []
# - name: DISABLE_TELEMETRY
# value: true
# value: "true"
# - name: DOCKER_HOST
# value: "tcp://localhost:2375"
##
## Init containers parameters:
@ -123,9 +127,19 @@ persistence:
# existingClaim: ""
# hostPath: /data
lifecycle:
enabled: false
# postStart:
# exec:
# command:
# - /bin/bash
# - -c
# - curl -s -L SOME_SCRIPT | bash
## Enable an Specify container in extraContainers.
## This is meant to allow adding code-server dependencies, like docker-dind.
extraContainers: |
# If docker-dind is used, DOCKER_HOST env is mandatory to set in "extraVars"
#- name: docker-dind
# image: docker:19.03-dind
# imagePullPolicy: IfNotPresent
@ -142,10 +156,30 @@ extraContainers: |
# - name: DOCKER_DRIVER
# value: "overlay2"
extraInitContainers: |
# - name: customization
# image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
# imagePullPolicy: IfNotPresent
# env:
# - name: SERVICE_URL
# value: https://open-vsx.org/vscode/gallery
# - name: ITEM_URL
# value: https://open-vsx.org/vscode/item
# command:
# - sh
# - -c
# - |
# code-server --install-extension ms-python.python
# code-server --install-extension golang.Go
# volumeMounts:
# - name: data
# mountPath: /home/coder
## Additional code-server secret mounts
extraSecretMounts: []
# - name: secret-files
# mountPath: /etc/secrets
# subPath: private.key # (optional)
# secretName: code-server-secret-files
# readOnly: true
@ -156,6 +190,7 @@ extraVolumeMounts: []
# readOnly: true
# existingClaim: volume-claim
# hostPath: ""
# emptyDir: {}
extraConfigmapMounts: []
# - name: certs-configmap
@ -163,3 +198,8 @@ extraConfigmapMounts: []
# subPath: certificates.crt # (optional)
# configMap: certs-configmap
# readOnly: true
extraPorts: []
# - name: minecraft
# port: 25565
# protocol: tcp

108
ci/lib.sh
View File

@ -9,93 +9,41 @@ popd() {
builtin popd > /dev/null
}
pkg_json_version() {
jq -r .version package.json
}
vscode_version() {
jq -r .version vendor/modules/code-oss-dev/package.json
jq -r .version lib/vscode/package.json
}
os() {
local os
os=$(uname | tr '[:upper:]' '[:lower:]')
if [[ $os == "linux" ]]; then
# Alpine's ldd doesn't have a version flag but if you use an invalid flag
# (like --version) it outputs the version to stderr and exits with 1.
local ldd_output
ldd_output=$(ldd --version 2>&1 || true)
if echo "$ldd_output" | grep -iq musl; then
os="alpine"
fi
elif [[ $os == "darwin" ]]; then
os="macos"
fi
echo "$os"
osname=$(uname | tr '[:upper:]' '[:lower:]')
case $osname in
linux)
# Alpine's ldd doesn't have a version flag but if you use an invalid flag
# (like --version) it outputs the version to stderr and exits with 1.
# TODO: Better to check /etc/os-release; see ../install.sh.
ldd_output=$(ldd --version 2>&1 || true)
if echo "$ldd_output" | grep -iq musl; then
osname="alpine"
fi
;;
darwin) osname="macos" ;;
cygwin* | mingw*) osname="windows" ;;
esac
echo "$osname"
}
arch() {
cpu="$(uname -m)"
case "$cpu" in
aarch64)
echo arm64
;;
x86_64 | amd64)
echo amd64
;;
*)
echo "$cpu"
;;
aarch64) cpu=arm64 ;;
x86_64) cpu=amd64 ;;
esac
}
# Grabs the most recent ci.yaml github workflow run that was triggered from the
# pull request of the release branch for this version (regardless of whether
# that run succeeded or failed). The release branch name must be in semver
# format with a v prepended.
# This will contain the artifacts we want.
# https://developer.github.com/v3/actions/workflow-runs/#list-workflow-runs
get_artifacts_url() {
local artifacts_url
local version_branch="v$VERSION"
local workflow_runs_url="repos/:owner/:repo/actions/workflows/ci.yaml/runs?event=pull_request&branch=$version_branch"
artifacts_url=$(gh api "$workflow_runs_url" | jq -r ".workflow_runs[] | select(.head_branch == \"$version_branch\") | .artifacts_url" | head -n 1)
if [[ -z "$artifacts_url" ]]; then
echo >&2 "ERROR: artifacts_url came back empty"
echo >&2 "We looked for a successful run triggered by a pull_request with for code-server version: $VERSION and a branch named $version_branch"
echo >&2 "URL used for gh API call: $workflow_runs_url"
exit 1
fi
echo "$artifacts_url"
}
# Grabs the artifact's download url.
# https://developer.github.com/v3/actions/artifacts/#list-workflow-run-artifacts
get_artifact_url() {
local artifact_name="$1"
gh api "$(get_artifacts_url)" | jq -r ".artifacts[] | select(.name == \"$artifact_name\") | .archive_download_url" | head -n 1
}
# Uses the above two functions to download a artifact into a directory.
download_artifact() {
local artifact_name="$1"
local dst="$2"
local tmp_file
tmp_file="$(mktemp)"
gh api "$(get_artifact_url "$artifact_name")" > "$tmp_file"
unzip -q -o "$tmp_file" -d "$dst"
rm "$tmp_file"
echo "$cpu"
}
rsync() {
command rsync -a --del "$@"
}
VERSION="$(pkg_json_version)"
export VERSION
ARCH="$(arch)"
export ARCH
OS=$(os)
@ -104,21 +52,3 @@ export OS
# RELEASE_PATH is the destination directory for the release from the root.
# Defaults to release
RELEASE_PATH="${RELEASE_PATH-release}"
# VS Code bundles some modules into an asar which is an archive format that
# works like tar. It then seems to get unpacked into node_modules.asar.
#
# I don't know why they do this but all the dependencies they bundle already
# exist in node_modules so just symlink it. We have to do this since not only VS
# Code itself but also extensions will look specifically in this directory for
# files (like the ripgrep binary or the oniguruma wasm).
symlink_asar() {
rm -rf node_modules.asar
if [ "${WINDIR-}" ]; then
# mklink takes the link name first.
mklink /J node_modules.asar node_modules
else
# ln takes the link name second.
ln -s node_modules node_modules.asar
fi
}

View File

@ -1,21 +1,28 @@
FROM debian:11
# syntax=docker/dockerfile:experimental
ARG BASE=debian:12
FROM scratch AS packages
COPY release-packages/code-server*.deb /tmp/
FROM $BASE
RUN apt-get update \
&& apt-get install -y \
&& apt-get install -y \
curl \
dumb-init \
zsh \
htop \
locales \
man \
nano \
git \
git-lfs \
procps \
openssh-client \
sudo \
vim.tiny \
htop \
locales \
lsb-release \
man-db \
nano \
openssh-client \
procps \
sudo \
vim-tiny \
wget \
zsh \
&& git lfs install \
&& rm -rf /var/lib/apt/lists/*
@ -24,19 +31,22 @@ RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen \
&& locale-gen
ENV LANG=en_US.UTF-8
RUN adduser --gecos '' --disabled-password coder && \
echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
RUN adduser --gecos '' --disabled-password coder \
&& echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
RUN ARCH="$(dpkg --print-architecture)" && \
curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.5/fixuid-0.5-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - && \
chown root:root /usr/local/bin/fixuid && \
chmod 4755 /usr/local/bin/fixuid && \
mkdir -p /etc/fixuid && \
printf "user: coder\ngroup: coder\n" > /etc/fixuid/config.yml
RUN ARCH="$(dpkg --print-architecture)" \
&& curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - \
&& chown root:root /usr/local/bin/fixuid \
&& chmod 4755 /usr/local/bin/fixuid \
&& mkdir -p /etc/fixuid \
&& printf "user: coder\ngroup: coder\n" > /etc/fixuid/config.yml
COPY release-packages/code-server*.deb /tmp/
COPY ci/release-image/entrypoint.sh /usr/bin/entrypoint.sh
RUN dpkg -i /tmp/code-server*$(dpkg --print-architecture).deb && rm /tmp/code-server*.deb
RUN --mount=from=packages,src=/tmp,dst=/tmp/packages dpkg -i /tmp/packages/code-server*$(dpkg --print-architecture).deb
# Allow users to have scripts run on container startup to prepare workspace.
# https://github.com/coder/code-server/issues/5177
ENV ENTRYPOINTD=${HOME}/entrypoint.d
EXPOSE 8080
# This way, if someone sets $DOCKER_USER, docker-exec will still work as

View File

@ -0,0 +1,51 @@
# syntax=docker/dockerfile:experimental
ARG BASE=fedora:39
FROM scratch AS packages
COPY release-packages/code-server*.rpm /tmp/
FROM $BASE
RUN dnf update -y \
&& dnf install -y \
curl \
git \
git-lfs \
htop \
nano \
openssh-clients \
procps \
wget \
zsh \
dumb-init \
glibc-langpack-en \
&& rm -rf /var/cache/dnf
RUN git lfs install
ENV LANG=en_US.UTF-8
RUN echo 'LANG="en_US.UTF-8"' > /etc/locale.conf
RUN useradd -u 1000 coder && echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
RUN ARCH="$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g')" \
&& curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - \
&& chown root:root /usr/local/bin/fixuid \
&& chmod 4755 /usr/local/bin/fixuid \
&& mkdir -p /etc/fixuid \
&& printf "user: coder\ngroup: coder\n" > /etc/fixuid/config.yml
COPY ci/release-image/entrypoint.sh /usr/bin/entrypoint.sh
RUN --mount=from=packages,src=/tmp,dst=/tmp/packages rpm -i /tmp/packages/code-server*$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g').rpm
# Allow users to have scripts run on container startup to prepare workspace.
# https://github.com/coder/code-server/issues/5177
ENV ENTRYPOINTD=${HOME}/entrypoint.d
EXPOSE 8080
# This way, if someone sets $DOCKER_USER, docker-exec will still work as
# the uid will remain the same. note: only relevant if -u isn't passed to
# docker-run.
USER 1000
ENV USER=coder
WORKDIR /home/coder
ENTRYPOINT ["/usr/bin/entrypoint.sh", "--bind-addr", "0.0.0.0:8080", "."]

View File

@ -0,0 +1,51 @@
# syntax=docker/dockerfile:experimental
ARG BASE=opensuse/tumbleweed
FROM scratch AS packages
COPY release-packages/code-server*.rpm /tmp/
FROM $BASE
RUN zypper dup -y \
&& zypper in -y \
curl \
git \
git-lfs \
htop \
nano \
openssh-clients \
procps \
wget \
zsh \
sudo \
catatonit \
&& rm -rf /var/cache/zypp /var/cache/zypper
RUN git lfs install
ENV LANG=en_US.UTF-8
RUN echo 'LANG="en_US.UTF-8"' > /etc/locale.conf
RUN useradd -u 1000 coder && echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
RUN ARCH="$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g')" \
&& curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - \
&& chown root:root /usr/local/bin/fixuid \
&& chmod 4755 /usr/local/bin/fixuid \
&& mkdir -p /etc/fixuid \
&& printf "user: coder\ngroup: coder\n" > /etc/fixuid/config.yml
COPY ci/release-image/entrypoint-catatonit.sh /usr/bin/entrypoint-catatonit.sh
RUN --mount=from=packages,src=/tmp,dst=/tmp/packages rpm -i /tmp/packages/code-server*$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g').rpm
# Allow users to have scripts run on container startup to prepare workspace.
# https://github.com/coder/code-server/issues/5177
ENV ENTRYPOINTD=${HOME}/entrypoint.d
EXPOSE 8080
# This way, if someone sets $DOCKER_USER, docker-exec will still work as
# the uid will remain the same. note: only relevant if -u isn't passed to
# docker-run.
USER 1000
ENV USER=coder
WORKDIR /home/coder
ENTRYPOINT ["/usr/bin/entrypoint-catatonit.sh", "--bind-addr", "0.0.0.0:8080", "."]

View File

@ -6,15 +6,101 @@ variable "VERSION" {
default = "latest"
}
group "default" {
targets = ["code-server"]
variable "DOCKER_REGISTRY" {
default = "docker.io/codercom/code-server"
}
target "code-server" {
dockerfile = "ci/release-image/Dockerfile"
tags = [
"docker.io/codercom/code-server:latest",
notequal("latest",VERSION) ? "docker.io/codercom/code-server:${VERSION}" : "",
variable "GITHUB_REGISTRY" {
default = "ghcr.io/coder/code-server"
}
group "default" {
targets = [
"code-server-debian-12",
"code-server-ubuntu-focal",
"code-server-ubuntu-noble",
"code-server-fedora-39",
"code-server-opensuse-tumbleweed",
]
}
function "prepend_hyphen_if_not_null" {
params = [tag]
result = notequal("","${tag}") ? "-${tag}" : "${tag}"
}
# use empty tag (tag="") to generate default tags
function "gen_tags" {
params = [registry, tag]
result = notequal("","${registry}") ? [
notequal("", "${tag}") ? "${registry}:${tag}" : "${registry}:latest",
notequal("latest",VERSION) ? "${registry}:${VERSION}${prepend_hyphen_if_not_null(tag)}" : "",
] : []
}
# helper function to generate tags for docker registry and github registry.
# set (DOCKER|GITHUB)_REGISTRY="" to disable corresponding registry
function "gen_tags_for_docker_and_ghcr" {
params = [tag]
result = concat(
gen_tags("${DOCKER_REGISTRY}", "${tag}"),
gen_tags("${GITHUB_REGISTRY}", "${tag}"),
)
}
target "code-server-debian-12" {
dockerfile = "ci/release-image/Dockerfile"
tags = concat(
gen_tags_for_docker_and_ghcr(""),
gen_tags_for_docker_and_ghcr("debian"),
gen_tags_for_docker_and_ghcr("bookworm"),
)
platforms = ["linux/amd64", "linux/arm64"]
}
target "code-server-ubuntu-focal" {
dockerfile = "ci/release-image/Dockerfile"
tags = concat(
gen_tags_for_docker_and_ghcr("ubuntu"),
gen_tags_for_docker_and_ghcr("focal"),
)
args = {
BASE = "ubuntu:focal"
}
platforms = ["linux/amd64", "linux/arm64"]
}
target "code-server-ubuntu-noble" {
dockerfile = "ci/release-image/Dockerfile"
tags = concat(
gen_tags_for_docker_and_ghcr("noble"),
)
args = {
BASE = "ubuntu:noble"
}
platforms = ["linux/amd64", "linux/arm64"]
}
target "code-server-fedora-39" {
dockerfile = "ci/release-image/Dockerfile.fedora"
tags = concat(
gen_tags_for_docker_and_ghcr("fedora"),
gen_tags_for_docker_and_ghcr("39"),
)
args = {
BASE = "fedora:39"
}
platforms = ["linux/amd64", "linux/arm64"]
}
target "code-server-opensuse-tumbleweed" {
dockerfile = "ci/release-image/Dockerfile.opensuse"
tags = concat(
gen_tags_for_docker_and_ghcr("opensuse"),
gen_tags_for_docker_and_ghcr("tumbleweed"),
)
args = {
BASE = "opensuse/tumbleweed"
}
platforms = ["linux/amd64", "linux/arm64"]
}

View File

@ -0,0 +1,27 @@
#!/bin/sh
set -eu
# We do this first to ensure sudo works below when renaming the user.
# Otherwise the current container UID may not exist in the passwd database.
eval "$(fixuid -q)"
if [ "${DOCKER_USER-}" ]; then
USER="$DOCKER_USER"
if [ "$DOCKER_USER" != "$(whoami)" ]; then
echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
# Unfortunately we cannot change $HOME as we cannot move any bind mounts
# nor can we bind mount $HOME into a new home as that requires a privileged container.
sudo usermod --login "$DOCKER_USER" coder
sudo groupmod -n "$DOCKER_USER" coder
sudo sed -i "/coder/d" /etc/sudoers.d/nopasswd
fi
fi
# Allow users to have scripts run on container startup to prepare workspace.
# https://github.com/coder/code-server/issues/5177
if [ -d "${ENTRYPOINTD}" ]; then
find "${ENTRYPOINTD}" -type f -executable -print -exec {} \;
fi
exec catatonit -- /usr/bin/code-server "$@"

View File

@ -18,4 +18,10 @@ if [ "${DOCKER_USER-}" ]; then
fi
fi
# Allow users to have scripts run on container startup to prepare workspace.
# https://github.com/coder/code-server/issues/5177
if [ -d "${ENTRYPOINTD}" ]; then
find "${ENTRYPOINTD}" -type f -executable -print -exec {} \;
fi
exec dumb-init /usr/bin/code-server "$@"

View File

@ -2,7 +2,6 @@
set -euo pipefail
main() {
cd "$(dirname "$0")/../.."
# Only sourcing this so we get access to $VERSION
source ./ci/lib.sh
source ./ci/steps/steps-lib.sh
@ -21,94 +20,18 @@ main() {
exit 1
fi
# NOTE: we need to make sure coderci/homebrew-core
# is up-to-date
# otherwise, brew bump-formula-pr will use an
# outdated base
echo "Cloning coderci/homebrew-core"
git clone https://github.com/coderci/homebrew-core.git
# Make sure the git clone step is successful
if directory_exists "homebrew-core"; then
echo "git clone failed. Cannot find homebrew-core directory."
ls -la
exit 1
fi
echo "Changing into homebrew-core directory"
pushd homebrew-core && pwd
echo "Adding Homebrew/homebrew-core"
git remote add upstream https://github.com/Homebrew/homebrew-core.git
# Make sure the git remote step is successful
if ! git config remote.upstream.url > /dev/null; then
echo "git remote add upstream failed."
echo "Could not find upstream in list of remotes."
git remote -v
exit 1
fi
# TODO@jsjoeio - can I somehow check that this succeeded?
echo "Fetching upstream Homebrew/hombrew-core commits"
git fetch upstream
# TODO@jsjoeio - can I somehow check that this succeeded?
echo "Merging in latest Homebrew/homebrew-core changes"
git merge upstream/master
echo "Pushing changes to coderci/homebrew-core fork on GitHub"
# GIT_ASKPASS lets us use the password when pushing without revealing it in the process list
# See: https://serverfault.com/a/912788
PATH_TO_GIT_ASKPASS="$HOME/git-askpass.sh"
# Source: https://serverfault.com/a/912788
# shellcheck disable=SC2016,SC2028
echo 'echo $HOMEBREW_GITHUB_API_TOKEN' > "$PATH_TO_ASKPASS"
# Make sure the git-askpass.sh file creation is successful
if file_exists "$PATH_TO_GIT_ASKPASS"; then
echo "git-askpass.sh not found in $HOME."
ls -la "$HOME"
exit 1
fi
# Ensure it's executable since we just created it
chmod +x "$PATH_TO_GIT_ASKPASS"
# Make sure the git-askpass.sh file is executable
if is_executable "$PATH_TO_GIT_ASKPASS"; then
echo "$PATH_TO_GIT_ASKPASS is not executable."
ls -la "$PATH_TO_GIT_ASKPASS"
exit 1
fi
# Export the variables so git sees them
export HOMEBREW_GITHUB_API_TOKEN="$HOMEBREW_GITHUB_API_TOKEN"
export GIT_ASKPASS="$PATH_TO_ASKPASS"
git push https://coder-oss@github.com/coder-oss/homebrew-core.git --all
# Find the docs for bump-formula-pr here
# https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/bump-formula-pr.rb#L18
local output
if ! output=$(brew bump-formula-pr --version="${VERSION}" code-server --no-browse --no-audit 2>&1); then
if ! output=$(brew bump-formula-pr --version="${VERSION}" code-server --no-browse --no-audit --message="PR opened by @${GITHUB_ACTOR}" 2>&1); then
if [[ $output == *"Duplicate PRs should not be opened"* ]]; then
echo "$VERSION is already submitted"
exit 0
else
echo "$output"
exit 1
fi
fi
# Clean up and remove homebrew-core
popd
rm -rf homebrew-core
# Make sure homebrew-core is removed
if directory_exists "homebrew-core"; then
echo "rm -rf homebrew-core failed."
ls -la
fi
}
main "$@"

View File

@ -3,13 +3,12 @@ set -euo pipefail
main() {
cd "$(dirname "$0")/../.."
# NOTE@jsjoeio - this script assumes VERSION exists as an
# environment variable.
# ci/lib.sh sets VERSION and provides download_artifact here
source ./ci/lib.sh
# Download the release-packages artifact
download_artifact release-packages ./release-packages
# NOTE@jsjoeio - this script assumes that you've downloaded
# the release-packages artifact to ./release-packages before
# running this docker buildx step
docker buildx bake -f ci/release-image/docker-bake.hcl --push
}

View File

@ -13,26 +13,12 @@ main() {
exit 1
fi
# NOTE@jsjoeio - only needed if we use the download_artifact
# because we talk to the GitHub API.
# Needed to use GitHub API
if ! is_env_var_set "GITHUB_TOKEN"; then
echo "GITHUB_TOKEN is not set. Cannot download npm release artifact without GitHub credentials."
exit 1
fi
## Publishing Information
# All the variables below are used to determine how we should publish
# the npm package. We also use this information for bumping the version.
# This is because npm won't publish your package unless it's a new version.
# i.e. for development, we bump the version to <current version>-<pr number>-<commit sha>
# example: "version": "4.0.1-4769-ad7b23cfe6ffd72914e34781ef7721b129a23040"
# We need the current package.json VERSION
if ! is_env_var_set "VERSION"; then
echo "VERSION is not set. Cannot publish to npm without VERSION."
exit 1
fi
# We use this to grab the PR_NUMBER
if ! is_env_var_set "GITHUB_REF"; then
echo "GITHUB_REF is not set. Are you running this locally? We rely on values provided by GitHub."
@ -51,6 +37,13 @@ main() {
exit 1
fi
# Check that we're using at least v7 of npm CLI
if ! command -v jq &> /dev/null; then
echo "Couldn't find jq"
echo "We need this in order to modify the package.json for dev builds."
exit 1
fi
# This allows us to publish to npm in CI workflows
if [[ ${CI-} ]]; then
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
@ -66,7 +59,8 @@ main() {
# "production" - this means we tag with `latest` (default), allowing
# a developer to install this version with `yarn add code-server@latest`
if ! is_env_var_set "NPM_ENVIRONMENT"; then
echo "NPM_ENVIRONMENT is not set. Determining in script based on GITHUB environment variables."
echo "NPM_ENVIRONMENT is not set."
echo "Determining in script based on GITHUB environment variables."
if [[ "$GITHUB_EVENT_NAME" == 'push' && "$GITHUB_REF" == 'refs/heads/main' ]]; then
NPM_ENVIRONMENT="staging"
@ -74,7 +68,6 @@ main() {
NPM_ENVIRONMENT="development"
fi
echo "Using npm environment: $NPM_ENVIRONMENT"
fi
# NOTE@jsjoeio - this script assumes we have the artifact downloaded on disk
@ -82,9 +75,9 @@ main() {
# https://github.com/actions/upload-artifact/issues/38
tar -xzf release-npm-package/package.tar.gz
# Ignore symlink when publishing npm package
# See: https://github.com/coder/code-server/pull/3935
echo "node_modules.asar" > release/.npmignore
# We use this to set the name of the package in the
# package.json
PACKAGE_NAME="code-server"
# NOTES:@jsjoeio
# We only need to run npm version for "development" and "staging".
@ -97,27 +90,29 @@ main() {
NPM_TAG="latest"
else
COMMIT_SHA="$GITHUB_SHA"
echo "Not a production environment"
echo "Found environment: $NPM_ENVIRONMENT"
echo "Manually bumping npm version..."
if [[ "$NPM_ENVIRONMENT" == "staging" ]]; then
NPM_VERSION="$VERSION-beta-$COMMIT_SHA"
# This means the npm version will be tagged with "beta"
# and installed when a user runs `yarn install code-server@beta`
NPM_TAG="beta"
PACKAGE_NAME="@coder/code-server-pr"
fi
if [[ "$NPM_ENVIRONMENT" == "development" ]]; then
# Source: https://github.com/actions/checkout/issues/58#issuecomment-614041550
PR_NUMBER=$(echo "$GITHUB_REF" | awk 'BEGIN { FS = "/" } ; { print $3 }')
NPM_VERSION="$VERSION-$PR_NUMBER-$COMMIT_SHA"
PACKAGE_NAME="@coder/code-server-pr"
# This means the npm version will be tagged with "<pr number>"
# and installed when a user runs `yarn install code-server@<pr number>`
NPM_TAG="$PR_NUMBER"
fi
echo "using tag: $NPM_TAG"
echo "- tag: $NPM_TAG"
echo "- version: $NPM_VERSION"
echo "- package name: $PACKAGE_NAME"
echo "- npm environment: $NPM_ENVIRONMENT"
# We modify the version in the package.json
# to be the current version + the PR number + commit SHA
@ -125,23 +120,34 @@ main() {
# Example: "version": "4.0.1-4769-ad7b23cfe6ffd72914e34781ef7721b129a23040"
# Example: "version": "4.0.1-beta-ad7b23cfe6ffd72914e34781ef7721b129a23040"
pushd release
# NOTE:@jsjoeio
# NOTE@jsjoeio
# I originally tried to use `yarn version` but ran into issues and abandoned it.
npm version "$NPM_VERSION"
# NOTE@jsjoeio
# Use the development package name
# This is so we don't clutter the code-server versions on npm
# with development versions.
# jq can't edit in place so we must store in memory and echo
local contents
contents="$(jq ".name |= \"$PACKAGE_NAME\"" package.json)"
echo "${contents}" > package.json
popd
fi
# NOTE@jsjoeio
# We need to make sure we haven't already published the version.
# This is because npm view won't exit with non-zero so we have
# to check the output.
# If we get error, continue with script because we want to publish
# If version is valid, we check if we're publishing the same one
local hasVersion
hasVersion=$(npm view "code-server@$NPM_VERSION" version)
if [[ $hasVersion == "$NPM_VERSION" ]]; then
echo "$NPM_VERSION is already published"
if hasVersion=$(npm view "$PACKAGE_NAME@$NPM_VERSION" version 2> /dev/null) && [[ $hasVersion == "$NPM_VERSION" ]]; then
echo "$NPM_VERSION is already published under $PACKAGE_NAME"
return
fi
yarn publish --non-interactive release --tag "$NPM_TAG"
# NOTE@jsjoeio
# Since the dev builds are scoped to @coder
# We pass --access public to ensure npm knows it's not private.
yarn publish --non-interactive release --tag "$NPM_TAG" --access public
}
main "$@"

View File

@ -1,5 +1,18 @@
<!-- prettier-ignore-start -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
# Contributor Covenant Code of Conduct
- [Contributor Covenant Code of Conduct](#contributor-covenant-code-of-conduct)
- [Our Pledge](#our-pledge)
- [Our Standards](#our-standards)
- [Our Responsibilities](#our-responsibilities)
- [Scope](#scope)
- [Enforcement](#enforcement)
- [Attribution](#attribution)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- prettier-ignore-end -->
# Contributor Covenant Code of Conduct

View File

@ -1,14 +1,18 @@
<!-- prettier-ignore-start -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
# Contributing
- [Requirements](#requirements)
- [Linux-specific requirements](#linux-specific-requirements)
- [Creating pull requests](#creating-pull-requests)
- [Commits and commit history](#commits-and-commit-history)
- [Development workflow](#development-workflow)
- [Updates to VS Code](#updates-to-vs-code)
- [Version updates to Code](#version-updates-to-code)
- [Patching Code](#patching-code)
- [Build](#build)
- [Creating a Standalone Release](#creating-a-standalone-release)
- [Troubleshooting](#troubleshooting)
- [I see "Forbidden access" when I load code-server in the browser](#i-see-forbidden-access-when-i-load-code-server-in-the-browser)
- ["Can only have one anonymous define call per script"](#can-only-have-one-anonymous-define-call-per-script)
- [Help](#help)
- [Test](#test)
- [Unit tests](#unit-tests)
@ -16,21 +20,19 @@
- [Integration tests](#integration-tests)
- [End-to-end tests](#end-to-end-tests)
- [Structure](#structure)
- [Modifications to VS Code](#modifications-to-vs-code)
- [Modifications to Code](#modifications-to-code)
- [Currently Known Issues](#currently-known-issues)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
- [Detailed CI and build process docs](../ci)
<!-- prettier-ignore-end -->
## Requirements
The prerequisites for contributing to code-server are almost the same as those
for [VS
Code](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites).
for [VS Code](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites).
Here is what is needed:
- `node` v14.x
- `node` v20.x
- `git` v2.x or greater
- [`git-lfs`](https://git-lfs.github.com)
- [`yarn`](https://classic.yarnpkg.com/en/)
@ -44,6 +46,8 @@ Here is what is needed:
signature
verification](https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification)
or follow [this tutorial](https://joeprevite.com/verify-commits-on-github)
- `quilt`
- Used to manage patches to Code
- `rsync` and `unzip`
- Used for code-server releases
- `bats`
@ -51,104 +55,145 @@ Here is what is needed:
### Linux-specific requirements
If you're developing code-server on Linux, make sure you have installed or install the following dependencies:
If you're developing code-server on Linux, make sure you have installed or
install the following dependencies:
```shell
sudo apt-get install build-essential g++ libx11-dev libxkbfile-dev libsecret-1-dev python-is-python3
sudo apt-get install build-essential g++ libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev python-is-python3
```
These are required by VS Code. See [their Wiki](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites) for more information.
## Creating pull requests
Please create a [GitHub Issue](https://github.com/coder/code-server/issues) that
includes context for issues that you see. You can skip this if the proposed fix
is minor.
In your pull requests (PR), link to the issue that the PR solves.
Please ensure that the base of your PR is the **main** branch.
### Commits and commit history
We prefer a clean commit history. This means you should squash all fixups and
fixup-type commits before asking for a review (e.g., clean up, squash, then force
push). If you need help with this, feel free to leave a comment in your PR, and
we'll guide you.
These are required by Code. See [their Wiki](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites)
for more information.
## Development workflow
The current development workflow is a bit tricky because we have this repo and we use our `coder/vscode` fork inside it with [`yarn link`](https://classic.yarnpkg.com/lang/en/docs/cli/link/).
Here are these steps you should follow to get your dev environment setup:
1. `git clone https://github.com/coder/code-server.git` - Clone `code-server`
2. `git clone https://github.com/coder/vscode.git` - Clone `vscode`
3. `cd vscode && yarn install` - install the dependencies in the `vscode` repo
4. `cd code-server && yarn install` - install the dependencies in the `code-server` repo
5. `cd vscode && yarn link` - use `yarn` to create a symlink to the `vscode` repo (`code-oss-dev` package)
6. `cd code-server && yarn link code-oss-dev --modules-folder vendor/modules` - links your local `vscode` repo (`code-oss-dev` package) inside your local version of code-server
7. `cd code-server && yarn watch` - this will spin up code-server on localhost:8080 which you can start developing. It will live reload changes to the source.
2. `git submodule update --init` - Clone `vscode` submodule
3. `quilt push -a` - Apply patches to the `vscode` submodule.
4. `yarn` - Install dependencies
5. `yarn watch` - Launch code-server localhost:8080. code-server will be live
reloaded when changes are made; the browser needs to be refreshed manually.
### Updates to VS Code
When pulling down changes that include modifications to the patches you will
need to apply them with `quilt`. If you pull down changes that update the
`vscode` submodule you will need to run `git submodule update --init` and
re-apply the patches.
If changes are made and merged into `main` in the [`coder/vscode`](https://github.com/coder/vscode) repo, then you'll need to update the version in the `code-server` repo by following these steps:
When you make a change that affects people deploying the marketplace please
update the changelog as part of your PR.
1. Update the package tag listed in `vendor/package.json`:
Note that building code-server takes a very, very long time, and loading it in
the browser in development mode also takes a very, very long time.
```json
{
"devDependencies": {
"vscode": "coder/vscode#<latest-commit-sha>"
}
}
```
Display language (Spanish, etc) support only works in a full build; it will not
work in development mode.
2. From the code-server **project root**, run `yarn install`.
Then, test code-server locally to make sure everything works.
3. Check the Node.js version that's used by Electron (which is shipped with VS
Code. If necessary, update your version of Node.js to match.
4. Open a PR
Generally we prefer that PRs be squashed into `main` but you can rebase or merge
if it is important to keep the individual commits (make sure to clean up the
commits first if you are doing this).
> Watch for updates to
> `vendor/modules/code-oss-dev/src/vs/code/browser/workbench/workbench.html`. You may need to
> make changes to `src/browser/pages/vscode.html`.
### Version updates to Code
1. Remove any patches with `quilt pop -a`.
2. Update the `lib/vscode` submodule to the desired upstream version branch.
1. `cd lib/vscode && git checkout release/1.66 && cd ../..`
2. `git add lib && git commit -m "chore: update to Code <version>"`
3. Apply the patches one at a time (`quilt push`). If the application succeeds
but the lines changed, update the patch with `quilt refresh`. If there are
conflicts, then force apply with `quilt push -f`, manually add back the
rejected code, then run `quilt refresh`.
4. From the code-server **project root**, run `yarn install`.
5. Check the Node.js version that's used by Electron (which is shipped with VS
Code. If necessary, update our version of Node.js to match.
### Patching Code
1. You can go through the patch stack with `quilt push` and `quilt pop`.
2. Create a new patch (`quilt new {name}.diff`) or use an existing patch.
3. Add the file(s) you are patching (`quilt add [-P patch] {file}`). A file
**must** be added before you make changes to it.
4. Make your changes. Patches do not need to be independent of each other but
each patch must result in a working code-server without any broken in-between
states otherwise they are difficult to test and modify.
5. Add your changes to the patch (`quilt refresh`)
6. Add a comment in the patch about the reason for the patch and how to
reproduce the behavior it fixes or adds. Every patch should have an e2e test
as well.
### Build
You can build as follows:
You can build a full production as follows:
```shell
git submodule update --init
quilt push -a
yarn install
yarn build
yarn build:vscode
VERSION=0.0.0 yarn build:vscode
yarn release
```
This does not keep `node_modules`. If you want them to be kept, use
`KEEP_MODULES=1 yarn release`
Run your build:
```shell
cd release
yarn --production
npm install --omit=dev # Skip if you used KEEP_MODULES=1
# Runs the built JavaScript with Node.
node .
```
Build the release packages (make sure that you run `yarn release` first):
Then, to build the release package:
```shell
yarn release:standalone
yarn test:standalone-release
yarn test:integration
yarn package
```
> On Linux, the currently running distro will become the minimum supported
> version. In our GitHub Actions CI, we use CentOS 7 for maximum compatibility.
> version. In our GitHub Actions CI, we use CentOS 8 for maximum compatibility.
> If you need your builds to support older distros, run the build commands
> inside a Docker container with all the build requirements installed.
#### Creating a Standalone Release
Part of the build process involves creating standalone releases. At the time of
writing, we do this for the following platforms/architectures:
- Linux amd64 (.tar.gz, .deb, and .rpm)
- Linux arm64 (.tar.gz, .deb, and .rpm)
- Linux arm7l (.tar.gz)
- Linux armhf.deb
- Linux armhf.rpm
- macOS arm64.tar.gz
Currently, these are compiled in CI using the `yarn release:standalone` command
in the `release.yaml` workflow. We then upload them to the draft release and
distribute via GitHub Releases.
### Troubleshooting
#### I see "Forbidden access" when I load code-server in the browser
This means your patches didn't apply correctly. We have a patch to remove the
auth from vanilla Code because we use our own.
Try popping off the patches with `quilt pop -a` and reapplying with `quilt push
-a`.
#### "Can only have one anonymous define call per script"
Code might be trying to use a dev or prod HTML in the wrong context. You can try
re-running code-server and setting `VSCODE_DEV=1`.
### Help
If you get stuck or need help, you can always start a new GitHub Discussion [here](https://github.com/coder/code-server/discussions). One of the maintainers will respond and help you out.
If you get stuck or need help, you can always start a new GitHub Discussion
[here](https://github.com/coder/code-server/discussions). One of the maintainers
will respond and help you out.
## Test
@ -166,7 +211,9 @@ Our unit tests are written in TypeScript and run using
These live under [test/unit](../test/unit).
We use unit tests for functions and things that can be tested in isolation. The file structure is modeled closely after `/src` so it's easy for people to know where test files should live.
We use unit tests for functions and things that can be tested in isolation. The
file structure is modeled closely after `/src` so it's easy for people to know
where test files should live.
### Script tests
@ -174,13 +221,14 @@ Our script tests are written in bash and run using [bats](https://github.com/bat
These tests live under `test/scripts`.
We use these to test anything related to our scripts (most of which live under `ci`).
We use these to test anything related to our scripts (most of which live under
`ci`).
### Integration tests
These are a work in progress. We build code-server and run a script called
[test-standalone-release.sh](../ci/build/test-standalone-release.sh), which
ensures that code-server's CLI is working.
These are a work in progress. We build code-server and run tests with `yarn
test:integration`, which ensures that code-server builds work on their
respective platforms.
Our integration tests look at components that rely on one another. For example,
testing the CLI requires us to build and package code-server.
@ -201,106 +249,48 @@ Take a look at `codeServer.test.ts` to see how you would use it (see
We also have a model where you can create helpers to use within tests. See
[models/CodeServer.ts](../test/e2e/models/CodeServer.ts) for an example.
Generally speaking, e2e means testing code-server while running in the browser
and interacting with it in a way that's similar to how a user would interact
with it. When running these tests with `yarn test:e2e`, you must have
code-server running locally. In CI, this is taken care of for you.
## Structure
The `code-server` script serves as an HTTP API for login and starting a remote VS
Code process.
code-server essentially serves as an HTTP API for logging in and starting a
remote Code process.
The CLI code is in [src/node](../src/node) and the HTTP routes are implemented
in [src/node/routes](../src/node/routes).
Most of the meaty parts are in the VS Code portion of the codebase under
[vendor/modules/code-oss-dev](../vendor/modules/code-oss-dev), which we describe next.
Most of the meaty parts are in the Code portion of the codebase under
[lib/vscode](../lib/vscode), which we describe next.
### Modifications to VS Code
### Modifications to Code
In v1 of code-server, we had a patch of VS Code that split the codebase into a
front-end and a server. The front-end consisted of the UI code, while the server
ran the extensions and exposed an API to the front-end for file access and all
UI needs.
Our modifications to Code can be found in the [patches](../patches) directory.
We pull in Code as a submodule pointing to an upstream release branch.
Over time, Microsoft added support to VS Code to run it on the web. They have
made the front-end open source, but not the server. As such, code-server v2 (and
later) uses the VS Code front-end and implements the server. We do this by using
a Git subtree to fork and modify VS Code. This code lives under
[vendor/modules/code-oss-dev](../vendor/modules/code-oss-dev).
In v1 of code-server, we had Code as a submodule and used a single massive patch
that split the codebase into a front-end and a server. The front-end consisted
of the UI code, while the server ran the extensions and exposed an API to the
front-end for file access and all UI needs.
Some noteworthy changes in our version of VS Code include:
Over time, Microsoft added support to Code to run it on the web. They had made
the front-end open source, but not the server. As such, code-server v2 (and
later) uses the Code front-end and implements the server. We did this by using a
Git subtree to fork and modify Code.
- Adding our build file, [`vendor/modules/code-oss-dev/coder.js`](../vendor/modules/code-oss-dev/coder.js), which includes build steps specific to code-server
- Node.js version detection changes in [`build/lib/node.ts`](../vendor/modules/code-oss-dev/build/lib/node.ts) and [`build/lib/util.ts`](../vendor/modules/code-oss-dev/build/lib/util.ts)
- Allowing extra extension directories
- Added extra arguments to [`src/vs/platform/environment/common/argv.ts`](../vendor/modules/code-oss-dev/src/vs/platform/environment/common/argv.ts) and to [`src/vs/platform/environment/node/argv.ts`](../vendor/modules/code-oss-dev/src/vs/platform/environment/node/argv.ts)
- Added extra environment state to [`src/vs/platform/environment/common/environment.ts`](../vendor/modules/code-oss-dev/src/vs/platform/environment/common/environment.ts);
- Added extra getters to [`src/vs/platform/environment/common/environmentService.ts`](../vendor/modules/code-oss-dev/src/vs/platform/environment/common/environmentService.ts)
- Added extra scanning paths to [`src/vs/platform/extensionManagement/node/extensionsScanner.ts`](../vendor/modules/code-oss-dev/src/vs/platform/extensionManagement/node/extensionsScanner.ts)
- Additions/removals from [`package.json`](../vendor/modules/code-oss-dev/package.json):
- Removing `electron`, `keytar` and `native-keymap` to avoid pulling in desktop dependencies during build on Linux
- Removing `gulp-azure-storage` and `gulp-tar` (unsued in our build process, may pull in outdated dependencies)
- Adding `proxy-agent`, `proxy-from-env` (for proxying) and `rimraf` (used during build/install steps)
- Adding our branding/custom URLs/version:
- [`product.json`](../vendor/modules/code-oss-dev/product.json)
- [`src/vs/base/common/product.ts`](../vendor/modules/code-oss-dev/src/vs/base/common/product.ts)
- [`src/vs/workbench/browser/parts/dialogs/dialogHandler.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts)
- [`src/vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page.ts)
- [`src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts)
- Removing azure/macOS signing related dependencies from [`build/package.json`](../vendor/modules/code-oss-dev/build/package.json)
- Modifying `.gitignore` to allow us to add files to `src/vs/server` and modifying `.eslintignore` to ignore lint on the shared files below (we use different formatter settings than VS Code).
- Sharing some files with our codebase via symlinks:
- [`src/vs/base/common/ipc.d.ts`](../vendor/modules/code-oss-dev/src/vs/base/common/ipc.d.ts) points to [`typings/ipc.d.ts`](../typings/ipc.d.ts)
- [`src/vs/base/common/util.ts`](../vendor/modules/code-oss-dev/src/vs/base/common/util.ts) points to [`src/common/util.ts`](../src/common/util.ts)
- [`src/vs/base/node/proxy_agent.ts`](../vendor/modules/code-oss-dev/src/vs/base/node/proxy_agent.ts) points to [`src/node/proxy_agent.ts`](../src/node/proxy_agent.ts)
- Allowing socket changes by adding `setSocket` in [`src/vs/base/parts/ipc/common/ipc.net.ts`](../vendor/modules/code-oss-dev/src/vs/base/parts/ipc/common/ipc.net.ts)
- We use this for connection persistence in our server-side code.
- Added our server-side Node.JS code to `src/vs/server`.
- This code includes the logic to spawn the various services (extension host, terminal, etc.) and some glue
- Added [`src/vs/workbench/browser/client.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/browser/client.ts) to hold some server customizations.
- Includes the functionality for the Log Out command and menu item
- Also, imported and called `initialize` from the main web file, [`src/vs/workbench/browser/web.main.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/browser/web.main.ts)
- Added a (hopefully temporary) hotfix to [`src/vs/workbench/common/resources.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/common/resources.ts) to get context menu actions working for the Git integration.
- Added connection type to WebSocket query parameters in [`src/vs/platform/remote/common/remoteAgentConnection.ts`](../vendor/modules/code-oss-dev/src/vs/platform/remote/common/remoteAgentConnection.ts)
- Added `CODE_SERVER*` variables to the sanitization list in [`src/vs/base/common/processes.ts`](../vendor/modules/code-oss-dev/src/vs/base/common/processes.ts)
- Fix localization support:
- Added file [`src/vs/workbench/services/localizations/browser/localizationsService.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/services/localizations/browser/localizationsService.ts).
- Modified file [`src/vs/base/common/platform.ts`](../vendor/modules/code-oss-dev/src/vs/base/common/platform.ts)
- Modified file [`src/vs/base/node/languagePacks.js`](../vendor/modules/code-oss-dev/src/vs/base/node/languagePacks.js)
- Added code to allow server to inject settings to [`src/vs/platform/product/common/product.ts`](../vendor/modules/code-oss-dev/src/vs/platform/product/common/product.ts)
- Extension fixes:
- Avoid disabling extensions by extensionKind in [`src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts) (Needed for vscode-icons)
- Remove broken symlinks in [`extensions/postinstall.js`](../vendor/modules/code-oss-dev/extensions/postinstall.js)
- Add tip about extension gallery in [`src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts)
- Use our own server for GitHub authentication in [`extensions/github-authentication/src/githubServer.ts`](../vendor/modules/code-oss-dev/extensions/github-authentication/src/githubServer.ts)
- Settings persistence on the server in [`src/vs/workbench/services/environment/browser/environmentService.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/services/environment/browser/environmentService.ts)
- Add extension install fallback in [`src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts)
- Add proxy-agent monkeypatch and keep extension host indefinitely running in [`src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts)
- Patch build system to avoid removing extension dependencies for `yarn global add` users in [`build/lib/extensions.ts`](../vendor/modules/code-oss-dev/build/lib/extensions.ts)
- Allow all extensions to use proposed APIs in [`src/vs/workbench/services/environment/browser/environmentService.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/services/environment/browser/environmentService.ts)
- Make storage writes async to allow extensions to wait for them to complete in [`src/vs/platform/storage/common/storage.ts`](../vendor/modules/code-oss-dev/src/vs/platform/storage/common/storage.ts)
- Specify webview path in [`src/vs/code/browser/workbench/workbench.ts`](../vendor/modules/code-oss-dev/src/vs/code/browser/workbench/workbench.ts)
- URL readability improvements for folder/workspace in [`src/vs/code/browser/workbench/workbench.ts`](../vendor/modules/code-oss-dev/src/vs/code/browser/workbench/workbench.ts)
- Socket/Authority-related fixes (for remote proxying etc.):
- [`src/vs/code/browser/workbench/workbench.ts`](../vendor/modules/code-oss-dev/src/vs/code/browser/workbench/workbench.ts)
- [`src/vs/platform/remote/browser/browserSocketFactory.ts`](../vendor/modules/code-oss-dev/src/vs/platform/remote/browser/browserSocketFactory.ts)
- [`src/vs/base/common/network.ts`](../vendor/modules/code-oss-dev/src/vs/base/common/network.ts)
- Added code to write out IPC path in [`src/vs/workbench/api/node/extHostCLIServer.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/api/node/extHostCLIServer.ts)
Microsoft eventually made the server open source and we were able to reduce our
changes significantly. Some time later we moved back to a submodule and patches
(managed by `quilt` this time instead of the mega-patch).
As the web portion of VS Code matures, we'll be able to shrink and possibly
eliminate our modifications. In the meantime, upgrading the VS Code version requires
us to ensure that our changes are still applied and work as intended. In the future,
we'd like to run VS Code unit tests against our builds to ensure that features
work as expected.
As the web portion of Code continues to mature, we'll be able to shrink and
possibly eliminate our patches. In the meantime, upgrading the Code version
requires us to ensure that our changes are still applied correctly and work as
intended. In the future, we'd like to run Code unit tests against our builds to
ensure that features work as expected.
> We have [extension docs](../ci/README.md) on the CI and build system.
If the functionality you're working on does NOT depend on code from VS Code, please
If the functionality you're working on does NOT depend on code from Code, please
move it out and into code-server.
### Currently Known Issues
- Creating custom VS Code extensions and debugging them doesn't work
- Creating custom Code extensions and debugging them doesn't work
- Extension profiling and tips are currently disabled

View File

@ -1,3 +1,4 @@
<!-- prettier-ignore-start -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
# FAQ
@ -13,6 +14,7 @@
- [How do I install an extension manually?](#how-do-i-install-an-extension-manually)
- [How do I use my own extensions marketplace?](#how-do-i-use-my-own-extensions-marketplace)
- [Where are extensions stored?](#where-are-extensions-stored)
- [Where is VS Code configuration stored?](#where-is-vs-code-configuration-stored)
- [How can I reuse my VS Code configuration?](#how-can-i-reuse-my-vs-code-configuration)
- [How does code-server decide what workspace or folder to open?](#how-does-code-server-decide-what-workspace-or-folder-to-open)
- [How do I access my Documents/Downloads/Desktop folders in code-server on macOS?](#how-do-i-access-my-documentsdownloadsdesktop-folders-in-code-server-on-macos)
@ -25,14 +27,20 @@
- [Is multi-tenancy possible?](#is-multi-tenancy-possible)
- [Can I use Docker in a code-server container?](#can-i-use-docker-in-a-code-server-container)
- [How do I disable telemetry?](#how-do-i-disable-telemetry)
- [What's the difference between code-server and Coder?](#whats-the-difference-between-code-server-and-coder)
- [What's the difference between code-server and Theia?](#whats-the-difference-between-code-server-and-theia)
- [What's the difference between code-server and OpenVSCode-Server?](#whats-the-difference-between-code-server-and-openvscode-server)
- [What's the difference between code-server and GitHub Codespaces?](#whats-the-difference-between-code-server-and-github-codespaces)
- [Does code-server have any security login validation?](#does-code-server-have-any-security-login-validation)
- [Are there community projects involving code-server?](#are-there-community-projects-involving-code-server)
- [How do I change the port?](#how-do-i-change-the-port)
- [How do I hide the coder/coder promotion in Help: Getting Started?](#how-do-i-hide-the-codercoder-promotion-in-help-getting-started)
- [How do I disable the proxy?](#how-do-i-disable-the-proxy)
- [How do I disable file download?](#how-do-i-disable-file-download)
- [Why do web views not work?](#why-do-web-views-not-work)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- prettier-ignore-end -->
## Questions?
@ -83,6 +91,12 @@ app (PWA):
1. Start the editor
2. Click the **plus** icon in the URL toolbar to install the PWA
If you use Firefox, you can use the appropriate extension to install PWA.
1. Go to the installation [website](https://addons.mozilla.org/en-US/firefox/addon/pwas-for-firefox/) of the add-on
2. Add the add-on to Firefox
3. Follow the os-specific instructions on how to install the runtime counterpart
For other browsers, you'll have to remap keybindings for shortcuts to work.
## Why can't code-server use Microsoft's extension marketplace?
@ -164,10 +178,10 @@ If you own a marketplace that implements the VS Code Extension Gallery API, you
can point code-server to it by setting `$EXTENSIONS_GALLERY`.
This corresponds directly with the `extensionsGallery` entry in in VS Code's `product.json`.
For example, to use the legacy Coder extensions marketplace:
For example:
```bash
export EXTENSIONS_GALLERY='{"serviceUrl": "https://extensions.coder.com/api"}'
export EXTENSIONS_GALLERY='{"serviceUrl": "https://my-extensions/api"}'
```
Though you can technically use Microsoft's marketplace in this manner, we
@ -180,10 +194,20 @@ docs](https://github.com/VSCodium/vscodium/blob/master/DOCS.md#extensions--marke
## Where are extensions stored?
Extensions are store, by default, to `~/.local/share/code-server/extensions`.
Extensions are stored in `~/.local/share/code-server/extensions` by default.
If you set the `XDG_DATA_HOME` environment variable, the data directory will be
`$XDG_DATA_HOME/code-server/extensions`. In general, we try to follow the XDG directory spec.
On Linux and macOS if you set the `XDG_DATA_HOME` environment variable, the
extensions directory will be `$XDG_DATA_HOME/code-server/extensions`. In
general, we try to follow the XDG directory spec.
## Where is VS Code configuration stored?
VS Code configuration such as settings and keybindings are stored in
`~/.local/share/code-server` by default.
On Linux and macOS if you set the `XDG_DATA_HOME` environment variable, the data
directory will be `$XDG_DATA_HOME/code-server`. In general, we try to follow the
XDG directory spec.
## How can I reuse my VS Code configuration?
@ -333,6 +357,12 @@ hashed-password: "$argon2i$v=19$m=4096,t=3,p=1$wST5QhBgk2lu1ih4DMuxvg$LS1alrVdIW
The `hashed-password` field takes precedence over `password`.
If you're using Docker Compose file, in order to make this work, you need to change all the single $ to $$. For example:
```yaml
- HASHED_PASSWORD=$$argon2i$$v=19$$m=4096,t=3,p=1$$wST5QhBgk2lu1ih4DMuxvg$$LS1alrVdIWtvZHwnzCM1DUGg+5DTO3Dt1d5v9XtLws4
```
## Is multi-tenancy possible?
If you want to run multiple code-servers on shared infrastructure, we recommend
@ -359,6 +389,15 @@ Use the `--disable-telemetry` flag to disable telemetry.
> We use the data collected only to improve code-server.
## What's the difference between code-server and Coder?
code-server and Coder are both applications that can be installed on any
machine. The main difference is who they serve. Out of the box, code-server is
simply VS Code in the browser while Coder is a tool for provisioning remote
development environments via Terraform.
code-server was built for individuals while Coder was built for teams. In Coder, you create Workspaces which can have applications like code-server. If you're looking for a team solution, you should reach for [Coder](https://github.com/coder/coder).
## What's the difference between code-server and Theia?
At a high level, code-server is a patched fork of VS Code that runs in the
@ -376,19 +415,13 @@ Theia doesn't allow you to reuse your existing VS Code config.
## What's the difference between code-server and OpenVSCode-Server?
code-server and OpenVSCode-Server both allow you to access VS Code via a
browser. The two projects also use their own [forks of VS Code](https://github.com/coder/vscode) to
leverage modern VS Code APIs and stay up to date with the upsteam version.
browser. OpenVSCode-Server is a direct fork of VS Code with changes comitted
directly while code-server pulls VS Code in via a submodule and makes changes
via patch files.
However, OpenVSCode-Server is scoped at only making VS Code available in the web browser.
code-server includes some other features:
- password auth
- proxy web ports
- certificate support
- plugin API
- settings sync (coming soon)
For more details, see [this discussion post](https://github.com/coder/code-server/discussions/4267#discussioncomment-1411583).
However, OpenVSCode-Server is scoped at only making VS Code available as-is in
the web browser. code-server contains additional changes to make the self-hosted
experience better (see the next section for details).
## What's the difference between code-server and GitHub Codespaces?
@ -396,8 +429,24 @@ Both code-server and GitHub Codespaces allow you to access VS Code via a
browser. GitHub Codespaces, however, is a closed-source, paid service offered by
GitHub and Microsoft.
On the other hand, code-server is self-hosted, free, open-source, and
can be run on any machine with few limitations.
On the other hand, code-server is self-hosted, free, open-source, and can be run
on any machine with few limitations.
Specific changes include:
- Password authentication
- The ability to host at sub-paths
- Self-contained web views that do not call out to Microsoft's servers
- The ability to use your own marketplace and collect your own telemetry
- Built-in proxy for accessing ports on the remote machine integrated into
VS Code's ports panel
- Wrapper process that spawns VS Code on-demand and has a separate CLI
- Notification when updates are available
- [Some other things](https://github.com/coder/code-server/tree/main/patches)
Some of these changes appear very unlikely to ever be adopted by Microsoft.
Some may make their way upstream, further closing the gap, but at the moment it
looks like there will always be some subtle differences.
## Does code-server have any security login validation?
@ -416,3 +465,45 @@ There are two ways to change the port on which code-server runs:
1. with an environment variable e.g. `PORT=3000 code-server`
2. using the flag `--bind-addr` e.g. `code-server --bind-addr localhost:3000`
## How do I hide the coder/coder promotion in Help: Getting Started?
You can pass the flag `--disable-getting-started-override` to `code-server` or
you can set the environment variable `CS_DISABLE_GETTING_STARTED_OVERRIDE=1` or
`CS_DISABLE_GETTING_STARTED_OVERRIDE=true`.
## How do I disable the proxy?
You can pass the flag `--disable-proxy` to `code-server` or
you can set the environment variable `CS_DISABLE_PROXY=1` or
`CS_DISABLE_PROXY=true`.
Note, this option currently only disables the proxy routes to forwarded ports, including
the domain and path proxy routes over HTTP and WebSocket; however, it does not
disable the automatic port forwarding in the VS Code workbench itself. In other words,
user will still see the Ports tab and notifications, but will not be able to actually
use access the ports. It is recommended to set `remote.autoForwardPorts` to `false`
when using the option.
## How do I disable file download?
You can pass the flag `--disable-file-downloads` to `code-server`
## Why do web views not work?
Web views rely on service workers, and service workers are only available in a
secure context, so most likely the answer is that you are using an insecure
context (for example an IP address).
If this happens, in the browser log you will see something like:
> Error loading webview: Error: Could not register service workers: SecurityError: Failed to register a ServiceWorker for scope with script: An SSL certificate error occurred when fetching the script..
To fix this, you must either:
- Access over localhost/127.0.0.1 which is always considered secure.
- Use a domain with a real certificate (for example with Let's Encrypt).
- Use a trusted self-signed certificate with [mkcert](https://mkcert.dev) (or
create and trust a certificate manually).
- Disable security if your browser allows it. For example, in Chromium see
`chrome://flags/#unsafely-treat-insecure-origin-as-secure`

View File

@ -1,192 +1,57 @@
<!-- prettier-ignore-start -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
# Maintaining
- [Team](#team)
- [Onboarding](#onboarding)
- [Offboarding](#offboarding)
- [Workflow](#workflow)
- [Milestones](#milestones)
- [Triage](#triage)
- [Project boards](#project-boards)
- [Versioning](#versioning)
- [Pull requests](#pull-requests)
- [Merge strategies](#merge-strategies)
- [Changelog](#changelog)
- [Releases](#releases)
- [Publishing a release](#publishing-a-release)
- [Releasing](#releasing)
- [Release Candidates](#release-candidates)
- [AUR](#aur)
- [Docker](#docker)
- [Homebrew](#homebrew)
- [nixpkgs](#nixpkgs)
- [npm](#npm)
- [Syncing with Upstream VS Code](#syncing-with-upstream-vs-code)
- [Testing](#testing)
- [Documentation](#documentation)
- [Troubleshooting](#troubleshooting)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- prettier-ignore-end -->
This document is meant to serve current and future maintainers of code-server,
as well as share our workflow for maintaining the project.
We keep code-server up to date with VS Code releases (there are usually two or
three a month) but we are not generally actively developing code-server aside
from fixing regressions.
## Team
Most of the work is keeping on top of issues and discussions.
Current maintainers:
## Releasing
- @code-asher
- @TeffenEllis
- @jsjoeio
1. Check that the changelog lists all the important changes.
2. Make sure the changelog entry lists the current version of VS Code.
3. Update the changelog with the release date.
4. Go to GitHub Actions > Draft release > Run workflow on the commit you want to
release. Make sure CI has finished the build workflow on that commit or this
will fail. For the version we match VS Code's minor and patch version. The
patch number may become temporarily out of sync if we need to put out a
patch, but if we make our own minor change then we will not release it until
the next minor VS Code release.
5. CI will automatically grab the build artifact on that commit (which is why CI
has to have completed), inject the provided version into the `package.json`,
put together platform-specific packages, and upload those packages to a draft
release.
6. Update the resulting draft release with the changelog contents.
7. Publish the draft release after validating it.
8. Bump the Helm chart version once the Docker images have published.
Occasionally, other Coder employees may step in time to time to assist with code-server.
#### Release Candidates
### Onboarding
We prefer to do release candidates so the community can test things before a
full-blown release. To do this follow the same steps as above but:
To onboard a new maintainer to the project, please make sure to do the following:
- [ ] Add to [coder/code-server-reviewers](https://github.com/orgs/coder/teams/code-server-reviewers)
- [ ] Add as Admin under [Repository Settings > Access](https://github.com/coder/code-server/settings/access)
- [ ] Add to [npm Coder org](https://www.npmjs.com/org/coder)
- [ ] Add as [AUR maintainer](https://aur.archlinux.org/packages/code-server/) (talk to Colin)
- [ ] Introduce to community via Discussion (see [example](https://github.com/coder/code-server/discussions/3955))
### Offboarding
Very similar to Onboarding but Remove maintainer from all teams and revoke access. Please also do the following:
- [ ] Write farewell post via Discussion (see [example](https://github.com/coder/code-server/discussions/3933))
## Workflow
The workflow used by code-server maintainers aims to be easy to understood by
the community and easy enough for new maintainers to jump in and start
contributing on day one.
### Milestones
We operate mainly using
[milestones](https://github.com/coder/code-server/milestones). This was heavily
inspired by our friends over at [vscode](https://github.com/microsoft/vscode).
Here are the milestones we use and how we use them:
- "Backlog" -> Work not yet planned for a specific release.
- "On Deck" -> Work under consideration for upcoming milestones.
- "Backlog Candidates" -> Work that is not yet accepted for the backlog. We wait
for the community to weigh in.
- "<0.0.0>" -> Work to be done for a specific version.
With this flow, any un-assigned issues are essentially in triage state. Once
triaged, issues are either "Backlog" or "Backlog Candidates". They will
eventually move to "On Deck" (or be closed). Lastly, they will end up on a
version milestone where they will be worked on.
### Triage
We use the following process for triaging GitHub issues:
1. Create an issue
1. Add appropriate labels to the issue (including "needs-investigation" if we
should look into it further)
1. Add the issue to a milestone
1. If it should be fixed soon, add to version milestone or "On Deck"
2. If not urgent, add to "Backlog"
3. Otherwise, add to "Backlog Candidate" for future consideration
### Project boards
We use project boards for projects or goals that span multiple milestones.
Think of this as a place to put miscellaneous things (like testing, clean up
stuff, etc). As a maintainer, random tasks may come up here and there. The
project boards give you places to add temporary notes before opening a new
issue. Given that our release milestones function off of issues, we believe
tasks should have dedicated issues.
Project boards also give us a way to separate the issue triage from
bigger-picture, long-term work.
## Versioning
`<major.minor.patch>`
The code-server project follows traditional [semantic
versioning](https://semver.org/), with the objective of minimizing major changes
that break backward compatibility. We increment the patch level for all
releases, except when the upstream Visual Studio Code project increments its
minor version or we change the plugin API in a backward-compatible manner. In
those cases, we increment the minor version rather than the patch level.
## Pull requests
Ideally, every PR should fix an issue. If it doesn't, make sure it's associated
with a version milestone.
If a PR does fix an issue, don't add it to the version milestone. Otherwise, the
version milestone will have duplicate information: the issue and the PR fixing
the issue.
### Merge strategies
For most things, we recommend the **squash and merge** strategy. There
may be times where **creating a merge commit** makes sense as well. Use your
best judgment. If you're unsure, you can always discuss in the PR with the team.
### Changelog
To save time when creating a new release for code-server, we keep a running
changelog at `CHANGELOG.md`.
If either the author or reviewer of a PR believes the change should be mentioned
in the changelog, then it should be added.
If there is not a **Next Version** when you modify `CHANGELOG.md`, please add it
using the template you see near the top of the changelog.
When writing your changelog item, ask yourself:
1. How do these changes affect code-server users?
2. What actions do they need to take (if any)?
If you need inspiration, we suggest looking at the [Emacs
changelog](https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS).
## Releases
With each release, we rotate the role of release manager to ensure every
maintainer goes through the process. This helps us keep documentation up-to-date
and encourages us to continually review and improve the flow.
If you're the current release manager, follow these steps:
1. Create a [release issue](../.github/ISSUE_TEMPLATE/release.md)
1. Fill out checklist
1. Publish the release
1. After release is published, close release milestone
### Publishing a release
1. Create a release branch called `v0.0.0` but replace with new version
1. Run `yarn release:prep` and type in the new version (e.g., `3.8.1`)
1. GitHub Actions will generate the `npm-package`, `release-packages` and
`release-images` artifacts. You do not have to wait for this step to complete
before proceeding.
1. Run `yarn release:github-draft` to create a GitHub draft release from the
template with the updated version.
1. Summarize the major changes in the release notes and link to the relevant
issues.
1. Change the @ to target the version branch. Example: `v3.9.0 @ Target: v3.9.0`
1. Wait for the `npm-package`, `release-packages` and `release-images` artifacts
to build.
1. Run `yarn release:github-assets` to download the `release-packages` artifact.
They will upload them to the draft release.
1. Run some basic sanity tests on one of the released packages (pay special
attention to making sure the terminal works).
1. Publish the release and merge the PR. CI will automatically grab the
artifacts, publish the NPM package from `npm-package`, and publish the Docker
Hub image from `release-images`.
1. Update the AUR package. Instructions for updating the AUR package are at
[coder/code-server-aur](https://github.com/coder/code-server-aur).
1. Wait for the npm package to be published.
1. Add a `-rc.<number>` suffix to the version.
2. When you publish the release select "pre-release". CI will not automatically
publish pre-releases.
3. Do not update the chart version or merge in the changelog until the final
release.
#### AUR
@ -194,7 +59,7 @@ We publish to AUR as a package [here](https://aur.archlinux.org/packages/code-se
#### Docker
We publish code-server as a Docker image [here](https://registry.hub.docker.com/r/codercom/code-server), tagging it both with the version and latest.
We publish code-server as a Docker image [here](https://hub.docker.com/r/codercom/code-server), tagging it both with the version and latest.
This is currently automated with the release process.
@ -209,46 +74,44 @@ This is currently automated with the release process (but may fail occasionally)
brew bump-formula-pr --version="${VERSION}" code-server --no-browse --no-audit
```
#### nixpkgs
We publish code-server in nixpkgs but it must be updated manually.
#### npm
We publish code-server as a npm package [here](https://www.npmjs.com/package/code-server/v/latest).
This is currently automated with the release process.
## Syncing with Upstream VS Code
The VS Code portion of code-server lives under [`coder/vscode`](https://github.com/coder/vscode). To update VS Code for code-server, follow these steps:
1. `git checkout -b vscode-update` - Create a new branch locally based off `main`
2. `git fetch upstream` - Fetch upstream (VS Code)'s latest branches
3. `git merge upstream/release/1.64` - Merge it locally
1. replace `1.64` with the version you're upgrading to
1. If there are merge conflicts, commit first, then fix them locally.
4. Open a PR merging your branch (`vscode-update`) into `main` and add the code-server review team
Ideally, our fork stays as close to upstream as possible. See the differences between our fork and upstream [here](https://github.com/microsoft/vscode/compare/main...coder:main).
## Testing
Our testing structure is laid out under our [Contributing docs](https://coder.com/docs/code-server/latest/CONTRIBUTING#test).
We hope to eventually hit 100% test coverage with our unit tests, and maybe one day our scripts (coverage not tracked currently).
If you're ever looking to add more tests, here are a few ways to get started:
- run `yarn test:unit` and look at the coverage chart. You'll see all the uncovered lines. This is a good place to start.
- look at `test/scripts` to see which scripts are tested. We can always use more tests there.
- run `yarn test:unit` and look at the coverage chart. You'll see all the
uncovered lines. This is a good place to start.
- look at `test/scripts` to see which scripts are tested. We can always use more
tests there.
- look at `test/e2e`. We can always use more end-to-end tests.
Otherwise, talk to a current maintainer and ask which part of the codebase is lacking most when it comes to tests.
Otherwise, talk to a current maintainer and ask which part of the codebase is
lacking most when it comes to tests.
## Documentation
### Troubleshooting
Our docs are hosted on [Vercel](https://vercel.com/). Vercel only shows logs in realtime, which means you need to have the logs open in one tab and reproduce your error in another tab. Since our logs are private to Coder the organization, you can only follow these steps if you're a Coder employee. Ask a maintainer for help if you need it.
Our docs are hosted on [Vercel](https://vercel.com/). Vercel only shows logs in
realtime, which means you need to have the logs open in one tab and reproduce
your error in another tab. Since our logs are private to Coder the organization,
you can only follow these steps if you're a Coder employee. Ask a maintainer for
help if you need it.
Taking a real scenario, let's say you wanted to troubleshoot [this docs change](https://github.com/coder/code-server/pull/4042). Here is how you would do it:
Taking a real scenario, let's say you wanted to troubleshoot [this docs
change](https://github.com/coder/code-server/pull/4042). Here is how you would
do it:
1. Go to https://vercel.com/codercom/codercom
2. Click "View Function Logs"

View File

@ -1,11 +1,12 @@
# code-server
[!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/coder/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://coder.com/community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq) [![codecov](https://codecov.io/gh/coder/code-server/branch/main/graph/badge.svg?token=5iM9farjnC)](https://codecov.io/gh/coder/code-server) [![See v4.0.2 docs](https://img.shields.io/static/v1?label=Docs&message=see%20v4.0.2%20&color=blue)](https://github.com/coder/code-server/tree/v4.0.2/docs)
[!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/coder/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://coder.com/community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq) [![codecov](https://codecov.io/gh/coder/code-server/branch/main/graph/badge.svg?token=5iM9farjnC)](https://codecov.io/gh/coder/code-server) [![See latest](https://img.shields.io/static/v1?label=Docs&message=see%20latest&color=blue)](https://coder.com/docs/code-server/latest)
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and
access it in the browser.
![Screenshot](./assets/screenshot.png)
![Screenshot](./assets/screenshot-1.png)
![Screenshot](./assets/screenshot-2.png)
## Highlights
@ -14,19 +15,16 @@ access it in the browser.
- Preserve battery life when you're on the go; all intensive tasks run on your
server
| 🔔 code-server is a free browser-based IDE while [Coder](https://coder.com/) is our enterprise developer workspace platform. For more information, visit [Coder.com](https://coder.com/docs/comparison)
| ---
## Requirements
See [requirements](requirements.md) for minimum specs, as well as instructions
See [requirements](https://coder.com/docs/code-server/latest/requirements) for minimum specs, as well as instructions
on how to set up a Google VM on which you can install code-server.
**TL;DR:** Linux machine with WebSockets enabled, 1 GB RAM, and 2 CPUs
**TL;DR:** Linux machine with WebSockets enabled, 1 GB RAM, and 2 vCPUs
## Getting started
There are three ways to get started:
There are four ways to get started:
1. Using the [install
script](https://github.com/coder/code-server/blob/main/install.sh), which
@ -34,7 +32,8 @@ There are three ways to get started:
possible.
2. Manually [installing
code-server](https://coder.com/docs/code-server/latest/install)
3. Using our one-click buttons and guides to [deploy code-server to a cloud
3. Deploy code-server to your team with [coder/coder](https://cdr.co/coder-github)
4. Using our one-click buttons and guides to [deploy code-server to a cloud
provider](https://github.com/coder/deploy-code-server) ⚡
If you use the install script, you can preview what occurs during the install
@ -53,6 +52,9 @@ curl -fsSL https://code-server.dev/install.sh | sh
When done, the install script prints out instructions for running and starting
code-server.
> **Note**
> To manage code-server for a team on your infrastructure, see: [coder/coder](https://cdr.co/coder-github)
We also have an in-depth [setup and
configuration](https://coder.com/docs/code-server/latest/guide) guide.
@ -71,7 +73,7 @@ details.
Interested in [working at Coder](https://coder.com/careers)? Check out [our open
positions](https://coder.com/careers#openings)!
## For Organizations
## For Teams
Want remote development for your organization or enterprise? Visit [our
website](https://coder.com) to learn more about Coder.
We develop [coder/coder](https://cdr.co/coder-github) to help teams to
adopt remote development.

View File

@ -16,11 +16,9 @@ We use the following tools to help us stay on top of vulnerability mitigation.
- [trivy](https://github.com/aquasecurity/trivy)
- Comprehensive vulnerability scanner that runs on PRs into the default
branch and scans both our container image and repository code (see
`trivy-scan-repo` and `trivy-scan-image` jobs in `ci.yaml`)
- [`audit-ci`](https://github.com/IBM/audit-ci)
- Audits npm and Yarn dependencies in CI (see `Audit for vulnerabilities` step
in `ci.yaml`) on PRs into the default branch and fails CI if moderate or
higher vulnerabilities (see the `audit.sh` script) are present.
`trivy-scan-repo` and `trivy-scan-image` jobs in `build.yaml`)
- `yarn audit` and `npm audit`
- Audits Yarn/NPM dependencies.
## Supported Versions

View File

@ -3,7 +3,7 @@
1. Install UserLAnd from [Google Play](https://play.google.com/store/apps/details?id=tech.ula&hl=en_US&gl=US)
2. Install an Ubuntu VM
3. Start app
4. Install Node.js, `curl` and `yarn` using `sudo apt install nodejs npm yarn curl -y`
4. Install Node.js and `curl` using `sudo apt install nodejs npm curl -y`
5. Install `nvm`:
```shell
@ -11,13 +11,21 @@ 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 14:
7. Install and use Node.js 20:
```shell
nvm install 14
nvm use 14
nvm install 18
nvm use 18
```
8. Install code-server globally on device with: `npm i -g code-server`
8. Install code-server globally on device with: `npm install --global code-server`
9. Run code-server with `code-server`
10. Access on localhost:8080 in your browser
# Running code-server using Nix-on-Droid
1. Install Nix-on-Droid from [F-Droid](https://f-droid.org/packages/com.termux.nix/)
2. Start app
3. Spawn a shell with code-server by running `nix-shell -p code-server`
4. Run code-server with `code-server`
5. Access on localhost:8080 in your browser

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="20" height="20" viewBox="0 0 20 20"> <path d="M12.2 13.4357L9.5 11.4357C10.4 10.7357 11 9.7357 11 8.5357V7.7357C11 5.8357 9.6 4.1357 7.7 4.0357C5.7 3.9357 4 5.5357 4 7.5357V8.5357C4 9.7357 4.6 10.7357 5.5 11.4357L2.8 13.5357C2.3 13.9357 2 14.5357 2 15.1357V17.0357C2 17.6357 2.4 18.0357 3 18.0357H12C12.6 18.0357 13 17.6357 13 17.0357V15.0357C13 14.4357 12.7 13.8357 12.2 13.4357Z"/> <path d="M17.1 8.43436L15.3 7.23436C15.7 6.83436 16 6.23436 16 5.53436V4.63436C16 3.43436 15.1 2.23436 13.9 2.03436C12.7 1.83436 11.7 2.53436 11.2 3.43436C12.3 4.43436 13 5.83436 13 7.43436V8.43436C13 9.33436 12.8 10.2344 12.4 10.9344C12.4 10.9344 13.6 11.8344 13.6 11.9344H17C17.6 11.9344 18 11.5344 18 10.9344V10.1344C18 9.43436 17.7 8.83436 17.1 8.43436Z"/></svg>

After

Width:  |  Height:  |  Size: 854 B

View File

@ -0,0 +1 @@
<svg width="20" height="20" fill="none" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 2.5V12.5" stroke="currentColor" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M15 7.5C16.3807 7.5 17.5 6.38071 17.5 5C17.5 3.61929 16.3807 2.5 15 2.5C13.6193 2.5 12.5 3.61929 12.5 5C12.5 6.38071 13.6193 7.5 15 7.5Z" stroke="currentColor" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M5 17.5C6.38071 17.5 7.5 16.3807 7.5 15C7.5 13.6193 6.38071 12.5 5 12.5C3.61929 12.5 2.5 13.6193 2.5 15C2.5 16.3807 3.61929 17.5 5 17.5Z" stroke="currentColor" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M15 7.5C15 9.48912 14.2098 11.3968 12.8033 12.8033C11.3968 14.2098 9.48912 15 7.5 15" stroke="currentColor" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>

After

Width:  |  Height:  |  Size: 909 B

View File

@ -0,0 +1 @@
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"><path d="M10.0001 18.3333C14.6025 18.3333 18.3334 14.6024 18.3334 10C18.3334 5.39762 14.6025 1.66666 10.0001 1.66666C5.39771 1.66666 1.66675 5.39762 1.66675 10C1.66675 14.6024 5.39771 18.3333 10.0001 18.3333Z" stroke="currentColor" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M7.57495 7.5C7.77087 6.94306 8.15758 6.47342 8.66658 6.17428C9.17558 5.87513 9.77403 5.76578 10.3559 5.86559C10.9378 5.96541 11.4656 6.26794 11.8458 6.71961C12.2261 7.17128 12.4342 7.74294 12.4333 8.33333C12.4333 10 9.93328 10.8333 9.93328 10.8333" stroke="currentColor" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M10 14.1667H10.0083" stroke="currentColor" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>

After

Width:  |  Height:  |  Size: 941 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 16 16" width="16px" xml:space="preserve"><path d="M15.45,7L14,5.551V2c0-0.55-0.45-1-1-1h-1c-0.55,0-1,0.45-1,1v0.553L9,0.555C8.727,0.297,8.477,0,8,0S7.273,0.297,7,0.555 L0.55,7C0.238,7.325,0,7.562,0,8c0,0.563,0.432,1,1,1h1v6c0,0.55,0.45,1,1,1h3v-5c0-0.55,0.45-1,1-1h2c0.55,0,1,0.45,1,1v5h3 c0.55,0,1-0.45,1-1V9h1c0.568,0,1-0.437,1-1C16,7.562,15.762,7.325,15.45,7z"></path></svg>

After

Width:  |  Height:  |  Size: 489 B

View File

@ -0,0 +1 @@
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"><path d="M6 2V11H2V15C2 16.7 3.3 18 5 18H15C16.7 18 18 16.7 18 15V2H6ZM16 15C16 15.6 15.6 16 15 16H8V4H16V15Z" /><path d="M14 7H10V9H14V7Z" /><path d="M14 11H10V13H14V11Z" /></svg>

After

Width:  |  Height:  |  Size: 321 B

View File

@ -0,0 +1 @@
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"><path d="M17.8049 2.19795C17.7385 2.1311 17.6587 2.07899 17.5708 2.04504C17.4829 2.01108 17.3889 1.99604 17.2948 2.00089C7.89216 2.49153 4.4188 10.8673 4.38528 10.9517C4.33624 11.0736 4.32406 11.2071 4.5.028 11.3358C4.3765 11.4645 4.43995 11.5827 4.53274 11.6756L8.32449 15.4674C8.41787 15.5606 8.53669 15.6242 8.66606 15.6502C8.79543 15.6762 8.92959 15.6634 9.05174 15.6135C9.13552 15.5793 17.4664 12.0671 17.9986 2.7087C18.0039 2.61474 17.9895 2.5207 17.9561 2.4327C17.9227 2.3447 17.8712 2.26471 17.8049 2.19795ZM12.3314 9.56427C12.1439 9.75179 11.9051 9.87951 11.645 9.93126C11.385 9.98302 11.1154 9.9565 10.8704 9.85505C10.6254 9.7536 10.4161 9.58178 10.2687 9.36131C10.1214 9.14085 10.0428 8.88166 10.0428 8.6165C10.0428 8.35135 10.1214 8.09215 10.2687 7.87169C10.4161 7.65123 10.6254 7.47941 10.8704 7.37796C11.1154 7.27651 11.385 7.24998 11.645 7.30174C11.9051 7.3535 12.1439 7.48121 12.3314 7.66873C12.5827 7.92012 12.7239 8.26104 12.7239 8.6165C12.7239 8.97197 12.5827 9.31288 12.3314 9.56427Z"/><path d="M2.74602 14.5444C2.92281 14.3664 3.133 14.2251 3.36454 14.1285C3.59608 14.0319 3.8444 13.9819 4.09529 13.9815C4.34617 13.9811 4.59466 14.0.12 4.82653 14.126C5.05839 14.2218 5.26907 14.3624 5.44647 14.5398C5.62386 14.7172 5.7645 14.9279 5.86031 15.1598C5.95612 15.3916 6.00522 15.6401 6.00479 15.891C6.00437 16.1419 5.95442 16.3902 5.85782 16.6218C5.76122 16.8533 5.61987 17.0635 5.44186 17.2403C4.69719 17.985 2 18.0004 2 18.0004C2 18.0004 2 15.2884 2.74602 14.5444Z"/><path d="M8.9416 3.48269C7.99688 3.31826 7.02645 3.38371 6.11237 3.67352C5.19828 3.96332 4.36741 4.46894 3.68999 5.14765C3.33153 5.50944.5.01988 5.91477 2.76233 6.35415C2.68692 6.4822 2.6562 6.63169 2.67501 6.77911C2.69381 6.92652 2.76108 7.06351 2.86623 7.16853L4.1994 8.50238C5.43822 6.53634 7.04911 4.83119 8.9416 3.48269Z"/><path d="M16.5181 11.0585C16.6825 12.0033 16.6171 12.9737 16.3273 13.8878C16.0375 14.8019 15.5318 15.6327 14.8531 16.3101C14.4914 16.6686 14.086 16.9803 13.6466 17.2378C13.5186 17.3132 13.3691 17.3439 13.2217 17.3251C13.0743 17.3063 12.9373 17.2391 12.8323 17.1339L11.4984 15.8007C13.4645 14.5619 15.1696 12.951 16.5181 11.0585Z"/></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,3 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.8 3.6H0V16.2C0 17.19 0.81 18 1.8 18H14.4V16.2H1.8V3.6ZM16.2 0H5.4C4.41 0 3.6 0.81 3.6 1.8V12.6C3.6 13.59 4.41 14.4 5.4 14.4H16.2C17.19 14.4 18 13.59 18 12.6V1.8C18 0.81 17.19 0 16.2 0ZM16.2 9L13.95 7.65L11.7 9V1.8H16.2V9Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 352 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true"><path d="M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"></path></svg>

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 KiB

48
docs/coder.md Normal file
View File

@ -0,0 +1,48 @@
# Coder
To install and run code-server in a Coder workspace, we suggest using the `install.sh`
script in your template like so:
```terraform
resource "coder_agent" "dev" {
arch = "amd64"
os = "linux"
startup_script = <<EOF
#!/bin/sh
set -x
# install and start code-server
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.8.3
code-server --auth none --port 13337 &
EOF
}
resource "coder_app" "code-server" {
agent_id = coder_agent.dev.id
slug = "code-server"
display_name = "code-server"
url = "http://localhost:13337/"
icon = "/icon/code.svg"
subdomain = false
share = "owner"
healthcheck {
url = "http://localhost:13337/healthz"
interval = 3
threshold = 10
}
}
```
Or use our official [`code-server`](https://registry.coder.com/modules/code-server) module from the Coder [module registry](htpps://registry.coder.com/modules):
```terraform
module "code-server" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.5"
agent_id = coder_agent.example.id
extensions = ["dracula-theme.theme-dracula", "ms-azuretools.vscode-docker"]
}
```
If you run into issues, ask for help on the `coder/coder` [Discussions
here](https://github.com/coder/coder/discussions).

View File

@ -60,6 +60,6 @@ As `code-server` is based on VS Code, you can follow the steps described on Duck
code-server --enable-proposed-api genuitecllc.codetogether
```
Another option would be to add a value in code-server's [config file](https://coder.com/docs/code-server/v4.0.2/FAQ#how-does-the-config-file-work).
Another option would be to add a value in code-server's [config file](https://coder.com/docs/code-server/latest/FAQ#how-does-the-config-file-work).
3. Refresh code-server and navigate to the CodeTogether icon in the sidebar to host or join a coding session.

View File

@ -1,3 +1,4 @@
<!-- prettier-ignore-start -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
# Setup Guide
@ -13,14 +14,15 @@
- [Accessing web services](#accessing-web-services)
- [Using a subdomain](#using-a-subdomain)
- [Using a subpath](#using-a-subpath)
- [Using your own proxy](#using-your-own-proxy)
- [Stripping `/proxy/<port>` from the request path](#stripping-proxyport-from-the-request-path)
- [Proxying to create a React app](#proxying-to-create-a-react-app)
- [Proxying to a Vue app](#proxying-to-a-vue-app)
- [SSH into code-server on VS Code](#ssh-into-code-server-on-vs-code)
- [Option 1: cloudflared tunnel](#option-1-cloudflared-tunnel)
- [Option 2: ngrok tunnel](#option-2-ngrok-tunnel)
- [Proxying to an Angular app](#proxying-to-an-angular-app)
- [Proxying to a Svelte app](#proxying-to-a-svelte-app)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- prettier-ignore-end -->
This article will walk you through exposing code-server securely once you've
completed the [installation process](install.md).
@ -52,7 +54,7 @@ There are several approaches to operating and exposing code-server securely:
We highly recommend using [port forwarding via
SSH](https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding) to access
code-server. If you have an SSH server on your remote machine, this approach
doesn't required additional setup.
doesn't require any additional setup at all.
The downside to SSH forwarding, however, is that you can't access code-server
when using machines without SSH clients (such as iPads). If this applies to you,
@ -88,11 +90,10 @@ we recommend using another method, such as [Let's Encrypt](#let-encrypt) instead
using [mutagen](https://mutagen.io/documentation/introduction/installation)
to do so. Once you've installed mutagen, you can port forward as follows:
```console
```shell
# This is the same as the above SSH command, but it runs in the background
# continuously. Be sure to add `mutagen daemon start` to your ~/.bashrc to
# start the mutagen daemon when you open a shell.
mutagen forward create --name=code-server tcp:127.0.0.1:8080 < instance-ip > :tcp:127.0.0.1:8080
```
@ -126,8 +127,8 @@ access code-server on an iPad or do not want to use SSH port forwarding.
```console
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/cfg/gpg/gpg.155B6D79CA56EA34.key' | sudo apt-key add -
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/cfg/setup/config.deb.txt?distro=debian&version=any-version' | sudo tee -a /etc/apt/sources.list.d/caddy-stable.list
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
```
@ -135,9 +136,9 @@ sudo apt install caddy
1. Replace `/etc/caddy/Caddyfile` using `sudo` so that the file looks like this:
```text
mydomain.com
reverse_proxy 127.0.0.1:8080
mydomain.com {
reverse_proxy 127.0.0.1:8080
}
```
If you want to serve code-server from a sub-path, you can do so as follows:
@ -187,7 +188,7 @@ At this point, you should be able to access code-server via
location / {
proxy_pass http://localhost:8080/;
proxy_set_header Host $host;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
proxy_set_header Accept-Encoding gzip;
@ -314,12 +315,32 @@ To set your domain, start code-server with the `--proxy-domain` flag:
code-server --proxy-domain <domain>
```
Now you can browse to `<port>.<domain>`. Note that this uses the host header, so
ensure your reverse proxy (if you're using one) forwards that information.
For instance, if you have code-server exposed on `domain.tld` and a Python
server running on port 8080 of the same machine code-server is running on, you
could run code-server with `--proxy-domain domain.tld` and access the Python
server via `8080.domain.tld`.
Note that this uses the host header, so ensure your reverse proxy (if you're
using one) forwards that information.
### Using a subpath
Simply browse to `/proxy/<port>/`.
Simply browse to `/proxy/<port>/`. For instance, if you have code-server
exposed on `domain.tld` and a Python server running on port 8080 of the same
machine code-server is running on, you could access the Python server via
`domain.tld/proxy/8000`.
### Using your own proxy
You can make extensions and the ports panel use your own proxy by setting
`VSCODE_PROXY_URI`. For example if you set
`VSCODE_PROXY_URI=https://{{port}}.kyle.dev` when an application is detected
running on port 3000 of the same machine code-server is running on the ports
panel will create a link to https://3000.kyle.dev instead of pointing to the
built-in subpath-based proxy.
Note: relative paths are also supported i.e.
`VSCODE_PROXY_URI=./proxy/{{port}}`
### Stripping `/proxy/<port>` from the request path
@ -382,92 +403,32 @@ module.exports = {
Read more about `publicPath` in the [Vue.js docs](https://cli.vuejs.org/config/#publicpath)
## SSH into code-server on VS Code
### Proxying to an Angular app
[![SSH](https://img.shields.io/badge/SSH-363636?style=for-the-badge&logo=GNU+Bash&logoColor=ffffff)](https://ohmyz.sh/) [![Terminal](https://img.shields.io/badge/Terminal-2E2E2E?style=for-the-badge&logo=Windows+Terminal&logoColor=ffffff)](https://img.shields.io/badge/Terminal-2E2E2E?style=for-the-badge&logo=Windows+Terminal&logoColor=ffffff) [![Visual Studio Code](https://img.shields.io/badge/Visual_Studio_Code-007ACC?style=for-the-badge&logo=Visual+Studio+Code&logoColor=ffffff)](vscode:extension/ms-vscode-remote.remote-ssh)
In order to use code-server's built-in proxy with Angular, you need to make the following changes in your app:
Follow these steps where code-server is running:
1. use `<base href="./.">` in `src/index.html`
2. add `--serve-path /absproxy/4200` to `ng serve` in your `package.json`
1. Install `openssh-server`, `wget`, and `unzip`.
For additional context, see [this GitHub Discussion](https://github.com/coder/code-server/discussions/5439#discussioncomment-3371983).
```bash
# example for Debian and Ubuntu operating systems
sudo apt update
sudo apt install wget unzip openssh-server
### Proxying to a Svelte app
In order to use code-server's built-in proxy with Svelte, you need to make the following changes in your app:
1. Add `svelte.config.js` if you don't already have one
2. Update the values to match this (you can use any free port):
```js
const config = {
kit: {
paths: {
base: "/absproxy/5173",
},
},
}
```
2. Start the SSH server and set the password for your user, if you haven't already. If you use [deploy-code-server](https://github.com/coder/deploy-code-server),
3. Access app at `<code-server-root>/absproxy/5173/` e.g. `http://localhost:8080/absproxy/5173/
```bash
sudo service ssh start
sudo passwd {user} # replace user with your code-server user
```
### Option 1: cloudflared tunnel
[![Cloudflared](https://img.shields.io/badge/Cloudflared-E4863B?style=for-the-badge&logo=cloudflare&logoColor=ffffff)](https://github.com/cloudflare/cloudflared)
1. Install [cloudflared](https://github.com/cloudflare/cloudflared#installing-cloudflared) on your local computer
2. Then go to `~/.ssh/config` and add the following:
```shell
Host *.trycloudflare.com
HostName %h
User root
Port 22
ProxyCommand "cloudflared location" access ssh --hostname %h
```
3. Run `cloudflared tunnel --url ssh://localhost:22` on the remote server
4. Finally on VS Code or any IDE that supports SSH, run `ssh coder@https://your-link.trycloudflare.com` or `ssh coder@your-link.trycloudflare.com`
### Option 2: ngrok tunnel
[![Ngrok](https://img.shields.io/badge/Ngrok-1F1E37?style=for-the-badge&logo=ngrok&logoColor=ffffff)](https://ngrok.com/)
1. Make a new account for ngrok [here](https://dashboard.ngrok.com/login)
2. Now, get the ngrok binary with `wget` and unzip it with `unzip`:
```bash
wget "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip"
unzip "ngrok-stable-linux-amd64.zip"
```
5. Then, go to [dashboard.ngrok.com](https://dashboard.ngrok.com) and go to the `Your Authtoken` section.
6. Copy the Authtoken shown there.
7. Now, go to the folder where you unzipped ngrok and store the Authtoken from the ngrok Dashboard.
```bash
./ngrok authtoken YOUR_AUTHTOKEN # replace YOUR_AUTHTOKEN with the ngrok authtoken.
```
8. Now, forward port 22, which is the SSH port with this command:
```bash
./ngrok tcp 22
```
Now, you get a screen in the terminal like this:
```console
ngrok by @inconshreveable(Ctrl+C to quit)
Session Status online
Account {Your name} (Plan: Free)
Version 2.3.40
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding tcp://0.tcp.ngrok.io:19028 -> localhost:22
```
In this case, copy the forwarded link `0.tcp.ngrok.io` and remember the port number `19028`. Type this on your local Visual Studio Code:
```bash
ssh user@0.tcp.ngrok.io -p 19028
```
The port redirects you to the default SSH port 22, and you can then successfully connect to code-server by entering the password you set for the user.
Note: the port and the url provided by ngrok will change each time you run it so modify as needed.
For additional context, see [this Github Issue](https://github.com/sveltejs/kit/issues/2958)

View File

@ -1,6 +1,6 @@
# code-server Helm Chart
[![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.0.2](https://img.shields.io/badge/AppVersion-4.0.2-informational?style=flat-square)](https://img.shields.io/badge/AppVersion-4.0.2-informational?style=flat-square)
[![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.8.0](https://img.shields.io/badge/AppVersion-4.8.0-informational?style=flat-square)](https://img.shields.io/badge/AppVersion-4.8.0-informational?style=flat-square)
[code-server](https://github.com/coder/code-server) code-server is VS Code running
on a remote server, accessible through the browser.
@ -73,7 +73,7 @@ and their default values.
| hostnameOverride | string | `""` |
| image.pullPolicy | string | `"Always"` |
| image.repository | string | `"codercom/code-server"` |
| image.tag | string | `"4.0.2"` |
| image.tag | string | `"4.8.0"` |
| imagePullSecrets | list | `[]` |
| ingress.enabled | bool | `false` |
| nameOverride | string | `""` |

View File

@ -1,14 +1,16 @@
<!-- prettier-ignore-start -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
# Install
- [install.sh](#installsh)
- [Detection reference](#detection-reference)
- [yarn, npm](#yarn-npm)
- [npm](#npm)
- [Standalone releases](#standalone-releases)
- [Debian, Ubuntu](#debian-ubuntu)
- [Fedora, CentOS, RHEL, SUSE](#fedora-centos-rhel-suse)
- [Arch Linux](#arch-linux)
- [Artix Linux](#artix-linux)
- [macOS](#macos)
- [Docker](#docker)
- [Helm](#helm)
@ -19,10 +21,11 @@
- [Uninstall](#uninstall)
- [install.sh](#installsh-1)
- [Homebrew](#homebrew)
- [yarn, npm](#yarn-npm-1)
- [npm](#npm-1)
- [Debian, Ubuntu](#debian-ubuntu-1)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- prettier-ignore-end -->
This document demonstrates how to install `code-server` on various distros and
operating systems.
@ -56,6 +59,7 @@ following flags:
- `--prefix=/usr/local`: install a standalone release archive system-wide.
- `--version=X.X.X`: install version `X.X.X` instead of latest version.
- `--help`: see usage docs.
- `--edge`: install the latest edge version (i.e. pre-release)
When done, the install script prints out instructions for running and starting
code-server.
@ -87,29 +91,27 @@ _exact_ same commands presented in the rest of this document.
- Ensure that you add `~/.local/bin` to your `$PATH` to run code-server.
- For FreeBSD, code-server will install the [npm package](#yarn-npm) with `yarn`
or `npm`.
- For FreeBSD, code-server will install the [npm package](#npm) with `npm`
- If you're installing code-server onto architecture with no releases,
code-server will install the [npm package](#yarn-npm) with `yarn` or `npm`
code-server will install the [npm package](#npm) with `npm`
- We currently offer releases for amd64 and arm64.
- The [npm package](#yarn-npm) builds the native modules on post-install.
- The [npm package](#npm) builds the native modules on post-install.
## yarn, npm
## npm
We recommend installing with `yarn` or `npm` when:
We recommend installing with `npm` when:
1. You aren't using a machine with `amd64` or `arm64`.
1. You are installing code-server on Windows
1. You're on Linux with `glibc` < v2.17, `glibcxx` < v3.4.18 on `amd64`, `glibc`
< v2.23, or `glibcxx` < v3.4.21 on `arm64`.
1. You're running Alpine Linux or are using a non-glibc libc. See
2. You are installing code-server on Windows.
3. You're on Linux with `glibc` < v2.28 or `glibcxx` < v3.4.21.
4. You're running Alpine Linux or are using a non-glibc libc. See
[#1430](https://github.com/coder/code-server/issues/1430#issuecomment-629883198)
for more information.
Installing code-server with `yarn` or `npm` builds native modules on install.
Installing code-server with `npm` builds native modules on install.
This process requires C dependencies; see our guide on [installing with yarn and npm][./npm.md](./npm.md) for more information.
This process requires C dependencies; see our guide on [installing with npm](./npm.md) for more information.
## Standalone releases
@ -117,11 +119,11 @@ We publish self-contained `.tar.gz` archives for every release on
[GitHub](https://github.com/coder/code-server/releases). The archives bundle the
node binary and node modules.
We create the standalone releases using the [npm package](#yarn-npm), and we
We create the standalone releases using the [npm package](#npm), and we
then create the remaining releases using the standalone version.
The only requirement to use the standalone release is `glibc` >= 2.17 and
`glibcxx` >= v3.4.18 on Linux (for macOS, there is no minimum system
The only requirement to use the standalone release is `glibc` >= 2.28 and
`glibcxx` >= v3.4.21 on Linux (for macOS, there is no minimum system
requirement).
To use a standalone release:
@ -151,11 +153,11 @@ code-server
## Debian, Ubuntu
> The standalone arm64 .deb does not support Ubuntu 16.04 or earlier. Please
> upgrade or [build with yarn](#yarn-npm).
> upgrade or [build with npm](#npm).
```bash
curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_$VERSION_amd64.deb
sudo dpkg -i code-server_$VERSION_amd64.deb
curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_${VERSION}_amd64.deb
sudo dpkg -i code-server_${VERSION}_amd64.deb
sudo systemctl enable --now code-server@$USER
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```
@ -163,7 +165,7 @@ sudo systemctl enable --now code-server@$USER
## Fedora, CentOS, RHEL, SUSE
> The standalone arm64 .rpm does not support CentOS 7. Please upgrade or [build
> with yarn](#yarn-npm).
> with npm](#npm).
```bash
curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server-$VERSION-amd64.rpm
@ -190,6 +192,72 @@ sudo systemctl enable --now code-server@$USER
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```
## Artix Linux
```bash
# Install code-server from the AUR
git clone https://aur.archlinux.org/code-server.git
cd code-server
makepkg -si
```
Save the file as `code-server` in `/etc/init.d/` and make it executable with `chmod +x code-server`. Put your username in line 3.
```bash
#!/sbin/openrc-run
name=$RC_SVCNAME
description="$name - VS Code on a remote server"
user="" # your username here
homedir="/home/$user"
command="$(which code-server)"
# Just because you can do this does not mean you should. Use ~/.config/code-server/config.yaml instead
#command_args="--extensions-dir $homedir/.local/share/$name/extensions --user-data-dir $homedir/.local/share/$name --disable-telemetry"
command_user="$user:$user"
pidfile="/run/$name/$name.pid"
command_background="yes"
extra_commands="report"
depend() {
use logger dns
need net
}
start_pre() {
checkpath --directory --owner $command_user --mode 0755 /run/$name /var/log/$name
}
start() {
default_start
report
}
stop() {
default_stop
}
status() {
default_status
report
}
report() {
# Report to the user
einfo "Reading configuration from ~/.config/code-server/config.yaml"
}
```
Start on boot with default runlevel
```
rc-update add code-server default
```
Start the service immediately
```
rc-service code-server start
```
## macOS
```bash
@ -211,6 +279,7 @@ brew services start code-server
# outside the container.
mkdir -p ~/.config
docker run -it --name code-server -p 127.0.0.1:8080:8080 \
-v "$HOME/.local:/home/coder/.local" \
-v "$HOME/.config:/home/coder/.config" \
-v "$PWD:/home/coder/project" \
-u "$(id -u):$(id -g)" \
@ -228,14 +297,15 @@ You can install code-server using the [Helm package manager](https://coder.com/d
## Windows
We currently [do not publish Windows releases](https://github.com/coder/code-server/issues/1397). We recommend installing code-server onto Windows with [`yarn` or `npm`](#yarn-npm).
> Note: You will also need to [build coder/cloud-agent manually](https://github.com/coder/cloud-agent/issues/17) if you would like to use `code-server --link` on Windows.
We currently [do not publish Windows
releases](https://github.com/coder/code-server/issues/1397). We recommend
installing code-server onto Windows with [`npm`](#npm).
## Raspberry Pi
We recommend installing code-server onto Raspberry Pi with [`yarn` or
`npm`](#yarn-npm).
We recommend installing code-server onto Raspberry Pi with [`npm`](#npm).
If you see an error related to `node-gyp` during installation, See [#5174](https://github.com/coder/code-server/issues/5174) for more information.
## Termux
@ -277,18 +347,12 @@ brew remove code-server
brew uninstall code-server
```
### yarn, npm
### npm
To remove the code-server global module, run:
```shell
yarn global remove code-server
```
or
```shell
npm uninstall -g code-server
npm uninstall --global code-server
```
### Debian, Ubuntu

View File

@ -1,7 +1,9 @@
# Using code-server on iOS with iSH
1. Install iSH from the [App Store](https://apps.apple.com/us/app/ish-shell/id1436902243)
2. Install `curl` with `apk add curl`
3. Install code-server with `curl -fsSL https://code-server.dev/install.sh | sh`
4. Run code-server with `code-server`
5. Access on localhost:8080 in your browser
2. Install `curl` and `nano` with `apk add curl nano`
3. Configure iSH to use an earlier version of NodeJS with `nano /etc/apk/repositories` and edit `v3.14` to `v3.12` on both repository links.
4. Install `nodejs` and `npm` with `apk add nodejs npm`
5. Install code-server with `curl -fsSL https://code-server.dev/install.sh | sh`
6. Run code-server with `code-server`
7. Access on localhost:8080 in your browser

View File

@ -1,3 +1,4 @@
<!-- prettier-ignore-start -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
# iPad
@ -13,6 +14,7 @@
- [Sharing a self-signed certificate with an iPad](#sharing-a-self-signed-certificate-with-an-ipad)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- prettier-ignore-end -->
Once you've installed code-server, you can access it from an iPad.

View File

@ -1,11 +0,0 @@
# code-server --link
> Note: This feature is no longer recommended due to instability. Stay tuned for a revised version.
Run code-server with the flag `--link` and you'll get TLS, authentication, and a dedicated URL
for accessing your IDE out of the box.
```console
$ code-server --link
Proxying code-server, you can access your IDE at https://example.coder.co
```

View File

@ -1,27 +1,27 @@
{
"versions": ["v4.0.2"],
"versions": ["v4.8.0"],
"routes": [
{
"title": "Home",
"description": "Learn how to install and run code-server.",
"path": "./README.md",
"icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16px\" xml:space=\"preserve\"><path d=\"M15.45,7L14,5.551V2c0-0.55-0.45-1-1-1h-1c-0.55,0-1,0.45-1,1v0.553L9,0.555C8.727,0.297,8.477,0,8,0S7.273,0.297,7,0.555 L0.55,7C0.238,7.325,0,7.562,0,8c0,0.563,0.432,1,1,1h1v6c0,0.55,0.45,1,1,1h3v-5c0-0.55,0.45-1,1-1h2c0.55,0,1,0.45,1,1v5h3 c0.55,0,1-0.45,1-1V9h1c0.568,0,1-0.437,1-1C16,7.562,15.762,7.325,15.45,7z\"></path></svg>"
"icon_path": "assets/images/icons/home.svg"
},
{
"title": "Requirements",
"description": "Learn about what you need to run code-server.",
"icon": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 2V11H2V15C2 16.7 3.3 18 5 18H15C16.7 18 18 16.7 18 15V2H6ZM16 15C16 15.6 15.6 16 15 16H8V4H16V15Z\" /><path d=\"M14 7H10V9H14V7Z\" /><path d=\"M14 11H10V13H14V11Z\" /></svg>",
"icon_path": "assets/images/icons/requirements.svg",
"path": "./requirements.md"
},
{
"title": "Install",
"description": "How to install code-server.",
"icon": "<svg class=\"MuiSvgIcon-root jss172\" focusable=\"false\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z\"></path></svg>",
"icon_path": "assets/images/icons/wrench.svg",
"path": "./install.md",
"children": [
{
"title": "npm",
"description": "How to install code-server using npm or yarn",
"description": "How to install code-server using npm",
"path": "./npm.md"
},
{
@ -34,13 +34,13 @@
{
"title": "Usage",
"description": "How to set up and use code-server.",
"icon": "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 10l-2.5-1.5L15 12V4h5v8z\"></path></svg>",
"icon_path": "assets/images/icons/usage.svg",
"path": "./guide.md",
"children": [
{
"title": "--link",
"description": "How to run code-server --link",
"path": "./link.md"
"title": "Coder",
"description": "How to run code-server in Coder",
"path": "./coder.md"
},
{
"title": "iPad",
@ -67,25 +67,25 @@
{
"title": "Collaboration",
"description": "How to setup real time collaboration using code server.",
"icon": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M12.2 13.4357L9.5 11.4357C10.4 10.7357 11 9.7357 11 8.5357V7.7357C11 5.8357 9.6 4.1357 7.7 4.0357C5.7 3.9357 4 5.5357 4 7.5357V8.5357C4 9.7357 4.6 10.7357 5.5 11.4357L2.8 13.5357C2.3 13.9357 2 14.5357 2 15.1357V17.0357C2 17.6357 2.4 18.0357 3 18.0357H12C12.6 18.0357 13 17.6357 13 17.0357V15.0357C13 14.4357 12.7 13.8357 12.2 13.4357Z\"/> <path d=\"M17.1 8.43436L15.3 7.23436C15.7 6.83436 16 6.23436 16 5.53436V4.63436C16 3.43436 15.1 2.23436 13.9 2.03436C12.7 1.83436 11.7 2.53436 11.2 3.43436C12.3 4.43436 13 5.83436 13 7.43436V8.43436C13 9.33436 12.8 10.2344 12.4 10.9344C12.4 10.9344 13.6 11.8344 13.6 11.9344H17C17.6 11.9344 18 11.5344 18 10.9344V10.1344C18 9.43436 17.7 8.83436 17.1 8.43436Z\"/></svg>",
"icon_path": "assets/images/icons/collab.svg",
"path": "./collaboration.md"
},
{
"title": "Upgrade",
"description": "How to upgrade code-server.",
"icon": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.8049 2.19795C17.7385 2.1311 17.6587 2.07899 17.5708 2.04504C17.4829 2.01108 17.3889 1.99604 17.2948 2.00089C7.89216 2.49153 4.4188 10.8673 4.38528 10.9517C4.33624 11.0736 4.32406 11.2071 4.35028 11.3358C4.3765 11.4645 4.43995 11.5827 4.53274 11.6756L8.32449 15.4674C8.41787 15.5606 8.53669 15.6242 8.66606 15.6502C8.79543 15.6762 8.92959 15.6634 9.05174 15.6135C9.13552 15.5793 17.4664 12.0671 17.9986 2.7087C18.0039 2.61474 17.9895 2.5207 17.9561 2.4327C17.9227 2.3447 17.8712 2.26471 17.8049 2.19795ZM12.3314 9.56427C12.1439 9.75179 11.9051 9.87951 11.645 9.93126C11.385 9.98302 11.1154 9.9565 10.8704 9.85505C10.6254 9.7536 10.4161 9.58178 10.2687 9.36131C10.1214 9.14085 10.0428 8.88166 10.0428 8.6165C10.0428 8.35135 10.1214 8.09215 10.2687 7.87169C10.4161 7.65123 10.6254 7.47941 10.8704 7.37796C11.1154 7.27651 11.385 7.24998 11.645 7.30174C11.9051 7.3535 12.1439 7.48121 12.3314 7.66873C12.5827 7.92012 12.7239 8.26104 12.7239 8.6165C12.7239 8.97197 12.5827 9.31288 12.3314 9.56427Z\"/><path d=\"M2.74602 14.5444C2.92281 14.3664 3.133 14.2251 3.36454 14.1285C3.59608 14.0319 3.8444 13.9819 4.09529 13.9815C4.34617 13.9811 4.59466 14.0.12 4.82653 14.126C5.05839 14.2218 5.26907 14.3624 5.44647 14.5398C5.62386 14.7172 5.7645 14.9279 5.86031 15.1598C5.95612 15.3916 6.00522 15.6401 6.00479 15.891C6.00437 16.1419 5.95442 16.3902 5.85782 16.6218C5.76122 16.8533 5.61987 17.0635 5.44186 17.2403C4.69719 17.985 2 18.0004 2 18.0004C2 18.0004 2 15.2884 2.74602 14.5444Z\"/><path d=\"M8.9416 3.48269C7.99688 3.31826 7.02645 3.38371 6.11237 3.67352C5.19828 3.96332 4.36741 4.46894 3.68999 5.14765C3.33153 5.50944 3.01988 5.91477 2.76233 6.35415C2.68692 6.4822 2.6562 6.63169 2.67501 6.77911C2.69381 6.92652 2.76108 7.06351 2.86623 7.16853L4.1994 8.50238C5.43822 6.53634 7.04911 4.83119 8.9416 3.48269Z\"/><path d=\"M16.5181 11.0585C16.6825 12.0033 16.6171 12.9737 16.3273 13.8878C16.0375 14.8019 15.5318 15.6327 14.8531 16.3101C14.4914 16.6686 14.086 16.9803 13.6466 17.2378C13.5186 17.3132 13.3691 17.3439 13.2217 17.3251C13.0743 17.3063 12.9373 17.2391 12.8323 17.1339L11.4984 15.8007C13.4645 14.5619 15.1696 12.951 16.5181 11.0585Z\"/></svg>",
"icon_path": "assets/images/icons/upgrade.svg",
"path": "./upgrade.md"
},
{
"title": "FAQ",
"description": "Frequently asked questions on installing and running code-server.",
"icon": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.0001 18.3333C14.6025 18.3333 18.3334 14.6024 18.3334 10C18.3334 5.39762 14.6025 1.66666 10.0001 1.66666C5.39771 1.66666 1.66675 5.39762 1.66675 10C1.66675 14.6024 5.39771 18.3333 10.0001 18.3333Z\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M7.57495 7.5C7.77087 6.94306 8.15758 6.47342 8.66658 6.17428C9.17558 5.87513 9.77403 5.76578 10.3559 5.86559C10.9378 5.96541 11.4656 6.26794 11.8458 6.71961C12.2261 7.17128 12.4342 7.74294 12.4333 8.33333C12.4333 10 9.93328 10.8333 9.93328 10.8333\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M10 14.1667H10.0083\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>",
"icon_path": "assets/images/icons/faq.svg",
"path": "./FAQ.md"
},
{
"title": "Contributing",
"description": "How to contribute to code-server.",
"icon": "<svg width=\"20\" height=\"20\" fill=\"none\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5 2.5V12.5\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M15 7.5C16.3807 7.5 17.5 6.38071 17.5 5C17.5 3.61929 16.3807 2.5 15 2.5C13.6193 2.5 12.5 3.61929 12.5 5C12.5 6.38071 13.6193 7.5 15 7.5Z\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M5 17.5C6.38071 17.5 7.5 16.3807 7.5 15C7.5 13.6193 6.38071 12.5 5 12.5C3.61929 12.5 2.5 13.6193 2.5 15C2.5 16.3807 3.61929 17.5 5 17.5Z\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M15 7.5C15 9.48912 14.2098 11.3968 12.8033 12.8033C11.3968 14.2098 9.48912 15 7.5 15\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>",
"icon_path": "assets/images/icons/contributing.svg",
"path": "./CONTRIBUTING.md",
"children": [
{

View File

@ -1,3 +1,4 @@
<!-- prettier-ignore-start -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
# npm Install Requirements
@ -15,15 +16,21 @@
- [Debugging install issues with npm](#debugging-install-issues-with-npm)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- prettier-ignore-end -->
If you're installing code-server via `npm`, you'll need to install additional
dependencies required to build the native modules used by VS Code. This article
includes installing instructions based on your operating system.
> **WARNING**: Do not use `yarn` to install code-server. Unlike `npm`, it does not respect
> lockfiles for distributed applications. It will instead use the latest version
> available at installation time - which might not be the one used for a given
> code-server release, and [might lead to unexpected behavior](https://github.com/coder/code-server/issues/4927).
## Node.js version
We use the same major version of Node.js shipped with VSCode's Electron,
which is currently `14.x`. VS Code also [lists Node.js
We use the same major version of Node.js shipped with Code's remote, which is
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
@ -72,7 +79,7 @@ Proceed to [installing](#installing)
## FreeBSD
```sh
pkg install -y git python npm-node14 yarn-node14 pkgconf
pkg install -y git python npm-node20 pkgconf
pkg install -y libinotify
```
@ -85,19 +92,17 @@ Installing code-server requires all of the [prerequisites for VS Code developmen
Next, install code-server with:
```bash
yarn global add code-server
# Or: npm install -g code-server
npm install --global code-server
code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```
A `postinstall.sh` script will attempt to run. Select your terminal (e.g., Git bash) as the default application for `.sh` files. If an additional dialog does not appear, run the install command again.
A `postinstall.sh` script will attempt to run. Select your terminal (e.g., Git bash) as the default shell for npm run-scripts. If an additional dialog does not appear, run the install command again.
If the `code-server` command is not found, you'll need to [add a directory to your PATH](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/). To find the directory, use the following command:
```shell
yarn global bin
# Or: npm config get prefix
npm config get prefix
```
For help and additional troubleshooting, see [#1397](https://github.com/coder/code-server/issues/1397).
@ -107,8 +112,7 @@ For help and additional troubleshooting, see [#1397](https://github.com/coder/co
After adding the dependencies for your OS, install the code-server package globally:
```bash
yarn global add code-server
# Or: npm install -g code-server
npm install --global code-server
code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```
@ -122,7 +126,7 @@ page](https://github.com/coder/code-server/discussions).
Occasionally, you may run into issues with Node.js.
If you install code-server using `yarn` or `npm`, and you upgrade your Node.js
If you install code-server using `npm`, and you upgrade your Node.js
version, you may need to reinstall code-server to recompile native modules.
Sometimes, you can get around this by navigating into code-server's `lib/vscode`
directory and running `npm rebuild` to recompile the modules.
@ -136,12 +140,12 @@ A step-by-step example of how you might do this is:
### Debugging install issues with npm
`yarn` suppresses logs when running `yarn global add`, so to debug installation issues, install with `npm` instead:
To debug installation issues, install with `npm`:
```shell
# Uninstall
npm uninstall -g --unsafe-perm code-server > /dev/null 2>&1
npm uninstall --global code-server > /dev/null 2>&1
# Install with logging
npm install --loglevel verbose -g --unsafe-perm code-server
npm install --loglevel verbose --global code-server
```

View File

@ -21,8 +21,8 @@ for communication between the browser and the server.
The following steps walk you through setting up a VM running Debian using Google
Cloud (though you are welcome to use any machine or VM provider).
If you're [signing up with Google](https://console.cloud.google.com/getting-started) for the first time, you should get a 12-month trial with
$300 of credits.
If you're [signing up with Google](https://console.cloud.google.com/getting-started) for the first time, you should get a 3-month trial with
\$300 of credits.
After you sign up and create a new Google Cloud Provider (GCP) project, create a
new Compute Engine VM instance:

Some files were not shown because too many files have changed in this diff Show More