* Update upstream Code to 1.70
* Update CSP hashes
* Update comment on remote authority
Also remove it from script-src since it is invalid anyway.
* Use absolute path for disable download patch
Just to keep it consistent with the other imports. We initially added
the patch like this so it was not part of the upgrade but might as well
fix it now.
* Fix inability to change language while code-server is running
Co-authored-by: Asher <ash@coder.com>
`proxy` should `await` for result of `authenticated` call otherwise since otherwise it will always appear to be authenticated as the promise is truthy.
Co-authored-by: Asher <ash@coder.com>
Now that we have a test for `--help` which checks to make sure native
modules are working as expected, we don't need the `--install-extension`
test or the `--list-extensions` test.
We can also remove the `.vsix` fixture since we're not using that
either.
* Update Node types to 16
* Update Express core types
Fixes a number of conflicts it has with Node 16.
* Fix websocket router types
It seems req was `any` before so now we have to handle the types. Also
it seems the socket is of type `stream.Duplex`, not `net.Socket`.
The ws types had to be updated to support the new type.
Unfortunately Code still uses the old type so cast for now.
In the web socket router just use a cast for the extra properties we
add. We could add the types to the Express namespace but I am not sure
we really want these commonly accessible so keep with the casts for now.
Likely we should use Express's `locals` or something instead.
* Add missing return
Not sure why it only just now started complaining though.
Co-authored-by: Asher <ash@coder.com>
* refactor: add env arg to runCodeServerCommand
This allows yous to pass environment variables to code-server's helper
when running integration tests.
* feat: add EXTENSIONS_GALLERY integration test
This test ensures EXTENSIONS_GALLERY is read when set and using the
`--install-extension` flag.
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
* docs: update maintaining
* chore(e2e): add maxFailures to playwright
* fix(ci): skip submodule in e2e job
We don't need the submodules for the e2e job. This will speed up the
checkout step.
* feat(ci): add test-e2e-proxy job
This adds a new job to CI to run our tests behind Caddy and simulate
code-server running against a reverse-proxy.
* refactor: make e2e work with reverse proxy
This refactors the e2e test in a couple ways:
- remove setting cookie in localStorage (instead we pass --auth none)
- refactor address() method to account for reverse proxy logic
* Update test/e2e/models/CodeServer.ts
* Update test/playwright.config.ts
* Update test/utils/constants.ts
Co-authored-by: Asher <ash@coder.com>
* Update test/utils/helpers.ts
Co-authored-by: Asher <ash@coder.com>
Co-authored-by: Asher <ash@coder.com>
* Include bin scripts for all platforms
These will get symlinked as part of the postinstall. These scripts
provide everything ours does inside the integrated terminal plus more.
* Improve OS detection
Specifically for Windows although we do not yet support Windows.
Also standardize the duplicate arch functions since they had drifted
from each other bit.
* Remove duplicate asar symlink
Since standalone releases run the postinstall they will get the asar
symlink there. That means the symlink will not exist for the npm
package and we will not need to ignore it.
The symlink portion is split out so it can be re-used for other
symlinks (for example linking bin scripts).
* Add symlinks to bin scripts
* Add test for opening a file from the terminal
* Add global Playwright timeout
Otherwise it will exceed the Actions timeout and get rudely killed
without any output.
* Make sed work on macOS
* Fix Node path in bin scripts
* Disable shellcheck expansion error
* Make scripts executable
* Remove .bak files created by sed
* Include Code build script in cache hash
Otherwise if we change the script it will not rebuild Code.
* Make sure the terminal opens
The selector was timing out even though it matched more than one element
but matching on the focused one appears to work.
In addition add a loop so it can keep trying to open the terminal
if something goes wrong with the focus.
* chore(release): bump version to 4.5.1
* chore: bump helm chart
* chore: update CHANGELOG
* Revert "chore: bump helm chart"
This reverts commit 703b03b665.
* chore: bump helm chart to 3.0.0
* revert: remove bad change to manifes.json icon
* fix(ci): add package.json.version to code cachekey
Before this, creating a release sometimes prevented vscode from
rebuilding and using the cache instead. Now we use the
package.json.version in the cache key to "bust" the cache if the
package.json version is updated (aka a release).
Fixes#5316
* Update .github/workflows/ci.yaml
Co-authored-by: Asher <ash@coder.com>
* fixup: formatting
* Revert "refactor: remove version check e2e test"
This reverts commit b23c398b7d.
Co-authored-by: Asher <ash@coder.com>
Having NODE_OPTIONS set is unexpected and although the later flag should
override the previous flag it is not certain that will always be the
case.
Also some users are having issues with the 2 GB limit.
We were using an overrides command in our `.prettierrc.yaml` which
quickly became out of sync with Code's Prettier styles.
Instead, we simply tell Prettier to ignore `lib/vscode`.
This way, if you have `formatOnSave` on and you save inside
`lib/vscode`, you won't convert the file to use code-server's styles.
When using `window.location.origin` to create a new URL for loading
web packages, it constructs a URL that is not relative, leading to the
terminal breaking when code-server is served not via the root (i.e. /ide
instead of /).