The problem was that whenever the hashe needed an update, the current
patch would create a conflict which cannot be easily auto-resolved.
Instead, put the hashes in a separate patch that is deleted and
regenerated each time, avoiding the conflicts.
Also the web worker iframe hash was not being updated.
It needs to parse the version *after* the VS Code update, otherwise it
is just pulling whatever the previous version was.
That means we cannot use it in the step title without some refactoring;
opted to just omit it for now.
- 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.
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.
The VS Code build process sets the bundled lib/vscode/package.json name to "code-server" (from product.json nameShort), causing vulnerability scanners to misidentify it and flag non-applicable CVEs. Override the name to "code-oss-dev" in build-release.sh after merging package.json.
Fixes#7071
Signed-off-by: ka-ishimoto <ka-ishimoto@kddi.com>