Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 33 additions & 26 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
with:
node-version-file: .node-version
cache: npm
cache: pnpm
cache-dependency-path: |
package-lock.json
test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- run: npx prettier --check .
- run: SKIP_SUBMODULE_DEPS=1 pnpm install --frozen-lockfile
- run: pnpm run prettier --check .

doctoc:
name: Doctoc markdown files
Expand All @@ -75,15 +76,16 @@ jobs:
if: needs.changes.outputs.docs == 'true'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
with:
node-version-file: .node-version
cache: npm
cache: pnpm
cache-dependency-path: |
package-lock.json
test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- run: npm run doctoc
- run: SKIP_SUBMODULE_DEPS=1 pnpm install --frozen-lockfile
- run: pnpm run doctoc

lint-helm:
name: Lint Helm chart
Expand All @@ -109,15 +111,16 @@ jobs:
if: needs.changes.outputs.code == 'true' || needs.changes.outputs.ci == 'true' || needs.changes.outputs.npm == 'true'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
with:
node-version-file: .node-version
cache: npm
cache: pnpm
cache-dependency-path: |
package-lock.json
test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- run: npm run lint:ts
- run: SKIP_SUBMODULE_DEPS=1 pnpm install --frozen-lockfile
- run: pnpm run lint:ts

lint-actions:
name: Lint GitHub Actions
Expand All @@ -140,15 +143,16 @@ jobs:
if: needs.changes.outputs.code == 'true' || needs.changes.outputs.npm == 'true'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
with:
node-version-file: .node-version
cache: npm
cache: pnpm
cache-dependency-path: |
package-lock.json
test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- run: npm run test:unit
- run: SKIP_SUBMODULE_DEPS=1 pnpm install --frozen-lockfile
- run: pnpm run test:unit
- uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
if: success()
with:
Expand Down Expand Up @@ -178,10 +182,11 @@ jobs:
with:
submodules: true
- run: quilt push -a
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
with:
node-version-file: .node-version
cache: npm
cache: pnpm
cache-dependency-path: |
package-lock.json
test/package-lock.json
Expand All @@ -205,22 +210,22 @@ jobs:
if: steps.cache-vscode.outputs.cache-hit != 'true'
run: |
cd lib/vscode/build
npm ci
pnpm install --frozen-lockfile
cd ..
source ./build/azure-pipelines/linux/setup-env.sh
# Run preinstall script before root dependencies are installed
# so that v8 headers are patched correctly for native modules.
node build/npm/preinstall.ts
npm ci
pnpm run preinstall
pnpm install --frozen-lockfile
cd ../..
npm run build:vscode
pnpm run build:vscode

# Build the code-server wrapper.
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- run: npm run build
- run: SKIP_SUBMODULE_DEPS=1 pnpm install --frozen-lockfile
- run: pnpm run build

# Push up an artifact containing the linux-x64 release.
- run: KEEP_MODULES=1 npm run release
- run: KEEP_MODULES=1 pnpm run release
- run: tar -czf package.tar.gz release
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
Expand All @@ -237,14 +242,15 @@ jobs:

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
with:
node-version-file: .node-version
cache: npm
cache: pnpm
cache-dependency-path: |
package-lock.json
test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- run: SKIP_SUBMODULE_DEPS=1 pnpm install --frozen-lockfile
- name: Install Playwright OS dependencies
run: |
./test/node_modules/.bin/playwright install-deps
Expand All @@ -255,7 +261,7 @@ jobs:
name: linux-x64-package
- run: tar -xzf package.tar.gz

- run: CODE_SERVER_TEST_ENTRY=./release npm run test:e2e
- run: CODE_SERVER_TEST_ENTRY=./release pnpm run test:e2e
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
if: always()
with:
Expand Down Expand Up @@ -287,14 +293,15 @@ jobs:
tar -xzf caddy_2.5.2_linux_amd64.tar.gz --directory ~/.cache/caddy

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
with:
node-version-file: .node-version
cache: npm
cache: pnpm
cache-dependency-path: |
package-lock.json
test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- run: SKIP_SUBMODULE_DEPS=1 pnpm install --frozen-lockfile
- name: Install Playwright OS dependencies
run: |
./test/node_modules/.bin/playwright install-deps
Expand All @@ -306,7 +313,7 @@ jobs:
- run: tar -xzf package.tar.gz

