Compare commits

..

2 Commits

Author SHA1 Message Date
cdrci
7f4881a710 Update Code to 1.133.0 2026-08-17 09:26:47 -08:00
Alexander Freiherr von Buddenbrock
596dbf3416 Update files to reflect the new node.js v24 (#7949)
With the update to node.js v24 in vscode and package.json some files have not been updated and still referenced version 22.x.
2026-08-17 09:03:55 -08:00
8 changed files with 19 additions and 28 deletions

View File

@@ -65,8 +65,8 @@ main() {
echo "USE AT YOUR OWN RISK!"
fi
if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-22}" ]; then
echo "ERROR: code-server currently requires node v22."
if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-24}" ]; then
echo "ERROR: code-server currently requires node v24."
if [ -n "$FORCE_NODE_VERSION" ]; then
echo "However, you have overrided the version check to use v$FORCE_NODE_VERSION."
fi

View File

@@ -31,7 +31,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` v22.x
- `node` v24.x
- `git` v2.x or greater
- [`git-lfs`](https://git-lfs.github.com)
- [`npm`](https://www.npmjs.com/)

View File

@@ -11,11 +11,11 @@ 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 22:
7. Install and use Node.js 24:
```shell
nvm install 22
nvm use 22
nvm install 24
nvm use 24
```
8. Install code-server globally on device with: `npm install --global code-server`

View File

@@ -29,8 +29,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 `22.x`. VS Code also [lists Node.js
We use Node.js `24.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 +77,7 @@ Proceed to [installing](#installing)
## FreeBSD
```sh
pkg install -y git python npm-node22 pkgconf
pkg install -y git python npm-node24 pkgconf
pkg install -y libinotify
```

View File

@@ -57,7 +57,7 @@ npm config set python python3
node -v
```
you will get Node version `v22`
you will get Node version `v24`
5. Now install code-server following our guide on [installing with npm](./npm.md)

View File

@@ -9,7 +9,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts
+++ code-server/lib/vscode/src/vs/server/node/serverServices.ts
@@ -14,7 +14,7 @@ import { IURITransformer } from '../../b
@@ -13,7 +13,7 @@ import { IURITransformer } from '../../b
import { generateUuid } from '../../base/common/uuid.js';
import { getMachineId, getSqmMachineId, getDevDeviceId } from '../../base/node/id.js';
import { Promises } from '../../base/node/pfs.js';
@@ -18,7 +18,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
import { ProtocolConstants } from '../../base/parts/ipc/common/ipc.net.js';
import { createRandomIPCHandle } from '../../base/parts/ipc/node/ipc.net.js';
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
@@ -418,6 +418,9 @@ export async function setupServerService
@@ -417,6 +417,9 @@ export async function setupServerService
socketServer.registerChannel('mcpManagement', new McpManagementChannel(mcpManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)));

View File

@@ -19,9 +19,9 @@ Index: code-server/lib/vscode/src/vs/platform/product/common/product.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/product/common/product.ts
+++ code-server/lib/vscode/src/vs/platform/product/common/product.ts
@@ -104,6 +104,17 @@ else {
}
});
@@ -65,6 +65,17 @@ else if (globalThis._VSCODE_PRODUCT_JSON
Object.assign(product, { copilotVersions: { runtime, sdk } });
}
}
+
+ Object.assign(product, {
@@ -36,7 +36,7 @@ Index: code-server/lib/vscode/src/vs/platform/product/common/product.ts
+ });
}
export default product;
// Web environment or unknown
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts

View File

@@ -12,15 +12,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts
+++ code-server/lib/vscode/src/vs/server/node/serverServices.ts
@@ -5,6 +5,7 @@
import * as fs from 'fs';
import { hostname, release } from 'os';
+import { promises as fs } from 'fs';
import { Emitter, Event } from '../../base/common/event.js';
import { DisposableStore, toDisposable } from '../../base/common/lifecycle.js';
import { Schemas } from '../../base/common/network.js';
@@ -68,6 +69,7 @@ import { IExtensionsScannerService } fro
@@ -68,6 +68,7 @@ import { IExtensionsScannerService } fro
import { ExtensionsScannerService } from './extensionsScannerService.js';
import { IExtensionsProfileScannerService } from '../../platform/extensionManagement/common/extensionsProfileScannerService.js';
import { IUserDataProfilesService } from '../../platform/userDataProfile/common/userDataProfile.js';
@@ -28,18 +20,18 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
import { NullPolicyService } from '../../platform/policy/common/policy.js';
import { OneDataSystemAppender } from '../../platform/telemetry/node/1dsAppender.js';
import { LoggerService } from '../../platform/log/node/loggerService.js';
@@ -179,11 +181,23 @@ export async function setupServerService
@@ -179,11 +180,23 @@ export async function setupServerService
const requestService = new RequestService('remote', configurationService, environmentService, logService);
services.set(IRequestService, requestService);
+ let isContainer = undefined;
+ try {
+ await fs.stat('/run/.containerenv');
+ await fs.promises.stat('/run/.containerenv');
+ isContainer = true;
+ } catch (error) { /* Does not exist, probably. */ }
+ if (!isContainer) {
+ try {
+ const content = await fs.readFile('/proc/self/cgroup', 'utf8')
+ const content = await fs.promises.readFile('/proc/self/cgroup', 'utf8')
+ isContainer = content.includes('docker');
+ } catch (error) { /* Permission denied, probably. */ }
+ }