* fix: use * for test plugin engines
This removes the need to update this version with every version change.
* refactor: use npm-package in release assets
This adds a new job to `release.yaml` to upload the `npm-package` to the
release assets which will also allow us to download it in the
`publish.yaml` workflow.
* docs: update release instructions
* fixup!: use package.tar.gz
* fix: use * for test plugin engines
This removes the need to update this version with every version change.
* refactor: use npm-package in release assets
This adds a new job to `release.yaml` to upload the `npm-package` to the
release assets which will also allow us to download it in the
`publish.yaml` workflow.
* docs: update release instructions
* 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>
* refactor: remove stylelint
* refactor: move shellcheck to separate job
* refactor: add helm script and job
* refactor: add eslint job and yarn script
* fix(test/tsconfig): exclude test-plugin
* refactor: delete lint, add typecheck job
* refactor: remove prebuild
* wip: add notes about unit test refactor
* refactor: delete buggy socket test
This test was really added to in get cover specific lines but it's buggy
and only passes sometimes locally. I think it's okay to remove because:
- it's an implementation detail (not user facing)
- not preventing any specific regressions
* refactor: move test-plugin to integration suite
This seems more appropriate given this tests how a plugin might work
within code-server.
* wip
* wip: refactor vscode integration tests
* refactor: move unit tests to separate job
* fix: formatting
* Revert "wip: refactor vscode integration tests"
This reverts commit 13286bf4c9.
* Revert "refactor: move unit tests to separate job"
This reverts commit 6c87b540b4.
* feat: collect codecov integration tests
* fixup! feat: collect codecov integration tests
* fixup! feat: collect codecov integration tests
* fixup!: move helm step
* fixup!: update ids for caching
* trigger ci
* trigger ci
* chore: clean up names in security.yaml
* fixup!: remove .tsx
* fixup!: change to src/**"
* fixup!: move helm cmd to yaml
* fixup!: always build test plugin
* fixup!: fix plugin typings
* fixup! add back flakey test
* fixup!: only install helm deps if changes
* fixup!: revert node mod caching
* dont keep, test for asher
* fixup!: add make to centos
* refactor: add test:native
This adds a new script to run native tests (i.e. --help which should run
in ci on all platforms).
* try updating glibc
* try 2.25
* Revert "refactor: move test-plugin to integration suite"
This reverts commit bc02005dc0.
I couldn't get past some GLIBC errors in CI so moving back to unit
tests.
* Revert "try updating glibc"
This reverts commit 02ed560f22.
* fixup!
* asher: again
* try this for ts changes
* fixup
* refactor: scripts.yml -> scripts.yaml
* fixup!: move lint-sh to scripts.yaml
* fixup!: use apk for lint scripts
* fixup! fixup!: use apk for lint scripts
* fixup!: remove typecheck step
* fix: pattern for lint ts files
* test: lint should fail
* fixup! fixup!: use apk for lint scripts
* Revert "test: lint should fail"
This reverts commit 158c64db04.
* fixup!: skip cancel workflow on forks
Looks like the cancel action workflow can't run on forks due to secrets.
See https://github.com/andymckay/cancel-action/issues/4
* fixup: remove cancel-workflow
* fixup! fixup! fixup!: use apk for lint scripts
* fixup! fixup! fixup!: use apk for lint scripts
* fixup!: fix yarn key
* fixup!: add fetch-depth 0
* 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
* 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>
* chore: update Code to 1.67
Was able to remove our changes to common/webview.ts since they are
upstream now.
Other than that no serious changes, just context diffs.
* chore: update Code to 1.68
- Upstream moved the web socket endpoint so change the Express route
from / to *. That will let web sockets work at any endpoint.
- Everything in the workbench config is basically the same but
de-indented (upstream extracted it into a separate object which
resulted in a de-indent), the ordering is slightly different, and
instead of vscodeBase we now need vscodeBase + this._staticRoute since
everything is served from a sub-path now.
- Move manifest link back to the root since that is where we host our
manifest.
- Change RemoteAuthoritiesImpl to use the same path building method as
in other places (+ instead of using URI.parse/join).
- Use existing host/port in RemoteAuthoritiesImpl and
BrowserSocketFactory instead of patching them to use window.location
(these are set from window.location to begin with so it should be the
same result but with less patching).
- Since BrowserSocketFactory includes a sub-path now (endpoints were
changed upstream to serve from /quality/commit instead of from the
root) the patch there has changed to prepend the base to that
path (instead of using the base directly).
- The workbench HTML now natively supports a base URL in the form of
WORKBENCH_WEB_BASE_URL so no need for VS_BASE patches there anymore.
- Upstream added type="image/x-icon" so I did as well.
- Move the language patch to the end of the series so it is easier to
eventually remove.
- Remove the existing NLS config in favor of one that supports
extensions.
- Upstream deleted webview main.js and inlined it into the HTML so move
that code (the parent origin check) into both those HTML files
(index.html and index-no-csp.html).
- The remaining diff is from changes to the surrounding context or a
line was changed slightly by upstream (for example renamed files or
new arguments like to the remote authority resolver).
* fix: modify product.json before building
Code injects this into the client during the build process so it needs
to be updated before we build.
* fix: update inline script nonces
* Update HTML base path test
* fix: missing commit
Code overrides it with nothing.
The date is also already injected.
* fix: web extensions breaking when the commit changes
By just using the marketplace directly instead of going through the
backend. I am not sure what the point is when searching extensions
already goes directly to the marketplace anyway.
But also remove the prefix that breaks this as well because otherwise
existing installations will break.
* refactor: fix type annotations in open
There was no clear reason as to why we needed to use type assertions
when initializing both `args` and `options` in `open` so I refactored
them both.
* refactor: create constructOpenOptions
* refactor: add urlSearch and remove options
* feat: add tests for constructOpenOptions
* feat: set up new test for beat twice
* refactor: make Heart.beat() async
This allows us to properly await heart.beat() in our tests and remove
the HACK I added before.
* refactor: bind heart methods .beat and .alive
This allows the functions to maintain access to the Heart instance (or
`this`) even when they are passed to other functions. We do this because
we pass both `isActive` and `beat` to `heartbeatTimer`.
* feat(heart): add test to ensure no warnings called
* fixup!: revert setTimeout for heartbeatTimer
* fixup!: return promise in beat
* chore: upgrade Code to 1.66
* docs: update docs for Code upgrades
* fixup!: docs
* chore: update vscode submodule
* chore: update integration patch
* chore: update node-version patch
* chore: update github-auth patch
They completely changed how auth is handled for GitHub in
https://github.com/microsoft/vscode/pull/145424 so our patch may not
work. Will need to test and revisit.
* refactor: remove postinstall patch
It appears they renamed postinstall.js to postinstall.mjs and removed
the use of `rimraf` which means our patch is no longer needed! 🎉b0e8554cce
* chore: refresh local-storage patch
* chore: refresh service-worker patch
* chore: bulk refresh patches
* fixup!: docs formatting
* refactor: remove unused last-opened patch
* fixup!: formatting docs
* fixup!: formatting docs
* refactor: remove rsync postinstall
* Revert "refactor: remove rsync postinstall"
This reverts commit 8d6b613e9d.
* refactor: update postinstall.js to .mjs
* feat(patches): add parent-origin bypass
* docs(patches): add notes for testing store-socket
* docs(patches): update testing info for node-version
* refactor(patches): delete github-auth.diff patch
* docs(patches): add notes for testing connection-type
* fixup!: delete github-auth patch
* fixup!: update connection type testing
* docs(patches): add notes to insecure-notification.diff
* docs(patches): add nots for update-check.diff
* fixup!: remove comma in integration patch
* fix(e2e): disable workspace trust
* refactor: add --no-default-rc for yarn install
* feat(patches): remove yarnrc in presinstall
* fixup!: silly mistake
* docs: add note about KEEP_MODULES=1
* docs(patches): add testing notes for node-version
* refactor(patches): remove node-version
It appears this is no longer needed due to the `remote/package.json` now which
targets node rather than electron.
* fixup!: add cd ../.. to code upgrade instructions
* fixup!: add note to yarn --production flag
* fixup!: make parent-origin easier to upstream
* Revert "refactor(patches): delete github-auth.diff patch"
This reverts commit 31a354a343.
* Revert "fixup!: delete github-auth patch"
This reverts commit bdeb5212e8.
* Merge webview origin patch into webview patch
* Remove unused post-install patch
* Prevent builtin extensions from updating
* Refresh sourcemaps patch
* Update Node to v16
This matches the version in ./lib/vscode/remote/.yarnrc.
I changed the engine to exactly 16 since if you use any different
version it will just not work since the modules will have been built for
16 (due to the .yarnrc).
* Replace fs.rmdir with fs.rm
Node is showing a deprecation warning about it.
* Update github-auth patch
The local credentials provider is no longer used when there is a remote
so this code moved into the backend web credential provider.
* Prevent fs.rm from erroring about non-existent files
We were using fs.rmdir which presumably did not have the same behavior
in v14 (in v16 fs.rmdir also errors).
* Install Python 3 in CentOS CI container
Co-authored-by: Asher <ash@coder.com>
After some feedback, we realized it is more intuitive to disable file
downloads by setting the environment variable
`CS_DISABLE_FILE_DOWNLOADS` to `true` than `1`. This commit adds support
for both.
* refactor: add timeout for race condition in heart test
* fixup!: set mtime to 0 and check for update
* fixup!: use utimes directly instead of file open
* fixup!: remove import
* refactor(heart): extract logic into heartbeatTimer fn
To make it easier to test, I extract heartbeatTimer into it's own
function.
* feat(testing): add tests for heart.ts
* fixup
* fixup!: remove unneeded heart call
* Update src/node/heart.ts
Co-authored-by: Asher <ash@coder.com>
* fixup!: use mockResolvedValue everywhere
* fixup!: add stat test for timestamp check
Co-authored-by: Asher <ash@coder.com>
* Move integration types into code-server
This will be easier to maintain than to have it as a patch.
* Disable connection token
Using a flag means we will not need to patch it out. I think this is
new from 1.64?
* Add product.json to build process
This way we do not have to patch it.
* Ship with remote agent package.json
Instead of the root one. This contains fewer dependencies.
* Let Code handle errors
This way we will not have to patch Code to make this work and I think it
makes sense to let Code handle the request.
If we do want to handle errors we can do it cleanly by patching their
error handler to throw instead.
* Move manifest override into code-server
This way we will not have to patch it.
* Move to patches
- Switch submodule to track upstream
- Add quilt to the process
- Add patches
The node-* ignore was ignoring one of the diffs so I removed it. This
was added when we were curling Node as node-v{version}-darwin-x64 for
the macOS build but this no longer happens (we use the Node action to
install a specific version now so we just use the system-wide Node).
* Use pre-packaged Code
* Move Code to a submodule
Closes#4901.
* Base Code cache on hash and re-enable node_modules cache
The current setup appears to only rebuild VS Code if the dependencies
change but we need to rebuild it if anything changes.
I also re-enabled the commented out node_modules caches. They look like
they should work to me with the submodule method. I think the problem
occurred because Code itself was being installed in the yarn step.
* 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 <ash@coder.com>
* 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 <ash@coder.com>
* fixup!: rename to FOLDER_OR_WORKSPACE_WAS_CLOSED
Co-authored-by: Asher <ash@coder.com>
* feat: github-auth flag
This will allow injecting credentials into code-server if you already
have them.
* Update Code
Contains the GitHub auth changes.
* Add e2e test for GitHub token
Show the bundled version of Code OSS in the text-based output
for --version and --help, in addition to the JSON output
(--version --json)
Closes: #4874
* refactor(http): extract logic into constructRedirectPath
This allows us to easily test our redirect path construction logic where we get
the relative path, the query string and construct a redirect path.
By extracting this from `redirect`, we can easily test this logic in a unit
test.
I did this so we could test some logic where slashes in query strings should be
made human-friendly for users.
* feat(testing): add tests for constructRedirectPath
Co-authored-by: Asher <ash@coder.com>
Introduce helper functions for getting human- and machine-readable
version strings from the constants package, and cover it in unit
tests.
This is a first step to resolving #4874.
* feat: add isAddressInfo helper function
* feat(update): add test for rejection UpdateProvider
* feat: add more tests for UpdateProvider
* fixup! move isAddressInfo, add .address check
* fixup! remove extra writeHead
* fixup! use -1 in redirect logic
* fixup! remove unnecessary String call
* fixup! use /latest for redirect
* fixup! use match group for regex
* fixup!: replace match/split logic
* Update links in package.json
I will try checking the docs too
* docs: Update links in triage.md
* docs: Update links in npm.md
* docs: Update links in whatever files that have `cdr`
* Replace globally, thanks @bpmct!
* fix: coderer instead of coder
I should've used all three toggles in the Search/Replace tab in the GItHub.dev editor.
* Code Formatting
* feat: add logic to publish beta/dev npm
This adds new log to publish the npm package both while working on PRs and when
PRs are merged into main, allowing us to easily test changes in a
production-like setting.
Co-authored-by: Asher <ash@coder.com>
* chore(deps): replace argon2 w/@node-rs/argon2
* refactor: clean up hashPassword functions
* refactor(util): pass in process.platform
* fix: use correct settings for test-extension
Before, it was running into errors with an @types package.
Now, we're correctly running `tsc` so it picks up our `tsconfig.json` and we're
telling TypeScript to not typecheck our lib and exclude `node_modules`