* Stop generating shrinkwraps npm 12 removes support for shrinkwraps. Additionally, VS Code has switched to pnpm and this will make generating the shrinkwraps less straightforward. Exact pins in the package.json would not be a sufficient replacement since that does not cover transitive dependencies. The recommendation for end user packages installed globally with npm seems to be to be to bundle dependencies. One idea would be to build for every platform and bundle them all, but the whole reason we have the npm package is to support platforms for which we are not building. If we build them, we could just add a regular release for that platform on GitHub. So instead for each native module we would need to add rebuild commands in the postinstall. And ideally remove the current platform builds to at least try keeping the tarball size down. I am not sure it is worth the effort for what it feels like fighting with npm, so this change does not attempt that. * Remove devDependencies from extensions package.json Not strictly necessary since we only install production dependencies in the postinstall, but might as well save some bytes. * Update Code to 1.146.0 * Support pnpm for post-install * Get Node version from package.json lib/vscode/remote/.npmrc no longer exists * Switch to pnpm VS Code recently switched to pnpm so various scripts needed to be updated, and we might as well follow suite with code-server's own dependencies. In general this change just swaps out "npm" invocations for "pnpm" plus any necessary flag changes to match but to call out some less obvious changes: 1. The extensions directory no longer has a post-install script, so there is no need to copy one anymore. 2. When merging the remote package.json, only copy the dependencies since that is all we need, to avoid copying in new properties like packageManager. 3. Remove unused publish:npm. It points to a nonexistent file anyway. 4. Remove publish:docker and just call the script directly, to avoid an npm/pnpm dependency in a job that really has no need for it. * Update nfpm maintainer
5.1 KiB
Maintaining
We keep code-server up to date with VS Code releases (there are usually two or three a month) but we are not generally actively developing code-server aside from fixing regressions.
Most of the work is keeping on top of issues and discussions.
Releasing
A release takes two people: one starts it, and a member of
code-server-release-team other than that person approves it. Nobody pushes a
tag or edits a draft release: the release workflow creates the tag and publishes
the release itself, once it is approved, and releases cannot be changed after
that.
- Check that the changelog lists all the important changes. The release notes
are the changelog's
Unreleasedsection at the released commit, so get them right in a PR before releasing. - Make sure the changelog entry lists the current version of VS Code.
- Start the release, either way:
- Merge the
update/<VS Code version>PR. Merging it starts the Release workflow on the merge commit. - Or go to GitHub Actions > Release > Run workflow on
main, with the version and the full SHA of the commit onmainto release. For the version we match VS Code's minor and patch version. The patch number may become temporarily out of sync if we need to put out a patch, but if we make our own minor change then we will not release it until the next minor VS Code release.
- Merge the
- CI builds the NPM package and the platform-specific packages from that commit, and attests each file's provenance.
- A member of
code-server-release-teamother than the person who started the release reviews the run and approves therelease-approvaldeployment. - The workflow then tags the commit and publishes the release with the built files. Publishing starts the publish workflow (npm, Docker Hub, GHCR and the AUR PR). It checks that the release came from the release workflow, and every file's attestation, before it publishes anything.
- Update the changelog with the release date and bump the Helm chart version once the Docker images have published.
- Merge the PR submitted to coder/code-server-aur repo.
Release Candidates
We prefer to do release candidates so the community can test things before a full-blown release. To do this follow the same steps as above but:
- Run the Release workflow by hand with a
-rc.<number>suffix on the version and "pre-release" checked. CI will not publish pre-releases to npm, Docker or the AUR. - Do not update the chart version or merge in the changelog until the final release.
AUR
We publish to AUR as a package here. This process is manual and can be done by following the steps in this repo.
Docker
We publish code-server as a Docker image here, tagging it both with the version and latest.
This is currently automated with the release process.
nixpkgs
We publish code-server in nixpkgs but it must be updated manually.
npm
We publish code-server as a npm package here.
This is currently automated with the release process.
Testing
Our testing structure is laid out under our Contributing docs.
If you're ever looking to add more tests, here are a few ways to get started:
- run
pnpm run test:unitand look at the coverage chart. You'll see all the uncovered lines. This is a good place to start. - look at
test/scriptsto see which scripts are tested. We can always use more tests there. - look at
test/e2e. We can always use more end-to-end tests.
Otherwise, talk to a current maintainer and ask which part of the codebase is lacking most when it comes to tests.
Documentation
Troubleshooting
Our docs are hosted on Vercel. Vercel only shows logs in realtime, which means you need to have the logs open in one tab and reproduce your error in another tab. Since our logs are private to Coder the organization, you can only follow these steps if you're a Coder employee. Ask a maintainer for help if you need it.
Taking a real scenario, let's say you wanted to troubleshoot this docs change. Here is how you would do it:
- Go to https://vercel.com/codercom/codercom
- Click "View Function Logs"
- In a separate tab, open the preview link from github-actions-bot
- Now look at the function logs and see if there are errors in the logs