* feat(ci): add lint-actions step to build.yaml
This adds a new job to the Build CI pipeline to lint our GitHub Actions.
By doing this, we can prevent typos from slipping in.
Fixes#5776
* fix: disable shellcheck in actionlint
I don't think we want to enable this for now.
* fix: ignore set-output warnings for now
It's deprecated but there isn't a reason to move away from using it yet.
* chore: update renovate.json ignoreDeps
ansi-regex, env-paths and limiter all switch to ESM which we can't
support at the moment so ignore updates for now.
* chore: update actions/cache@v3
* chore: update minor deps
* chore: add pretteir to renovate.json
* chore: upgrade Code to 1.74.1
* chore: remove require in integration.diff
I don't know what the impact of this is but in 192c67db71
they removed the usage of `require` in `server.main.ts`.
More details in PR: https://github.com/microsoft/vscode/pull/165831
* chore: update marketplace.diff
* chore: update sha hash in webview.diff
* chore: update disable-builtin-ext-update.diff
If my logic is right, then this patch is now simplified thanks to this:
https://github.com/microsoft/vscode/blob/1.74.1/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts#L1238
* chore: refresh proxy-uri patch
* chore: refresh local-storage.diff
* chore: refresh sourcemaps.diff
* chore: refresh disable-downloads.diff
* chore: refresh display-language.diff
* chore: refresh getting-started.diff
* docs: update testing notes for cli-window-open
* docs: update telemetry testing instructions
* fix: add GITHUB_TOKEN to build code-server job
Downloading @vscode/ripgrep is failing only in CI so adding this
environment variable to see if it increases the rate limit.
Ref: https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
* refactor: use own cache key build code-server job
* temp: disable vscode test
* refactor: delete wrapper test
* Revert "refactor: delete wrapper test"
This reverts commit 3999279b73.
* refactor: move vscode tests to e2e (#5911)
* wip: migrate vscode tests to e2e
* feat: add codeWorkspace to global setup
* refactor: only use dir in spawn when we should
* wip: migrate more tests
* refactor: move all vscode tests to e2e
* refactor(ci): move unit to own job
* fixup: add codecov to unit test step
* Update test/e2e/models/CodeServer.ts
* Update test/e2e/models/CodeServer.ts
* docs: add note about intercept requests
* refactor: rm unused clean() calls
* refactor: delete duplicate test
* refactor: update 'should not redirect' test
* refactor: rm unused imports
* refactor: rm unnecessary navigate call in test
* fixup: formatting
* wip: update test
* refactor: modify assertion for proxy
* fixup: use REVERSE_PROXY_BASE_PATH
* refactor: add helper fn getMaybeProxiedPathname
* fixup: formatting
* fixup: rm unused import
* chore: increase playwright timeout
* Revert "chore: increase playwright timeout"
This reverts commit a059129252.
* chore: rm timeout
* refactor: remove keytar dep in cross-compile
* refactor: try other keytar package
* refactor: remove keytar step in cross-compile
* fix: manually remove keytar
* try this first
* I think this is it
* Revert "I think this is it"
This reverts commit 5c566b0c01.
* okay this is it
* fixup
* try legacy peer
* remove keytar before standalone
* wrong path
* maybe
* revert: change *npm* back to npm*
* revert: don't uninstall keytar
* fix: use npm run standalone-release
* fixup formatting
* Revert "refactor: remove yarn.lock steps (#5850)"
This reverts commit 907747d394.
* fixup: remove the --exclude
* refactor: remove yarn.lock check
* try ddd in postinstall
* refactor: cache before release:standalone
* refactor: add os to cache key in release
* chore: formatting
* Update ci/build/npm-postinstall.sh
* fixup: formatting
* refactor: remove keytar dep in cross-compile
* refactor: try other keytar package
* refactor: remove keytar step in cross-compile
* fix: manually remove keytar
* try this first
* I think this is it
* Revert "I think this is it"
This reverts commit 5c566b0c01.
* okay this is it
* fixup
* try legacy peer
* remove keytar before standalone
* wrong path
* maybe
* revert: change *npm* back to npm*
* revert: don't uninstall keytar
* fix: use npm run standalone-release
* fixup formatting
* Revert "refactor: remove yarn.lock steps (#5850)"
This reverts commit 907747d394.
* fixup: remove the --exclude
* refactor: remove yarn.lock check
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
When I did the last release, `VERSION` wasn't defined which lead to a
blank string in the PR title and the commit message here:
https://github.com/coder/code-server-aur/pull/24
This should fix that.
* 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>
* refactor: get version dynamically
* chore: remove version
* fixup: missing quotes
* refactor: drop global VERSION
* wip: updating ersion in publish
* refactor: update publish.yaml with version changes
* refactor: release.yaml with new version changes
* refactor: update build.yaml with version changes
* chore: update maintainer
* fixup: update version in build-vscode
* fixup: fix github env version
* try macos only
* try again
* last resort
* joe again
* this oneee
* fixup: this should work
* try using inputs
* docs: update release notes
* fixup!: use env.VERSION in docker step
* fixup!: comment get and set version
* fixup!: remove compress release package comment
* fixup!: use $VERSION in npm-version
* refactor: set VERSION in build VS Code step
* refactor: use 0.0.0 in package.json version
* refactor: delete release-prep script
* Update ci/build/build-vscode.sh
* fixup!: remove extra VERSION set in aur
* 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
* docs: add toc to CODE OF CONDUCT
* chore: add prettier ignore blocks to docs
* chore: update styles for Dockerfile
* refactor: separate prettier, doctoc
This does a couple things:
- update `.prettierignore`
- split `prettier` and `doctoc` commands. you can still run with `yarn
fmt`
- delete `fmt.sh` and add `doctoc.sh`
By doing so, we can run tasks in parallel in CI and we should also have
less false positives than before with `yarn fmt` locally.
* refactor: update prettier job, add doctoc
This modifies the prettier job to use actionsx/prettier. It also adds a
job for `doctoc`.
* chore: upgrade to prettier 2.7.1
* chore: pin doctoc to 2.0.0
* fixup!: add .pc to prettierignore
* feat: add --cache to prettier cmd
* 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
* chore: update upstream code
* update patches for vs 1.71.0
the cli fix seems to be fixed in upstream, the telemtry patch requires (again) some fixing and adjustments.
* add safari fix.
* increase ci timeout
Co-authored-by: Joe Previte <jjprevite@gmail.com>
This adds a new job called aur which checkouts code-server-aur, updates
the files with the new version then opens a PR into the repo.
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>
* refactor: switch to codecov-uploader GitHub Action
codecov deprecated their Node wrapper for uploading coverage reports.
This removes that and uses their new uploaded along with the v2 GitHub
Action they maintain.
* fix: update broken integration 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>
* fix: install nfpm straight from GitHub
install.goreleaser.com appears to no longer be available.
* Add -f to curl commands
This might have made it so we got the right error rather than erroring
on the envsubst step.
* 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
* 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.
* 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
* 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.