Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot]
90c05dee82 chore: bump ip-address from 10.1.0 to 10.2.0
Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.1.0 to 10.2.0.
- [Commits](https://github.com/beaugunderson/ip-address/commits)

---
updated-dependencies:
- dependency-name: ip-address
  dependency-version: 10.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-06 19:39:27 +00:00
23 changed files with 99 additions and 533 deletions

View File

@@ -25,8 +25,8 @@ jobs:
docs: ${{ steps.filter.outputs.docs }}
helm: ${{ steps.filter.outputs.helm }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3
- uses: actions/checkout@v6
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: filter
with:
filters: |
@@ -55,8 +55,8 @@ jobs:
name: Run prettier check
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
@@ -72,8 +72,8 @@ jobs:
needs: changes
if: needs.changes.outputs.docs == 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
@@ -89,7 +89,7 @@ jobs:
needs: changes
if: needs.changes.outputs.helm == 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/checkout@v6
- uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
@@ -103,8 +103,8 @@ jobs:
needs: changes
if: needs.changes.outputs.code == 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
@@ -121,7 +121,7 @@ jobs:
if: needs.changes.outputs.ci == 'true'
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@v6
- name: Check workflow files
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.9
@@ -134,8 +134,8 @@ jobs:
needs: changes
if: needs.changes.outputs.code == 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
@@ -144,7 +144,7 @@ jobs:
test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- run: npm run test:unit
- uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
- uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v5
if: success()
with:
token: ${{ secrets.CODECOV_TOKEN }}
@@ -163,16 +163,16 @@ jobs:
steps:
- run: sudo apt update && sudo apt install -y libkrb5-dev
- uses: awalsh128/cache-apt-pkgs-action@2c09a5e66da6c8016428a2172bd76e5e4f14bb17 # latest
- uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # latest
with:
packages: quilt
version: 1.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/checkout@v6
with:
submodules: true
- run: quilt push -a
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
@@ -191,7 +191,7 @@ jobs:
# embedded into the code). Use VSCODE_CACHE_VERSION to force a rebuild.
- name: Fetch prebuilt linux-x64 Code package from cache
id: cache-vscode
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
uses: actions/cache@v4
with:
path: lib/vscode-reh-web-linux-x64
key: vscode-linux-x64-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff', 'ci/build/build-vscode.sh') }}
@@ -205,7 +205,7 @@ jobs:
# Push up an artifact containing the linux-x64 release.
- run: KEEP_MODULES=1 npm run release
- run: tar -czf package.tar.gz release
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
- uses: actions/upload-artifact@v7
with:
name: linux-x64-package
path: ./package.tar.gz
@@ -219,8 +219,8 @@ jobs:
if: needs.changes.outputs.code == 'true' || needs.changes.outputs.deps == 'true' || needs.changes.outputs.ci == 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
@@ -233,13 +233,13 @@ jobs:
./test/node_modules/.bin/playwright install-deps
./test/node_modules/.bin/playwright install
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
- uses: actions/download-artifact@v8
with:
name: linux-x64-package
- run: tar -xzf package.tar.gz
- run: CODE_SERVER_TEST_ENTRY=./release npm run test:e2e
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
- uses: actions/upload-artifact@v7
if: always()
with:
name: failed-test-videos
@@ -256,7 +256,7 @@ jobs:
steps:
- name: Cache Caddy
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
uses: actions/cache@v4
id: caddy-cache
with:
path: |
@@ -269,8 +269,8 @@ jobs:
mkdir -p ~/.cache/caddy
tar -xzf caddy_2.5.2_linux_amd64.tar.gz --directory ~/.cache/caddy
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
@@ -283,7 +283,7 @@ jobs:
./test/node_modules/.bin/playwright install-deps
./test/node_modules/.bin/playwright install
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
- uses: actions/download-artifact@v8
with:
name: linux-x64-package
- run: tar -xzf package.tar.gz
@@ -292,7 +292,7 @@ jobs:
- run: CODE_SERVER_TEST_ENTRY=./release npm run test:e2e:proxy
- run: ~/.cache/caddy/caddy stop --config ./ci/Caddyfile
if: always()
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
- uses: actions/upload-artifact@v7
if: always()
with:
name: failed-test-videos-proxy

View File

@@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@v6
- name: Install code-server
run: ./install.sh
@@ -44,7 +44,7 @@ jobs:
container: "alpine:3.17"
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@v6
- name: Install curl
run: apk add curl
@@ -67,7 +67,7 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@v6
- name: Install code-server
run: ./install.sh

View File

@@ -33,8 +33,8 @@ jobs:
run: |
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .node-version
@@ -64,24 +64,23 @@ jobs:
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Checkout code-server-aur repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@v6
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
- name: Fetch and reset master
run: |
git remote add upstream https://github.com/coder/code-server-aur.git
git fetch upstream
git reset --hard upstream/master
git push --force
- name: Validate package
uses: heyhusen/archlinux-package-action@c9f94059ccbebe8710d31d582f33ef4e84fe575c # v3.0.0
with:
@@ -108,7 +107,7 @@ jobs:
run: |
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/checkout@v6
- uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
@@ -136,32 +135,3 @@ jobs:
out-file-path: "release-packages"
- run: npm run publish:docker
repo:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
TAG: ${{ inputs.version || github.ref_name }}
needs: docker
steps:
- name: Set version to tag without leading v
run: |
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- run: ./ci/build/update-repo.sh
- name: Open PR
run: |
git config --global user.name cdrci
git config --global user.email opensource@coder.com
git checkout -b "helm/$VERSION"
git add .
git commit -m "Update to $VERSION"
git push -u origin "$(git branch --show)"
gh pr create \
--repo coder/code-server \
--body-file .cache/checklist \
--title "Update to $VERSION"

View File

@@ -6,11 +6,6 @@ on:
version:
type: string
required: true
pull_request_target:
types:
- closed
branches:
- "update/**"
permissions:
contents: write # For creating releases.
@@ -26,7 +21,6 @@ jobs:
package-linux:
name: ${{ format('linux-{0}', matrix.vscode_arch) }}
runs-on: ubuntu-22.04
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
strategy:
matrix:
@@ -45,7 +39,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
TAG: ${{ inputs.version || github.event.pull_request.head.ref || github.ref_name }}
TAG: ${{ inputs.version || github.ref_name }}
# Set release package name.
ARCH: ${{ matrix.package_arch }}
# Cross-compile target.
@@ -60,7 +54,7 @@ jobs:
steps:
- run: sudo apt update && sudo apt install -y libkrb5-dev
- uses: awalsh128/cache-apt-pkgs-action@2c09a5e66da6c8016428a2172bd76e5e4f14bb17 # latest
- uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # latest
with:
packages: quilt
version: 1.0
@@ -70,16 +64,15 @@ jobs:
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: Strip update/ and v from tag
- name: Set version to tag without leading v
run: |
version=${TAG#update/}
echo "VERSION=${version#v}" >> $GITHUB_ENV
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/checkout@v6
with:
submodules: true
- run: quilt push -a
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
@@ -106,18 +99,12 @@ jobs:
if: ${{ matrix.vscode_arch == 'x64' }}
- run: tar -czf package.tar.gz release
if: ${{ matrix.vscode_arch == 'x64' }}
- run: |
sed "/^## Unreleased/,/^## / ! d" CHANGELOG.md | head -n -2 | tail -n +3 > .cache/release-notes
if: ${{ matrix.vscode_arch == 'x64' }}
- uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
if: ${{ matrix.vscode_arch == 'x64' }}
with:
draft: true
discussion_category_name: "📣 Announcements"
files: package.tar.gz
tag_name: v${{ env.VERSION }}
name: v${{ env.VERSION }}
body: .cache/release-notes
# Platform-specific release.
- run: KEEP_MODULES=1 npm run release
@@ -127,13 +114,10 @@ jobs:
draft: true
discussion_category_name: "📣 Announcements"
files: ./release-packages/*
tag_name: v${{ env.VERSION }}
name: v${{ env.VERSION }}
package-macos:
name: ${{ matrix.vscode_target }}
runs-on: ${{ matrix.os }}
if: github.event_name == 'workflow_dispatch' || github.event.pull_request_merged == true
strategy:
matrix:
include:
@@ -160,16 +144,15 @@ jobs:
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: Strip update/ and v from tag
- name: Set version to tag without leading v
run: |
version=${TAG#update/}
echo "VERSION=${version#v}" >> $GITHUB_ENV
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/checkout@v6
with:
submodules: true
- run: quilt push -a
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
@@ -189,5 +172,3 @@ jobs:
draft: true
discussion_category_name: "📣 Announcements"
files: ./release-packages/*
tag_name: v${{ env.VERSION }}
name: v${{ env.VERSION }}

View File

@@ -41,7 +41,7 @@ jobs:
container: "alpine:3.17"
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@v6
- name: Install test utilities
run: apk add bats checkbashisms
@@ -58,7 +58,7 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@v6
- name: Install lint utilities
run: sudo apt install shellcheck

View File

@@ -25,12 +25,12 @@ jobs:
timeout-minutes: 15
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
uses: actions/setup-node@v6
with:
node-version-file: .node-version
@@ -46,12 +46,12 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478 # latest
uses: aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478
with:
scan-type: "fs"
scan-ref: "."
@@ -62,7 +62,7 @@ jobs:
severity: "HIGH,CRITICAL"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: "trivy-repo-results.sarif"
@@ -76,17 +76,17 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4
uses: github/codeql-action/init@v4
with:
config-file: ./.github/codeql-config.yml
languages: javascript
- name: Autobuild
uses: github/codeql-action/autobuild@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4
uses: github/codeql-action/autobuild@v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4
uses: github/codeql-action/analyze@v4

View File

@@ -48,10 +48,10 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@v6
- name: Run Trivy vulnerability scanner in image mode
uses: aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478 # latest
uses: aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478
with:
image-ref: "docker.io/codercom/code-server:latest"
ignore-unfixed: true
@@ -60,6 +60,6 @@ jobs:
severity: "HIGH,CRITICAL"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: "trivy-image-results.sarif"

View File

@@ -1,72 +0,0 @@
name: Update code-server
on:
workflow_dispatch:
inputs:
version:
type: string
required: true
schedule:
- cron: "0 16,21 * * *"
jobs:
update:
runs-on: ubuntu-latest
env:
TAG: ${{ inputs.version }}
GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
steps:
- name: Fetch latest tag
if: env.TAG == ''
run: |
tag=$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://github.com/microsoft/vscode/releases/latest)
tag="${tag#https://github.com/microsoft/vscode/releases/tag/}"
echo "TAG=$tag" >> $GITHUB_ENV
- name: Remove leading v from tag
run: |
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: true
- name: Check current version
id: check
run: |
commit="$(git -C lib/vscode rev-parse HEAD)"
if [[ $(git -C lib/vscode ls-remote --tags | grep "$commit") == */"$VERSION" ]] ; then
echo "$VERSION update has already been merged into $(git rev-parse --abbrev-ref HEAD)"
echo done=true >> $GITHUB_OUTPUT
elif git ls-remote --exit-code --heads origin "update/$VERSION" ; then
echo "There is already a PR for updating to $VERSION"
echo done=true >> $GITHUB_OUTPUT
else
echo "$VERSION update has not started yet"
echo done=false >> $GITHUB_OUTPUT
fi
- uses: awalsh128/cache-apt-pkgs-action@2c09a5e66da6c8016428a2172bd76e5e4f14bb17 # latest
if: steps.check.outputs.done == 'false'
with:
packages: quilt
version: 1.0
- run: ./ci/build/update-vscode.sh
if: steps.check.outputs.done == 'false'
- name: Open PR
if: steps.check.outputs.done == 'false'
run: |
git config --global user.name cdrci
git config --global user.email opensource@coder.com
git checkout -b "update/$VERSION"
git add .
git commit -m "Update VS Code to $VERSION"
git push -u origin "$(git branch --show)"
gh pr create \
--repo coder/code-server \
--title "Update VS Code to $VERSION" \
--body-file .cache/checklist \
--draft

1
.gitignore vendored
View File

@@ -11,7 +11,6 @@ node_modules
.home
coverage
**/.DS_Store
*.bak
# Code packages itself here.
/lib/vscode-reh-web-*

View File

@@ -22,30 +22,6 @@ Code v99.99.999
## Unreleased
## [4.119.0](https://github.com/coder/code-server/releases/tag/v4.119.0) - 2026-05-07
Code v1.119.0
### Changed
- Update to Code 1.119.0
## [4.118.0](https://github.com/coder/code-server/releases/tag/v4.118.0) - 2026-05-06
Code v1.118.0
### Changed
- Update to Code 1.118.0
## [4.117.0](https://github.com/coder/code-server/releases/tag/v4.117.0) - 2026-04-22
Code v1.117.0
### Changed
- Update to Code 1.117.0
## [4.116.0](https://github.com/coder/code-server/releases/tag/v4.116.0) - 2026-04-16
Code v1.116.0

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
set -Eeuo pipefail
function update_helm() {
local current
current=$(yq .version ci/helm-chart/Chart.yaml)
local next
next=$(semver "$current" -i minor)
echo "Bumping version from $current to $next..."
sed -i.bak "s/^version: $current\$/version: $next/" ci/helm-chart/Chart.yaml
echo "Setting app version and image to $version..."
sed -i.bak "s/^appVersion: .\+\$/appVersion: $version/" ci/helm-chart/Chart.yaml
sed -i.bak "s/^ tag: .\+\$/ tag: '$version'/" ci/helm-chart/values.yaml
}
function update_changelog() {
local date
date=$(printf '%(%Y-%m-%d)T\n' -1)
local link="https://github.com/coder/code-server/releases/tag/v$version"
sed -i.bak "s|## Unreleased|## Unreleased\n\n## [$version]($link) - $date|" CHANGELOG.md
}
function main() {
cd "$(dirname "${0}")/../.."
source ./ci/lib.sh
local version=${VERSION:-$(git describe --tags)}
version="${version#v}"
declare -a steps
steps+=(
"Update Helm chart" "update_helm"
"Update changelog" "update_changelog"
)
run-steps "${steps[@]}"
# This step is always manual.
echo "- [ ] https://github.com/coder/code-server-aur/pulls" >> .cache/checklist
}
main "$@"

View File

@@ -1,154 +0,0 @@
#!/usr/bin/env bash
set -Eeuo pipefail
function unapply_patches() {
local -i exit_code=0
quiet quilt pop -af || exit_code=$?
case $exit_code in
# Sucessfully unapplied.
0) ;;
# No more patches to unapply.
2) ;;
# Some error.
*) return $exit_code ;;
esac
}
function update_vscode() {
pushd lib/vscode
if ! git checkout 2>&1 "$target_vscode_version" ; then
echo "$target_vscode_version does not exist locally, fetching..."
git fetch --all --prune
git checkout "$target_vscode_version"
fi
popd
}
function refresh_patches() {
local -i exit_code=0
while quiet quilt push ; ! (( exit_code=$? )) ; do
quilt refresh
done
case $exit_code in
# No more patches to apply.
2) ;;
# Some error.
*) return $exit_code ;;
esac
}
function update_node() {
local node_version
node_version=$(cat .node-version)
if [[ $node_version == "$target_node_version" ]] ; then
echo "Already set to $target_node_version"
else
echo "Updating from $node_version to $target_node_version..."
echo "$target_node_version" > .node-version
fi
}
function get-webview-script-hash() {
local html
html=$(<"$1")
local start_tag='<script async type="module">'
local end_tag="</script>"
html=${html##*"$start_tag"}
html=${html%%"$end_tag"*}
echo -n "$html" | openssl sha256 -binary | openssl base64
}
function update_csp() {
local current
current=$(quilt top 2>/dev/null || echo "")
local patch_action=""
echo "Currently at ${current:-base}"
if [[ $current != */webview.diff ]] ; then
echo "Moving to patches/webview.diff..."
local -i exit_code=0
if quilt applied 2>/dev/null | grep --quiet webview.diff ; then
quiet quilt pop webview || exit_code=$?
patch_action=pop
else
quiet quilt push webview || exit_code=$?
patch_action=push
fi
case $exit_code in
# Successfully moved.
0) ;;
# Some error.
*) return $exit_code ;;
esac
fi
local file=lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
local hash
hash=$(get-webview-script-hash "$file")
echo "Calculated hash as $hash"
# Use octothorpe as a delimiter since the hash may contain a slash.
sed -i.bak "s#script-src 'sha256-[^']\+'#script-src 'sha256-$hash'#" "$file"
quilt refresh
if [[ $patch_action != "" ]] ; then
echo "Moving back to ${current:-base}..."
case $patch_action in
pop) quiet quilt push "$current" ;;
push) quiet quilt pop "${current:--a}" ;;
esac
fi
}
function add_changelog() {
local file=CHANGELOG.md
if grep --quiet "Code $target_vscode_version" "$file" ; then
echo "Changelog for $target_vscode_version already exists"
else
# TODO: This is not exactly robust. In particular, it needs to handle if
# there is already a "changed" section.
sed -i.bak "s/## Unreleased/## Unreleased\n\nCode v$target_vscode_version\n\n### Changed\n\n- Update to Code $target_vscode_version/" "$file"
fi
}
function main() {
cd "$(dirname "${0}")/../.."
source ./ci/lib.sh
local target_node_version
target_node_version=$(grep target lib/vscode/remote/.npmrc | awk -F= '{print $2}' | tr -d '"')
declare -a steps
# If version is not set, assume we are already at the target version and the
# user is just trying to resolve conflics.
local target_vscode_version
if [[ ${VERSION-} ]] ; then
# Removing patches only needs to be done locally; in CI we start from a
# fresh clone each time.
if [[ ! ${CI-} ]] ; then
steps+=("Unapplying patches" "unapply_patches")
fi
target_vscode_version="${VERSION#v}"
steps+=(
"Update VS Code to $target_vscode_version" "update_vscode"
"Refresh VS Code patches" "refresh_patches"
)
else
target_vscode_version="$(git -C lib/vscode describe --tags --exact-match)"
echo "Detected VS Code version $target_vscode_version"
fi
steps+=(
"Set Node version to $target_node_version" "update_node"
"Update CSP webview hash" "update_csp"
"Add changelog note" "add_changelog"
)
run-steps "${steps[@]}"
# This step is always manual.
echo "- [ ] Verify changelog" >> .cache/checklist
}
main "$@"

