* Support browsers from before 2020
As reported in #2825, #2826 and #3051, almost everything works in older browsers. This setting here prevented me from updating and I think it is an obvious enhancement to not restrict to browsers from 2020+. There should not be any measurable downsides of this change since es6 and es2020 are pretty similar with only minor differences.
* Include lib (polyfills) for <es2020 targets
* Assume all modern dom features despite es6 syntax
* Add modern dom iterators to es6 environment
Co-authored-by: Joe Previte <jjprevite@gmail.com>
Co-authored-by: Asher <ash@coder.com>
* Added instructions to install it on iOSi (#4614)
* Added instructions to install it on iOS
* Update ios.md
Co-authored-by: Joe Previte <jjprevite@gmail.com>
* docs: add ios to manifest
* docs: clean up ios docs
Co-authored-by: The AliX Legend <alixgamer175@gmail.com>
The problem before was that the pop() caused the open in existing
instance functionality to break because the arguments no longer
contained the file.
We could simply remove the pop() but since `workspace` and `folder` are
not CLI arguments I think it makes sense to handle them in a separate
function which can be called at the point where they are needed. This
also lets us de-duplicate some logic since we create these arguments in
two spots and lets us skip this logic when we do not need it.
The pop() is still avoided because manipulating a passed-in object
in-place seems like a risky move. If we really need to do this we
should copy the positional argument array instead.
* Add tests for relativeRoot
* Remove path.posix.join
Since this is for file system paths it feels incorrect to use it on
URL paths as they are different in many ways.
* Rewrite cookie path logic
Before we relied on the client to resolve the base given to it by the
backend against the path.
Instead have the client pass that information along so we can resolve it
on the backend. This means the client has to do less work.
* Do not remove out directory before watch
This is re-used for incremental compilation.
Also remove del since that was the only use (and we can use fs.rmdir in
the future if we need something like this).
* Remove unused function resolveBase
* Remove extra VS Code CLI spawn
We already spawn VS Code's CLI when necessary in the lines below.
Having the CLI spawn unconditionally when in a VS Code environment makes
it impossible to run code-server within code-server (for example to
develop it).
* Update VS Code
This sanitizes our environment variables so code-server does not always
think it is a child spawn.
Fixes https://github.com/cdr/code-server/issues/4519.
The watch script was reloading the web server after every extension
compilation which is not necessary plus VS Code will not even be ready
at that point anyway.
Instead restart when the main compilation is finished. The string to
match with includes a "with" because otherwise it would match "Finished
compilation extensions" which is not the main compilation task where we
actually need to restart the web server.
I also replaced this.log with console.log because the former does not
include a newline and it appears we want newlines with all
these (otherwise the next log starts on the same line which looks odd).
I removed the cache clean as well because the cache is meant to stay
there to speed up builds.
* docs(CONTRIBUTING): update workflow based on vscode changes
* docs(MAINTAINING): add section for syncing VS Code upstream
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
* Fix issue where HTTP error status codes are not read.
* Fix issues surrounding sessions when accessed from a proxy.
- Updated vscode args to match latest upstream.
- Fixed issues surrounding trailing slashes affecting base paths.
- Updated cookie names to better match upstream's usage, debuggability.
* Bump vendor.
* Update tests.
* Fix issue where tests lack cookie key.
Co-authored-by: Asher <ash@coder.com>
The "Starting watch-client" string no longer appears in the latest build
output. We could look for "Finished compilation with" to avoid
restarting when other tasks restart (since they also include the name
i.e. "Finished compilation extensions with 0 errors") but I figure we
might as well restart code-server when any compilation task completes in
case other tasks include changes that need to be reloaded.
* Refactor vscode router to load async.
* Bump vscode.
* fix volumes (#4497)
* Fix : recreate the termux guide to adapt the recent changes (#4472)
* Fix : recreate the termux guide to adapt the recent changes
Termux nodejs-lts changed from v14 to v16 and there are many issues people are facing such as with argon2. Hence I recommend changing it to this install process which is comparably better and has one less issue :^)
I've also added some extra things such as installing GO and Python, idk about the TOC tree but this is pretty much it.
* yarn-fmt and minor typos
https://github.com/cdr/code-server/pull/4472#issuecomment-964752180
* Fix : replace unnecessary steps to be linked to a guide
* Change from private gist to a section in Extra
* Remove reference to non-existent step
* ready to merge!
Co-authored-by: Joe Previte <jjprevite@gmail.com>
Co-authored-by: Jinu <jlandowner8@gmail.com>
Co-authored-by: Han Seung Min - 한승민 <hanseungmin.ar@gmail.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
* Fix : recreate the termux guide to adapt the recent changes
Termux nodejs-lts changed from v14 to v16 and there are many issues people are facing such as with argon2. Hence I recommend changing it to this install process which is comparably better and has one less issue :^)
I've also added some extra things such as installing GO and Python, idk about the TOC tree but this is pretty much it.
* yarn-fmt and minor typos
https://github.com/cdr/code-server/pull/4472#issuecomment-964752180
* Fix : replace unnecessary steps to be linked to a guide
* Change from private gist to a section in Extra
* Remove reference to non-existent step
* ready to merge!
Co-authored-by: Joe Previte <jjprevite@gmail.com>
I added the missing versions and some changelog entries for the latest
version. I also added some extra details to the entries that should
help users understand what changed and what they need to do about
it. The overall format is based on keepachangelog.com.
In that same spirit I removed entries that do not affect
users (documentation and development changes).
I removed the names because it seems unlikely users will be interested,
that information can be found in the PR, and code is really the work of
multiple developers (even if only one is writing code and the other is
reviewing) which is not something that is reflected in this document.
* docs: update FAQ with extension gallery info (#2672)
* Update app to reflect Open VSX switch.
- Remove extension related github configs.
- Update tests to reflect new upstream behavior.
Co-authored-by: Akash Satheesan <akash@coder.com>
* Flesh out fixes to align with upstream.
* Update route handlers to better reflect fallback behavior.
* Add platform to vscode-reh-web task
Our strategy has been to build once and then recompile native modules
for individual platforms. It looks like VS Code builds from scratch for
each platform.
But we can target any platform, grab the pre-packaged folder, then
continue with own packaging.
In the future we may want to rework to match upstream.
* Fix issue where workspace args are not parsed.
* Fix issues surrounding opening files within code-server's terminal.
* Readd parent wrapper for hot reload.
* Allow more errors.
* Fix issues surrounding Coder link.
* Add dir creation and fix cli
It seems VS Code explodes when certain directories do not exist so
import the reh agent instead of the server component since it creates
the directories (require patching thus the VS Code update).
Also the CLI (for installing extensions) did not seem to be working so
point that to the same place since it also exports a function for
running that part of the CLI.
* Remove hardcoded VSCODE_DEV=1
This causes VS Code to use the development HTML file. Move this to the
watch command instead.
I deleted the other stuff before it as well since in the latest main.js
they do not have this code so I figure we should be safe to omit it.
* Fix mismatching commit between client and server
* Mostly restore command-line parity
Restore most everything and remove the added server arguments. This
will let us add and remove options after later so we can contain the
number of breaking changes.
To accomplish this a hard separation is added between the CLI arguments
and the server arguments.
The separation between user-provided arguments and arguments with
defaults is also made more clear.
The extra directory flags have been left out as they were buggy and
should be implemented upstream although I think there are better
solutions anyway. locale and install-source are unsupported with the
web remote and are left removed. It is unclear whether they were used
before anyway.
Some restored flags still need to have their behavior re-implemented.
* Fix static endpoint not emitting 404s
This fixes the last failing unit test.
Fix a missing dependency, add some generic reverse proxy support for the
protocol, and add back a missing nfpm fix.
* Import missing logError
* Fix 403 errors
* Add code-server version to about dialog
* Use user settings to disable welcome page
The workspace setting seems to be recognized but if so it is having no
effect.
* Update VS Code cache step with new build directories
Co-authored-by: Asher <ash@coder.com>
* Add a gist of the difference
* Update the gist
* Update README.md
As told by @tmikaeld here: https://github.com/cdr/code-server/discussions/3102#discussioncomment-1565789
* Update docs/README.md
Co-authored-by: Joe Previte <jjprevite@gmail.com>
* `yarn fmt` results
Co-authored-by: Joe Previte <jjprevite@gmail.com>
Co-authored-by: Asher <ash@coder.com>
* Drop duplicate Helm values from values.yaml
* Use frozen lockfile for test dependencies in CI (#4442)
* Use frozen lockfile for test dependencies in CI
This might be causing more Playwright issues.
* Bump Playwright
Mostly just to trigger a reinstall of dependencies since it is cached
and still failing.
Once updated it errors saying install needs to run so add that too.
* Drop duplicate Helm values from values.yaml
Co-authored-by: Asher <ash@coder.com>
* Use frozen lockfile for test dependencies in CI
This might be causing more Playwright issues.
* Bump Playwright
Mostly just to trigger a reinstall of dependencies since it is cached
and still failing.
Once updated it errors saying install needs to run so add that too.
It was causing version mismatch errors.
It might make more sense to have this in the postinstall but for now I
have foregone that as it would be installed in every step including
those that do not run e2e tests.