* 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
The tilde is ambiguous and it can be helpful to know exactly what paths
code-server is trying to use, especially if it is running as a different
user than you expected.
* Avoid spawning code-server with --reuse-window and --new-window
These flags mean the user explicitly wants to open in an existing
instance so if the socket is down it should error rather than try to
spawn code-server normally.
* Set session socket into environment variable
While I was at it I added a CLI flag to override the default. I also
swapped the default to --user-data-dir.
The value is set on an environment variable so it can be used by the
extension host similar to VSCODE_IPC_HOOK_CLI.
* Add e2e test for opening files externally
The indented logs technically apply to the HTTP server so move the
session server log afterward to avoid making them look like they apply
to the session server.
Extracted host detection into a separate function to avoid multiple log
lines on each return and went with a thrown error to consolidate the
common log text.
* Move splitOnFirstEquals to util
I will be making use of this to parse the forwarded header.
* Type splitOnFirstEquals with two items
Also add some test cases.
* Check origin header on web sockets
* Update changelog with origin check
* Fix web sockets not closing with error code
This does not seem to actually cause an issue (not resolving ends up
with the same behavior as resolving with false) but I am not sure if the
hanging promises would be a memory leak so seems best to fix.
* feat: add i18n in login page
* fix: add word space and put the app name into the title
* fix: remove duplicate replace title
* fix: prettier format code
* fix: fix typescript check warning
* fix: add zh-cn locale file code owner
* fix: use existing flag locale to the login page
Co-authored-by: Joe Previte <jjprevite@gmail.com>
* wip: changelog
* fixup
* fix: add +x to product.json in build-vscode
While testing a pre-release, there seems to be a bug with the file
permissions for `product.json`. Adding `chmod +x` to see if that fixes
it.
* chore: increase timeout
* fix: keep product.json file permissions in release
When we added the change to modify the `package.json` version using `mv`
and `jq` we didn't account for lost file permissions.
This caused a bug only happening in CI.
This should fix it by giving it 755 via `chmod`.
* trigger ci
* chore: update package.json bust cache
* fixup!: fix: keep product.json file permissions in release
* Revert "fix: add +x to product.json in build-vscode"
This reverts commit fc4d2b532f.
* chore: pin ubuntu runner in build code-server
* chore: update prettierignore
* chore: add notes to changelog
* chore: use ubuntu-22.04 for e2e
* chore: pin all jobs in build to ubuntu 20.04
* feat(wrapper): add tests for isChild
* fixup: include description ts-expect-error comment
* chore: update CHANGELOG
* chore: update Helm chart
* fixup: use our childProcess
* Update CHANGELOG.md
Co-authored-by: Asher <ash@coder.com>
Co-authored-by: Asher <ash@coder.com>
* chore: upgrade Code to 1.73.0
This upgrades Code to 1.73.0 via the tag.
* chore: refresh integration patch
* chore: clean up base-path patch
Only change here was they moved
lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
so I had to update it. Code still looks the same though.
* chore: refresh proposed-api patch
* chore: update marketplace patch
Simlar to a previous patch, the location of
lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
changed so I had to update this patch.
No changes to code itself.
* chore: update hash in webview patch
I believe there was only one to update but I may have missed one.
* chore: refresh disable-builtin-ext-update.diff
* chore: refresh update-check
quilt couldn't apply it so I had to add one change in manually to
lib/vscode/src/vs/server/node/serverEnvironmentService.ts
* chore: refresh logout patch
* chore: refresh proxy-uri patch
* chore: refresh local-storage patch
* chore: refresh sourcemaps patch
* chore: refresh disable-downloads patch
* chore: refresh telemetry patch
* refactor: re-apply display-language patch
This kinda got removed but I added it back in.
* refactor: drop exec-argv patch
This was accepted upstream! :tada
* chore: refresh getting-started patch
* fixup: add missing slash in marketplace
* fixup: update notes proposed-api patch
* fixup: support this.args.log as string
Seems like upstream now uses a string[] for this. For now, support
string.
See
2b50ab06b1
* Revert "fixup: support this.args.log as string"
This reverts commit 78c02a1f13.
* fixup!: add log to toCodeArgs
This was changed upstream from `string` to `string[]` so now we convert
to an array in `toCodeArgs`.
See 78c02a1f13
* fixup: update telemetry description
* Improve getting started Coder CTA
This wasn't very standout-ish before, and I think it's
wise for us to experiment with directing users to Coder.
* Update nix flake
* Update diff
* Add advert to code-server install
* Fix patch to reset columns if getting started is disabled
* Update text for advert
* chore: bump version to 4.8.2
* chore: update CHANGELOG
* docs: add back line in publishing release
See https://github.com/coder/code-server/pull/5732#discussion_r1010685933
* Revert "chore: bump version to 4.8.2"
This reverts commit 5d70994f22.
* fixup: use 4.8.2-rc.1
* docs: add release candidate notes
* refactor: warn plugin range incompatibble
* chore: bump version 4.8.2
* feat: add getting-started patch
This modifies the text on the Getting Started page to promote
coder/coder.
* feat: add --disable-getting-started-override
This adds a new CLI flag to code-server called
`--disable-getting-started` which will be used in Code to not use
Coder's custom Getting Started text.
* refactor: conditionally show coder getting started
This modifies the getting started patch changes to work with the new
`--disable-getting-started-override`.
The flag is false by default meaning the Coder getting started is shown.
By passing the flag to code-server, it will not be shown.
* docs: update faq for getting started override
* docs: update getting-started patch description
* fixup!: update patch
* fixup!: unit test
* feat: add more tests
* fixup!: use correct env var in tests
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
* add customization options for the login page
* add unit tests
* add test for correct welcome text when none is set but app-name is
Signed-off-by: niwla23 <46248939+niwla23@users.noreply.github.com>
* add test for no app-name set and check in title too
Signed-off-by: niwla23 <46248939+niwla23@users.noreply.github.com>
Signed-off-by: niwla23 <46248939+niwla23@users.noreply.github.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
* docs: update MAINTAINING
* refactor: use branch name in release-prep
This makes a minor improvement to the `release-prep.sh` script to grab
the version to update to from the branch name.
* chore(release): bump version to 4.7.0
* fixup: bump version
* docs: use latest instead of version
* fixup: bump Chart version
* chore: update CHANGELOG
* chore: add license to test package.json
* chore: bump @coder/logging to 3.0.0
* fix: change level to Warn
* Use fork instead of spawn
We no longer do in-place updating so no need for the spawn. The
advantage of a fork is that it preserves flags like --prof which you can
use to profile code-server.
Also I am not sure the comment about not being able to reload in place
with fork was even true to begin with.
* Refresh heartbeat patch
Seems to have gotten out of date a little.
* Propagate execArgv to extension host
This will let us profile the extension host.
`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>
* 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>