mirror of
https://github.com/coder/code-server.git
synced 2026-04-12 18:28:17 -05:00
Update Code to 1.94.2 (#7026)
* Update Code to 1.94.2 * Convert from yarn to npm This is to match VS Code. We were already partially using npm for the releases so this is some nice alignment. * Update caniuse-lite This was complaining on every unit test. * Update eslint I was having a bunch of dependency conflicts and eslint seemed to be the culprit so I just removed it and set it up again, since it seems things have changed quite a bit. * Update test dependencies I was getting oom when running the unit tests...updating seems to work. * Remove package.json `scripts` property in release The new pre-install script was being included, which is dev-only. This was always the intent; did not realize jq's merge was recursive. * Remove jest and devDependencies in release as well * Update test extension dependencies This appears to be conflicting with the root dependencies. * Fix playwright exec npm does not let you run binaries like yarn does, as far as I know. * Fix import of server-main.js * Fix several tests by waiting for selectors
This commit is contained in:
@@ -18,7 +18,7 @@ main() {
|
||||
echo "Files need generation or are formatted incorrectly:"
|
||||
git -c color.ui=always status | grep --color=no '\[31m'
|
||||
echo "Please run the following locally:"
|
||||
echo " yarn doctoc"
|
||||
echo " npm run doctoc"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -3,14 +3,13 @@ set -euo pipefail
|
||||
|
||||
# Install dependencies in $1.
|
||||
install-deps() {
|
||||
local args=(install)
|
||||
local args=()
|
||||
if [[ ${CI-} ]]; then
|
||||
args+=(--frozen-lockfile)
|
||||
args+=(ci)
|
||||
else
|
||||
args+=(install)
|
||||
fi
|
||||
if [[ "$1" == "lib/vscode" ]]; then
|
||||
args+=(--no-default-rc)
|
||||
fi
|
||||
# If there is no package.json then yarn will look upward and end up installing
|
||||
# If there is no package.json then npm will look upward and end up installing
|
||||
# from the root resulting in an infinite loop (this can happen if you have not
|
||||
# checked out the submodule yet for example).
|
||||
if [[ ! -f "$1/package.json" ]]; then
|
||||
@@ -19,7 +18,7 @@ install-deps() {
|
||||
fi
|
||||
pushd "$1"
|
||||
echo "Installing dependencies for $PWD"
|
||||
yarn "${args[@]}"
|
||||
npm "${args[@]}"
|
||||
popd
|
||||
}
|
||||
|
||||
|
||||
3
ci/dev/preinstall.js
Normal file
3
ci/dev/preinstall.js
Normal file
@@ -0,0 +1,3 @@
|
||||
if (process.env.npm_execpath.includes("yarn")) {
|
||||
throw new Error("`yarn` is no longer supported; please use `npm install` instead")
|
||||
}
|
||||
@@ -2,9 +2,9 @@
|
||||
set -euo pipefail
|
||||
|
||||
help() {
|
||||
echo >&2 " You can build with 'yarn watch' or you can build a release"
|
||||
echo >&2 " For example: 'yarn build && yarn build:vscode && KEEP_MODULES=1 yarn release'"
|
||||
echo >&2 " Then 'CODE_SERVER_TEST_ENTRY=./release yarn test:e2e'"
|
||||
echo >&2 " You can build with 'npm run watch' or you can build a release"
|
||||
echo >&2 " For example: 'npm run build && npm run build:vscode && KEEP_MODULES=1 npm run release'"
|
||||
echo >&2 " Then 'CODE_SERVER_TEST_ENTRY=./release npm run test:e2e'"
|
||||
echo >&2 " You can manually run that release with 'node ./release'"
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ main() {
|
||||
|
||||
pushd test/e2e/extensions/test-extension
|
||||
echo "Building test extension"
|
||||
yarn build
|
||||
npm run build
|
||||
popd
|
||||
|
||||
local dir="$PWD"
|
||||
@@ -44,7 +44,7 @@ main() {
|
||||
fi
|
||||
|
||||
cd test
|
||||
yarn playwright test "$@"
|
||||
./node_modules/.bin/playwright test "$@"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
set -euo pipefail
|
||||
|
||||
help() {
|
||||
echo >&2 " You can build the standalone release with 'yarn release:standalone'"
|
||||
echo >&2 " You can build the standalone release with 'npm run release:standalone'"
|
||||
echo >&2 " Or you can pass in a custom path."
|
||||
echo >&2 " CODE_SERVER_PATH='/var/tmp/coder/code-server/bin/code-server' yarn test:integration"
|
||||
echo >&2 " CODE_SERVER_PATH='/var/tmp/coder/code-server/bin/code-server' npm run test:integration"
|
||||
}
|
||||
|
||||
# Make sure a code-server release works. You can pass in the path otherwise it
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
set -euo pipefail
|
||||
|
||||
help() {
|
||||
echo >&2 " You can build the standalone release with 'yarn release:standalone'"
|
||||
echo >&2 " You can build the standalone release with 'npm run release:standalone'"
|
||||
echo >&2 " Or you can pass in a custom path."
|
||||
echo >&2 " CODE_SERVER_PATH='/var/tmp/coder/code-server/bin/code-server' yarn test:integration"
|
||||
echo >&2 " CODE_SERVER_PATH='/var/tmp/coder/code-server/bin/code-server' npm run test:integration"
|
||||
}
|
||||
|
||||
# Make sure a code-server release works. You can pass in the path otherwise it
|
||||
|
||||
@@ -45,9 +45,11 @@ class Watcher {
|
||||
|
||||
private readonly compilers: DevelopmentCompilers = {
|
||||
codeServer: spawn("tsc", ["--watch", "--pretty", "--preserveWatchOutput"], { cwd: this.rootPath }),
|
||||
vscode: spawn("yarn", ["watch"], { cwd: this.paths.vscodeDir }),
|
||||
vscodeWebExtensions: spawn("yarn", ["watch-web"], { cwd: this.paths.vscodeDir }),
|
||||
plugins: this.paths.pluginDir ? spawn("yarn", ["build", "--watch"], { cwd: this.paths.pluginDir }) : undefined,
|
||||
vscode: spawn("npm", ["run", "watch"], { cwd: this.paths.vscodeDir }),
|
||||
vscodeWebExtensions: spawn("npm", ["run", "watch-web"], { cwd: this.paths.vscodeDir }),
|
||||
plugins: this.paths.pluginDir
|
||||
? spawn("npm", ["run", "build", "--watch"], { cwd: this.paths.pluginDir })
|
||||
: undefined,
|
||||
}
|
||||
|
||||
public async initialize(): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user