mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: switch from yarn to pnpm (#8822)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
**/pnpm-lock.yaml
|
||||
@@ -27,12 +27,12 @@ go run github.com/swaggo/swag/cmd/swag@v1.8.9 init \
|
||||
popd
|
||||
|
||||
pushd "${APIDOCGEN_DIR}"
|
||||
yarn
|
||||
pnpm i
|
||||
|
||||
# Make sure that widdershins is installed correctly.
|
||||
yarn exec -- widdershins --version
|
||||
pnpm exec -- widdershins --version
|
||||
# Render the Markdown file.
|
||||
yarn exec -- widdershins \
|
||||
pnpm exec -- widdershins \
|
||||
--user_templates "./markdown-template" \
|
||||
--search false \
|
||||
--omitHeader true \
|
||||
|
||||
Generated
+1271
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -48,7 +48,7 @@ if [ "${CODER_BUILD_AGPL:-0}" -gt "0" ] && [ "${use_proxy}" -gt "0" ]; then
|
||||
fi
|
||||
|
||||
# Preflight checks: ensure we have our required dependencies, and make sure nothing is listening on port 3000 or 8080
|
||||
dependencies curl git go make yarn
|
||||
dependencies curl git go make pnpm
|
||||
curl --fail http://127.0.0.1:3000 >/dev/null 2>&1 && echo '== ERROR: something is listening on port 3000. Kill it and re-run this script.' && exit 1
|
||||
curl --fail http://127.0.0.1:8080 >/dev/null 2>&1 && echo '== ERROR: something is listening on port 8080. Kill it and re-run this script.' && exit 1
|
||||
|
||||
@@ -190,7 +190,7 @@ fatal() {
|
||||
fi
|
||||
|
||||
# Start the frontend once we have a template up and running
|
||||
CODER_HOST=http://127.0.0.1:3000 start_cmd SITE date yarn --cwd=./site dev --host
|
||||
CODER_HOST=http://127.0.0.1:3000 start_cmd SITE date pnpm --cwd=./site dev --host
|
||||
|
||||
interfaces=(localhost)
|
||||
if command -v ip >/dev/null; then
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Run "yarn install" with flags appropriate to the environment (local
|
||||
# Run "pnpm install" with flags appropriate to the environment (local
|
||||
# development vs build system). The install is always run within the current
|
||||
# directory.
|
||||
#
|
||||
# Usage: yarn_install.sh [optional extra flags]
|
||||
# Usage: pnpm_install.sh [optional extra flags]
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
yarn_flags=(
|
||||
pnpm_flags=(
|
||||
# Do not execute install scripts
|
||||
# TODO: check if build works properly with this enabled
|
||||
# --ignore-scripts
|
||||
@@ -19,19 +19,17 @@ yarn_flags=(
|
||||
)
|
||||
|
||||
if [[ -n ${CI:-} ]]; then
|
||||
yarn_flags+=(
|
||||
pnpm_flags+=(
|
||||
# Install dependencies from lockfile, ensuring builds are fully
|
||||
# reproducible
|
||||
--frozen-lockfile
|
||||
# Suppress progress information
|
||||
--silent
|
||||
# Disable interactive prompts for build
|
||||
--non-interactive
|
||||
# Disable interactive prompts.
|
||||
--reporter append-only
|
||||
)
|
||||
fi
|
||||
|
||||
# Append whatever is specified on the command line
|
||||
yarn_flags+=("$@")
|
||||
pnpm_flags+=("$@")
|
||||
|
||||
echo "+ yarn install ${yarn_flags[*]}"
|
||||
yarn install "${yarn_flags[@]}"
|
||||
echo "+ pnpm install ${pnpm_flags[*]}"
|
||||
pnpm install "${pnpm_flags[@]}"
|
||||
Reference in New Issue
Block a user