@ucdjs/release-scripts 0.1.0-beta.20 → 0.1.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +11 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -202,8 +202,7 @@ async function createBranch(branch, base, workspaceRoot) {
|
|
|
202
202
|
try {
|
|
203
203
|
logger.info(`Creating branch: ${farver.green(branch)} from ${farver.cyan(base)}`);
|
|
204
204
|
await runIfNotDry("git", [
|
|
205
|
-
"
|
|
206
|
-
"-b",
|
|
205
|
+
"branch",
|
|
207
206
|
branch,
|
|
208
207
|
base
|
|
209
208
|
], { nodeOptions: {
|
|
@@ -1290,6 +1289,10 @@ async function selectVersionPrompt(workspaceRoot, pkg, currentVersion, suggested
|
|
|
1290
1289
|
value: "suggested",
|
|
1291
1290
|
title: `suggested ${farver.bold(suggestedVersion)}`
|
|
1292
1291
|
},
|
|
1292
|
+
{
|
|
1293
|
+
value: "as-is",
|
|
1294
|
+
title: `as-is ${farver.dim("(keep current version)")}`
|
|
1295
|
+
},
|
|
1293
1296
|
{
|
|
1294
1297
|
value: "custom",
|
|
1295
1298
|
title: "custom"
|
|
@@ -1312,7 +1315,8 @@ async function selectVersionPrompt(workspaceRoot, pkg, currentVersion, suggested
|
|
|
1312
1315
|
else if (answers.version === "custom") {
|
|
1313
1316
|
if (!answers.custom) return null;
|
|
1314
1317
|
return answers.custom;
|
|
1315
|
-
} else
|
|
1318
|
+
} else if (answers.version === "as-is") return currentVersion;
|
|
1319
|
+
else return getNextVersion(pkg.version, answers.version);
|
|
1316
1320
|
}
|
|
1317
1321
|
|
|
1318
1322
|
//#endregion
|
|
@@ -1689,7 +1693,7 @@ async function verify(options) {
|
|
|
1689
1693
|
logger.info(`Found release PR #${releasePr.number}. Verifying against default branch "${defaultBranch}"...`);
|
|
1690
1694
|
const originalBranch = await getCurrentBranch(workspaceRoot);
|
|
1691
1695
|
if (originalBranch !== defaultBranch) await checkoutBranch(defaultBranch, workspaceRoot);
|
|
1692
|
-
const overridesPath =
|
|
1696
|
+
const overridesPath = ucdjsReleaseOverridesPath;
|
|
1693
1697
|
let existingOverrides = {};
|
|
1694
1698
|
try {
|
|
1695
1699
|
const overridesContent = await readFileFromGit(workspaceRoot, releasePr.head.sha, overridesPath);
|
|
@@ -1713,7 +1717,7 @@ async function verify(options) {
|
|
|
1713
1717
|
const expectedVersionMap = new Map(expectedUpdates.map((u) => [u.package.name, u.newVersion]));
|
|
1714
1718
|
const prVersionMap = /* @__PURE__ */ new Map();
|
|
1715
1719
|
for (const pkg of mainPackages) {
|
|
1716
|
-
const pkgJsonPath = join(pkg.path
|
|
1720
|
+
const pkgJsonPath = relative(workspaceRoot, join(pkg.path, "package.json"));
|
|
1717
1721
|
const pkgJsonContent = await readFileFromGit(workspaceRoot, releasePr.head.sha, pkgJsonPath);
|
|
1718
1722
|
if (pkgJsonContent) {
|
|
1719
1723
|
const pkgJson = JSON.parse(pkgJsonContent);
|
|
@@ -1747,7 +1751,8 @@ async function verify(options) {
|
|
|
1747
1751
|
sha: releasePr.head.sha,
|
|
1748
1752
|
state: "success",
|
|
1749
1753
|
context: statusContext,
|
|
1750
|
-
description: "Release PR is up to date."
|
|
1754
|
+
description: "Release PR is up to date.",
|
|
1755
|
+
targetUrl: `https://github.com/${normalizedOptions.owner}/${normalizedOptions.repo}/pull/${releasePr.number}`
|
|
1751
1756
|
});
|
|
1752
1757
|
logger.success("Verification successful. Commit status set to 'success'.");
|
|
1753
1758
|
}
|