Commit Graph

3153 Commits

Author SHA1 Message Date
Simon Elsbrock 47f0b6f4fa
docs(ipad): fix link to ios-ipad related issues (#4651)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2021-12-28 12:45:28 -07:00
renovate[bot] 047a4f01f2
chore(deps): update aquasecurity/trivy-action commit hash to 8f4c716 (#4650)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-27 10:38:13 -07:00
Joe Previte 95d965a27b
fix: add codeServerVersion to vscode/product.json (#4632)
* fix: add codeServerVersion to vscode/product/json

* chore: update vscode

* chore: update modulePathIgnorePattern jest
2021-12-17 12:58:46 -07:00
Asher c4c480a068
Implement last opened functionality (#4633)
* Implement last opened functionality

Fixes https://github.com/cdr/code-server/issues/4619

* Fix test temp dirs not being cleaned up

* Mock logger everywhere

This suppresses all the error and debug output we generate which makes
it hard to actually find which test has failed.  It also gives us a
standard way to test logging for the few places we do that.

* Use separate data directories for unit test instances

Exactly as we do for the e2e tests.

* Add integration tests for vscode route

* Make settings use --user-data-dir

Without this test instances step on each other feet and they also
clobber your own non-test settings.

* Make redirects consistent

They will preserve the trailing slash if there is one.

* Remove compilation check

If you do a regular non-watch build there are no compilation stats so
this bricks VS Code in CI when running the unit tests.

I am not sure how best to fix this for the case where you have a build
that has not been packaged yet so I just removed it for now and added a
message to check if VS Code is compiling when in dev mode.

* Update code-server update endpoint name
2021-12-17 13:06:52 -06:00
Jonathan Yu b990dabed1
chore: use readonly deploy key for preview (#4645) 2021-12-17 10:27:22 -07:00
Joe Previte 4943e9418d
docs: fix install.sh link (#4627)
Co-authored-by: Asher <ash@coder.com>
2021-12-16 16:59:07 -07:00
Asher f10ef42f04
Add codeowner group for new name (#4641) 2021-12-16 16:43:05 -06:00
Asher c27dbd0463
Revert .editorconfig (#4640)
I have been wondering why my editor is not defaulting to two spaces and
it is because indent_size was removed from the * block.

I am not sure why we would need a separate block for package.json and
yaml anyway since they use the same settings as the rest of our code.

I would revert the commit but this change was made in a larger commit
with a bunch of unrelated changes.
2021-12-16 15:30:07 -06:00
Kyle Carberry ec3d9974b3
fix: Update install.sh to use "coder" GitHub organization (#4638)
* fix: Update install.sh to use "coder" GitHub organization

* Update docs preview
2021-12-16 10:49:16 -06:00
Asher 73e0b79d7f
Update VS Code (#4631)
Fixes https://github.com/cdr/code-server/issues/3410
Fixes https://github.com/cdr/code-server/issues/4604
Fixes https://github.com/cdr/code-server/issues/4607
Fixes https://github.com/cdr/code-server/issues/4608
Fixes https://github.com/cdr/code-server/issues/4609

Also has the foundation for
https://github.com/cdr/code-server/issues/4619.
2021-12-15 15:26:59 -07:00
Joe Previte 3059d72a5d
docs: add section for Android (#4621)
* Add Instructions To Install 100% In Android (#4536)

* Add Instructions To Install 100% In Android

Thx

* Update android.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* docs: clean up android.md

* docs: add android to manifest

* Add missing backtick

Co-authored-by: The AliX Legend <alixgamer175@gmail.com>
Co-authored-by: Asher <ash@coder.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-12-15 20:37:16 +00:00
Joe Previte 6e9e411542
fix: add --clobber to release-github-assets script (#4628)
Co-authored-by: Asher <ash@coder.com>
2021-12-15 20:11:35 +00:00
renovate[bot] 7561fc4306
chore(deps): update aquasecurity/trivy-action commit hash to 81cc8cd (#4601)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2021-12-15 10:38:18 -07:00
Len 259363bcdb
Support browsers from before 2020 (#4579)
* 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>
2021-12-15 10:07:42 -07:00
Joe Previte 1b796d19bf
docs: add section for iOS (#4622)
* 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>
2021-12-14 23:43:52 +00:00
hyk 5960a6728c
support git-lfs default (#4611)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2021-12-14 16:08:25 -07:00
Leask Wong 18e66c4299
adding option --edge to install latest edge / preview version (#4605)
* adding option --edge to install latest edge / preview version

* updated arg --edge parsing to match the style of --dryrun
2021-12-14 15:30:35 -07:00
Joe Previte c77999bcd3
release: 4.0.0 (#4597)
* chore(release): bump version to 4.0.0

* Bump test plugin code-server engine

Co-authored-by: Asher <ash@coder.com>
2021-12-10 13:30:53 -07:00
Asher 9e583fa562
Add separate function for VS Code arguments (#4599)
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.
2021-12-10 12:01:35 -06:00
Joe Previte 3b91cffae5
chore: update CHANGELOG (#4595) 2021-12-09 14:21:02 -07:00
Asher 4b4ec37880
Fix relative paths (#4594)
* 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
2021-12-08 15:52:15 -06:00
Asher 9d9f3a41ab
Fix spawning code-server within code-server (#4590)
* 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.
2021-12-07 18:20:57 -06:00
Asher c3eb9b800e
Remove excessive reloading before VS Code is ready (#4589)
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.
2021-12-07 17:38:03 -06:00
JounQin 6c9c84090e
chore: replace eslint-import-resolver-alias with eslint-import-resolver-typescript (#4546)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2021-12-07 14:39:01 -07:00
Joe Previte d15731a570
docs: update sections around VS Code fork (#4571)
* 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>
2021-12-06 17:58:04 +00:00
renovate[bot] 80f30fc42c
fix(deps): update dependency qs to v6.10.2 (#4581)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-06 10:33:13 -07:00
Teffen 62b3a6fd9f
Proxy path fixes (#4548)
* 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>
2021-12-01 18:21:52 -06:00
Ben Potter 6a2740f57e
chore: add deprecation notice for --link (#4562)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2021-11-29 12:03:33 -08:00
renovate[bot] 3d4660491a
chore(deps): update minor dependency updates (#4531)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-29 11:31:35 -07:00
Joe Previte 65d7420ee7
feat: add test for onLine throw error (#4542) 2021-11-22 20:18:58 +00:00
Joe Previte 0bc96989c2
chore(deps): upgrade json-schema version to 0.4.0 (#4543) 2021-11-22 19:36:04 +00:00
Teffen bd09533f40
Fix issue where 404 errors are mistaken for server errors. (#4534)
* Fix issue where 404 errors are mistaken for server errors.

* Bump vendor.
2021-11-19 18:14:13 -05:00
Joe Previte db35c47315
chore(codecov): add slack webhook integration (#4532)
Co-authored-by: Teffen <TeffenEllis@users.noreply.github.com>
2021-11-19 22:10:27 +00:00
Teffen 3157a40044
Fix issues surrounding initial web server load. (#4509)
- Clean up watcher behaviors.
2021-11-19 16:03:40 -05:00
renovate[bot] 5fe16be62d
chore(deps): update aquasecurity/trivy-action commit hash to 2a2157e (#4493)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2021-11-19 12:04:08 -05:00
Asher dd29a823c3
Fix /vscode route being shadowed by / (#4522)
This causes / to always take precedence and on the VS Code side we would
see /vscode instead of / so the matching does not work correctly.
2021-11-17 10:20:01 -06:00
Asher cd26f84bc6
Fix watcher not restarting code-server on VS Code compilation (#4520)
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.
2021-11-16 16:21:14 -06:00
Jinu ccb9d948c0
fix NOTE.txt (#4515) 2021-11-16 09:46:39 -07:00
Joe Previte 0a072f7532
feat(testing): refactor humanPath and add tests (#4511)
* feat: add test for humanPath

* refactor: make humanPath pure and pass in homedir
2021-11-15 19:40:34 +00:00
Joe Previte 16a5f2e171
docs: update CONTRIBUTING with new flow (#4502) 2021-11-15 11:37:16 -07:00
Teffen e705948ef3
Spawn vscode on demand (#4499)
* 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>
2021-11-14 20:03:20 -05:00
Han Seung Min - 한승민 6606040835
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>
2021-11-12 14:25:48 -07:00
Jinu cdf0deb534
fix volumes (#4497) 2021-11-12 10:10:47 -07:00
Asher d052cc246d
Update changelog (#4492)
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.
2021-11-10 16:45:19 -06:00
Teffen e4a797dc9e
Open VSX switch, Part II (#4319)
* 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>
2021-11-10 10:00:59 -05:00
Teffen 1b60ef418c
Use upstream server (#4414)
* 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>
2021-11-09 23:28:31 -06:00
Mauricio Garavaglia 31d5823d10
Escape HTML from messages in error page (#4430)
Co-authored-by: Asher <ash@coder.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2021-11-09 14:39:54 -07:00
LG 605c3c6367
Add a gist of the difference between code-server and Coder (#4419)
* 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>
2021-11-09 10:30:27 -07:00
Matthew Beckett 94b2774f8c
Drop duplicate Helm values from values.yaml (#4450)
* 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>
2021-11-05 12:04:52 -07:00
renovate[bot] 4399c7df64
fix(deps): update dependency rotating-file-stream to v3 (#4451)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-05 12:04:10 -07:00