- run: ~/.cache/caddy/caddy start --config ./ci/Caddyfile
- run: CODE_SERVER_TEST_ENTRY=./release npm run test:e2e:proxy
- run: CODE_SERVER_TEST_ENTRY=./release pnpm run test:e2e:proxy
- run: ~/.cache/caddy/caddy stop --config ./ci/Caddyfile
if: always()
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- run: tar -xzf release-npm-package/package.tar.gz
- run: |
pushd release
npm publish --tag latest --access public
pnpm publish --tag latest --access public

aur:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
fileName: "*.rpm"
out-file-path: "release-packages"

- run: npm run publish:docker
- run: pnpm run publish:docker

repo:
runs-on: ubuntu-latest
Expand Down
57 changes: 31 additions & 26 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
npm_config_arch: ${{ matrix.npm_arch }}
# Ensure native modules are built from source to avoid prebuilds and use
# the correct version of glibc.
# TODO@npm: does this work with pnpm? (and the others below)
npm_config_build_from_source: true
# Gulp target name.
# TODO: Pull from VSCODE_ARCH instead.
Expand Down Expand Up @@ -82,30 +83,31 @@ jobs:
# which requires secrets.
allow-unsafe-pr-checkout: true
- run: quilt push -a
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
with:
node-version-file: .node-version
cache: npm
cache: pnpm
cache-dependency-path: |
package-lock.json
test/package-lock.json

- name: Build
run: |
cd lib/vscode/build
npm ci
pnpm install --frozen-lockfile
cd ..
source ./build/azure-pipelines/linux/setup-env.sh
# Run preinstall script before root dependencies are installed
# so that v8 headers are patched correctly for native modules.
node build/npm/preinstall.ts
pnpm run preinstall
cd ../..
npm ci
npm run build
npm run build:vscode
pnpm install --frozen-lockfile
pnpm run build
pnpm run build:vscode

# Platform-agnostic NPM package.
- run: npm run release
- run: pnpm run release
if: ${{ matrix.vscode_arch == 'x64' }}
- run: tar -czf package.tar.gz release
if: ${{ matrix.vscode_arch == 'x64' }}
Expand All @@ -122,8 +124,8 @@ jobs:
body_path: .cache/release-notes

# Platform-specific release.
- run: KEEP_MODULES=1 npm run release
- run: npm run package
- run: KEEP_MODULES=1 pnpm run release
- run: pnpm run package
- uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
draft: true
Expand Down Expand Up @@ -177,21 +179,22 @@ jobs:
# which requires secrets.
allow-unsafe-pr-checkout: true
- run: quilt push -a
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
with:
node-version-file: .node-version
cache: npm
cache: pnpm
cache-dependency-path: |
package-lock.json
test/package-lock.json

- run: npm ci
- run: npm run build
- run: npm run build:vscode
- run: KEEP_MODULES=1 npm run release
- run: npm run test:native
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- run: pnpm run build:vscode
- run: KEEP_MODULES=1 pnpm run release
- run: pnpm run test:native

- run: npm run package
- run: pnpm run package
- uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
draft: true
Expand Down Expand Up @@ -249,19 +252,21 @@ jobs:
git apply --whitespace=nowarn "patches/$patch"
done < patches/series

- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
with:
node-version-file: .node-version
cache: npm
cache: pnpm
cache-dependency-path: |
package-lock.json
test/package-lock.json

# npm hands every script it runs to cmd, which cannot run the shell
# TODO@npm: does this work with pnpm?
# pnpm hands every script it runs to cmd, which cannot run the shell
# scripts this repository is built out of. Point it at the same bash
# the steps here use rather than at a path, which moves between
# images.
- name: Let npm run shell scripts
- name: Let pnpm run shell scripts
run: echo "npm_config_script_shell=$(cygpath -w "$(command -v bash)")" >> $GITHUB_ENV

