Skip to content

Commit 2f5610c

Browse files
committed
Remove long-unused internal plugin system
We are trying to update Express to fix a vulnerability. We would have to update the plugins as well, but since we are no longer using the plugin system, we can just delete it instead.
1 parent d6ff011 commit 2f5610c

23 files changed

+32
-1032
lines changed

ci/build/build-release.sh

-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ bundle_code_server() {
4444
rsync src/browser/pages/*.css "$RELEASE_PATH/src/browser/pages"
4545
rsync src/browser/robots.txt "$RELEASE_PATH/src/browser"
4646

47-
# Add typings for plugins
48-
mkdir -p "$RELEASE_PATH/typings"
49-
rsync typings/pluginapi.d.ts "$RELEASE_PATH/typings"
50-
5147
# Adds the commit to package.json
5248
jq --slurp '(.[0] | del(.scripts,.jest,.devDependencies)) * .[1]' package.json <(
5349
cat << EOF

ci/dev/test-integration.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ main() {
3333
exit 1
3434
fi
3535

36-
CODE_SERVER_PATH="$path" CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest "$@" --coverage=false --testRegex "./test/integration" --testPathIgnorePatterns "./test/integration/fixtures"
36+
CODE_SERVER_PATH="$path" ./test/node_modules/.bin/jest "$@" --coverage=false --testRegex "./test/integration" --testPathIgnorePatterns "./test/integration/fixtures"
3737
}
3838

3939
main "$@"

ci/dev/test-unit.sh

+1-6
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@ main() {
66

77
source ./ci/lib.sh
88

9-
echo "Building test plugin"
10-
pushd test/unit/node/test-plugin
11-
make -s out/index.js
12-
popd
13-
149
# We must keep jest in a sub-directory. See ../../test/package.json for more
1510
# information. We must also run it from the root otherwise coverage will not
1611
# include our source files.
17-
CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest "$@" --testRegex "./test/unit/.*ts" --testPathIgnorePatterns "./test/unit/node/test-plugin"
12+
./test/node_modules/.bin/jest "$@" --testRegex "./test/unit/.*ts"
1813
}
1914

2015
main "$@"

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"publish:docker": "./ci/steps/docker-buildx-push.sh",
3131
"fmt": "npm run prettier && ./ci/dev/doctoc.sh",
3232
"lint:scripts": "./ci/dev/lint-scripts.sh",
33-
"lint:ts": "eslint --max-warnings=0 --fix $(git ls-files '*.ts' '*.js' | grep -v 'lib/vscode' | grep -v test-plugin)",
33+
"lint:ts": "eslint --max-warnings=0 --fix $(git ls-files '*.ts' '*.js' | grep -v 'lib/vscode')",
3434
"test": "echo 'Run npm run test:unit or npm run test:e2e' && exit 1",
3535
"watch": "VSCODE_DEV=1 VSCODE_IPC_HOOK_CLI= NODE_OPTIONS='--max_old_space_size=32384 --trace-warnings' ts-node ./ci/dev/watch.ts",
3636
"icons": "./ci/dev/gen_icons.sh"

src/node/plugin.ts

-302
This file was deleted.

src/node/routes/apps.ts

-17
This file was deleted.

src/node/routes/errors.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { logger } from "@coder/logger"
22
import express from "express"
33
import { promises as fs } from "fs"
44
import path from "path"
5-
import { WebsocketRequest } from "../../../typings/pluginapi"
65
import { HttpCode } from "../../common/http"
6+
import type { WebsocketRequest } from "../wsRouter"
77
import { rootPath } from "../constants"
88
import { replaceTemplates } from "../http"
99
import { escapeHtml, getMediaMime } from "../util"

0 commit comments

Comments
 (0)