Skip to content

Commit 071c8e1

Browse files
authored
Merge branch 'main' into jsjoeio/upgrade-vscode-1.54
2 parents 36714da + 6892b0b commit 071c8e1

31 files changed

+232
-390
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

+30-9
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,43 @@ assignees: ""
77
---
88

99
<!--
10-
Please see https://github.com/cdr/code-server/blob/master/docs/FAQ.md#how-do-i-debug-issues-with-code-server
11-
and include any logging information relevant to the issue.
1210
13-
Please search for existing issues before filing.
11+
Hi there! 👋
1412
15-
If you can reproduce the issue on vanilla VS Code,
16-
please file the issue at the VS Code repository instead.
13+
Thanks for reporting a bug. Please see https://github.com/cdr/code-server/blob/main/docs/FAQ.md#how-do-i-debug-issues-with-code-server and include any logging information relevant to the issue.
1714
18-
Provide screenshots if applicable.
19-
20-
Please fill in the issue template and try to be as detailed
21-
and clear as possible!
15+
Please search for existing issues before filing, as they may contain additional information about the problem and descriptions of workarounds. Provide as much information as you can, so that we can reproduce the issue. Otherwise, we may not be able to help diagnose the problem, and may close the issue as unreproducible or incomplete. For visual defects, please include screenshots to help us understand the issue.
2216
-->
2317

18+
## OS/Web Information
19+
2420
- Web Browser:
2521
- Local OS:
2622
- Remote OS:
2723
- Remote Architecture:
2824
- `code-server --version`:
25+
26+
## Steps to Reproduce
27+
28+
1.
29+
2.
30+
3.
31+
32+
## Expected
33+
34+
<!-- What should happen? -->
35+
36+
## Actual
37+
38+
<!-- What actually happens? -->
39+
40+
## Screenshot
41+
42+
<!-- Ideally provide a screenshot, gif, video or screenrecording -->
43+
44+
## Notes
45+
46+
<!-- If you can reproduce the issue on vanilla VS Code,
47+
please file the issue at the VS Code repository instead. -->
48+
49+
This issue can be reproduced in VS Code: Yes/No

.github/dependabot.yml

-8
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ updates:
55
schedule:
66
interval: "daily"
77
time: "11:00"
8-
assignees:
9-
- "jawnsy"
10-
reviewers:
11-
- "jawnsy"
128
ignore:
139
# GitHub always delivers the latest versions for each major
1410
# release tag, so handle updates manually
@@ -19,7 +15,3 @@ updates:
1915
schedule:
2016
interval: "daily"
2117
time: "11:00"
22-
assignees:
23-
- "jawnsy"
24-
reviewers:
25-
- "jawnsy"

.github/ranger.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Configuration for the repo ranger bot
2+
# See docs: https://www.notion.so/Documentation-8d7627bb1f3c42b7b1820e8d6f157a57#9879d1374fab4d1f9c607c230fd5123d
3+
default:
4+
close:
5+
# Default time to wait before closing the label. Can either be a number in milliseconds
6+
# or a string specified by the `ms` package (https://www.npmjs.com/package/ms)
7+
delay: "3 days"
8+
9+
# Default comment to post when an issue is first marked with a closing label
10+
comment: "⚠️ This issue has been marked $LABEL and will be closed in $DELAY."
11+
12+
labels:
13+
duplicate: close
14+
wontfix: close
15+
"squash when passing": merge
16+
"rebase when passing": merge
17+
"merge when passing": merge
18+
stale:
19+
action: close
20+
delay: 7 days
21+
comment: "⚠️ This issue has been marked stale and will automatically be closed in $DELAY."
22+
"new contributor":
23+
action: comment
24+
delay: 5s
25+
message: "Thanks for making your first contribution! :slightly_smiling_face:"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Consider running code-server with the beta flag `--link` if you don't want to wo
5757

5858
```bash
5959
$ code-server --link
60-
Proxying code-server to Coder Cloud, you can access your IDE at https://valmar-jon.cdr.co
60+
Proxying code-server, you can access your IDE at https://valmar-jon.cdr.co
6161
```
6262

6363
## FAQ

