Skip to content

refactor: remove folder/workspace from vsCodeCliArgs #4932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Mar 2, 2022

Conversation

jsjoeio
Copy link
Contributor

@jsjoeio jsjoeio commented Mar 1, 2022

Since we handle this in the vscode.ts route, we no longer need to pass it to VS
Code as a CLI arg since it's deprecated on that side.

This adds logic to our vscode route handler to handle both folder and workspace paths passed in via the CLI

Fixes an issue related to coder/vscode#45

Blocked by coder/vscode#49

@jsjoeio jsjoeio temporarily deployed to CI March 1, 2022 22:00 Inactive
@github-actions
Copy link

github-actions bot commented Mar 1, 2022

✨ Coder.com for PR #4932 deployed! It will be updated on every commit.

@jsjoeio jsjoeio force-pushed the jsjoeio/fix-folder-workspace-cli-args branch from aa44e6c to 6be88d7 Compare March 1, 2022 23:22
@jsjoeio jsjoeio mentioned this pull request Mar 1, 2022
28 tasks
@jsjoeio jsjoeio force-pushed the jsjoeio/fix-folder-workspace-cli-args branch from 6be88d7 to c2ecce1 Compare March 1, 2022 23:29
@jsjoeio jsjoeio temporarily deployed to CI March 1, 2022 23:29 Inactive
@jsjoeio jsjoeio self-assigned this Mar 1, 2022
@jsjoeio jsjoeio modified the milestones: 4.0.3, March 2022 Mar 1, 2022
@jsjoeio jsjoeio marked this pull request as ready for review March 1, 2022 23:30
@jsjoeio jsjoeio requested a review from a team March 1, 2022 23:30
Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A much cleaner paradigm!

@jsjoeio jsjoeio temporarily deployed to CI March 2, 2022 20:20 Inactive
@jsjoeio jsjoeio temporarily deployed to CI March 2, 2022 21:06 Inactive
@jsjoeio jsjoeio temporarily deployed to CI March 2, 2022 21:20 Inactive
@jsjoeio
Copy link
Contributor Author

jsjoeio commented Mar 2, 2022

Argh, this won't pass CI until I remove those args in the VS Code side, merge and then update here.

@jsjoeio jsjoeio force-pushed the jsjoeio/fix-folder-workspace-cli-args branch from 1cd9aa8 to 4ffd923 Compare March 2, 2022 21:49
@jsjoeio jsjoeio temporarily deployed to CI March 2, 2022 21:59 Inactive
Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great refactor!

@jsjoeio jsjoeio temporarily deployed to npm March 2, 2022 22:16 Inactive
@codecov
Copy link

codecov bot commented Mar 2, 2022

Codecov Report

Merging #4932 (8162fba) into main (0e78a14) will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4932      +/-   ##
==========================================
+ Coverage   70.16%   70.29%   +0.13%     
==========================================
  Files          29       29              
  Lines        1666     1670       +4     
  Branches      369      369              
==========================================
+ Hits         1169     1174       +5     
+ Misses        423      422       -1     
  Partials       74       74              
Impacted Files Coverage Δ
src/node/cli.ts 84.29% <100.00%> (-0.53%) ⬇️
src/node/routes/vscode.ts 83.54% <100.00%> (+3.24%) ⬆️
src/node/http.ts 70.40% <0.00%> (+1.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b018112...8162fba. Read the comment docs.

@jsjoeio jsjoeio merged commit 78658f1 into main Mar 2, 2022
@jsjoeio jsjoeio deleted the jsjoeio/fix-folder-workspace-cli-args branch March 2, 2022 22:36
@jsjoeio jsjoeio modified the milestones: March 2022, 4.0.3 Mar 3, 2022
TinLe pushed a commit to TinLe/code-server that referenced this pull request Apr 23, 2022
* refactor: remove folder/workspace from vsCodeCliArgs

Since we handle this in the vscode.ts route, we no longer need to pass it to VS
Code as a CLI arg since it's deprecated on that side.

* feat(vscode): redirect to folder from cli

* Update src/node/routes/vscode.ts

Co-authored-by: Asher <[email protected]>

* fixup!: update _: type

* fixup!: move vars to lower if block

* fixup!: share redirect block

* fixup!: mmove req.query.ew block into if

* fixup!: refactor vscode tests

* refactor: make vscode.ts logic easier to read

* fixup!: fix broken tests and clean up logic

* chore: upgrade vscode version

* fixup!: delete unnecessary if closed block

* Update src/node/routes/vscode.ts

Co-authored-by: Asher <[email protected]>

* fixup!: rename to FOLDER_OR_WORKSPACE_WAS_CLOSED

Co-authored-by: Asher <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants