* 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>
* chore(release): bump version to 4.5.0
* chore: update CHANGELOG
* chore: bump chart version
* docs: update MAINTAINING
* fix: add VSCODE_DEV=1 to e2e script
I'm not sure what changed in the latest version but without setting
VSCODE_DEV=1, code-server won't load. This fixes that.
* Revert "fix: add VSCODE_DEV=1 to e2e script"
This reverts commit 58c4826af8.
* fix: try setting VSCODE_DEV=1
* Revert "fix: try setting VSCODE_DEV=1"
This reverts commit 902f5f2f30.
* refactor: remove version check e2e test
I am not sure why this is passing locally and failing CI. I need to
further investigate this since it fails depending on where you test.
* feat: add installExtension integration test
This adds a new helper function called `runCodeServerCommand` along with
a test for `--install-extension`. We can use this approach for writing
integration tests (i.e. testing a real code-server build, CLI commands,
etc).
* refactor: s/ test:standalone with test:integration
This replaces our integration approach to use Jest instead of a single
bash script. By doing this, we will be able to easily maintain and add
to our integration test suite.
* refactor: filter unit tests
Now that our integration tests also use Jest, we need to update our unit
test script to ignore `test/integration`.
* refactor: add SKIP_SUBMODULE_DEPS to postinstall
* refactor: add SKIP_SUBMODULE_DEPS to postinstall
* fixup!: skip submod deps
* refactor: move runCodeServerCommand into sep. file
When Jest runs a test, it loads all the files and imports for that test.
This means you might be "requiring" code that's unrelated to your tests.
This leads to unexpected errors depending on where the code runs.
Moved this file to avoid GLIBC and other errors relaed to argon2 when
running integration tests in CI.
* fizup: formatting
* fizup: increase timeout
* refactor: use fixture in installExtension test
Instead of relying on a network to install an extension, we use a
fixture - vsix file in the repo. This is also faster.
* feat: add integration test for listExtensions
* chore: ignore integration fixtures
* fixup: formatting
* fixup: remove custom-hacks.css
* fixup: formatting
* Update test/integration/installExtension.test.ts
Co-authored-by: Asher <ash@coder.com>
* Update test/integration/listExtensions.test.ts
Co-authored-by: Asher <ash@coder.com>
* Update test/integration/installExtension.test.ts
Co-authored-by: Asher <ash@coder.com>
* Update test/integration/listExtensions.test.ts
Co-authored-by: Asher <ash@coder.com>
* fixup: contributing integration tests section
* fixup: update ci/readme
* fixup: use RELEASE_PATH in test-integration.sh
* refactor: unzip vsix for listExtensions
* refactor: use exec instead of spawn
* Update docs/CONTRIBUTING.md
Co-authored-by: Asher <ash@coder.com>
* Update test/integration/listExtensions.test.ts
Co-authored-by: Asher <ash@coder.com>
* Update test/integration/listExtensions.test.ts
Co-authored-by: Asher <ash@coder.com>
* Update test/integration/listExtensions.test.ts
Co-authored-by: Asher <ash@coder.com>
* refactor: use different default binary path
* fixup!: formatting
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.
* 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>
We tried to switch from `yarn` to `npm` because `yarn` ignores lockfiles
but learned that we missed a few key things.
For now, we are reverting docs and a few other changes that suggested
using `npm` instead of `yarn` until we fully remove `yarn` from the
codebase.
t Please enter the commit message for your changes. Lines starting
* Use --exclude to skip node_modules
Instead of copying and then deleting them. This will also catch some
node_modules directories that were missed.
* Remove per-extension dependency install
Code packages all the dependencies using webpack for each extension so
there are no dependencies to install.
* Include source maps
I also moved this to its own patch because it feels sufficiently
standalone.
Fixes#5026.
* Refresh language patch
The base is slightly different so it needed to be refreshed.
* Add missing package.json
This was caused by switching to Code's package step which does not
include the package.json.
Fixes#5019.
* Include keytar
It seems this actually is used now.
* fix: source lib.sh in docker-buildx-push for tagging version
* chore: use ubuntu and update git config homebrew job
* refactor: simplify brew-bump.sh script
* Revert "fix: source lib.sh in docker-buildx-push for tagging version"
This reverts commit 2f7a3610cb.
* Regenerate last opened patch
The lines were a bit off.
* Remove packaged .gitignore files
Fixes#4964.
* Remove extra Node binary
This gets overidden in the standalone but it was getting uselessly
included in the npm package.
* 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
* refactor: checkout homebrew-core in action instead of script
This moves the git clone step from the `brew-bump.sh` script into the
`npm-brew.yaml` as part of the job using actions/checkout instead.
* refactor: clean up brew-bump.sh script
* fixup
* fixup!: remove step to clean up homebrew repo
* fixup!: use correct ./ci path steps-lib.sh
* fixup!: add exit code 0 for duplicate PRs
* fix(ci): correctly download npm artifact
* fixup! fix(ci): correctly download npm artifact
* docs: update MAINTAINING
* fixup! docs: update MAINTAINING
* fixup! Merge branch 'main' into 4949-chore-fix-npm-workflow
* chore: get ci to run
* refactor: use vVERSION branch name instead of release
* refactor: use new download artifact in docker workflow
* refactor: clean up release-github-assets script
* fixup: remove extra v
* fixup! fixup: remove extra v
* feat(npm): use DEV_PACKAGE_NAME for development
* feat(ci): use npm v7 in npm job
* fixup: add npm version
* fixup: always set package name
* wip
* fix: check for npm and npm v7
* fixup
* fixup: move after release dir created
* fixup: use jq
* fixup: use jq correctly
* 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.
* add support for imagePullSecrets
* Add doc and example value for imagePullSecrets
* simplify syntax for imagePullSecrets
Co-authored-by: Joe Previte <jjprevite@gmail.com>
* feat: refactor npm workflows to use download-artifact
This refactors the npm workflows to use the download-artifact GitHub Action. We
had problems in the past with our download_artifact custom bash function. This
also fixes an issue where we weren't downloading the correct artifacts when
publishing beta and dev tags to npm.
* fixup: remove unused env var
* fixup! add download-artifcat to npm-brew"
* fixup! remove unnecessary code comment
* fixup! move NPM_ENVIRONMENT logic to script
* 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
* Disable BROWSER env var
Right now the browser helper script does not actually work. It seems
safer to skip this until we can fix it.
* Bump to 4.0.2
* Update changelog for 4.0.2
* 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`