Skip to content

Commit 3856527

Browse files
committed
Merge branch 'main' of github.com:cdr/code-server into update-docs-links
2 parents 008e69f + 4a47ce7 commit 3856527

34 files changed

+951
-4218
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@ If there is no existing issue, please first create one unless the fix is minor.
55
Please make sure the base of your PR is the default branch!
66
-->
77

8-
## Checklist
9-
10-
- [ ] updated `CHANGELOG.md`
8+
Fixes #

.github/codecov.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
codecov:
2+
require_ci_to_pass: yes
3+
allow_coverage_offsets: True
4+
5+
coverage:
6+
precision: 2
7+
round: down
8+
range: "70...100"
9+
10+
parsers:
11+
gcov:
12+
branch_detection:
13+
conditional: yes
14+
loop: yes
15+
method: no
16+
macro: no
17+
18+
comment:
19+
layout: "reach,diff,flags,files,footer"
20+
behavior: default
21+
require_changes: no

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.tsbuildinfo
22
.cache
3-
dist*
43
/out*/
54
release/
65
release-npm-package/

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ VS Code v0.00.0
6565
### Development
6666

6767
- fix(publish): update cdrci fork in brew-bump.sh #3468 @jsjoeio
68+
- chore(dev): migrate away from parcel #3578 @jsjoeio
6869

6970
## 3.10.2
7071

ci/build/build-code-server.sh

+3-11
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ set -euo pipefail
33

44
# Builds code-server into out and the frontend into dist.
55

