

























@@ -21,6 +21,7 @@ import {
2121createPackedBundledPluginPostinstallEnv,
2222PACKED_CLI_SMOKE_COMMANDS,
2323packageNameFromSpecifier,
24+resolveMissingPackBuildHint,
2425} from "../scripts/release-check.ts";
2526import { PACKAGE_DIST_INVENTORY_RELATIVE_PATH } from "../src/infra/package-dist-inventory.ts";
2627import { bundledDistPluginFile, bundledPluginFile } from "./helpers/bundled-plugin-paths.js";
@@ -585,6 +586,32 @@ describe("collectMissingPackPaths", () => {
585586});
586587});
587588589+describe("resolveMissingPackBuildHint", () => {
590+it("points missing runtime build artifacts at pnpm build", () => {
591+expect(resolveMissingPackBuildHint(["dist/build-info.json"])).toBe(
592+"release-check: build artifacts are missing. Run `pnpm build` before `pnpm release:check`.",
593+);
594+});
595+596+it("points missing Control UI artifacts at pnpm ui:build", () => {
597+expect(resolveMissingPackBuildHint(["dist/control-ui/index.html"])).toBe(
598+"release-check: Control UI artifacts are missing. Run `pnpm ui:build` before `pnpm release:check`.",
599+);
600+});
601+602+it("points combined runtime and Control UI misses at both build commands", () => {
603+expect(
604+resolveMissingPackBuildHint(["dist/build-info.json", "dist/control-ui/index.html"]),
605+).toBe(
606+"release-check: build and Control UI artifacts are missing. Run `pnpm build && pnpm ui:build` before `pnpm release:check`.",
607+);
608+});
609+610+it("does not emit a build hint for unrelated packed paths", () => {
611+expect(resolveMissingPackBuildHint(["scripts/npm-runner.mjs"])).toBeNull();
612+});
613+});
614+588615describe("collectPackUnpackedSizeErrors", () => {
589616it("accepts pack results within the unpacked size budget", () => {
590617expect(
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。