This is just a guard in case there are paths where the workspace is
already marked as initialized but the workspace configuration is not and
we end up actually un-initializing it.
And fix the workspace bug. It is caused by an issue with how some
global variables are being used asynchronously and is exacerbated by the
delay reading settings from the remote introduces.
1. The workspace is created and is marked as not initialized.
2. The configuration's change handler is triggered, and now
initialization is complete.
3. The handler tries to set the global workspace variable to initialized
but the workspace has not been set yet so we get an undefined error.
4. The workspace global is now set, but it is set to the old value with
initialized still set to false.
5. Workspace is never marked as initialized until something else
triggers the on change handler again.
Fixes#3061, and closes#6546.
My guess is this logic changed in one of the VS Code updates,
introducing this async bug but never getting caught probably because for
them the settings are always local thus minimal delay.
The main goal of this patch was to make user settings stored on disk
instead of in the browser, but this stopped working some time ago. Not
only that but it is causing a bug where a workspace will not fully open.
A secondary goal was to fix the Vim extension but the extension appears
to work just fine without this change now (both the server and browser
versions).
This patch is not useful anymore anyway because there are remote-level
settings that *do* get stored on disk and can be used instead of
user-level settings when necessary.
Fixes#3061, and possibly #6153.
This should make it much easier to update. Also use 18.15.0
specifically since that is what VS Code ships with.
Additionally, it fixes the post-install script being skipped due to
a Yarn v1 bug that happens when Yarn installs node-gyp, which
it does because 18.18 onward stopped bundling node-gyp.
* Update Code to 1.83.1
* Patch out lookbehind for Safari support
Not sure why it needs a lookbehind unless a number followed by a capital
letter is not supposed to be considered a new word, which seems wrong to
me. The tests do not contain any numbers so I can only guess.
---------
Co-authored-by: Asher <ash@coder.com>
Since the release of code-server v4.17.0 (Code 1.82), "Command Center" has become a default option. However, the current code-server PWA app lacks support for the Windows control overlay, resulting in an untidy appearance of the title bar. This commit introduces modifications to the manifest file to enable support for the window control overlay.
Also remove github.com from the trusted domains. This causes the
browser to block the popup instead (probably because the space between
interaction and popup is too great), which is difficult to notice in
Chromium. Even in Firefox with the extra bar they add at the top it can
be easy to miss.
* Fix building from source on arm
Not building from source causes argon2 to pull the wrong arch, so we
have to build from source.
But building from source is causing the new Kerberos module to fail on
arm64 and keytar to fail on both.
The latter has been very difficult to debug because the GitHub image
provides a different result to containers based on Ubuntu 20.04.
Because of this, use a container instead.
Use debian:buster as the container because it is easier to set up the
architecture sources (no need to modify the sources) and because it
seems to come with glibc 2.28 rather than 2.31.
Also use the exact version of Node (18.15.0) for reproducibility.
* Set owner and group during tar to zero
Otherwise you get IDs that can cause (benign) errors while extracting,
which might be confusing. At the very least, I did not see these errors
from previous tars (although they seem to use 1001).
There is no guarantee what IDs might exist so 0 seems the most
reasonable.
The comment said the issue with argon2 was related to CentOS 7 but the
cross-compile steps never used CentOS 7 so maybe the real issue is with
the architecture.
* Avoid packaging yarn.lock
Since the shrinkwrap is what we want everything to use.
* Build with npm
It seems we stuck with yarn because npm was giving us errors but I will try
sorting it out now so we can build with npm as originally intended.
* Remove build from source
Not using CentOS 7 anymore so based on the comment we no longer need
this. Keytar seems to install fine now.
* Update missed Node version
These numbers are all over the place.
* npm_config_arch must be lowercase
* Patch out Kerberos
I am not sure exactly how it is used but I think it is not a path code-server
worries about, at least not right now. Just going to patch it out rather than
figure out how to build it on armv7l but we can revisit later.
* 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