512 Commits
Author SHA1 Message Date
cdrci 9cc1033c19 Update Code to 1.146.0 (#8121)
* Stop generating shrinkwraps

npm 12 removes support for shrinkwraps.  Additionally, VS Code has
switched to pnpm and this will make generating the shrinkwraps less
straightforward.

Exact pins in the package.json would not be a sufficient replacement
since that does not cover transitive dependencies.

The recommendation for end user packages installed globally with npm
seems to be to be to bundle dependencies.

One idea would be to build for every platform and bundle them all, but
the whole reason we have the npm package is to support platforms for
which we are not building.  If we build them, we could just add a
regular release for that platform on GitHub.

So instead for each native module we would need to add rebuild commands
in the postinstall.  And ideally remove the current platform builds to
at least try keeping the tarball size down.

I am not sure it is worth the effort for what it feels like fighting
with npm, so this change does not attempt that.

* Remove devDependencies from extensions package.json

Not strictly necessary since we only install production dependencies in
the postinstall, but might as well save some bytes.

* Update Code to 1.146.0

* Support pnpm for post-install

* Get Node version from package.json

lib/vscode/remote/.npmrc no longer exists

* Switch to pnpm

VS Code recently switched to pnpm so various scripts needed to be
updated, and we might as well follow suite with code-server's own
dependencies.

In general this change just swaps out "npm" invocations for "pnpm" plus
any necessary flag changes to match but to call out some less obvious
changes:

1. The extensions directory no longer has a post-install script, so
   there is no need to copy one anymore.
2. When merging the remote package.json, only copy the dependencies
   since that is all we need, to avoid copying in new properties like
   packageManager.
3. Remove unused publish:npm.  It points to a nonexistent file anyway.
4. Remove publish:docker and just call the script directly, to avoid an
   npm/pnpm dependency in a job that really has no need for it.

* Update nfpm maintainer
2026-11-20 01:38:16 -09:00
T Mohan Aditya dda09f22fa Split proxy request paths on / instead of path.sep (#8123)
The base path of /proxy/<port> requests was computed by splitting the
request path on path.sep, which is a backslash on Windows, so the whole
path became the base. Requests were proxied to / on the target port and
redirects were rewritten against the wrong base. URL paths always use /.
2026-11-12 18:22:59 -09:00
T Mohan Aditya b1ec0ce604 Match exact trusted origins case-insensitively (#8125)
authenticateOrigin() lowercases the host of the origin and
isTrustedOrigin() lowercases the domain of *.example.com entries, but
exact entries were compared as written, so an entry with an uppercase
letter (for example a Windows host name like DESKTOP-ABC123:8080) never
matched and requests from that origin were refused.
2026-11-12 17:48:53 -09:00
Wei-Lun Li bef3afff83 Add --wait to code-server's own CLI (#8117) 2026-11-12 16:55:11 -09:00
Asher cc7388533d Strip cookie from web socket requests (#8111)
This matches what we already do for regular HTTP requests.
2026-11-04 12:59:36 -09:00
Andy Piper 79d2c29c49 Add --disable-file-cache flag (#8085)
The browser writes some workspace files to the client disk during normal
use. The webview service worker stores resources that have an ETag in
Cache Storage, and responses from /vscode-remote-resource can end up in
the HTTP disk cache. --disable-file-downloads does not cover either.

With --disable-file-cache, the webview resource loader sends no ETag for
a resource outside the webview's own extension, so the service worker
does not store it. /vscode-remote-resource responds with
`Cache-Control: no-store` for files outside the extension directories.
Extension files keep their ETags, so webviews still load extension code
from the cache. The flag is off by default.
2026-11-02 14:14:26 -09:00
Andy Piper 27808460b1 Fix --socket-fd when code-server is socket-activated (#8083)
The --socket-fd flag never worked. The wrapper forks the process that
listens, but only the IPC channel was inherited as fd 3, so the socket
passed by the caller was not available to the child. Node then tried to
listen on the IPC pipe and failed with "listen EEXIST".

Pass the socket to the child as stdio entry 4 and tell the child to use
that fd in the handshake.

Node also reports no address for a Unix socket adopted by fd, which made
startup fail with "Server has no address". Log the listener as fd:<n>
in that case.

Add an integration test that starts the code-server binary with a Unix
or TCP socket as fd 3 and checks that /healthz answers over it.
2026-10-28 15:11:06 -08:00
Raphael Fakhri 761b0d2a19 Fix cookie domain not being set against root host (#8076) 2026-10-27 13:05:56 -08:00
Harsh Bhanushali 89cba83cb4 Normalize default ports and use X-Forwarded-Port in the origin check (#8059)
The origin check compared the host header to the origin's host as plain
strings, so `example.com:443` did not match `https://example.com`, and a
proxy forwarding `$host` (no port) together with X-Forwarded-Port failed
on any non-default port.

Default ports (80 for http, 443 for https) are now treated as no port,
and when X-Forwarded-Host has no port the port from X-Forwarded-Port is
used.  Everything else is still an exact match.  getHost() is unchanged
for the domain proxy.
2026-10-26 16:42:24 -08:00
cdrci 22ddf60dbc Update Code to 1.143.1 (#8069)
* Remove Node patch
* Update patches
Just one conflict, they use user-data-dir now which is something we
already have been doing for a long time.
2026-10-23 22:15:00 +00:00
Dean Sheather 777c493a9b Upgrade Node to 24.22.1 2026-10-23 15:06:41 +00:00
Harsh Bhanushali f07405cba3 Expand ~ in path options from the config file (#8055)
The shell expands ~ in command-line arguments, but values read from
config.yaml were passed to path.resolve as-is, so
`user-data-dir: ~/.config/code-server-data` resolved to
`<cwd>/~/.config/code-server-data`.
2026-10-14 13:47:08 -08:00
Harsh Bhanushali 83670e50c6 Fix false booleans in config file being parsed as true (#8053)
Options like `enable-remote-storage: false` in config.yaml are converted to
`--enable-remote-storage=false`, but the parser set any boolean option to
true regardless of its value. Booleans set to false are now ignored, the
same way optional strings set to false already are.
2026-10-13 17:01:10 -08:00
KeuqS 41cf6f7eaf Add Turkish locale (#8050) 2026-10-09 22:50:17 +00:00
cdrci 8b41915d25 Update Code to 1.141.0 (#8040)
* Update Code to 1.141.0
* Allow pull_request_target
* Add e2e tests for remote storage
* Fix Typescript extension not loading
* Remove unused imports
2026-10-07 22:54:47 -08:00
dependabot[bot] be95e9f163 Bump @babel/core from 7.25.7 to 7.29.7 in /test (#8004) 2026-10-07 17:39:45 -08:00
dependabot[bot] 8a1f2e3d55 Bump brace-expansion from 1.1.18 to 1.1.21 in /test (#8041) 2026-10-07 17:33:36 -08:00
Daywin67 8be4df7ab0 Add flag to store state on remote instead of browser (#7914) 2026-10-07 16:35:44 -08:00
cdrci 53c2f3253b Update Code to 1.139.1 (#8021)
* Update Code to 1.139.1
* Bump proxy-addr to 2.0.8
* Add preinstall setup to build
  Already had this in the release build step, not sure why it is not in
  the main build step.  But we started getting errors building native
  modules in ci, and this seems to be why.
* Fix quick input
  It types too quickly, before the input is visible.
2026-09-25 15:12:50 -08:00
Leo Camus 8a7bf87a4d Fix --idle-timeout-seconds validation being skipped (#8009)
The lower bound check ran before the parser had resolved the value, so it
only saw a value with the --idle-timeout-seconds=<value> form. With the
space-separated form the value was still undefined at that point,
Number(undefined) is NaN, and NaN <= 60 is false, so anything got through.

Move the check below the block that pulls the value from the next
argument so both forms are validated the same way.
2026-09-20 02:53:04 -08:00
Limbo ef5eba4348 Preserve path, query, and fragment in proxy URL rewrite (#8012) 2026-09-17 12:41:01 -08:00
dependabot[bot] 729815064f Bump js-yaml from 3.14.2 to 3.15.2 in /test (#8003) 2026-09-11 11:06:08 -08:00
dependabot[bot] 76f7789303 Bump browserslist from 4.24.0 to 4.28.9 in /test (#7988) 2026-09-08 12:48:11 -08:00
Asher 53692fd9fd Add local settings test (#7992) 2026-09-08 12:38:24 -08:00
denusklo f1dde9b093 Default the session socket to a named pipe on windows (#7985) 2026-09-08 12:37:51 -08:00
cdrci 00672a5522 Update Code to 1.136.1 (#7981)
* Update Code to 1.136.1

* Do not click on tab during test file opens

It will already be the selected tab, and if any other tab is already
open (like the welcome tab), it will click that instead.

We disable the welcome page so this is not supposed to actually matter,
but that Setting appears not to be working.

Also add the quick input widget selector in the disabled downloads test,
since if the widget never shows up it would mistakenly pass.
2026-09-08 08:32:03 -08:00
Robert Gingras 4cb856c475 Add --socket-fd CLI option (#7940) 2026-08-20 13:24:49 -08:00
dependabot[bot] 1735f6d3fb Bump brace-expansion from 1.1.11 to 1.1.18 in /test (#7957) 2026-08-19 14:45:44 -08:00
Fernando Softov 04ce2301a7 Add VSCODE_OPTIONS and --vscode-option for Code flags (#1528) (#7952) 2026-08-19 13:44:48 -08:00
Asher 208c81a072 Fix mistakenly encoding cookies to proxy
We use the cookie parser to remove the code-server token but by default
it encodes using encodeURIComponent, which encodes more than is strictly
necessary and can break proxied applications.

Now we pass the cookies through unchanged (other than removing the
code-server token).

Fixes #7927.
2026-08-06 13:06:00 -08:00
Asher f836314954 Use const for unmutated let 2026-08-06 12:35:34 -08:00
Anupam Mediratta 4f73664880 Require auth for mint key endpoint (#7923)
The client combines the key from this endpoint to then encrypt secrets into browser storage.
2026-08-03 08:24:25 -08:00
dependabot[bot] 3ed5f97448 chore: bump ws from 7.5.10 to 7.5.13 in /test (#7901) 2026-07-21 11:14:19 -08:00
Asher 25e847dc94 Update Playwright 2026-06-16 11:33:33 -08:00
Asher e1c839fb1d Slightly improve heart tests
- Get rid of the global isActive mock; in particular the way it shadows
  local ones seemed sketchy.
- No need for requireActual from my testing.
- Reword the comment for why we need setImmediate.
- Add the setImmediate to another test that seemed to only pass because
  of an await on the timer call which is not actually a promise but had
  the side effect of yielding.
- Always set fake/real timers in the before/after handlers and never in
  individual tests.
2026-06-16 11:27:53 -08:00
YONGJAE LEE (이용재) 7dfd68589a fix: re-enable skipped Heart tests and make non-asserting checks assert (#7845) 2026-06-16 09:58:42 -08:00
dependabot[bot] a056406eff chore: bump form-data in /test (#7848) 2026-06-16 17:35:17 +00:00
Asher 364cf99338 Strip token from cookies before proxying
Since this functionality requires information placed onto the request by
code-server (req.args) and Express (req.cookies), move the standalone
tests into the integration tests as the proxy can no longer run
correctly on its own without that context.

We could strip the header elsewhere or refactor in some way (pass in a
callback function for the stripping or something) but this seems like
the simplest and safest place at the moment to ensure we catch all uses
of the proxy.

In any case, I think it does lend more confidence to know we are testing
the proxy the way it will be used in practice.  The downside is some
additional complexity when setting up tests, but at the moment I do not
think that exchange is overly burdensome.
2026-06-15 16:42:17 -08:00
Asher 99bfbd5931 Update e2e example commands
I think the syntax changed when we moved from yarn to npm.
2026-05-21 13:30:44 -08:00
Micah Zoltu 238769e535 Apply --app-name to web page titles (#7794) 2026-05-21 12:22:29 -08:00
Asher 871f1d9048 Skip webkit in e2e tests for now 2026-05-06 12:12:54 -08:00
Asher f6bd6aa1a4 Update Playwright to 1.59.1 2026-05-06 11:50:06 -08:00
dependabot[bot] 5f7c23bd8e chore: bump lodash from 4.17.23 to 4.18.1 in /test (#7743) 2026-04-17 11:14:54 -08:00
Olivier BenzandAsher 7cc2270228 Update Code to 1.116.0 (#7754)
* Update Code to 1.116.0

* Add copilot extension build

Seems the vscode build requires this separately now.

* Disable welcome popup

A giant modal window asking you to sign in for AI features is blocking
the tests.  Rather than have to click through it, disable it.  It looks like
this has to be a user setting, so switch to that instead of machine (we
used machine because user settings were in the browser, but they have
been since moved back to disk).

---------

Co-authored-by: Asher <ash@coder.com>
2026-04-15 15:05:17 -08:00
dependabot[bot] 394c6fc3f9 chore: bump picomatch from 2.3.1 to 2.3.2 in /test (#7717) 2026-04-06 10:26:38 -08:00
Tianyi Cui ada3489acf feat: expose --reconnection-grace-time CLI flag (#7678)
* feat: expose --reconnection-grace-time CLI flag

Pass through VS Code Server's --reconnection-grace-time argument,
allowing users to configure how long the server waits for a
disconnected client to reconnect before cleaning up the session.

This is useful for users whose client machines sleep overnight, causing
the default 3-hour grace period to expire and forcing a "Reload Window"
on wake. The flag can also be set via CODE_SERVER_RECONNECTION_GRACE_TIME
env var or in config.yaml.
2026-03-25 11:47:58 -08:00
Abdulsattar Mohammed 4d615f18a9 feat: add wildcard support to trusted-origins (#7697) 2026-03-25 11:04:06 -08:00
Luna Ops 24ea70ac88 feat: use --app-name in error page title (#7693) 2026-03-11 13:43:45 -08:00
dependabot[bot] b5e2c42183 chore: bump minimatch from 3.1.2 to 3.1.5 in /test (#7682) 2026-03-03 12:19:52 -09:00
dependabot[bot] 1dd0741c94 chore: bump js-yaml from 3.14.1 to 3.14.2 in /test (#7566) 2026-01-23 12:45:39 -09:00