6-
# MINIFY controls whether parcel minifies dist.
7-
MINIFY=${MINIFY-true}
8-
96
main() {
107
cd "$(dirname "${0}")/../.."
118

@@ -32,14 +29,9 @@ main() {
3229
set -e
3330
fi
3431

35-
parcel build \
36-
--public-url "." \
37-
--out-dir dist \
38-
$([[ $MINIFY ]] || echo --no-minify) \
39-
src/browser/register.ts \
40-
src/browser/serviceWorker.ts \
41-
src/browser/pages/login.ts \
42-
src/browser/pages/vscode.ts
32+
yarn browserify out/browser/register.js -o out/browser/register.browserified.js
33+
yarn browserify out/browser/pages/login.js -o out/browser/pages/login.browserified.js
34+
yarn browserify out/browser/pages/vscode.js -o out/browser/pages/vscode.browserified.js
4335
}
4436

4537
main "$@"

ci/build/build-packages.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ release_gcp() {
4646
# Generates deb and rpm packages.
4747
release_nfpm() {
4848
local nfpm_config
49-
nfpm_config="$(envsubst <./ci/build/nfpm.yaml)"
49+
nfpm_config="$(envsubst < ./ci/build/nfpm.yaml)"
5050

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

ci/build/build-release.sh

+7-6
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ main() {
2828
}
2929

3030
bundle_code_server() {
31-
rsync out dist "$RELEASE_PATH"
31+
rsync out "$RELEASE_PATH"
3232

3333
# For source maps and images.
3434
mkdir -p "$RELEASE_PATH/src/browser"
3535
rsync src/browser/media/ "$RELEASE_PATH/src/browser/media"
3636
mkdir -p "$RELEASE_PATH/src/browser/pages"
3737
rsync src/browser/pages/*.html "$RELEASE_PATH/src/browser/pages"
38+
rsync src/browser/pages/*.css "$RELEASE_PATH/src/browser/pages"
3839
rsync src/browser/robots.txt "$RELEASE_PATH/src/browser"
3940

4041
# Add typings for plugins
@@ -43,15 +44,15 @@ bundle_code_server() {
4344

4445
# Adds the commit to package.json
4546
jq --slurp '.[0] * .[1]' package.json <(
46-
cat <<EOF
47+
cat << EOF
4748
{
4849
"commit": "$(git rev-parse HEAD)",
4950
"scripts": {
5051
"postinstall": "./postinstall.sh"
5152
}
5253
}
5354
EOF
54-
) >"$RELEASE_PATH/package.json"
55+
) > "$RELEASE_PATH/package.json"
5556
rsync yarn.lock "$RELEASE_PATH"
5657
rsync ci/build/npm-postinstall.sh "$RELEASE_PATH/postinstall.sh"
5758

@@ -83,18 +84,18 @@ bundle_vscode() {
8384

8485
# Adds the commit and date to product.json
8586
jq --slurp '.[0] * .[1]' "$VSCODE_SRC_PATH/product.json" <(
86-
cat <<EOF
87+
cat << EOF
8788
{
8889
"commit": "$(git rev-parse HEAD)",
8990
"date": $(jq -n 'now | todate')
9091
}
9192
EOF
92-
) >"$VSCODE_OUT_PATH/product.json"
93+
) > "$VSCODE_OUT_PATH/product.json"
9394

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

99100
pushd "$VSCODE_OUT_PATH"
100101
symlink_asar

ci/build/build-standalone-release.sh

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

2121
mkdir -p "$RELEASE_PATH/bin"
2222
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"

ci/build/npm-postinstall.sh

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ set -eu
44
# Copied from arch() in ci/lib.sh.
55
detect_arch() {
66
case "$(uname -m)" in
7-
aarch64)
8-
echo arm64
9-
;;
10-
x86_64 | amd64)
11-
echo amd64
12-
;;
13-
*)
14-
# This will cause the download to fail, but is intentional
15-
uname -m
16-
;;
7+
aarch64)
8+
echo arm64
9+
;;
10+
x86_64 | amd64)
11+
echo amd64
12+
;;
13+
*)
14+
# This will cause the download to fail, but is intentional
15+
uname -m
16+
;;
1717
esac
1818
}
1919

ci/build/release-github-draft.sh

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

ci/build/release-prep.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,31 @@ main() {
2020
cd "$(dirname "$0")/../.."
2121

2222
# Check that gh is installed
23-
if ! command -v gh &>/dev/null; then
23+
if ! command -v gh &> /dev/null; then
2424
echo "gh could not be found."
2525
echo "We use this with the release-github-draft.sh and release-github-assets.sh scripts."
2626
echo -e "See docs here: https://github.com/cli/cli#installation"
2727
exit
2828
fi
2929

3030
# Check that they have jq installed
31-
if ! command -v jq &>/dev/null; then
31+
if ! command -v jq &> /dev/null; then
3232
echo "jq could not be found."
3333
echo "We use this to parse the package.json and grab the current version of code-server."
3434
echo -e "See docs here: https://stedolan.github.io/jq/download/"
3535
exit
3636
fi
3737

3838
# Check that they have rg installed
39-
if ! command -v rg &>/dev/null; then
39+
if ! command -v rg &> /dev/null; then
4040
echo "rg could not be found."
4141
echo "We use this when updating files across the codebase."
4242
echo -e "See docs here: https://github.com/BurntSushi/ripgrep#installation"
4343
exit
4444
fi
4545

4646
# Check that they have node installed
47-
if ! command -v node &>/dev/null; then
47+
if ! command -v node &> /dev/null; then
4848
echo "node could not be found."
4949
echo "That's surprising..."
5050
echo "We use it in this script for getting the package.json version"
@@ -53,7 +53,7 @@ main() {
5353
fi
5454

5555
# Check that gh is authenticated
56-
if ! gh auth status -h github.com &>/dev/null; then
56+
if ! gh auth status -h github.com &> /dev/null; then
5757
echo "gh isn't authenticated to github.com."
5858
echo "This is needed for our scripts that use gh."
5959
echo -e "See docs regarding authentication: https://cli.github.com/manual/gh_auth_login"

ci/dev/fmt.sh

+9-9
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ main() {
2222
git ls-files "${prettierExts[@]}" | grep -v "lib/vscode" | grep -v 'helm-chart'
2323
)
2424

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 '# Maintaining' docs/MAINTAINING.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
33-
doctoc --title '# Termux' docs/termux.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 '# Maintaining' docs/MAINTAINING.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
33+
doctoc --title '# Termux' docs/termux.md > /dev/null
3434

3535
if [[ ${CI-} && $(git ls-files --other --modified --exclude-standard) ]]; then
3636
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

+4-4
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/"
@@ -62,7 +62,7 @@ main() {
6262
# Note: `git subtree` returns 129 when installed, and prints help;
6363
# but when uninstalled, returns 1.
6464
set +e
65-
git subtree &>/dev/null
65+
git subtree &> /dev/null
6666
if [ $? -ne 129 ]; then
6767
echo "git-subtree could not be found."
6868
echo "We use this to fetch and update the lib/vscode subtree."
@@ -83,7 +83,7 @@ main() {
8383
git fetch vscode
8484

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

0 commit comments

Comments
 (0)