View File

@@ -78,42 +78,6 @@ nodeArch() {
echo "$cpu"
}
run-steps() {
local -i failed=0
rm -f .cache/checklist
while (( $# )) ; do
local name=$1 ; shift
local fn=$1 ; shift
# Only run if an earlier step has not failed.
if [[ $failed == 0 ]] ; then
echo "$name..."
if $fn | indent ; then
echo "- [X] $name" >> .cache/checklist
else
((failed++))
fi
fi
# For all failed steps, write out an empty checkbox.
if [[ $failed != 0 ]] ; then
echo "- [ ] $name" >> .cache/checklist
fi
done
if [[ $failed != 0 ]] ; then
return 1
fi
}
quiet() {
"$@" >/dev/null
}
indent() {
local count=2
local space
space=$(printf "%${count}s")
sed "s/^/$space| /g"
}
# See gulpfile.reh.ts for available targets.
if [[ ! ${VSCODE_TARGET-} ]]; then
VSCODE_TARGET="$(nodeOS)-$(nodeArch)"

View File

@@ -93,20 +93,17 @@ commits first if you are doing this).
### Version updates to Code
PRs will be automatically created with updates to VS Code. If a patch cannot be
automatically resolved, it will be necessary to clone the branch, resolve the
conflicts manually, and finish the update. To do this:
1. Apply as many patches as possible `quilt push -a`.
2. Once you hit a conflict, force apply with `quilt push -f`, manually add back
the rejected code, then run `quilt refresh`.
3. Once all patches have been resolved, run `./ci/build/update.sh` to finish the
update process.
4. Commit all changes, push them up to the branch, and update the checklist in
the PR description.
Once the PR is ready, manually verify that the unreleased changelog section
contains all the changes going into this version before merging.
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 `npm 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

6
package-lock.json generated
View File

@@ -3637,9 +3637,9 @@
}
},
"node_modules/ip-address": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz",
"integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==",
"version": "10.2.0",
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.2.0.tgz",
"integrity": "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==",
"license": "MIT",
"engines": {
"node": ">= 12"

View File

@@ -2,7 +2,7 @@ Index: code-server/lib/vscode/build/gulpfile.extensions.ts
===================================================================
--- code-server.orig/lib/vscode/build/gulpfile.extensions.ts
+++ code-server/lib/vscode/build/gulpfile.extensions.ts
@@ -294,6 +294,29 @@ export const compileCopilotExtensionBuil
@@ -293,6 +293,29 @@ export const compileCopilotExtensionBuil
gulp.task(compileCopilotExtensionBuildTask);
/**
@@ -44,7 +44,7 @@ Index: code-server/lib/vscode/build/lib/extensions.ts
import vzip from 'gulp-vinyl-zip';
import { createRequire } from 'module';
@@ -487,6 +488,116 @@ export function packageCopilotExtensionS
@@ -482,6 +483,116 @@ export function packageCopilotExtensionS
).pipe(util2.setExecutableBit(['**/*.sh']));
}
@@ -61,7 +61,7 @@ Index: code-server/lib/vscode/build/lib/extensions.ts
+ return es.readArray([]);
+ }
+
+ const esbuildConfigFileName = '.esbuild.mts';
+ const esbuildConfigFileName = '.esbuild.ts';
+ const esbuildScript = path.join(extensionPath, esbuildConfigFileName);
+ if (!fs.existsSync(esbuildScript)) {
+ throw new Error(`Copilot esbuild script not found at ${esbuildScript}`);

View File

@@ -32,7 +32,7 @@ Index: code-server/lib/vscode/src/vs/platform/environment/common/environmentServ
===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/environment/common/environmentService.ts
+++ code-server/lib/vscode/src/vs/platform/environment/common/environmentService.ts
@@ -112,7 +112,7 @@ export abstract class AbstractNativeEnvi
@@ -98,7 +98,7 @@ export abstract class AbstractNativeEnvi
return URI.file(join(vscodePortable, 'argv.json'));
}

View File

@@ -166,8 +166,8 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions
import { AutoSaveAfterShortDelayContext } from '../../../services/filesConfiguration/common/filesConfigurationService.js';
import { WorkbenchListDoubleSelection } from '../../../../platform/list/browser/listService.js';
import { Schemas } from '../../../../base/common/network.js';
-import { DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsSessionsWindowContext, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, MultipleEditorsSelectedInGroupContext, TwoEditorsSelectedInGroupContext, SelectedEditorsInGroupFileOrUntitledResourceContextKey } from '../../../common/contextkeys.js';
+import { IsEnabledFileDownloads, IsEnabledFileUploads, DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsSessionsWindowContext, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, MultipleEditorsSelectedInGroupContext, TwoEditorsSelectedInGroupContext, SelectedEditorsInGroupFileOrUntitledResourceContextKey } from '../../../common/contextkeys.js';
-import { DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, MultipleEditorsSelectedInGroupContext, TwoEditorsSelectedInGroupContext, SelectedEditorsInGroupFileOrUntitledResourceContextKey } from '../../../common/contextkeys.js';
+import { IsEnabledFileDownloads, IsEnabledFileUploads, DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, MultipleEditorsSelectedInGroupContext, TwoEditorsSelectedInGroupContext, SelectedEditorsInGroupFileOrUntitledResourceContextKey } from '../../../common/contextkeys.js';
import { IsWebContext } from '../../../../platform/contextkey/common/contextkeys.js';
import { ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js';
import { ThemeIcon } from '../../../../base/common/themables.js';

View File

@@ -31,7 +31,7 @@ Index: code-server/lib/vscode/src/vs/workbench/api/node/extHostExtensionService.
import { ExtHostDiskFileSystemProvider } from './extHostDiskFileSystemProvider.js';
import nodeModule from 'node:module';
import { assertType } from '../../../base/common/types.js';
@@ -175,6 +177,52 @@ export class ExtHostExtensionService ext
@@ -226,6 +228,52 @@ export class ExtHostExtensionService ext
performance.mark('code/extHost/didInitAPI');

63
test/package-lock.json generated
View File

@@ -18,7 +18,7 @@
"jest-fetch-mock": "^3.0.3",
"jsdom": "^16.4.0",
"node-fetch": "^2.6.7",
"playwright": "^1.59.1",
"playwright": "^1.56.1",
"ts-jest": "^27.0.7",
"wtfnode": "^0.9.1"
}
@@ -1013,53 +1013,6 @@
"node": ">=18"
}
},
"node_modules/@playwright/test/node_modules/fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/@playwright/test/node_modules/playwright": {
"version": "1.56.1",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz",
"integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"playwright-core": "1.56.1"
},
"bin": {
"playwright": "cli.js"
},
"engines": {
"node": ">=18"
},
"optionalDependencies": {
"fsevents": "2.3.2"
}
},
"node_modules/@playwright/test/node_modules/playwright-core": {
"version": "1.56.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz",
"integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"playwright-core": "cli.js"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@sinonjs/commons": {
"version": "1.8.6",
"resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz",
@@ -4114,13 +4067,13 @@
}
},
"node_modules/playwright": {
"version": "1.59.1",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.59.1.tgz",
"integrity": "sha512-C8oWjPR3F81yljW9o5OxcWzfh6avkVwDD2VYdwIGqTkl+OGFISgypqzfu7dOe4QNLL2aqcWBmI3PMtLIK233lw==",
"version": "1.56.1",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz",
"integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"playwright-core": "1.59.1"
"playwright-core": "1.56.1"
},
"bin": {
"playwright": "cli.js"
@@ -4133,9 +4086,9 @@
}
},
"node_modules/playwright-core": {
"version": "1.59.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.59.1.tgz",
"integrity": "sha512-HBV/RJg81z5BiiZ9yPzIiClYV/QMsDCKUyogwH9p3MCP6IYjUFu/MActgYAvK0oWyV9NlwM3GLBjADyWgydVyg==",
"version": "1.56.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz",
"integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==",
"dev": true,
"license": "Apache-2.0",
"bin": {

View File

@@ -14,7 +14,7 @@
"jest-fetch-mock": "^3.0.3",
"jsdom": "^16.4.0",
"node-fetch": "^2.6.7",
"playwright": "^1.59.1",
"playwright": "^1.56.1",
"ts-jest": "^27.0.7",
"wtfnode": "^0.9.1"
},

View File

@@ -33,12 +33,10 @@ const config: PlaywrightTestConfig = {
// name: "Firefox",
// use: { browserName: "firefox" },
// },
// Keeps failing with "Underlying ArrayBuffer has been detached from the view or out-of-bounds"
// Not sure what we can do about it...so skip for now.
// {
// name: "WebKit",
// use: { browserName: "webkit" },
// },
{
name: "WebKit",
use: { browserName: "webkit" },
},
],
}