diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 369040983858..b8f169a4b1fa 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -20,6 +20,8 @@ body: - **Remote OS**: Ubuntu - **Remote Architecture**: amd64 - **`code-server --version`**: 4.0.1 + + Please do not just put "latest" for the version. value: | - Web Browser: - Local OS: diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index f020ccde31ae..91e320087175 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -124,7 +124,7 @@ jobs: echo "VERSION=${TAG#v}" >> $GITHUB_ENV - name: Validate package - uses: heyhusen/archlinux-package-action@v2.2.1 + uses: heyhusen/archlinux-package-action@v2.4.0 env: VERSION: ${{ env.VERSION }} with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a4433c810937..ee9039f926c8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -268,7 +268,7 @@ jobs: timeout-minutes: 15 steps: - name: Download artifacts - uses: dawidd6/action-download-artifact@v9 + uses: dawidd6/action-download-artifact@v10 id: download with: branch: ${{ github.ref }} diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index 69a08a5a4e09..03dbcf508103 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -43,7 +43,7 @@ jobs: 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 + runs-on: ubuntu-22.04 steps: - name: Checkout repo uses: actions/checkout@v4 @@ -72,7 +72,7 @@ jobs: 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 + runs-on: ubuntu-22.04 steps: - name: Checkout repository diff --git a/.github/workflows/trivy-docker.yaml b/.github/workflows/trivy-docker.yaml index a1e90306c7f4..b60f0fcc9fff 100644 --- a/.github/workflows/trivy-docker.yaml +++ b/.github/workflows/trivy-docker.yaml @@ -44,7 +44,7 @@ concurrency: jobs: trivy-scan-image: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout code diff --git a/.node-version b/.node-version index 5bd6811705e9..8320a6d2994a 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -20.19.0 +22.15.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index b81cca33116e..a16bb9380908 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,74 @@ Code v99.99.999 ## Unreleased +Code v1.101.1 + +### Fixed + +- Fix web views not loading due to 401 when requesting the service worker. + +## [4.101.1](https://github.com/coder/code-server/releases/tag/v4.101.1) - 2025-06-20 + +Code v1.101.1 + +### Changed + +- Update to Code 1.101.1. + +## [4.101.0](https://github.com/coder/code-server/releases/tag/v4.101.0) - 2025-06-20 + +Code v1.101.0 + +### Changed + +- Update to Code 1.101.0. + +## [4.100.3](https://github.com/coder/code-server/releases/tag/v4.100.3) - 2025-06-03 + +Code v1.100.3 + +### Changed + +- Update to Code 1.100.3. + +## [4.100.2](https://github.com/coder/code-server/releases/tag/v4.100.2) - 2025-05-15 + +Code v1.100.2 + +### Changed + +- Update to Code 1.100.2. + +## [4.100.1](https://github.com/coder/code-server/releases/tag/v4.100.1) - 2025-05-13 + +Code v1.100.1 + +### Changed + +- Update to Code 1.100.1. + +## [4.100.0](https://github.com/coder/code-server/releases/tag/v4.100.0) - 2025-05-12 + +Code v1.100.0 + +### Added + +- Trusted domains for links can now be set at run-time by configuring + `linkProtectionTrustedDomains` in the `lib/vscode/product.json` file or via + the `--link-protection-trusted-domains` flag. + +### Changed + +- Update to Code 1.100.0. +- Disable extension signature verification, which previously was skipped by + default (the package used for verification is not available to OSS builds of + VS Code) but now reportedly throws hard errors making it impossible to install + extensions. + +### Fixed + +- Flags with repeatable options now work via the config file. + ## [4.99.4](https://github.com/coder/code-server/releases/tag/v4.99.4) - 2025-05-02 Code v1.99.3 diff --git a/ci/build/npm-postinstall.sh b/ci/build/npm-postinstall.sh index fc82b2ffbe47..ee4c92237023 100755 --- a/ci/build/npm-postinstall.sh +++ b/ci/build/npm-postinstall.sh @@ -76,8 +76,8 @@ main() { echo "USE AT YOUR OWN RISK!" fi - if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-20}" ]; then - echo "ERROR: code-server currently requires node v20." + if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-22}" ]; then + echo "ERROR: code-server currently requires node v22." if [ -n "$FORCE_NODE_VERSION" ]; then echo "However, you have overrided the version check to use v$FORCE_NODE_VERSION." fi diff --git a/ci/dev/gen_icons.sh b/ci/dev/gen_icons.sh index 9d27486dcc57..049e9eef0864 100755 --- a/ci/dev/gen_icons.sh +++ b/ci/dev/gen_icons.sh @@ -1,44 +1,40 @@ #!/bin/sh set -eu +# Generate icons from a single favicon.svg. favicon.svg should have no fill +# colors set. main() { cd src/browser/media - # We need .ico for backwards compatibility. - # The other two are the only icon sizes required by Chrome and - # we use them for stuff like apple-touch-icon as well. - # https://web.dev/add-manifest/ + # We need .ico for backwards compatibility. The other two are the only icon + # sizes required by Chrome and we use them for stuff like apple-touch-icon as + # well. https://web.dev/add-manifest/ # # This should be enough and we can always add more if there are problems. - + # + # -quiet to avoid https://github.com/ImageMagick/ImageMagick/issues/884 # -background defaults to white but we want it transparent. + # -density somehow makes the image both sharper and smaller in file size. + # # https://imagemagick.org/script/command-line-options.php#background - convert -quiet -background transparent -resize 256x256 favicon.svg favicon.ico - # We do not generate the pwa-icon from the favicon as they are slightly different - # designs and sizes. - # See favicon.afdesign and #2401 for details on the differences. - convert -quiet -background transparent -resize 192x192 pwa-icon.png pwa-icon-192.png - convert -quiet -background transparent -resize 512x512 pwa-icon.png pwa-icon-512.png + convert -quiet -background transparent \ + -resize 256x256 -density 256x256 \ + favicon.svg favicon.ico - # We use -quiet above to avoid https://github.com/ImageMagick/ImageMagick/issues/884 + # Generate PWA icons. There should be enough padding to support masking. + convert -quiet -border 60x60 -bordercolor white -background white \ + -resize 192x192 -density 192x192 \ + favicon.svg pwa-icon-192.png + convert -quiet -border 160x160 -bordercolor white -background white \ + -resize 512x512 -density 512x512 \ + favicon.svg pwa-icon-512.png - # The following adds dark mode support for the favicon as favicon-dark-support.svg - # There is no similar capability for pwas or .ico so we can only add support to the svg. - favicon_dark_style="" - # See https://stackoverflow.com/a/22901380/4283659 - # This escapes all newlines so that sed will accept them. - favicon_dark_style="$(printf "%s\n" "$favicon_dark_style" | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/\\n/g')" - sed "$( - cat -n << EOF -s% favicon-dark-support.svg + # The following adds dark mode support for the favicon as + # favicon-dark-support.svg There is no similar capability for pwas or .ico so + # we can only add support to the svg. + favicon_dark_style="" + cp favicon.svg favicon-dark-support.svg + sed "s% favicon-dark-support.svg } main "$@" diff --git a/ci/helm-chart/Chart.yaml b/ci/helm-chart/Chart.yaml index 63c9483a5026..2d03e966d2a0 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: 3.26.4 +version: 3.28.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.99.4 +appVersion: 4.101.1 diff --git a/ci/helm-chart/values.yaml b/ci/helm-chart/values.yaml index 3790acc7e006..2785e1bbc4f2 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.99.4' + tag: '4.101.1' pullPolicy: Always # Specifies one or more secrets to be used when pulling images from a diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 9d6c413c4ff4..3a89005e32f6 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -32,7 +32,7 @@ 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). Here is what is needed: -- `node` v20.x +- `node` v22.x - `git` v2.x or greater - [`git-lfs`](https://git-lfs.github.com) - [`npm`](https://www.npmjs.com/) diff --git a/docs/android.md b/docs/android.md index 00909f975415..2659c44000b8 100644 --- a/docs/android.md +++ b/docs/android.md @@ -11,7 +11,7 @@ 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 20: +7. Install and use Node.js 22: ```shell nvm install 18 diff --git a/docs/npm.md b/docs/npm.md index d300cfa5bd55..8d3afd0be06a 100644 --- a/docs/npm.md +++ b/docs/npm.md @@ -30,7 +30,7 @@ includes installing instructions based on your operating system. ## Node.js version 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 +currently `22.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 @@ -78,7 +78,7 @@ Proceed to [installing](#installing) ## FreeBSD ```sh -pkg install -y git python npm-node20 pkgconf +pkg install -y git python npm-node22 pkgconf pkg install -y libinotify ``` diff --git a/docs/termux.md b/docs/termux.md index 84dcec0765e4..db81cb57d1e1 100644 --- a/docs/termux.md +++ b/docs/termux.md @@ -57,7 +57,7 @@ npm config set python python3 node -v ``` -you will get Node version `v20` +you will get Node version `v22` 5. Now install code-server following our guide on [installing with npm](./npm.md) diff --git a/flake.nix b/flake.nix index 2fee8f28b6fd..3a1f7efbc122 100644 --- a/flake.nix +++ b/flake.nix @@ -10,10 +10,11 @@ flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; - nodejs = pkgs.nodejs_20; + nodejs = pkgs.nodejs_22; in { devShells.default = pkgs.mkShell { nativeBuildInputs = with pkgs; [ + imagemagick nodejs python3 pkg-config diff --git a/lib/vscode b/lib/vscode index 19e0f9e681ec..2901c5ac6db8 160000 --- a/lib/vscode +++ b/lib/vscode @@ -1 +1 @@ -Subproject commit 19e0f9e681ecb8e5c09d8784acaa601316ca4571 +Subproject commit 2901c5ac6db8a986a5666c3af51ff804d05af0d4 diff --git a/package-lock.json b/package-lock.json index 006764f2d12e..81e34569153c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "limiter": "^2.1.0", "pem": "^1.14.8", "proxy-agent": "^6.3.1", - "qs": "6.13.0", + "qs": "6.14.0", "rotating-file-stream": "^3.1.1", "safe-buffer": "^5.2.1", "safe-compare": "^1.1.4", @@ -45,7 +45,7 @@ "@types/express": "^5.0.0", "@types/http-proxy": "1.17.7", "@types/js-yaml": "^4.0.6", - "@types/node": "20.x", + "@types/node": "22.x", "@types/pem": "^1.14.1", "@types/proxy-from-env": "^1.0.1", "@types/safe-compare": "^1.1.0", @@ -58,7 +58,7 @@ "eslint-import-resolver-typescript": "^3.6.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-prettier": "^5.0.0", - "globals": "^15.10.0", + "globals": "^16.1.0", "prettier": "3.4.2", "prettier-plugin-sh": "^0.14.0", "ts-node": "^10.9.1", @@ -66,7 +66,7 @@ "typescript-eslint": "^8.8.0" }, "engines": { - "node": "20" + "node": "22" } }, "node_modules/@babel/runtime": { @@ -99,16 +99,20 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", "dev": true, + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } @@ -502,12 +506,14 @@ } }, "node_modules/@types/compression": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@types/compression/-/compression-1.7.5.tgz", - "integrity": "sha512-AAQvK5pxMpaT+nDvhHrsBhLSYG5yQdtkaJE1WYieSNY2mVFKAgmU4ks65rkZD5oqnGCFLyQpUr1CqI4DmUMyDg==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@types/compression/-/compression-1.8.0.tgz", + "integrity": "sha512-g4vmPIwbTii9dX1HVioHbOolubEaf4re4vDxuzpKrzz9uI7uarBExi9begX0cXyIB85jXZ5X2A/v8rsHZxSAPw==", "dev": true, + "license": "MIT", "dependencies": { - "@types/express": "*" + "@types/express": "*", + "@types/node": "*" } }, "node_modules/@types/connect": { @@ -632,13 +638,13 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.17.17", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.17.tgz", - "integrity": "sha512-/WndGO4kIfMicEQLTi/mDANUu/iVUhT7KboZPdEqqHQ4aTS+3qT3U5gIqWDFV+XouorjfgGqvKILJeHhuQgFYg==", + "version": "22.15.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.31.tgz", + "integrity": "sha512-jnVe5ULKl6tijxUhvQeNbQG/84fHfg+yMak02cT8QVhBx/F05rAVxCGBYYTh2EKz22D6JF5ktXuNwdx7b9iEGw==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.21.0" } }, "node_modules/@types/pem": { @@ -729,21 +735,21 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.29.0.tgz", - "integrity": "sha512-PAIpk/U7NIS6H7TEtN45SPGLQaHNgB7wSjsQV/8+KYokAb2T/gloOA/Bee2yd4/yKVhPKe5LlaUGhAZk5zmSaQ==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.33.0.tgz", + "integrity": "sha512-CACyQuqSHt7ma3Ns601xykeBK/rDeZa3w6IS6UtMQbixO5DWy+8TilKkviGDH6jtWCo8FGRKEK5cLLkPvEammQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.29.0", - "@typescript-eslint/type-utils": "8.29.0", - "@typescript-eslint/utils": "8.29.0", - "@typescript-eslint/visitor-keys": "8.29.0", + "@typescript-eslint/scope-manager": "8.33.0", + "@typescript-eslint/type-utils": "8.33.0", + "@typescript-eslint/utils": "8.33.0", + "@typescript-eslint/visitor-keys": "8.33.0", "graphemer": "^1.4.0", - "ignore": "^5.3.1", + "ignore": "^7.0.0", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -753,22 +759,32 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "@typescript-eslint/parser": "^8.33.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/@typescript-eslint/parser": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.29.0.tgz", - "integrity": "sha512-8C0+jlNJOwQso2GapCVWWfW/rzaq7Lbme+vGUFKE31djwNncIpgXD7Cd4weEsDdkoZDjH0lwwr3QDQFuyrMg9g==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.33.0.tgz", + "integrity": "sha512-JaehZvf6m0yqYp34+RVnihBAChkqeH+tqqhS0GuX1qgPpwLvmTPheKEs6OeCK6hVJgXZHJ2vbjnC9j119auStQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.29.0", - "@typescript-eslint/types": "8.29.0", - "@typescript-eslint/typescript-estree": "8.29.0", - "@typescript-eslint/visitor-keys": "8.29.0", + "@typescript-eslint/scope-manager": "8.33.0", + "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/typescript-estree": "8.33.0", + "@typescript-eslint/visitor-keys": "8.33.0", "debug": "^4.3.4" }, "engines": { @@ -783,15 +799,34 @@ "typescript": ">=4.8.4 <5.9.0" } }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.33.0.tgz", + "integrity": "sha512-d1hz0u9l6N+u/gcrk6s6gYdl7/+pp8yHheRTqP6X5hVDKALEaTn8WfGiit7G511yueBEL3OpOEpD+3/MBdoN+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.33.0", + "@typescript-eslint/types": "^8.33.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.29.0.tgz", - "integrity": "sha512-aO1PVsq7Gm+tcghabUpzEnVSFMCU4/nYIgC2GOatJcllvWfnhrgW0ZEbnTxm36QsikmCN1K/6ZgM7fok2I7xNw==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.33.0.tgz", + "integrity": "sha512-LMi/oqrzpqxyO72ltP+dBSP6V0xiUb4saY7WLtxSfiNEBI8m321LLVFU9/QDJxjDQG9/tjSqKz/E3380TEqSTw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.29.0", - "@typescript-eslint/visitor-keys": "8.29.0" + "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/visitor-keys": "8.33.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -801,17 +836,34 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.33.0.tgz", + "integrity": "sha512-sTkETlbqhEoiFmGr1gsdq5HyVbSOF0145SYDJ/EQmXHtKViCaGvnyLqWFFHtEXoS0J1yU8Wyou2UGmgW88fEug==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" + } + }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.29.0.tgz", - "integrity": "sha512-ahaWQ42JAOx+NKEf5++WC/ua17q5l+j1GFrbbpVKzFL/tKVc0aYY8rVSYUpUvt2hUP1YBr7mwXzx+E/DfUWI9Q==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.33.0.tgz", + "integrity": "sha512-lScnHNCBqL1QayuSrWeqAL5GmqNdVUQAAMTaCwdYEdWfIrSrOGzyLGRCHXcCixa5NK6i5l0AfSO2oBSjCjf4XQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.29.0", - "@typescript-eslint/utils": "8.29.0", + "@typescript-eslint/typescript-estree": "8.33.0", + "@typescript-eslint/utils": "8.33.0", "debug": "^4.3.4", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -826,9 +878,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.29.0.tgz", - "integrity": "sha512-wcJL/+cOXV+RE3gjCyl/V2G877+2faqvlgtso/ZRbTCnZazh0gXhe+7gbAnfubzN2bNsBtZjDvlh7ero8uIbzg==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.33.0.tgz", + "integrity": "sha512-DKuXOKpM5IDT1FA2g9x9x1Ug81YuKrzf4mYX8FAVSNu5Wo/LELHWQyM1pQaDkI42bX15PWl0vNPt1uGiIFUOpg==", "dev": true, "license": "MIT", "engines": { @@ -840,20 +892,22 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.29.0.tgz", - "integrity": "sha512-yOfen3jE9ISZR/hHpU/bmNvTtBW1NjRbkSFdZOksL1N+ybPEE7UVGMwqvS6CP022Rp00Sb0tdiIkhSCe6NI8ow==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.33.0.tgz", + "integrity": "sha512-vegY4FQoB6jL97Tu/lWRsAiUUp8qJTqzAmENH2k59SJhw0Th1oszb9Idq/FyyONLuNqT1OADJPXfyUNOR8SzAQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.29.0", - "@typescript-eslint/visitor-keys": "8.29.0", + "@typescript-eslint/project-service": "8.33.0", + "@typescript-eslint/tsconfig-utils": "8.33.0", + "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/visitor-keys": "8.33.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -867,9 +921,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -893,16 +947,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.29.0.tgz", - "integrity": "sha512-gX/A0Mz9Bskm8avSWFcK0gP7cZpbY4AIo6B0hWYFCaIsz750oaiWR4Jr2CI+PQhfW1CpcQr9OlfPS+kMFegjXA==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.33.0.tgz", + "integrity": "sha512-lPFuQaLA9aSNa7D5u2EpRiqdAUhzShwGg/nhpBlc4GR6kcTABttCuyjFs8BcEZ8VWrjCBof/bePhP3Q3fS+Yrw==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.29.0", - "@typescript-eslint/types": "8.29.0", - "@typescript-eslint/typescript-estree": "8.29.0" + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.33.0", + "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/typescript-estree": "8.33.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -917,13 +971,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.29.0.tgz", - "integrity": "sha512-Sne/pVz8ryR03NFK21VpN88dZ2FdQXOlq3VIklbrTYEt8yXtRFr9tvUhqvCeKjqYk5FSim37sHbooT6vzBTZcg==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.33.0.tgz", + "integrity": "sha512-7RW7CMYoskiz5OOGAWjJFxgb7c5UNjTG292gYhWeOAcFmYCtVCSqjqSBj5zMhxbXo2JOW95YYrUWJfU0zrpaGQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.29.0", + "@typescript-eslint/types": "8.33.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -1281,7 +1335,7 @@ "http-errors": "^2.0.0", "iconv-lite": "^0.5.2", "on-finished": "^2.4.1", - "qs": "^6.14.0", + "qs": "6.14.0", "raw-body": "^3.0.0", "type-is": "^2.0.0" }, @@ -1289,25 +1343,10 @@ "node": ">=18" } }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -2619,6 +2658,21 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "license": "MIT" }, + "node_modules/express/node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -3034,10 +3088,11 @@ } }, "node_modules/globals": { - "version": "15.14.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.14.0.tgz", - "integrity": "sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.1.0.tgz", + "integrity": "sha512-aibexHNbb/jiUSObBgpHLj+sIuUmJnYcgXBlrfsiDZ9rt4aF2TFRbyLgZ2iFQuVZ1K5Mx3FVkbKRSgKrbK3K2g==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" }, @@ -4886,11 +4941,12 @@ } }, "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" }, "engines": { "node": ">=0.6" @@ -6021,9 +6077,9 @@ } }, "node_modules/typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -6035,15 +6091,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.29.0.tgz", - "integrity": "sha512-ep9rVd9B4kQsZ7ZnWCVxUE/xDLUUUsRzE0poAeNu+4CkFErLfuvPt/qtm2EpnSyfvsR0S6QzDFSrPCFBwf64fg==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.33.0.tgz", + "integrity": "sha512-5YmNhF24ylCsvdNW2oJwMzTbaeO4bg90KeGtMjUw0AGtHksgEPLRTUil+coHwCfiu4QjVJFnjp94DmU6zV7DhQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.29.0", - "@typescript-eslint/parser": "8.29.0", - "@typescript-eslint/utils": "8.29.0" + "@typescript-eslint/eslint-plugin": "8.33.0", + "@typescript-eslint/parser": "8.33.0", + "@typescript-eslint/utils": "8.33.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -6079,10 +6135,11 @@ "dev": true }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", - "dev": true + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" }, "node_modules/unified": { "version": "9.2.2", diff --git a/package.json b/package.json index ffdfccafdede..1a2fe6524020 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@types/express": "^5.0.0", "@types/http-proxy": "1.17.7", "@types/js-yaml": "^4.0.6", - "@types/node": "20.x", + "@types/node": "22.x", "@types/pem": "^1.14.1", "@types/proxy-from-env": "^1.0.1", "@types/safe-compare": "^1.1.0", @@ -60,7 +60,7 @@ "eslint-import-resolver-typescript": "^3.6.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-prettier": "^5.0.0", - "globals": "^15.10.0", + "globals": "^16.1.0", "prettier": "3.4.2", "prettier-plugin-sh": "^0.14.0", "ts-node": "^10.9.1", @@ -81,7 +81,7 @@ "limiter": "^2.1.0", "pem": "^1.14.8", "proxy-agent": "^6.3.1", - "qs": "6.13.0", + "qs": "6.14.0", "rotating-file-stream": "^3.1.1", "safe-buffer": "^5.2.1", "safe-compare": "^1.1.4", @@ -90,7 +90,7 @@ "xdg-basedir": "^4.0.0" }, "resolutions": { - "@types/node": "20.x" + "@types/node": "22.x" }, "bin": { "code-server": "out/node/entry.js" @@ -105,7 +105,7 @@ "remote-development" ], "engines": { - "node": "20" + "node": "22" }, "jest": { "transform": { diff --git a/patches/base-path.diff b/patches/base-path.diff index 842a27ef2293..ed5d69e7f553 100644 --- a/patches/base-path.diff +++ b/patches/base-path.diff @@ -111,7 +111,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -246,7 +246,9 @@ export class WebClientServer { +@@ -245,7 +245,9 @@ export class WebClientServer { }; // Prefix routes with basePath for clients @@ -122,7 +122,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts const queryConnectionToken = parsedUrl.query[connectionTokenQueryName]; if (typeof queryConnectionToken === 'string') { -@@ -285,10 +287,14 @@ export class WebClientServer { +@@ -284,10 +286,14 @@ export class WebClientServer { }; const useTestResolver = (!this._environmentService.isBuilt && this._environmentService.args['use-test-resolver']); @@ -138,7 +138,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts ); if (!remoteAuthority) { return serveError(req, res, 400, `Bad request.`); -@@ -335,6 +341,7 @@ export class WebClientServer { +@@ -334,6 +340,7 @@ export class WebClientServer { const productConfiguration: Partial> = { codeServerVersion: this._productService.codeServerVersion, @@ -146,7 +146,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts embedderIdentifier: 'server-distro', extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? { ...this._productService.extensionsGallery, -@@ -388,7 +395,9 @@ export class WebClientServer { +@@ -387,7 +394,9 @@ export class WebClientServer { WORKBENCH_AUTH_SESSION: authSessionInfo ? asJSON(authSessionInfo) : '', WORKBENCH_WEB_BASE_URL: staticRoute, WORKBENCH_NLS_URL, @@ -157,7 +157,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts }; // DEV --------------------------------------------------------------------------------------- -@@ -425,7 +434,7 @@ export class WebClientServer { +@@ -424,7 +433,7 @@ export class WebClientServer { 'default-src \'self\';', 'img-src \'self\' https: data: blob:;', 'media-src \'self\';', @@ -166,7 +166,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts 'child-src \'self\';', `frame-src 'self' https://*.vscode-cdn.net data:;`, 'worker-src \'self\' data: blob:;', -@@ -498,3 +507,70 @@ export class WebClientServer { +@@ -497,3 +506,70 @@ export class WebClientServer { return void res.end(data); } } diff --git a/patches/clipboard.diff b/patches/clipboard.diff index ffcafe5dddb0..7a38442c001d 100644 --- a/patches/clipboard.diff +++ b/patches/clipboard.diff @@ -85,7 +85,7 @@ Index: code-server/lib/vscode/src/vs/platform/environment/common/argv.ts + 'stdin-to-clipboard'?: boolean; 'unresponsive-sample-interval'?: string; 'unresponsive-sample-period'?: string; - + 'enable-rdp-display-tracking'?: boolean; Index: code-server/lib/vscode/src/vs/platform/environment/node/argv.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/platform/environment/node/argv.ts diff --git a/patches/disable-builtin-ext-update.diff b/patches/disable-builtin-ext-update.diff index f1262e5b47ee..a293cca5d71a 100644 --- a/patches/disable-builtin-ext-update.diff +++ b/patches/disable-builtin-ext-update.diff @@ -7,7 +7,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts -@@ -332,6 +332,10 @@ export class Extension implements IExten +@@ -340,6 +340,10 @@ export class Extension implements IExten if (this.type === ExtensionType.System && this.productService.quality === 'stable') { return false; } diff --git a/patches/display-language.diff b/patches/display-language.diff index 3114704fa891..3e9a7652814e 100644 --- a/patches/display-language.diff +++ b/patches/display-language.diff @@ -153,7 +153,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -26,6 +26,7 @@ import { URI } from '../../base/common/u +@@ -25,6 +25,7 @@ import { URI } from '../../base/common/u import { streamToBuffer } from '../../base/common/buffer.js'; import { IProductConfiguration } from '../../base/common/product.js'; import { isString, Mutable } from '../../base/common/types.js'; @@ -161,7 +161,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts import { CharCode } from '../../base/common/charCode.js'; import { IExtensionManifest } from '../../platform/extensions/common/extensions.js'; import { ICSSDevelopmentService } from '../../platform/cssDev/node/cssDevService.js'; -@@ -386,14 +387,22 @@ export class WebClientServer { +@@ -385,14 +386,22 @@ export class WebClientServer { }; const cookies = cookie.parse(req.headers.cookie || ''); @@ -272,7 +272,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts -@@ -474,9 +474,6 @@ export class InstallAction extends Exten +@@ -475,9 +475,6 @@ export class InstallAction extends Exten if (this.extension.isBuiltin) { return; } @@ -282,7 +282,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens if (this.extension.state !== ExtensionState.Uninstalled) { return; } -@@ -781,7 +778,7 @@ export abstract class InstallInOtherServ +@@ -782,7 +779,7 @@ export abstract class InstallInOtherServ } if (isLanguagePackExtension(this.extension.local.manifest)) { @@ -291,7 +291,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens } // Prefers to run on UI -@@ -2071,17 +2068,6 @@ export class SetLanguageAction extends E +@@ -2073,17 +2070,6 @@ export class SetLanguageAction extends E update(): void { this.enabled = false; this.class = SetLanguageAction.DisabledClass; @@ -309,7 +309,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens } override async run(): Promise { -@@ -2098,7 +2084,6 @@ export class ClearLanguageAction extends +@@ -2100,7 +2086,6 @@ export class ClearLanguageAction extends private static readonly DisabledClass = `${this.EnabledClass} disabled`; constructor( @@ -317,7 +317,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens @ILocaleService private readonly localeService: ILocaleService, ) { super(ClearLanguageAction.ID, ClearLanguageAction.TITLE.value, ClearLanguageAction.DisabledClass, false); -@@ -2108,17 +2093,6 @@ export class ClearLanguageAction extends +@@ -2110,17 +2095,6 @@ export class ClearLanguageAction extends update(): void { this.enabled = false; this.class = ClearLanguageAction.DisabledClass; diff --git a/patches/external-file-actions.diff b/patches/external-file-actions.diff index b64f89992c05..86547532f6c2 100644 --- a/patches/external-file-actions.diff +++ b/patches/external-file-actions.diff @@ -112,7 +112,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -370,6 +370,8 @@ export class WebClientServer { +@@ -369,6 +369,8 @@ export class WebClientServer { serverBasePath: basePath, webviewEndpoint: staticRoute + '/out/vs/workbench/contrib/webview/browser/pre', userDataPath: this._environmentService.userDataPath, @@ -208,7 +208,7 @@ Index: code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/common/contextkeys.ts +++ code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts -@@ -40,6 +40,9 @@ export const HasWebFileSystemAccess = ne +@@ -36,6 +36,9 @@ export const HasWebFileSystemAccess = ne export const EmbedderIdentifierContext = new RawContextKey('embedderIdentifier', undefined, localize('embedderIdentifier', 'The identifier of the embedder according to the product service, if one is defined')); @@ -217,7 +217,7 @@ Index: code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts + //#endregion - + //#region < --- Window --- > Index: code-server/lib/vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts diff --git a/patches/getting-started.diff b/patches/getting-started.diff index 98f8a82c60ab..4fd9efcc9225 100644 --- a/patches/getting-started.diff +++ b/patches/getting-started.diff @@ -28,7 +28,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro import { IEditorOpenContext, IEditorSerializer } from '../../../common/editor.js'; import { IWebviewElement, IWebviewService } from '../../webview/browser/webview.js'; import './gettingStartedColors.js'; -@@ -874,6 +874,72 @@ export class GettingStartedPage extends +@@ -876,6 +876,72 @@ export class GettingStartedPage extends $('p.subtitle.description', {}, localize({ key: 'gettingStarted.editingEvolved', comment: ['Shown as subtitle on the Welcome page.'] }, "Editing evolved")) ); @@ -101,7 +101,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro const leftColumn = $('.categories-column.categories-column-left', {},); const rightColumn = $('.categories-column.categories-column-right', {},); -@@ -909,6 +975,9 @@ export class GettingStartedPage extends +@@ -911,6 +977,9 @@ export class GettingStartedPage extends recentList.setLimit(5); reset(leftColumn, startList.getDomElement(), recentList.getDomElement()); } @@ -201,7 +201,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -374,6 +374,7 @@ export class WebClientServer { +@@ -373,6 +373,7 @@ export class WebClientServer { userDataPath: this._environmentService.userDataPath, isEnabledFileDownloads: !this._environmentService.args['disable-file-downloads'], isEnabledFileUploads: !this._environmentService.args['disable-file-uploads'], @@ -234,7 +234,7 @@ Index: code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/common/contextkeys.ts +++ code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts -@@ -42,6 +42,7 @@ export const EmbedderIdentifierContext = +@@ -38,6 +38,7 @@ export const EmbedderIdentifierContext = export const IsEnabledFileDownloads = new RawContextKey('isEnabledFileDownloads', true, true); export const IsEnabledFileUploads = new RawContextKey('isEnabledFileUploads', true, true); diff --git a/patches/integration.diff b/patches/integration.diff index 4c43b1b2a149..70de17b788fd 100644 --- a/patches/integration.diff +++ b/patches/integration.diff @@ -269,7 +269,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -334,6 +334,7 @@ export class WebClientServer { +@@ -333,6 +333,7 @@ export class WebClientServer { } : undefined; const productConfiguration: Partial> = { diff --git a/patches/local-storage.diff b/patches/local-storage.diff index de77fc36c67e..081c9c503020 100644 --- a/patches/local-storage.diff +++ b/patches/local-storage.diff @@ -18,7 +18,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -365,6 +365,7 @@ export class WebClientServer { +@@ -364,6 +364,7 @@ export class WebClientServer { remoteAuthority, serverBasePath: basePath, webviewEndpoint: staticRoute + '/out/vs/workbench/contrib/webview/browser/pre', diff --git a/patches/logout.diff b/patches/logout.diff index b54e8d9c62e8..04a14be6203a 100644 --- a/patches/logout.diff +++ b/patches/logout.diff @@ -40,7 +40,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -342,6 +342,7 @@ export class WebClientServer { +@@ -341,6 +341,7 @@ export class WebClientServer { codeServerVersion: this._productService.codeServerVersion, rootEndpoint: rootBase, updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined, diff --git a/patches/marketplace.diff b/patches/marketplace.diff index dc6bdd5740d5..25a22b093b1d 100644 --- a/patches/marketplace.diff +++ b/patches/marketplace.diff @@ -40,15 +40,15 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -327,7 +327,6 @@ export class WebClientServer { +@@ -326,7 +326,6 @@ export class WebClientServer { const staticRoute = posix.join(basePath, this._productPath, STATIC_PATH); const callbackRoute = posix.join(basePath, this._productPath, CALLBACK_PATH); - const webExtensionRoute = posix.join(basePath, this._productPath, WEB_EXTENSION_PATH); - const resolveWorkspaceURI = (defaultLocation?: string) => defaultLocation && URI.file(path.resolve(defaultLocation)).with({ scheme: Schemas.vscodeRemote, authority: remoteAuthority }); + const resolveWorkspaceURI = (defaultLocation?: string) => defaultLocation && URI.file(resolve(defaultLocation)).with({ scheme: Schemas.vscodeRemote, authority: remoteAuthority }); -@@ -343,14 +342,7 @@ export class WebClientServer { +@@ -342,14 +341,7 @@ export class WebClientServer { codeServerVersion: this._productService.codeServerVersion, rootEndpoint: rootBase, embedderIdentifier: 'server-distro', diff --git a/patches/proxy-uri.diff b/patches/proxy-uri.diff index 12c13d65205c..872733f8bdfb 100644 --- a/patches/proxy-uri.diff +++ b/patches/proxy-uri.diff @@ -71,7 +71,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -343,6 +343,7 @@ export class WebClientServer { +@@ -342,6 +342,7 @@ export class WebClientServer { rootEndpoint: rootBase, updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined, logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? rootBase + '/logout' : undefined, diff --git a/patches/service-worker.diff b/patches/service-worker.diff index 20091175b3e8..f2e1058fb4f7 100644 --- a/patches/service-worker.diff +++ b/patches/service-worker.diff @@ -54,7 +54,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -344,6 +344,10 @@ export class WebClientServer { +@@ -343,6 +343,10 @@ export class WebClientServer { updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined, logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? rootBase + '/logout' : undefined, proxyEndpointTemplate: process.env.VSCODE_PROXY_URI ?? rootBase + '/proxy/{{port}}/', diff --git a/patches/signature-verification.diff b/patches/signature-verification.diff index 6abd6629fe5b..8c05f4a3f760 100644 --- a/patches/signature-verification.diff +++ b/patches/signature-verification.diff @@ -22,7 +22,7 @@ Index: code-server/lib/vscode/src/vs/platform/extensionManagement/node/extension @IConfigurationService private readonly configurationService: IConfigurationService, @IExtensionGalleryManifestService protected readonly extensionGalleryManifestService: IExtensionGalleryManifestService, @IProductService productService: IProductService, -@@ -331,8 +333,7 @@ export class ExtensionManagementService +@@ -339,8 +341,7 @@ export class ExtensionManagementService private async downloadExtension(extension: IGalleryExtension, operation: InstallOperation, verifySignature: boolean, clientTargetPlatform?: TargetPlatform): Promise<{ readonly location: URI; readonly verificationStatus: ExtensionSignatureVerificationCode | undefined }> { if (verifySignature) { diff --git a/patches/store-socket.diff b/patches/store-socket.diff index 909937e30eca..60c65802c32e 100644 --- a/patches/store-socket.diff +++ b/patches/store-socket.diff @@ -96,7 +96,7 @@ Index: code-server/lib/vscode/src/vs/workbench/api/node/extensionHostProcess.ts import minimist from 'minimist'; import * as nativeWatchdog from 'native-watchdog'; import * as net from 'net'; -@@ -423,7 +424,28 @@ async function startExtensionHostProcess +@@ -437,7 +438,28 @@ async function startExtensionHostProcess ); // rewrite onTerminate-function to be a proper shutdown diff --git a/patches/telemetry.diff b/patches/telemetry.diff index b4465f99db68..ce5ae188c9f2 100644 --- a/patches/telemetry.diff +++ b/patches/telemetry.diff @@ -134,7 +134,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -348,6 +348,8 @@ export class WebClientServer { +@@ -347,6 +347,8 @@ export class WebClientServer { scope: vscodeBase + '/', path: rootBase + '/_static/out/browser/serviceWorker.js', }, diff --git a/patches/trusted-domains.diff b/patches/trusted-domains.diff index a32360faf39f..d26343e9e4d4 100644 --- a/patches/trusted-domains.diff +++ b/patches/trusted-domains.diff @@ -24,7 +24,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -339,6 +339,14 @@ export class WebClientServer { +@@ -338,6 +338,14 @@ export class WebClientServer { scopes: [['user:email'], ['repo']] } : undefined; @@ -39,7 +39,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts const productConfiguration: Partial> = { codeServerVersion: this._productService.codeServerVersion, rootEndpoint: rootBase, -@@ -353,6 +361,7 @@ export class WebClientServer { +@@ -352,6 +360,7 @@ export class WebClientServer { telemetryEndpoint: this._productService.telemetryEndpoint, embedderIdentifier: 'server-distro', extensionsGallery: this._productService.extensionsGallery, diff --git a/patches/update-check.diff b/patches/update-check.diff index 908c69e17820..faa6b07b20ba 100644 --- a/patches/update-check.diff +++ b/patches/update-check.diff @@ -105,7 +105,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -341,6 +341,7 @@ export class WebClientServer { +@@ -340,6 +340,7 @@ export class WebClientServer { const productConfiguration: Partial> = { codeServerVersion: this._productService.codeServerVersion, rootEndpoint: rootBase, diff --git a/patches/webview.diff b/patches/webview.diff index fb35c4a32229..d6002fa017ab 100644 --- a/patches/webview.diff +++ b/patches/webview.diff @@ -54,7 +54,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -361,6 +361,7 @@ export class WebClientServer { +@@ -360,6 +360,7 @@ export class WebClientServer { const workbenchWebConfiguration = { remoteAuthority, serverBasePath: basePath, @@ -70,29 +70,21 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index -+ content="default-src 'none'; script-src 'sha256-ap/AtocvSWp0rrxaO19DJy/nOpazT6M5Cv9utUWe7MA=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> - +- content="default-src 'none'; script-src 'sha256-gEAyFzmkyqMoTTnN+3KReFUYoHsK4RAJEb+6eiul+UY=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> ++ content="default-src 'none'; script-src 'sha256-Oi71Tq4Buohx0KDH3yEbVJUzABnqYv9iVLo420HZXqI=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> -@@ -349,6 +349,12 @@ - - const hostname = location.hostname; + { + /** + * @param {MessageEvent} event +@@ -351,6 +351,12 @@ const hostname = location.hostname; diff --git a/src/browser/media/favicon-dark-support.svg b/src/browser/media/favicon-dark-support.svg index 06f1fa00d62c..d64bf32ed96e 100644 --- a/src/browser/media/favicon-dark-support.svg +++ b/src/browser/media/favicon-dark-support.svg @@ -1,7 +1,4 @@ - \ No newline at end of file + + + + diff --git a/src/browser/media/favicon.ico b/src/browser/media/favicon.ico index e721447bd9d1..56078ead6697 100644 Binary files a/src/browser/media/favicon.ico and b/src/browser/media/favicon.ico differ diff --git a/src/browser/media/favicon.svg b/src/browser/media/favicon.svg index 45388729b6b4..01a01541ec75 100644 --- a/src/browser/media/favicon.svg +++ b/src/browser/media/favicon.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/browser/media/pwa-icon-192.png b/src/browser/media/pwa-icon-192.png index a6ee503115d8..3f28593b3aee 100644 Binary files a/src/browser/media/pwa-icon-192.png and b/src/browser/media/pwa-icon-192.png differ diff --git a/src/browser/media/pwa-icon-512.png b/src/browser/media/pwa-icon-512.png index ff42978ce9a5..7df85f7665ac 100644 Binary files a/src/browser/media/pwa-icon-512.png and b/src/browser/media/pwa-icon-512.png differ diff --git a/src/browser/media/pwa-icon.png b/src/browser/media/pwa-icon.png deleted file mode 100644 index d4f5188ffc0c..000000000000 Binary files a/src/browser/media/pwa-icon.png and /dev/null differ diff --git a/src/node/main.ts b/src/node/main.ts index 04e4470b9088..0d5c40928dfd 100644 --- a/src/node/main.ts +++ b/src/node/main.ts @@ -1,5 +1,6 @@ import { field, logger } from "@coder/logger" import http from "http" +import * as os from "os" import * as path from "path" import { Disposable } from "../common/emitter" import { plural } from "../common/util" @@ -9,7 +10,6 @@ import { commit, version, vsRootPath } from "./constants" import { register } from "./routes" import { VSCodeModule } from "./routes/vscode" import { isDirectory, open } from "./util" -import * as os from "os" /** * Return true if the user passed an extension-related VS Code flag. @@ -144,6 +144,8 @@ export const runCodeServer = async ( logger.info(" - Using password from $PASSWORD") } else if (args.usingEnvHashedPassword) { logger.info(" - Using password from $HASHED_PASSWORD") + } else if (args["hashed-password"]) { + logger.info(` - Using hashed-password from ${args.config}`) } else { logger.info(` - Using password from ${args.config}`) } diff --git a/src/node/routes/errors.ts b/src/node/routes/errors.ts index 1f1475e9beee..da0ee8d7c07f 100644 --- a/src/node/routes/errors.ts +++ b/src/node/routes/errors.ts @@ -3,10 +3,10 @@ import express from "express" import { promises as fs } from "fs" import path from "path" import { HttpCode } from "../../common/http" -import type { WebsocketRequest } from "../wsRouter" import { rootPath } from "../constants" import { replaceTemplates } from "../http" import { escapeHtml, getMediaMime } from "../util" +import type { WebsocketRequest } from "../wsRouter" interface ErrorWithStatusCode { statusCode: number diff --git a/src/node/routes/index.ts b/src/node/routes/index.ts index 36cf76b4a7ca..2841b5a01113 100644 --- a/src/node/routes/index.ts +++ b/src/node/routes/index.ts @@ -14,8 +14,8 @@ import { Heart } from "../heart" import { redirect } from "../http" import { CoderSettings, SettingsProvider } from "../settings" import { UpdateProvider } from "../update" -import type { WebsocketRequest } from "../wsRouter" import { getMediaMime, paths } from "../util" +import type { WebsocketRequest } from "../wsRouter" import * as domainProxy from "./domainProxy" import { errorHandler, wsErrorHandler } from "./errors" import * as health from "./health" diff --git a/src/node/routes/vscode.ts b/src/node/routes/vscode.ts index 4efb32993115..62d7c80c4ba0 100644 --- a/src/node/routes/vscode.ts +++ b/src/node/routes/vscode.ts @@ -4,8 +4,8 @@ import * as express from "express" import { promises as fs } from "fs" import * as http from "http" import * as net from "net" -import * as path from "path" import * as os from "os" +import * as path from "path" import { logError } from "../../common/util" import { CodeArgs, toCodeArgs } from "../cli" import { isDevMode, vsRootPath } from "../constants" @@ -190,6 +190,7 @@ router.get("/manifest.json", async (req, res) => { src: `{{BASE}}/_static/src/browser/media/pwa-icon-${size}.png`, type: "image/png", sizes: `${size}x${size}`, + purpose: "maskable", })), }, null, diff --git a/src/node/settings.ts b/src/node/settings.ts index 709ce950cb89..29716af036f9 100644 --- a/src/node/settings.ts +++ b/src/node/settings.ts @@ -17,7 +17,7 @@ export class SettingsProvider { public async read(): Promise { try { const raw = (await fs.readFile(this.settingsPath, "utf8")).trim() - return raw ? JSON.parse(raw) : {} + return raw ? JSON.parse(raw) : ({} as T) } catch (error: any) { if (error.code !== "ENOENT") { logger.warn(error.message) diff --git a/test/unit/node/settings.test.ts b/test/unit/node/settings.test.ts index 59c6f46a50bc..ad04b15ff81b 100644 --- a/test/unit/node/settings.test.ts +++ b/test/unit/node/settings.test.ts @@ -29,7 +29,7 @@ describe("settings", () => { const settings = new SettingsProvider(pathToMockSettingsFile) await settings.read() // This happens when we can't parse a JSON (usually error in file) - expect(logger.warn).toHaveBeenCalledWith(expect.stringMatching(/Unexpected token/)) + expect(logger.warn).toHaveBeenCalledWith(expect.stringMatching(/Expected ':'/)) }) }) describe("with invalid settings file path", () => {