release: WRNexusJS 0.3.1

This commit is contained in:
2026-07-22 18:42:20 +05:30
parent 07d8fb59d6
commit 304819dfe9
62 changed files with 158 additions and 103 deletions
+39 -1
View File
@@ -2,7 +2,7 @@ import { expect, test } from "bun:test";
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { updateApp, verificationCommands } from "../src/update.ts";
import { blockingVerificationChecks, updateApp, verificationCommands } from "../src/update.ts";
test("updateApp migrates project files without marking an unverified update complete", () => {
const root = mkdtempSync(join(tmpdir(), "wrnexus-update-"));
@@ -188,3 +188,41 @@ test("0.3 WRN source normalization is conservative and idempotent", async () =>
expect(migrated).toContain("data-config={{ nested: true }}");
expect(migrateWrnSource(migrated)).toBe(migrated);
});
test("update verification allows pending marker and configuration warnings", () => {
expect(
blockingVerificationChecks([
{
name: "update marker",
ok: false,
detail: "project last migrated to 0.2.79",
level: "warning",
},
{
name: "configuration",
ok: false,
detail: "No wrnexus.config file; framework defaults will be used",
level: "warning",
},
]),
).toEqual([]);
});
test("update verification still blocks real doctor errors", () => {
const fatal = {
name: "WRN language",
ok: false,
detail: "10 files, 1 errors, 0 warnings",
};
expect(
blockingVerificationChecks([
fatal,
{
name: "update marker",
ok: false,
detail: "project last migrated to 0.2.79",
level: "warning",
},
]),
).toEqual([fatal]);
});