release: WRNexusJS 0.7.0
This commit is contained in:
@@ -26,6 +26,8 @@ import {
|
||||
} from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import process from "node:process";
|
||||
import { validateAndHashStage, type StagedPackageIntegrity } from "./lib/package-integrity.ts";
|
||||
|
||||
const repoRoot = join(dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const packagesDir = join(repoRoot, "packages");
|
||||
@@ -240,6 +242,7 @@ async function main() {
|
||||
mkdirSync(stageRoot, { recursive: true });
|
||||
|
||||
const order: string[] = [];
|
||||
const packageIntegrity: StagedPackageIntegrity[] = [];
|
||||
for (const p of pkgs) {
|
||||
const entries = entriesOf(p.dir, p.manifest);
|
||||
process.stdout.write(`▸ ${p.name} … `);
|
||||
@@ -297,11 +300,27 @@ async function main() {
|
||||
);
|
||||
}
|
||||
|
||||
packageIntegrity.push(validateAndHashStage(stage, manifest));
|
||||
order.push(p.name);
|
||||
console.log("staged");
|
||||
console.log("staged + verified");
|
||||
}
|
||||
|
||||
console.log(`\n✓ Staged ${order.length} package(s) under .publish/ (access: ${ACCESS})`);
|
||||
const integrityDocument = {
|
||||
schemaVersion: 1,
|
||||
frameworkVersion: String(
|
||||
JSON.parse(readFileSync(join(repoRoot, "package.json"), "utf8")).version,
|
||||
),
|
||||
access: ACCESS,
|
||||
packages: packageIntegrity,
|
||||
};
|
||||
writeFileSync(
|
||||
join(stageRoot, "PACKAGE-INTEGRITY.json"),
|
||||
`${JSON.stringify(integrityDocument, null, 2)}\n`,
|
||||
);
|
||||
|
||||
console.log(
|
||||
`\n✓ Staged and verified ${order.length} package(s) under .publish/ (access: ${ACCESS})`,
|
||||
);
|
||||
console.log("Publish order (deps first):");
|
||||
for (const n of order) {
|
||||
console.log(` npm publish .publish/${n.replace("@wrnexus/", "")} --access ${ACCESS}`);
|
||||
|
||||
Reference in New Issue
Block a user