From 6201a2c6e6333f2cdd867003ebab99cc152349c9 Mon Sep 17 00:00:00 2001 From: Menghuan1918 Date: Thu, 3 Sep 2026 12:07:29 +0800 Subject: [PATCH] =?UTF-8?q?build(ci):=20=E8=A1=A5=20test:mount:aggregate?= =?UTF-8?q?=20/=20clean=20/=20packageManager=20=E5=B9=B6=E5=AF=B9=E9=BD=90?= =?UTF-8?q?=20release=20=E6=A0=A1=E9=AA=8C=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - package.json 新增 test:mount:aggregate(scripts/e2e-aggregate-mount.sh 的 npm 别名,CI plugin-mount lane 改经它驱动,保留 DSH_CMD/DSH_TELEMETRY_DISABLED env)与 clean(node rmSync 删 lib,与 build 开头清理同款、跨平台); 只新增普通 script,不动任何生命周期钩子(market-manifest.spec.ts 对 packed manifest 的 lifecycle 断言不受影响,已实跑验证) - packageManager 钉 pnpm@11.8.0(本地实装版本;pnpm 10+ 运行时按该字段 自切版本,CI action-setup 的 version: 11 输入与其兼容不冲突) - release.yml 校验顺序统一为 typecheck → test → build → check:consumer-types (与 ci.yml 一致),补上缺失的 consumer 类型面守卫;tag 校验等非构建 步骤位置不变 --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 12 +++++++++--- package.json | 3 +++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f10c662..6253078 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,7 +146,7 @@ jobs: - name: Aggregate double-mount regression env: DSH_CMD: dsh - run: bash scripts/e2e-aggregate-mount.sh + run: pnpm test:mount:aggregate - name: Upload Playwright report on failure if: failure() diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de47be6..32b625e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -84,15 +84,21 @@ jobs: exit 1 fi - - name: Build - run: pnpm build - - name: Typecheck run: pnpm typecheck - name: Test run: pnpm test + - name: Build + run: pnpm build + + # The consumer-facing declaration surface guard — mirrors the ci.yml + # verification order (typecheck → test → build → check:consumer-types) + # so a release is gated on the same checks a PR runs. + - name: Check consumer type surface + run: pnpm check:consumer-types + - name: Dry-run publish (validation only) if: github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'true' run: pnpm publish --dry-run --no-git-checks diff --git a/package.json b/package.json index 28d9aaf..53f674e 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "engines": { "node": ">=20" }, + "packageManager": "pnpm@11.8.0", "dsh": { "bundle": { "patch": "./cordis.patch.yml" @@ -79,6 +80,8 @@ "prepare": "tsdown", "test": "vitest run", "test:mount": "bash scripts/e2e-mount.sh", + "test:mount:aggregate": "bash scripts/e2e-aggregate-mount.sh", + "clean": "node -e \"require('node:fs').rmSync('lib',{recursive:true,force:true})\"", "check:consumer-types": "bash scripts/check-consumer-types.sh" }, "license": "MIT",