release: WRNexusJS 0.3.4

This commit is contained in:
2026-07-22 21:25:53 +05:30
parent e2d9ea1ece
commit d51662826d
73 changed files with 1533 additions and 1125 deletions
+64
View File
@@ -195,6 +195,10 @@ function verifyDocs(all: PackageInfo[], version: string) {
function prepare(all: PackageInfo[], version: string) {
requireMigration(version);
console.log(`\nPreparing WRNexusJS ${version} (${all.length} packages)…\n`);
run(process.execPath, ["run", "scripts/generate-ui-component-reference.mjs"]);
run(process.execPath, ["run", "format"]);
run(process.execPath, ["run", "check"]);
run(process.execPath, ["run", "scripts/publish-packages.ts"]);
validateStaging(all, version);
@@ -203,11 +207,71 @@ function prepare(all: PackageInfo[], version: string) {
);
}
function verifyUiComponentReference(): void {
const result = run(
process.execPath,
["run", "scripts/generate-ui-component-reference.mjs"],
root,
{
capture: true,
allowFailure: true,
},
);
if (result.status !== 0) {
const detail = result.stderr || result.stdout || "";
throw new Error(`Failed to generate the UI component reference.${detail ? `\n${detail}` : ""}`);
}
const changed =
output(
"git",
[
"diff",
"--name-only",
"--",
"packages/ui/component-reference.json",
"packages/ui/COMPONENTS.md",
],
root,
).trim() ||
output(
"git",
[
"ls-files",
"--others",
"--exclude-standard",
"--",
"packages/ui/component-reference.json",
"packages/ui/COMPONENTS.md",
],
root,
).trim();
if (changed) {
throw new Error(
"UI component reference is stale. Run " +
"`bun run scripts/generate-ui-component-reference.mjs`, " +
"then format, commit, and push the generated files.",
);
}
}
function publish(all: PackageInfo[], version: string) {
if (!existsSync(docsRoot)) throw new Error(`Docs repository not found: ${docsRoot}`);
requireMigration(version);
requireCleanAndPushed(root, "Framework");
requireCleanAndPushed(docsRoot, "Docs");
verifyUiComponentReference();
run(process.execPath, ["run", "scripts/generate-ui-component-reference.mjs"]);
run(process.execPath, ["run", "format"]);
requireCleanAndPushed(root, "Framework after generated references");
run(process.execPath, ["run", "scripts/publish-packages.ts"]);
// Rebuild from the committed source and refuse publication if staging drifts.
run(process.execPath, ["run", "scripts/publish-packages.ts"]);