ci/build/build-packages.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ release_gcp() {
4040
# Generates deb and rpm packages.
4141
release_nfpm() {
4242
local nfpm_config
43-
nfpm_config="$(envsubst < ./ci/build/nfpm.yaml)"
43+
nfpm_config="$(envsubst <./ci/build/nfpm.yaml)"
4444

4545
# The underscores are convention for .deb.
4646
nfpm pkg -f <(echo "$nfpm_config") --target "release-packages/code-server_${VERSION}_$ARCH.deb"

ci/build/build-release.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ bundle_code_server() {
4949

5050
# Adds the commit to package.json
5151
jq --slurp '.[0] * .[1]' package.json <(
52-
cat << EOF
52+
cat <<EOF
5353
{
5454
"commit": "$(git rev-parse HEAD)",
5555
"scripts": {
5656
"postinstall": "./postinstall.sh"
5757
}
5858
}
5959
EOF
60-
) > "$RELEASE_PATH/package.json"
60+
) >"$RELEASE_PATH/package.json"
6161
rsync yarn.lock "$RELEASE_PATH"
6262
rsync ci/build/npm-postinstall.sh "$RELEASE_PATH/postinstall.sh"
6363

@@ -89,18 +89,18 @@ bundle_vscode() {
8989

9090
# Adds the commit and date to product.json
9191
jq --slurp '.[0] * .[1]' "$VSCODE_SRC_PATH/product.json" <(
92-
cat << EOF
92+
cat <<EOF
9393
{
9494
"commit": "$(git rev-parse HEAD)",
9595
"date": $(jq -n 'now | todate')
9696
}
9797
EOF
98-
) > "$VSCODE_OUT_PATH/product.json"
98+
) >"$VSCODE_OUT_PATH/product.json"
9999

100100
# We remove the scripts field so that later on we can run
101101
# yarn to fetch node_modules if necessary without build scripts running.
102102
# We cannot use --no-scripts because we still want dependent package scripts to run.
103-
jq 'del(.scripts)' < "$VSCODE_SRC_PATH/package.json" > "$VSCODE_OUT_PATH/package.json"
103+
jq 'del(.scripts)' <"$VSCODE_SRC_PATH/package.json" >"$VSCODE_OUT_PATH/package.json"
104104

105105
pushd "$VSCODE_OUT_PATH"
106106
symlink_asar

ci/build/build-standalone-release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ main() {
1212
# we use the same version it's using so we instead run a script with yarn that
1313
# will print the path to node.
1414
local node_path
15-
node_path="$(yarn -s node <<< 'console.info(process.execPath)')"
15+
node_path="$(yarn -s node <<<'console.info(process.execPath)')"
1616

1717
mkdir -p "$RELEASE_PATH/bin"
1818
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"

ci/build/code-server.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ _realpath() {
1111
cd "$(dirname "$script")"
1212

1313
while [ -L "$(basename "$script")" ]; do
14-
if [ -L "./node" ] && [ -L "./code-server" ] &&
15-
[ -f "package.json" ] &&
16-
cat package.json | grep -q '^ "name": "code-server",$'; then
14+
if [ -L "./node" ] && [ -L "./code-server" ] \
15+
&& [ -f "package.json" ] \
16+
&& cat package.json | grep -q '^ "name": "code-server",$'; then
1717
echo "***** Please use the script in bin/code-server instead!" >&2
1818
echo "***** This script will soon be removed!" >&2
1919
echo "***** See the release notes at https://github.com/cdr/code-server/releases/tag/v3.4.0" >&2

ci/build/release-github-draft.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ main() {
1010
hub release create \
1111
--file - \
1212
-t "$(git rev-parse HEAD)" \
13-
--draft "v$VERSION" << EOF
13+
--draft "v$VERSION" <<EOF
1414
v$VERSION
1515
1616
VS Code v$(vscode_version)

ci/dev/fmt.sh

+8-9
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ set -euo pipefail
44
main() {
55
cd "$(dirname "$0")/../.."
66

7-
shfmt -i 2 -w -sr $(git ls-files "*.sh" | grep -v "lib/vscode")
8-
97
local prettierExts
108
prettierExts=(
119
"*.js"
@@ -18,18 +16,19 @@ main() {
1816
"*.toml"
1917
"*.yaml"
2018
"*.yml"
19+
"*.sh"
2120
)
2221
prettier --write --loglevel=warn $(
2322
git ls-files "${prettierExts[@]}" | grep -v "lib/vscode" | grep -v 'helm-chart'
2423
)
2524

26-
doctoc --title '# FAQ' docs/FAQ.md > /dev/null
27-
doctoc --title '# Setup Guide' docs/guide.md > /dev/null
28-
doctoc --title '# Install' docs/install.md > /dev/null
29-
doctoc --title '# npm Install Requirements' docs/npm.md > /dev/null
30-
doctoc --title '# Contributing' docs/CONTRIBUTING.md > /dev/null
31-
doctoc --title '# Contributor Covenant Code of Conduct' docs/CODE_OF_CONDUCT.md > /dev/null
32-
doctoc --title '# iPad' docs/ipad.md > /dev/null
25+
doctoc --title '# FAQ' docs/FAQ.md >/dev/null
26+
doctoc --title '# Setup Guide' docs/guide.md >/dev/null
27+
doctoc --title '# Install' docs/install.md >/dev/null
28+
doctoc --title '# npm Install Requirements' docs/npm.md >/dev/null
29+
doctoc --title '# Contributing' docs/CONTRIBUTING.md >/dev/null
30+
doctoc --title '# Contributor Covenant Code of Conduct' docs/CODE_OF_CONDUCT.md >/dev/null
31+
doctoc --title '# iPad' docs/ipad.md >/dev/null
3332

3433
if [[ ${CI-} && $(git ls-files --other --modified --exclude-standard) ]]; then
3534
echo "Files need generation or are formatted incorrectly:"

ci/dev/gen_icons.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ main() {
3535
# This escapes all newlines so that sed will accept them.
3636
favicon_dark_style="$(printf "%s\n" "$favicon_dark_style" | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/\\n/g')"
3737
sed "$(
38-
cat -n << EOF
38+
cat -n <<EOF
3939
s%<rect id="favicon"%$favicon_dark_style<rect id="favicon"%
4040
EOF
41-
)" favicon.svg > favicon-dark-support.svg
41+
)" favicon.svg >favicon-dark-support.svg
4242
}
4343

4444
main "$@"

ci/dev/lint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ main() {
88
stylelint $(git ls-files "*.css" | grep -v "lib/vscode")
99
tsc --noEmit --skipLibCheck
1010
shellcheck -e SC2046,SC2164,SC2154,SC1091,SC1090,SC2002 $(git ls-files "*.sh" | grep -v "lib/vscode")
11-
if command -v helm && helm kubeval --help > /dev/null; then
11+
if command -v helm && helm kubeval --help >/dev/null; then
1212
helm kubeval ci/helm-chart
1313
fi
1414

ci/dev/update-vscode.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ main() {
3333

3434
# Check if the remote exists
3535
# if it doesn't, we add it
36-
if ! git config remote.vscode.url > /dev/null; then
36+
if ! git config remote.vscode.url >/dev/null; then
3737
echo "Could not find 'vscode' as a remote"
3838
echo "Adding with: git remote add vscode https://github.com/microsoft/vscode.git"
3939
git remote add vscode https://github.com/microsoft/vscode.git
@@ -52,7 +52,7 @@ main() {
5252
fi
5353

5454
# Check that they have jq installed
55-
if ! command -v jq &> /dev/null; then
55+
if ! command -v jq &>/dev/null; then
5656
echo "jq could not be found."
5757
echo "We use this when looking up the exact version to update to in the package.json in VS Code."
5858
echo -e "See docs here: https://stedolan.github.io/jq/download/"
@@ -71,7 +71,7 @@ main() {
7171
git fetch vscode
7272

7373
# Check if GitHub CLI is installed
74-
if ! command -v gh &> /dev/null; then
74+
if ! command -v gh &>/dev/null; then
7575
echo "GitHub CLI could not be found."
7676
echo "If you install it before you run this script next time, we'll open a draft PR for you!"
7777
echo -e "See docs here: https://github.com/cli/cli#installation\n"

ci/images/centos7/Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ ENV PATH=/usr/local/go/bin:$GOPATH/bin:$PATH
2626

2727
# Install Go dependencies
2828
ENV GO111MODULE=on
29-
RUN go get mvdan.cc/sh/v3/cmd/shfmt
3029
RUN go get github.com/goreleaser/nfpm/cmd/[email protected]
3130

3231
RUN curl -fsSL https://get.docker.com | sh

ci/images/debian10/Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ ENV PATH=/usr/local/go/bin:$GOPATH/bin:$PATH
4242

4343
# Install Go dependencies
4444
ENV GO111MODULE=on
45-
RUN go get mvdan.cc/sh/v3/cmd/shfmt
4645
RUN go get github.com/goreleaser/nfpm/cmd/[email protected]
4746

4847
RUN VERSION="$(curl -fsSL https://storage.googleapis.com/kubernetes-release/release/stable.txt)" && \

ci/lib.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
set -euo pipefail
33

44
pushd() {
5-
builtin pushd "$@" > /dev/null
5+
builtin pushd "$@" >/dev/null
66
}
77

88
popd() {
9-
builtin popd > /dev/null
9+
builtin popd >/dev/null
1010
}
1111

1212
pkg_json_version() {
@@ -75,7 +75,7 @@ download_artifact() {
7575
local tmp_file
7676
tmp_file="$(mktemp)"
7777

78-
curl -fsSL "$(get_artifact_url "$artifact_name")" > "$tmp_file"
78+
curl -fsSL "$(get_artifact_url "$artifact_name")" >"$tmp_file"
7979
unzip -q -o "$tmp_file" -d "$dst"
8080
rm "$tmp_file"
8181
}

ci/release-image/entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -eu
66
eval "$(fixuid -q)"
77

88
if [ "${DOCKER_USER-}" ] && [ "$DOCKER_USER" != "$USER" ]; then
9-
echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
9+
echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd >/dev/null
1010
# Unfortunately we cannot change $HOME as we cannot move any bind mounts
1111
# nor can we bind mount $HOME into a new home as that requires a privileged container.
1212
sudo usermod --login "$DOCKER_USER" coder

ci/steps/build-docker-image.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ main() {
88
./ci/release-image/build.sh
99

1010
mkdir -p release-images
11-
docker save "codercom/code-server-$ARCH:$VERSION" > "release-images/code-server-$ARCH-$VERSION.tar"
11+
docker save "codercom/code-server-$ARCH:$VERSION" >"release-images/code-server-$ARCH-$VERSION.tar"
1212
}
1313

1414
main "$@"

ci/steps/publish-npm.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ main() {
66
source ./ci/lib.sh
77

88
if [[ ${CI-} ]]; then
9-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
9+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >~/.npmrc
1010
fi
1111

1212
download_artifact npm-package ./release-npm-package

docs/CONTRIBUTING.md

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ There are several differences, however. You must:
3636
- Use Node.js version 12.x (or greater)
3737
- Have [yarn](https://classic.yarnpkg.com/en/) installed (which is used to install JS packages and run development scripts)
3838
- Have [nfpm](https://github.com/goreleaser/nfpm) (which is used to build `.deb` and `.rpm` packages and [jq](https://stedolan.github.io/jq/) (used to build code-server releases) installed
39-
- Have [shfmt](https://pkg.go.dev/mvdan.cc/sh/v3) installed to run `yarn fmt` (requires Go is installed on your system)
4039

4140
The [CI container](../ci/images/debian10/Dockerfile) is a useful reference for all
4241
of the dependencies code-server uses.

install.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ usage() {
1313
"
1414
fi
1515

16-
cath << EOF
16+
cath <<EOF
1717
Installs code-server for Linux, macOS and FreeBSD.
1818
It tries to use the system package manager if possible.
1919
After successful installation it explains how to start using code-server.
@@ -81,7 +81,7 @@ echo_latest_version() {
8181

8282
echo_npm_postinstall() {
8383
echoh
84-
cath << EOF
84+
cath <<EOF
8585
The npm package has been installed successfully!
8686
Please extend your path to use code-server:
8787
PATH="$NPM_BIN_DIR:\$PATH"
@@ -92,7 +92,7 @@ EOF
9292

9393
echo_standalone_postinstall() {
9494
echoh
95-
cath << EOF
95+
cath <<EOF
9696
Standalone release has been installed into $STANDALONE_INSTALL_PREFIX/lib/code-server-$VERSION
9797
Please extend your path to use code-server:
9898
PATH="$STANDALONE_INSTALL_PREFIX/bin:\$PATH"
@@ -103,7 +103,7 @@ EOF
103103

104104
echo_systemd_postinstall() {
105105
echoh
106-
cath << EOF
106+
cath <<EOF
107107
To have systemd start code-server now and restart on boot:
108108
sudo systemctl enable --now code-server@\$USER
109109
Or, if you don't want/need a background service you can run:
@@ -509,7 +509,7 @@ arch() {
509509
}
510510

511511
command_exists() {
512-
command -v "$@" > /dev/null
512+
command -v "$@" >/dev/null
513513
}
514514

515515
sh_c() {
@@ -571,7 +571,7 @@ prefix() {
571571
fifo="$(mktemp -d)/fifo"
572572
mkfifo "$fifo"
573573
sed -e "s#^#$PREFIX: #" "$fifo" &
574-
"$@" > "$fifo" 2>&1
574+
"$@" >"$fifo" 2>&1
575575
}
576576

577577
main "$@"

0 commit comments

Comments
 (0)