Node 22+ everywhere, LF text on Windows checkouts, CI actions v7

- Node minimum is 22 in package.json engines, the start scripts, the service installer, setup and doctor,
  matching the README, the release notes and the CI matrix (22 / 24).
- .gitattributes: CSS, HTML, JSON, Markdown and YAML check out with LF, so `node --test` on Windows matches the
  CSS rules the UI tests read; the Windows test step is no longer continue-on-error.
- CI: actions/checkout@v7 and actions/setup-node@v7 (Node 24 runtime).
This commit is contained in:
sganggs committed 2026-10-02 16:51:44 +08:00
1 parent b59aa15ee2
commit bb5c792a4d
12 files changed
+31 -26

No files matched your search

+4 -4
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env bash
# 卫戍协议:盟约 · macOS / Linux start script. Docs: docs/DEPLOY.md
# scripts/start.sh [--port 3001] [--no-open] [--no-local] [--no-assets] … (arguments go to scripts/launch.mjs)
# Checks Node.js ≥ 18, runs `npm ci` on the first run, then scripts/launch.mjs (tools/setup.mjs → server → browser).
# Checks Node.js ≥ 22, runs `npm ci` on the first run, then scripts/launch.mjs (tools/setup.mjs → server → browser).
set -euo pipefail
cd "$(dirname "$0")/.."
if ! command -v node >/dev/null 2>&1; then
echo "未找到 Node.js(需要 18 或更高,推荐 22 LTS)。Node.js not found."
echo "未找到 Node.js(需要 22 或更高,22 / 24 LTS)。Node.js not found."
if [ "$(uname -s)" = "Darwin" ]; then
echo " 安装:brew install node@22 或 https://nodejs.org/zh-cn/download"
else
@@ -14,8 +14,8 @@ if ! command -v node >/dev/null 2>&1; then
fi
exit 1
fi
if ! node -e "process.exit(Number(process.versions.node.split('.')[0])>=18?0:1)"; then
echo "Node.js $(node -v) 太旧,需要 18 或更高(推荐 22 LTS):https://nodejs.org/zh-cn/download"
if ! node -e "process.exit(Number(process.versions.node.split('.')[0])>=22?0:1)"; then
echo "Node.js $(node -v) 太旧,需要 22 或更高(22 / 24 LTS):https://nodejs.org/zh-cn/download"
exit 1
fi