mirror of
https://github.com/coder/code-server.git
synced 2026-05-05 03:55:18 +02:00
Compare commits
26 Commits
fbe40fdc18
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02f4d6ea0b | ||
|
|
80a642f511 | ||
|
|
ddeb0a3de0 | ||
|
|
22ec1ea65b | ||
|
|
e0b100ee31 | ||
|
|
5f7c23bd8e | ||
|
|
367dcda592 | ||
|
|
6ecac88f4d | ||
|
|
cc8ac4f40f | ||
|
|
a12c89658c | ||
|
|
4b4903e809 | ||
|
|
be537ce77a | ||
|
|
cc8f0b7348 | ||
|
|
7cc2270228 | ||
|
|
34ac5f47de | ||
|
|
523c0cbaa7 | ||
|
|
05f481d2f0 | ||
|
|
c66372452f | ||
|
|
aee8825558 | ||
|
|
f612511974 | ||
|
|
287f8ecd56 | ||
|
|
1c6fb2dc20 | ||
|
|
f04dc2cabd | ||
|
|
4af6408e39 | ||
|
|
1fa5d5084b | ||
|
|
d74b002969 |
7
.github/workflows/build.yaml
vendored
7
.github/workflows/build.yaml
vendored
@@ -90,9 +90,10 @@ jobs:
|
||||
if: needs.changes.outputs.helm == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
|
||||
- uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: "v3.19.2"
|
||||
- run: helm plugin install https://github.com/instrumenta/helm-kubeval
|
||||
- run: helm kubeval ci/helm-chart
|
||||
|
||||
@@ -143,7 +144,7 @@ jobs:
|
||||
test/package-lock.json
|
||||
- run: SKIP_SUBMODULE_DEPS=1 npm ci
|
||||
- run: npm run test:unit
|
||||
- uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5
|
||||
- uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v5
|
||||
if: success()
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
@@ -162,7 +163,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
|
||||
|
||||
4
.github/workflows/publish.yaml
vendored
4
.github/workflows/publish.yaml
vendored
@@ -108,8 +108,8 @@ jobs:
|
||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/checkout@v6
|
||||
- uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
|
||||
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
|
||||
- uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
||||
- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||
|
||||
- uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
|
||||
with:
|
||||
|
||||
8
.github/workflows/release.yaml
vendored
8
.github/workflows/release.yaml
vendored
@@ -45,12 +45,16 @@ jobs:
|
||||
# Cross-compile target.
|
||||
VSCODE_ARCH: ${{ matrix.vscode_arch }}
|
||||
npm_config_arch: ${{ matrix.npm_arch }}
|
||||
# Ensure native modules are built from source to avoid prebuilds and use
|
||||
# the correct version of glibc.
|
||||
npm_config_build_from_source: true
|
||||
# Gulp target name.
|
||||
# TODO: Pull from VSCODE_ARCH instead.
|
||||
VSCODE_TARGET: ${{ format('linux-{0}', matrix.vscode_arch) }}
|
||||
|
||||
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
|
||||
@@ -125,6 +129,8 @@ jobs:
|
||||
VSCODE_TARGET: ${{ matrix.vscode_target }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAG: ${{ inputs.version || github.ref_name }}
|
||||
# Ensure native modules are built from source to avoid prebuilds.
|
||||
npm_config_build_from_source: true
|
||||
|
||||
steps:
|
||||
# The version of node-gyp we use depends on distutils but it was removed
|
||||
|
||||
49
CHANGELOG.md
49
CHANGELOG.md
@@ -22,6 +22,55 @@ Code v99.99.999
|
||||
|
||||
## Unreleased
|
||||
|
||||
## [4.116.0](https://github.com/coder/code-server/releases/tag/v4.116.0) - 2026-04-16
|
||||
|
||||
Code v1.116.0
|
||||
|
||||
### Changed
|
||||
|
||||
- Update to Code 1.116.0
|
||||
|
||||
## [4.115.0](https://github.com/coder/code-server/releases/tag/v4.115.0) - 2026-04-08
|
||||
|
||||
Code v1.115.0
|
||||
|
||||
### Changed
|
||||
|
||||
- Update to Code 1.115.0
|
||||
|
||||
## [4.114.1](https://github.com/coder/code-server/releases/tag/v4.114.1) - 2026-04-06
|
||||
|
||||
Code v1.114.0
|
||||
|
||||
### Changed
|
||||
|
||||
- Ensure native modules are built from source so they use the correct version of
|
||||
glibc. This should bring down the requirement from 2.34 back down to 2.28.
|
||||
|
||||
## [4.114.0](https://github.com/coder/code-server/releases/tag/v4.114.0) - 2026-04-04
|
||||
|
||||
Code v1.114.0
|
||||
|
||||
### Changed
|
||||
|
||||
- Update to Code 1.114.0.
|
||||
|
||||
## [4.113.1](https://github.com/coder/code-server/releases/tag/v4.113.1) - 2026-04-03
|
||||
|
||||
Code v1.113.0
|
||||
|
||||
This is a re-release of v4.113.0 but with the correct Node binaries for arm64
|
||||
and armv7l. Previously they were packaging the amd64 Node binary due to a
|
||||
mistake while refactoring CI to use more of the upstream build scripts.
|
||||
|
||||
## [4.113.0](https://github.com/coder/code-server/releases/tag/v4.113.0) - 2026-04-02
|
||||
|
||||
Code v1.113.0
|
||||
|
||||
### Changed
|
||||
|
||||
- Update to Code 1.113.0
|
||||
|
||||
## [4.112.0](https://github.com/coder/code-server/releases/tag/v4.112.0) - 2026-03-19
|
||||
|
||||
Code v1.112.0
|
||||
|
||||
@@ -79,7 +79,15 @@ EOF
|
||||
mv npm-shrinkwrap.json "$RELEASE_PATH"
|
||||
|
||||
if [ "$KEEP_MODULES" = 1 ]; then
|
||||
rsync node_modules/ "$RELEASE_PATH/node_modules"
|
||||
local rsync_opts=(-a)
|
||||
if [[ ${DEBUG-} = 1 ]]; then
|
||||
rsync_opts+=(-vh)
|
||||
fi
|
||||
# If we build from source, exclude the prebuilds.
|
||||
if [[ ${npm_config_build_from_source-} = true ]]; then
|
||||
rsync_opts+=(--exclude /argon2/prebuilds)
|
||||
fi
|
||||
rsync "${rsync_opts[@]}" node_modules/ "$RELEASE_PATH/node_modules"
|
||||
# Remove dev dependencies.
|
||||
pushd "$RELEASE_PATH"
|
||||
npm prune --production
|
||||
@@ -92,7 +100,7 @@ EOF
|
||||
bundle_vscode() {
|
||||
mkdir -p "$VSCODE_OUT_PATH"
|
||||
|
||||
local rsync_opts=()
|
||||
local rsync_opts=(-a)
|
||||
if [[ ${DEBUG-} = 1 ]]; then
|
||||
rsync_opts+=(-vh)
|
||||
fi
|
||||
|
||||
@@ -107,6 +107,9 @@ main() {
|
||||
EOF
|
||||
) > product.json
|
||||
|
||||
|
||||
VSCODE_QUALITY=stable npm run gulp compile-copilot-extension-full-build
|
||||
|
||||
npm run gulp core-ci
|
||||
npm run gulp "vscode-reh-web-$VSCODE_TARGET${MINIFY:+-min}-ci"
|
||||
|
||||
|
||||
@@ -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.33.0
|
||||
version: 3.35.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.109.5
|
||||
appVersion: 4.116.0
|
||||
|
||||
@@ -8,7 +8,9 @@ metadata:
|
||||
annotations: {{- toYaml .Values.annotations | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount | default 1 }}
|
||||
{{- if ne .Values.replicaCount nil }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
|
||||
@@ -6,7 +6,7 @@ replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: codercom/code-server
|
||||
tag: '4.109.5'
|
||||
tag: '4.116.0'
|
||||
pullPolicy: Always
|
||||
|
||||
# Specifies one or more secrets to be used when pulling images from a
|
||||
|
||||
@@ -20,6 +20,7 @@ group "default" {
|
||||
"code-server-debian-12",
|
||||
"code-server-ubuntu-focal",
|
||||
"code-server-ubuntu-noble",
|
||||
"code-server-ubuntu-resolute",
|
||||
"code-server-fedora-39",
|
||||
"code-server-opensuse-tumbleweed",
|
||||
]
|
||||
@@ -73,7 +74,6 @@ target "code-server-debian-12" {
|
||||
target "code-server-ubuntu-focal" {
|
||||
dockerfile = "ci/release-image/Dockerfile"
|
||||
tags = concat(
|
||||
gen_tags_for_docker_and_ghcr("ubuntu"),
|
||||
gen_tags_for_docker_and_ghcr("focal"),
|
||||
)
|
||||
args = {
|
||||
@@ -86,6 +86,7 @@ target "code-server-ubuntu-noble" {
|
||||
dockerfile = "ci/release-image/Dockerfile"
|
||||
tags = concat(
|
||||
gen_tags_for_docker_and_ghcr("noble"),
|
||||
gen_tags_for_docker_and_ghcr("ubuntu"),
|
||||
)
|
||||
args = {
|
||||
BASE = "ubuntu:noble"
|
||||
@@ -93,6 +94,17 @@ target "code-server-ubuntu-noble" {
|
||||
platforms = ["linux/amd64", "linux/arm64"]
|
||||
}
|
||||
|
||||
target "code-server-ubuntu-resolute" {
|
||||
dockerfile = "ci/release-image/Dockerfile"
|
||||
tags = concat(
|
||||
gen_tags_for_docker_and_ghcr("resolute"),
|
||||
)
|
||||
args = {
|
||||
BASE = "ubuntu:resolute"
|
||||
}
|
||||
platforms = ["linux/amd64", "linux/arm64"]
|
||||
}
|
||||
|
||||
target "code-server-fedora-39" {
|
||||
dockerfile = "ci/release-image/Dockerfile.fedora"
|
||||
tags = concat(
|
||||
|
||||
Submodule lib/vscode updated: e7fb5e96c0...10c8e557c8
30
package-lock.json
generated
30
package-lock.json
generated
@@ -968,9 +968,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz",
|
||||
"integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==",
|
||||
"version": "5.0.5",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz",
|
||||
"integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1639,9 +1639,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/basic-ftp": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.2.0.tgz",
|
||||
"integrity": "sha512-VoMINM2rqJwJgfdHq6RiUudKt2BV+FY5ZFezP/ypmwayk68+NzzAQy4XXLlqsGD4MCzq3DrmNFD/uUmBJuGoXw==",
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.3.0.tgz",
|
||||
"integrity": "sha512-5K9eNNn7ywHPsYnFwjKgYH8Hf8B5emh7JKcPaVjjrMJFQQwGpwowEnZNEtHs7DfR7hCZsmaK3VA4HUK0YarT+w==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
@@ -1672,9 +1672,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.12",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
|
||||
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
|
||||
"version": "1.1.14",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
|
||||
"integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -3102,9 +3102,9 @@
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.11",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz",
|
||||
"integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==",
|
||||
"version": "1.16.0",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz",
|
||||
"integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
@@ -5042,9 +5042,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/path-to-regexp": {
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",
|
||||
"integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",
|
||||
"version": "8.4.2",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz",
|
||||
"integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
||||
@@ -78,7 +78,7 @@ Index: code-server/lib/vscode/src/vs/platform/environment/common/argv.ts
|
||||
===================================================================
|
||||
--- code-server.orig/lib/vscode/src/vs/platform/environment/common/argv.ts
|
||||
+++ code-server/lib/vscode/src/vs/platform/environment/common/argv.ts
|
||||
@@ -144,6 +144,7 @@ export interface NativeParsedArgs {
|
||||
@@ -145,6 +145,7 @@ export interface NativeParsedArgs {
|
||||
'disable-chromium-sandbox'?: boolean;
|
||||
sandbox?: boolean;
|
||||
'enable-coi'?: boolean;
|
||||
|
||||
163
patches/copilot.diff
Normal file
163
patches/copilot.diff
Normal file
@@ -0,0 +1,163 @@
|
||||
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
|
||||
@@ -287,6 +287,29 @@ export const compileCopilotExtensionBuil
|
||||
gulp.task(compileCopilotExtensionBuildTask);
|
||||
|
||||
/**
|
||||
+ * Compiles the built-in copilot extension with proper `.vscodeignore` filtering
|
||||
+ * and materializes native dependency shims (`node-pty`, `ripgrep`).
|
||||
+ * Produces output equivalent to what CI ships from the pre-built VSIX.
|
||||
+ *
|
||||
+ * The result is placed in `.build/extensions/copilot/` and can be copied
|
||||
+ * directly into a VS Code Insiders installation at:
|
||||
+ * `<insiders>/resources/app/extensions/copilot/`
|
||||
+ */
|
||||
+export const compileCopilotExtensionFullBuildTask = task.define('compile-copilot-extension-full-build', task.series(
|
||||
+ // Step 1: Clean previous copilot build output
|
||||
+ task.define('clean-copilot-build', util.rimraf('.build/extensions/copilot')),
|
||||
+ // Step 2: Build and package with proper `.vscodeignore` filtering
|
||||
+ task.define('package-copilot-extension-full', () => ext.packageCopilotExtensionFullStream().pipe(gulp.dest('.build'))),
|
||||
+ // Step 3: Materialize native dependency shims (`node-pty`, `ripgrep`)
|
||||
+ task.define('copilot-extension-native-shims', () => {
|
||||
+ const copilotExtDir = path.join(root, '.build', 'extensions', 'copilot');
|
||||
+ ext.prepareCopilotExtensionNativeShims(copilotExtDir);
|
||||
+ return Promise.resolve();
|
||||
+ })
|
||||
+));
|
||||
+gulp.task(compileCopilotExtensionFullBuildTask);
|
||||
+
|
||||
+/**
|
||||
* Compiles the extensions for the build.
|
||||
* This is essentially a helper task that combines {@link cleanExtensionsBuildTask}, {@link compileNonNativeExtensionsBuildTask} and {@link compileNativeExtensionsBuildTask}
|
||||
*/
|
||||
Index: code-server/lib/vscode/build/lib/extensions.ts
|
||||
===================================================================
|
||||
--- code-server.orig/lib/vscode/build/lib/extensions.ts
|
||||
+++ code-server/lib/vscode/build/lib/extensions.ts
|
||||
@@ -24,6 +24,7 @@ import { getProductionDependencies } fro
|
||||
import { type IExtensionDefinition, getExtensionStream } from './builtInExtensions.ts';
|
||||
import { fetchUrls, fetchGithub } from './fetch.ts';
|
||||
import { createTsgoStream, spawnTsgo } from './tsgo.ts';
|
||||
+import { prepareBuiltInCopilotExtensionShims } from './copilot.ts';
|
||||
import vzip from 'gulp-vinyl-zip';
|
||||
|
||||
import { createRequire } from 'module';
|
||||
@@ -482,6 +483,116 @@ export function packageCopilotExtensionS
|
||||
).pipe(util2.setExecutableBit(['**/*.sh']));
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * Package the built-in copilot extension as a properly filtered VSIX-equivalent.
|
||||
+ * Unlike {@link packageCopilotExtensionStream}, this uses vsce.listFiles with
|
||||
+ * PackageManager.Npm so that .vscodeignore is respected for dependency filtering,
|
||||
+ * producing output equivalent to what CI ships from the pre-built VSIX.
|
||||
+ */
|
||||
+export function packageCopilotExtensionFullStream(): Stream {
|
||||
+ const vsce = require('@vscode/vsce') as typeof import('@vscode/vsce');
|
||||
+ const extensionPath = path.join(root, 'extensions', 'copilot');
|
||||
+ if (!fs.existsSync(extensionPath)) {
|
||||
+ return es.readArray([]);
|
||||
+ }
|
||||
+
|
||||
+ const esbuildConfigFileName = '.esbuild.ts';
|
||||
+ const esbuildScript = path.join(extensionPath, esbuildConfigFileName);
|
||||
+ if (!fs.existsSync(esbuildScript)) {
|
||||
+ throw new Error(`Copilot esbuild script not found at ${esbuildScript}`);
|
||||
+ }
|
||||
+
|
||||
+ const result = es.through();
|
||||
+
|
||||
+ // Step 1: Run esbuild to compile the extension
|
||||
+ new Promise<void>((resolve, reject) => {
|
||||
+ const proc = cp.execFile(process.argv[0], [esbuildScript], { cwd: extensionPath }, (error, _stdout, stderr) => {
|
||||
+ if (error) {
|
||||
+ return reject(error);
|
||||
+ }
|
||||
+ const matches = (stderr || '').match(/\> (.+): error: (.+)?/g);
|
||||
+ fancyLog(`Bundled extension: ${ansiColors.yellow(path.join('copilot', esbuildConfigFileName))} with ${matches ? matches.length : 0} errors.`);
|
||||
+ for (const match of matches || []) {
|
||||
+ fancyLog.error(match);
|
||||
+ }
|
||||
+ return resolve();
|
||||
+ });
|
||||
+ proc.stdout!.on('data', (data) => {
|
||||
+ fancyLog(`${ansiColors.green('esbuilding copilot')}: ${data.toString('utf8')}`);
|
||||
+ });
|
||||
+ }).then(() => {
|
||||
+ // Step 2: Use `vsce.listFiles` with Npm package manager so `.vscodeignore`
|
||||
+ // is applied to both source files AND `node_modules` dependencies.
|
||||
+ // This is the key difference from `packageCopilotExtensionStream` which
|
||||
+ // uses `PackageManager.None` and then blindly merges all production deps.
|
||||
+ return vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Npm });
|
||||
+ }).then(fileNames => {
|
||||
+ const files = fileNames
|
||||
+ .map(fileName => path.join(extensionPath, fileName))
|
||||
+ .map(filePath => new File({
|
||||
+ path: filePath,
|
||||
+ stat: fs.statSync(filePath),
|
||||
+ base: extensionPath,
|
||||
+ contents: fs.createReadStream(filePath)
|
||||
+ }));
|
||||
+
|
||||
+ es.readArray(files).pipe(result);
|
||||
+ }).catch(err => {
|
||||
+ console.error('Failed to package copilot extension:', err);
|
||||
+ result.emit('error', err);
|
||||
+ });
|
||||
+
|
||||
+ // Apply the same package.json cleanup as bundled extensions get
|
||||
+ const cleaned = updateExtensionPackageJSON(
|
||||
+ result.pipe(rename(p => p.dirname = `extensions/copilot/${p.dirname}`)),
|
||||
+ (data: any) => {
|
||||
+ delete data.scripts;
|
||||
+ delete data.dependencies;
|
||||
+ delete data.devDependencies;
|
||||
+ if (data.main) {
|
||||
+ data.main = data.main.replace('/out/', '/dist/');
|
||||
+ }
|
||||
+ return data;
|
||||
+ }
|
||||
+ );
|
||||
+
|
||||
+ return minifyExtensionResources(cleaned)
|
||||
+ .pipe(util2.setExecutableBit(['**/*.sh']));
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * Materializes native dependency shims (`node-pty`, `ripgrep`) into the copilot
|
||||
+ * extension output at {@link outputDir}. Uses the root `node_modules` as the
|
||||
+ * source for native binaries, targeting the current platform/arch.
|
||||
+ *
|
||||
+ * This is the equivalent of what {@link copyCopilotNativeDepsTask} in
|
||||
+ * `gulpfile.vscode.ts` does during a full product build, but scoped to
|
||||
+ * just the standalone copilot extension output.
|
||||
+ *
|
||||
+ * Failures are logged as warnings rather than throwing, since the copilot
|
||||
+ * extension can still create shims at runtime if they are missing.
|
||||
+ */
|
||||
+export function prepareCopilotExtensionNativeShims(outputDir: string): void {
|
||||
+ const platform = process.platform;
|
||||
+ const arch = process.arch;
|
||||
+ const appNodeModulesDir = path.join(root, 'node_modules');
|
||||
+
|
||||
+ if (!fs.existsSync(outputDir)) {
|
||||
+ fancyLog.warn('[prepareCopilotExtensionNativeShims] Copilot extension not found at', outputDir, '- skipping shims');
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ try {
|
||||
+ prepareBuiltInCopilotExtensionShims(platform, arch, outputDir, appNodeModulesDir);
|
||||
+ fancyLog(`[prepareCopilotExtensionNativeShims] Materialized native shims for ${platform}-${arch}`);
|
||||
+ } catch (err) {
|
||||
+ // Downgrade to a warning for local builds since the extension
|
||||
+ // can still function without shims (it creates them at runtime).
|
||||
+ fancyLog.warn(`[prepareCopilotExtensionNativeShims] Failed to materialize shims: ${err}`);
|
||||
+ fancyLog.warn('[prepareCopilotExtensionNativeShims] The extension will still work but will create shims at runtime.');
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
export function packageMarketplaceExtensionsStream(forWeb: boolean): Stream {
|
||||
const marketplaceExtensionsDescriptions = [
|
||||
...builtInExtensions.filter(({ name }) => (forWeb ? !marketplaceWebExtensionsExclude.has(name) : true)),
|
||||
@@ -8,7 +8,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
|
||||
@@ -342,6 +342,10 @@ export class Extension implements IExten
|
||||
if (this.type === ExtensionType.System && this.productService.quality === 'stable') {
|
||||
if (this.type === ExtensionType.System && this.productService.quality === 'stable' && !this.productService.builtInExtensionsEnabledWithAutoUpdates?.some(id => id.toLowerCase() === this.identifier.id.toLowerCase())) {
|
||||
return false;
|
||||
}
|
||||
+ // Do not update builtin extensions.
|
||||
|
||||
@@ -291,7 +291,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
||||
}
|
||||
|
||||
// Prefers to run on UI
|
||||
@@ -2072,17 +2069,6 @@ export class SetLanguageAction extends E
|
||||
@@ -2284,17 +2281,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<any> {
|
||||
@@ -2099,7 +2085,6 @@ export class ClearLanguageAction extends
|
||||
@@ -2311,7 +2297,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);
|
||||
@@ -2109,17 +2094,6 @@ export class ClearLanguageAction extends
|
||||
@@ -2321,17 +2306,6 @@ export class ClearLanguageAction extends
|
||||
update(): void {
|
||||
this.enabled = false;
|
||||
this.class = ClearLanguageAction.DisabledClass;
|
||||
|
||||
@@ -27,7 +27,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||
===================================================================
|
||||
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||
@@ -303,6 +303,16 @@ export interface IWorkbenchConstructionO
|
||||
@@ -312,6 +312,16 @@ export interface IWorkbenchConstructionO
|
||||
*/
|
||||
readonly userDataPath?: string
|
||||
|
||||
|
||||
@@ -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';
|
||||
@@ -924,6 +924,72 @@ export class GettingStartedPage extends
|
||||
@@ -925,6 +925,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', {},);
|
||||
|
||||
@@ -959,6 +1025,9 @@ export class GettingStartedPage extends
|
||||
@@ -974,6 +1040,9 @@ export class GettingStartedPage extends
|
||||
recentList.setLimit(5);
|
||||
reset(leftColumn, startList.getDomElement(), recentList.getDomElement());
|
||||
}
|
||||
@@ -135,7 +135,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||
===================================================================
|
||||
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||
@@ -313,6 +313,11 @@ export interface IWorkbenchConstructionO
|
||||
@@ -322,6 +322,11 @@ export interface IWorkbenchConstructionO
|
||||
*/
|
||||
readonly isEnabledFileUploads?: boolean
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||
===================================================================
|
||||
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||
@@ -298,6 +298,11 @@ export interface IWorkbenchConstructionO
|
||||
@@ -307,6 +307,11 @@ export interface IWorkbenchConstructionO
|
||||
*/
|
||||
readonly configurationDefaults?: Record<string, unknown>;
|
||||
|
||||
|
||||
@@ -22,3 +22,4 @@ clipboard.diff
|
||||
display-language.diff
|
||||
trusted-domains.diff
|
||||
signature-verification.diff
|
||||
copilot.diff
|
||||
|
||||
@@ -1,43 +1,25 @@
|
||||
Make sourcemaps self-hosted
|
||||
Remove sourcemaps URL
|
||||
|
||||
Normally source maps get removed as part of the build process so prevent that
|
||||
from happening. Also avoid using the windows.net host since obviously we can
|
||||
not host our source maps there and want them to be self-hosted even if we could.
|
||||
|
||||
To test try debugging/browsing the source of a build in a browser.
|
||||
These will not work since we patch VS Code.
|
||||
|
||||
Index: code-server/lib/vscode/build/gulpfile.reh.ts
|
||||
===================================================================
|
||||
--- code-server.orig/lib/vscode/build/gulpfile.reh.ts
|
||||
+++ code-server/lib/vscode/build/gulpfile.reh.ts
|
||||
@@ -263,8 +263,7 @@ function packageTask(type: string, platf
|
||||
@@ -261,10 +261,15 @@ function packageTask(type: string, platf
|
||||
const destination = path.join(BUILD_ROOT, destinationFolderName);
|
||||
|
||||
return () => {
|
||||
+ const jsFilterMain = util.filter(data => !data.isDirectory() && /\.js$/.test(data.path));
|
||||
+
|
||||
const src = gulp.src(sourceFolderName + '/**', { base: '.' })
|
||||
.pipe(rename(function (path) { path.dirname = path.dirname!.replace(new RegExp('^' + sourceFolderName), 'out'); }))
|
||||
- .pipe(util.setExecutableBit(['**/*.sh']))
|
||||
.pipe(util.setExecutableBit(['**/*.sh']))
|
||||
- .pipe(filter(['**', '!**/*.{js,css}.map']));
|
||||
+ .pipe(util.setExecutableBit(['**/*.sh']));
|
||||
+ .pipe(filter(['**', '!**/*.{js,css}.map']))
|
||||
+ .pipe(jsFilterMain)
|
||||
+ .pipe(util.stripSourceMappingURL())
|
||||
+ .pipe(jsFilterMain.restore);
|
||||
|
||||
const workspaceExtensionPoints = ['debuggers', 'jsonValidation'];
|
||||
const isUIExtension = (manifest: { extensionKind?: string; main?: string; contributes?: Record<string, unknown> }) => {
|
||||
@@ -304,9 +303,9 @@ function packageTask(type: string, platf
|
||||
.map(name => `.build/extensions/${name}/**`);
|
||||
|
||||
const extensions = gulp.src(extensionPaths, { base: '.build', dot: true });
|
||||
- const extensionsCommonDependencies = gulp.src('.build/extensions/node_modules/**', { base: '.build', dot: true });
|
||||
- const sources = es.merge(src, extensions, extensionsCommonDependencies)
|
||||
+ const extensionsCommonDependencies = gulp.src('.build/extensions/node_modules/**', { base: '.build', dot: true })
|
||||
.pipe(filter(['**', '!**/*.{js,css}.map'], { dot: true }));
|
||||
+ const sources = es.merge(src, extensions, extensionsCommonDependencies);
|
||||
|
||||
let version = packageJson.version;
|
||||
const quality = (product as typeof product & { quality?: string }).quality;
|
||||
@@ -501,7 +500,7 @@ function tweakProductForServerWeb(produc
|
||||
const minifyTask = task.define(`minify-vscode-${type}`, task.series(
|
||||
bundleTask,
|
||||
util.rimraf(`out-vscode-${type}-min`),
|
||||
- optimize.minifyTask(`out-vscode-${type}`, `https://main.vscode-cdn.net/sourcemaps/${commit}/core`)
|
||||
+ optimize.minifyTask(`out-vscode-${type}`, ``)
|
||||
));
|
||||
gulp.task(minifyTask);
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts
|
||||
|
||||
readonly version: string;
|
||||
readonly date?: string;
|
||||
@@ -115,6 +116,7 @@ export interface IProductConfiguration {
|
||||
@@ -118,6 +119,7 @@ export interface IProductConfiguration {
|
||||
readonly resourceUrlTemplate: string;
|
||||
readonly nlsBaseUrl: string;
|
||||
readonly accessSKUs?: string[];
|
||||
|
||||
@@ -77,11 +77,14 @@ export class CodeServer {
|
||||
*/
|
||||
private async createWorkspace(): Promise<string> {
|
||||
const dir = await this.workspaceDir
|
||||
await fs.mkdir(path.join(dir, "Machine"), { recursive: true })
|
||||
await fs.mkdir(path.join(dir, "User"), { recursive: true })
|
||||
await fs.writeFile(
|
||||
path.join(dir, "Machine/settings.json"),
|
||||
path.join(dir, "User/settings.json"),
|
||||
JSON.stringify({
|
||||
"workbench.startupEditor": "none",
|
||||
// Disable the welcome popup so we can avoid having to click through it
|
||||
// on every test.
|
||||
"workbench.welcomePage.experimentalOnboarding": false,
|
||||
}),
|
||||
"utf8",
|
||||
)
|
||||
|
||||
6
test/package-lock.json
generated
6
test/package-lock.json
generated
@@ -3645,9 +3645,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/lodash": {
|
||||
"version": "4.17.23",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
||||
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
||||
"version": "4.18.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz",
|
||||
"integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user