diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0eb615b018ea..0aa15c5aa789 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -143,14 +143,20 @@ jobs: id: vscode-rev run: echo "::set-output name=rev::$(git rev-parse HEAD:./lib/vscode)" - # We need to rebuild when we have a new version of Code or when any of - # the patches changed. Use VSCODE_CACHE_VERSION to force a rebuild. + - name: Get version + id: version + run: echo "::set-output name=version::$(jq -r .version package.json)" + + # 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@v3 with: path: lib/vscode-reh-web-* - key: vscode-reh-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff') }} + key: vscode-reh-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ steps.version.outputs.version }}-${{ hashFiles('patches/*.diff') }} - name: Build vscode if: steps.cache-vscode.outputs.cache-hit != 'true' diff --git a/.github/workflows/npm-brew.yaml b/.github/workflows/npm-brew.yaml index 5df31ad99592..822cd692122e 100644 --- a/.github/workflows/npm-brew.yaml +++ b/.github/workflows/npm-brew.yaml @@ -31,7 +31,7 @@ jobs: uses: dawidd6/action-download-artifact@v2 id: download with: - branch: v${{ steps.version.outputs.version }} + branch: release/v${{ steps.version.outputs.version }} workflow: ci.yaml workflow_conclusion: completed name: "npm-package" diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000000..a65aaff4da80 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +lib/vscode \ No newline at end of file diff --git a/.prettierrc.yaml b/.prettierrc.yaml index a58621d69ead..b6114bf4613b 100644 --- a/.prettierrc.yaml +++ b/.prettierrc.yaml @@ -4,14 +4,3 @@ trailingComma: all arrowParens: always singleQuote: false useTabs: false - -overrides: - # Attempt to keep VScode's existing code style intact. - - files: "lib/vscode/**/*.ts" - options: - # No limit defined upstream. - printWidth: 10000 - semi: true - singleQuote: true - useTabs: true - arrowParens: avoid diff --git a/CHANGELOG.md b/CHANGELOG.md index e54ceac21825..50f16fdd68a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,38 @@ Code v99.99.999 --> +## [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 diff --git a/ci/helm-chart/Chart.yaml b/ci/helm-chart/Chart.yaml index 760278db964d..3e30d4fafd1d 100644 --- a/ci/helm-chart/Chart.yaml +++ b/ci/helm-chart/Chart.yaml @@ -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.6.0 +version: 3.0.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.5.0 +appVersion: 4.5.1 diff --git a/ci/helm-chart/templates/deployment.yaml b/ci/helm-chart/templates/deployment.yaml index f137a9d2a8b6..3a5e45166fe4 100644 --- a/ci/helm-chart/templates/deployment.yaml +++ b/ci/helm-chart/templates/deployment.yaml @@ -25,6 +25,9 @@ spec: {{- if .Values.hostnameOverride }} hostname: {{ .Values.hostnameOverride }} {{- end }} + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} {{- if .Values.securityContext.enabled }} securityContext: fsGroup: {{ .Values.securityContext.fsGroup }} @@ -116,7 +119,7 @@ spec: {{- end }} {{- with .Values.affinity }} affinity: - {{- toYaml . | nindent 8 }} + {{- tpl . $ | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: diff --git a/ci/helm-chart/values.yaml b/ci/helm-chart/values.yaml index 636a16951e59..509eadd15569 100644 --- a/ci/helm-chart/values.yaml +++ b/ci/helm-chart/values.yaml @@ -6,7 +6,7 @@ replicaCount: 1 image: repository: codercom/code-server - tag: '4.5.0' + tag: '4.5.1' 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 diff --git a/ci/steps/brew-bump.sh b/ci/steps/brew-bump.sh index c1828decdb2d..e8af2a22e8fd 100755 --- a/ci/steps/brew-bump.sh +++ b/ci/steps/brew-bump.sh @@ -23,7 +23,7 @@ main() { # 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 diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index fefa229f0823..8c4db87f1c9b 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -10,6 +10,9 @@ - [Version updates to Code](#version-updates-to-code) - [Patching Code](#patching-code) - [Build](#build) + - [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) @@ -156,6 +159,18 @@ yarn package > If you need your builds to support older distros, run the build commands > inside a Docker container with all the build requirements installed. +### 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. diff --git a/docs/MAINTAINING.md b/docs/MAINTAINING.md index 6ef0251ad85a..18e3a8f0ede3 100644 --- a/docs/MAINTAINING.md +++ b/docs/MAINTAINING.md @@ -164,7 +164,8 @@ If you're the current release manager, follow these steps: ### Publishing a release -1. Create a new branch called `v0.0.0` (replace 0s with actual version aka v4.5.0) +1. Create a new branch called `release/v0.0.0` (replace 0s with actual version aka v4.5.0) + 1. If you don't do this, the `npm-brew` GitHub workflow will fail. It looks for the release artifacts under the branch pattern. 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 diff --git a/docs/collaboration.md b/docs/collaboration.md index 7430f4a17ef5..73dbb302e496 100644 --- a/docs/collaboration.md +++ b/docs/collaboration.md @@ -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.5.0/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/v4.5.1/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. diff --git a/docs/helm.md b/docs/helm.md index 500ee9ec44d8..1643dbbc889e 100644 --- a/docs/helm.md +++ b/docs/helm.md @@ -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.5.0](https://img.shields.io/badge/AppVersion-4.5.0-informational?style=flat-square)](https://img.shields.io/badge/AppVersion-4.5.0-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.5.1](https://img.shields.io/badge/AppVersion-4.5.1-informational?style=flat-square)](https://img.shields.io/badge/AppVersion-4.5.1-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.5.0"` | +| image.tag | string | `"4.5.1"` | | imagePullSecrets | list | `[]` | | ingress.enabled | bool | `false` | | nameOverride | string | `""` | diff --git a/docs/manifest.json b/docs/manifest.json index 2511b2091c1f..278aaf5e6b7b 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -1,5 +1,5 @@ { - "versions": ["v4.5.0"], + "versions": ["v4.5.1"], "routes": [ { "title": "Home", diff --git a/package.json b/package.json index 5fcdc3789fc0..1bb923c29485 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-server", "license": "MIT", - "version": "4.5.0", + "version": "4.5.1", "description": "Run VS Code on a remote server.", "homepage": "https://github.com/coder/code-server", "bugs": { @@ -83,7 +83,8 @@ "follow-redirects": "^1.14.8", "node-fetch": "^2.6.7", "nanoid": "^3.1.31", - "minimist": "npm:minimist-lite@2.2.1" + "minimist": "npm:minimist-lite@2.2.1", + "glob-parent": "^6.0.1" }, "dependencies": { "@coder/logger": "1.1.16", diff --git a/patches/base-path.diff b/patches/base-path.diff index bf16984651c9..49cef29fccb7 100644 --- a/patches/base-path.diff +++ b/patches/base-path.diff @@ -86,6 +86,15 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html +@@ -38,7 +38,7 @@ + + +