I was having a bunch of dependency conflicts and eslint seemed to be the
culprit so I just removed it and set it up again, since it seems things
have changed quite a bit.
* Update VS Code to 1.92.2
* Use server-main.js to load VS Code
It looks like the bootstrap files are now bundled so we can no longer
require them. We could make them included again, but maybe it is better
to go through the main entrypoint anyway because it includes some nls
stuff which is maybe necessary.
This also fixes what looks like a bug where we could create two servers
if two requests came in. I am not sure what the practical consequences
of that would be, but it will no longer do that.
* Drop es2020 patch
Unfortunately, VS Code will not load with this. It seems to be because
`this` is being used in static properties, and it becomes `void 0` for
some reason under the es2020 target. For example:
static PREFIX_BY_CATEGORY = `${this.PREFIX}${this.SCOPE_PREFIX}`;
becomes
AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY = `${(void 0).PREFIX}${(void 0).SCOPE_PREFIX}`;
Which, obviously, will not work.
Older versions of Safari (and maybe other browsers) are likely affected.
* Fix display language
* Update Playwright
I think maybe because of the dropped es2020 patch that Webkit is now
failing because it is too old.
* Do not wait for networkidle in e2e tests
I am not sure what is going on but some tests on Webkit are timing out
and it seems the page is loaded but something is still trying to
download. Not good, but for now try to at least get the tests passing.
It is not working. I test this manually anyway so for now just remove
the test, but I think maybe we have to watch for code-server to extract
the language files, and then reload the page, or maybe we have to
install the language from the UI.
Ideally we can drop our patch in the future anyway...
It seems that * matches a literal * now, so we have to use a regular
expression.
Parentheses around a parameter no longer works (it causes it to match on
the parameter name literally) and I am not sure why we had it anyway as
it had no effect previously.
Matching with a leading / does not appear to work either, but we do not
need the leading / anyway since the proxy logic was changed to use the
whole path. Consequently it will never be / anymore from what I can
tell but I left that check in just in case. I turned it into a named
parameter as well, because that seems better.
* Update dependencies and force-update qs
This is mainly an attempt to get rid of as many resolutions as possible
since it seems they are unnecessary except for qs (according to yarn/npm
audit).
For qs use 6.9.7 since Express is using 6.9.6 and that matches the most
closely.
Also add overrides since this is npm's version of yarn's resolutions and
we need it for the shrinkwrap to generate with the right dependencies.
Decided to keep pinning @types/node as well although I am not sure it is
necessary. Express is pulling in v20 types. Since this is
development-only we only need it in resolutions.
* Run formatter
Some rules seem to have changed with the dependency updates.
* Replace deprecated bodyParser.json() usage
* Audit npm shrinkwrap as well
* Skip installing dependencies in audit
It seems the tools only require the lock files.
* Fix tests when using ipv6
* Add missing openssl dependency to flake
The tilde is ambiguous and it can be helpful to know exactly what paths
code-server is trying to use, especially if it is running as a different
user than you expected.
* Avoid spawning code-server with --reuse-window and --new-window
These flags mean the user explicitly wants to open in an existing
instance so if the socket is down it should error rather than try to
spawn code-server normally.
* Set session socket into environment variable
While I was at it I added a CLI flag to override the default. I also
swapped the default to --user-data-dir.
The value is set on an environment variable so it can be used by the
extension host similar to VSCODE_IPC_HOOK_CLI.
* Add e2e test for opening files externally
This is not a valid ID (to install a specific version you use @) and,
quite strangely, Code is now returning an "extension not found" error if
the ID is invalid, breaking the test since we expect it to error about
the marketplace not existing.
Extracted host detection into a separate function to avoid multiple log
lines on each return and went with a thrown error to consolidate the
common log text.