From 173d899683d7b8b70d374ab8539b6410c75f432f Mon Sep 17 00:00:00 2001 From: Crimson Date: Tue, 5 May 2026 23:29:46 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B8=D0=BD=D1=85=D1=80=D0=BE=D0=BD?= =?UTF-8?q?=D0=B8=D0=B7=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D1=81=D0=B8=D1=8E=20Bun=20builder=20=D1=81=20lockf?= =?UTF-8?q?ile=20=D0=B8=20=D0=B7=D0=B0=D0=BA=D1=80=D0=B5=D0=BF=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20policy=20frozen-lockfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- orchestrator/package.json | 5 +++-- tools/build/README.md | 20 +++++++++++++++++++- tools/build/lib/deps.sh | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/orchestrator/package.json b/orchestrator/package.json index 532ffd0..c3b84b9 100644 --- a/orchestrator/package.json +++ b/orchestrator/package.json @@ -3,12 +3,13 @@ "version": "0.1.0", "private": true, "type": "module", + "packageManager": "bun@1.3.13", "scripts": { "check": "tsc --noEmit", "build": "bun build src/cli.ts --compile --target=bun-linux-x64 --outfile dist/hy2xs-orchestrator" }, "devDependencies": { - "bun-types": "^1.1.0", - "typescript": "^5.4.5" + "bun-types": "1.3.13", + "typescript": "5.9.3" } } diff --git a/tools/build/README.md b/tools/build/README.md index 6d52cb3..f9dba09 100644 --- a/tools/build/README.md +++ b/tools/build/README.md @@ -55,7 +55,7 @@ Windows и macOS можно использовать для редактиров 3. Устанавливает недостающие системные build dependencies через `apt-get`. 4. Проверяет или скачивает локальные версии: - Go `1.21.13`; - - Bun `1.1.45`; + - Bun `1.3.13`; - Node.js `20.19.0`; - pnpm `9.15.9`. 5. Собирает install-only orchestrator в standalone binary. @@ -137,6 +137,24 @@ tar -tzf dist/hy2xs-install-0.1.6.tar.gz | grep -E '^(hy2xs-install/install.sh|h tar -xOzf dist/hy2xs-install-0.1.6.tar.gz hy2xs-install/metadata/package.env ``` +## When to update orchestrator/bun.lock + +Do not regenerate [`orchestrator/bun.lock`](../../orchestrator/bun.lock) during production builds. + +Update and commit [`orchestrator/bun.lock`](../../orchestrator/bun.lock) only when: + +- [`orchestrator/package.json`](../../orchestrator/package.json) changes; +- `BUN_REQUIRED` changes in [`tools/build/lib/deps.sh`](lib/deps.sh); +- orchestrator dependencies are intentionally upgraded. + +Production builder always runs: + +```bash +bun install --frozen-lockfile +``` + +If this command fails, fix and commit the lockfile in source control. Do not remove `--frozen-lockfile`. + ## Полезные переменные - `PACKAGE_VERSION=0.1.6` diff --git a/tools/build/lib/deps.sh b/tools/build/lib/deps.sh index a66c72f..0f35cfb 100644 --- a/tools/build/lib/deps.sh +++ b/tools/build/lib/deps.sh @@ -2,7 +2,7 @@ set -euo pipefail GO_REQUIRED="${GO_REQUIRED:-1.21.13}" -BUN_REQUIRED="${BUN_REQUIRED:-1.1.45}" +BUN_REQUIRED="${BUN_REQUIRED:-1.3.13}" NODE_REQUIRED="${NODE_REQUIRED:-20.19.0}" PNPM_REQUIRED="${PNPM_REQUIRED:-9.15.9}" TOOLCHAIN_DIR="${TOOLCHAIN_DIR:-$ROOT_DIR/.toolchain}"