mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 19:00:45 +00:00
build: keep a2ui bundle stable
This commit is contained in:
@@ -51,21 +51,21 @@ describe("scripts/bundle-a2ui.mjs", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("tracks repo dependency manifests through lockfile inputs", () => {
|
||||
it("keeps unrelated repo dependency churn out of bundle hash inputs", () => {
|
||||
const repoRoot = path.resolve("repo-root");
|
||||
const inputPaths = getBundleHashRepoInputPaths(repoRoot);
|
||||
|
||||
expect(inputPaths).toContain(path.join(repoRoot, "package.json"));
|
||||
expect(inputPaths).toContain(path.join(repoRoot, "pnpm-lock.yaml"));
|
||||
expect(inputPaths).toContain(path.join(repoRoot, "ui", "package.json"));
|
||||
expect(inputPaths).not.toContain(path.join(repoRoot, "package.json"));
|
||||
expect(inputPaths).not.toContain(path.join(repoRoot, "pnpm-lock.yaml"));
|
||||
});
|
||||
|
||||
it("keeps local node_modules state out of bundle hash inputs", () => {
|
||||
const repoRoot = process.cwd();
|
||||
const inputPaths = getBundleHashInputPaths(repoRoot);
|
||||
|
||||
expect(inputPaths).toContain(path.join(repoRoot, "package.json"));
|
||||
expect(inputPaths).toContain(path.join(repoRoot, "pnpm-lock.yaml"));
|
||||
expect(inputPaths).not.toContain(path.join(repoRoot, "package.json"));
|
||||
expect(inputPaths).not.toContain(path.join(repoRoot, "pnpm-lock.yaml"));
|
||||
expect(inputPaths).not.toContain(path.join(repoRoot, "node_modules", "lit", "package.json"));
|
||||
expect(inputPaths).not.toContain(
|
||||
path.join(repoRoot, "ui", "node_modules", "lit", "package.json"),
|
||||
|
||||
@@ -190,6 +190,17 @@ describe("scripts/changed-lanes", () => {
|
||||
expect(plan.runFullTests).toBe(false);
|
||||
});
|
||||
|
||||
it("does not route generated A2UI artifacts as direct Vitest targets", () => {
|
||||
const result = detectChangedLanes([
|
||||
"src/canvas-host/a2ui/.bundle.hash",
|
||||
"test/scripts/bundle-a2ui.test.ts",
|
||||
]);
|
||||
const plan = createChangedCheckPlan(result);
|
||||
|
||||
expect(plan.testTargets).toEqual(["test/scripts/bundle-a2ui.test.ts"]);
|
||||
expect(plan.runChangedTestsBroad).toBe(false);
|
||||
});
|
||||
|
||||
it("routes changed extension Vitest configs to only their owning shard", () => {
|
||||
const result = detectChangedLanes(["test/vitest/vitest.extension-discord.config.ts"]);
|
||||
const plan = createChangedCheckPlan(result);
|
||||
|
||||
Reference in New Issue
Block a user