# The build merges json by handing jq a process substitution, which
Expand Down Expand Up @@ -310,10 +315,10 @@ jobs:
run: C:\msys64\usr\bin\pacman -Sy --noconfirm --needed rsync

# Only rsync crosses over. Putting msys2's /usr/bin in front instead
# breaks the release step: npm on the path is a shell script whose
# breaks the release step: pnpm on the path is a shell script whose
# shebang reads /usr/bin/env bash, so with msys2 first it is msys2's
# bash that runs it, and crossing into a second msys runtime does not
# carry the environment. npm then sees no script-shell and falls back
# carry the environment. pnpm then sees no script-shell and falls back
# to cmd, which cannot run ./ci/build/build-release.sh, and
# KEEP_MODULES is dropped on the way. A forwarder avoids the whole
# class: rsync is a native exe that loads its runtime from beside
Expand All @@ -326,10 +331,10 @@ jobs:
SHIM
chmod +x "$RUNNER_TEMP/shim/rsync"

- run: npm ci
- run: npm run build
- run: npm run build:vscode
- run: KEEP_MODULES=1 npm run release
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- run: pnpm run build:vscode
- run: KEEP_MODULES=1 pnpm run release

# Of the two tars on this image it is git bash's GNU one that can
# rename the tree's top directory as it archives; the windows bsdtar
Expand All @@ -341,7 +346,7 @@ jobs:
*GNU*) ;;
*) echo "expected GNU tar for --transform, got $(tar --version | head -1)" >&2; exit 1 ;;
esac
npm run package
pnpm run package

- uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
fetch-depth: 0

- name: Install Node.js
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
with:
node-version-file: .node-version

- name: Audit npm for vulnerabilities
run: npm audit
- run: pnpm audit
if: success()

trivy-scan-repo:
Expand Down
4 changes: 2 additions & 2 deletions .tours/start-development.tour
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"file": "package.json",
"line": 31,
"description": "## Commands\n\nTo start developing, make sure you have Node 16+ and the [required dependencies](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites) installed. Then, run the following commands:\n\n1. Install dependencies:\n>> npm\n\n3. Start development mode (and watch for changes):\n>> npm run watch"
"description": "## Commands\n\nTo start developing, make sure you have Node 16+ and the [required dependencies](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites) installed. Then, run the following commands:\n\n1. Install dependencies:\n>> pnpm\n\n3. Start development mode (and watch for changes):\n>> pnpm run watch"
},
{
"file": "src/node/app.ts",
Expand All @@ -20,7 +20,7 @@
{
"file": "src/node/app.ts",
"line": 62,
"description": "## That's it!\n\n\nThat's all there is to it! When this tour ends, your terminal session may stop, but just use `npm run watch` to start developing from here on out!\n\n\nIf you haven't already, be sure to check out these resources:\n- [Tour: Contributing](command:codetour.startTourByTitle?[\"Contributing\"])\n- [Docs: FAQ.md](https://github.com/coder/code-server/blob/main/docs/FAQ.md)\n- [Docs: CONTRIBUTING.md](https://github.com/coder/code-server/blob/main/docs/CONTRIBUTING.md)\n- [Community: GitHub Discussions](https://github.com/coder/code-server/discussions)\n- [Community: Slack](https://community.coder.com)"
"description": "## That's it!\n\n\nThat's all there is to it! When this tour ends, your terminal session may stop, but just use `pnpm run watch` to start developing from here on out!\n\n\nIf you haven't already, be sure to check out these resources:\n- [Tour: Contributing](command:codetour.startTourByTitle?[\"Contributing\"])\n- [Docs: FAQ.md](https://github.com/coder/code-server/blob/main/docs/FAQ.md)\n- [Docs: CONTRIBUTING.md](https://github.com/coder/code-server/blob/main/docs/CONTRIBUTING.md)\n- [Community: GitHub Discussions](https://github.com/coder/code-server/discussions)\n- [Community: Slack](https://community.coder.com)"
}
]
}
Loading
Loading