@ucdjs/release-scripts 0.1.2 → 0.1.5

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.
Files changed (2) hide show
  1. package/dist/index.mjs +20 -8
  2. package/package.json +9 -8
package/dist/index.mjs CHANGED
@@ -222,7 +222,7 @@ function exitWithError(message, hint, cause) {
222
222
  const HASH_PREFIX_RE = /^#/;
223
223
  function formatCommitLine({ commit, owner, repo, authors }) {
224
224
  const commitUrl = `https://github.com/${owner}/${repo}/commit/${commit.hash}`;
225
- let line = `${commit.description}`;
225
+ let line = commit.description;
226
226
  const references = commit.references ?? [];
227
227
  for (const ref of references) {
228
228
  if (!ref.value) continue;
@@ -973,7 +973,7 @@ async function getMostRecentPackageTag(workspaceRoot, packageName) {
973
973
  } });
974
974
  const tags = stdout.split("\n").map((tag) => tag.trim()).filter(Boolean);
975
975
  if (tags.length === 0) return ok(void 0);
976
- return ok(tags.filter((t) => semver.valid(t.slice(t.lastIndexOf("@") + 1))).sort((a, b) => {
976
+ return ok(tags.filter((t) => semver.valid(t.slice(t.lastIndexOf("@") + 1))).toSorted((a, b) => {
977
977
  const va = a.slice(a.lastIndexOf("@") + 1);
978
978
  const vb = b.slice(b.lastIndexOf("@") + 1);
979
979
  return semver.rcompare(va, vb);
@@ -992,7 +992,7 @@ async function getMostRecentPackageStableTag(workspaceRoot, packageName) {
992
992
  cwd: workspaceRoot,
993
993
  stdio: "pipe"
994
994
  } });
995
- const tags = stdout.split("\n").map((tag) => tag.trim()).filter((tag) => Boolean(tag) && semver.valid(tag.slice(tag.lastIndexOf("@") + 1))).sort((a, b) => {
995
+ const tags = stdout.split("\n").map((tag) => tag.trim()).filter((tag) => Boolean(tag) && semver.valid(tag.slice(tag.lastIndexOf("@") + 1))).toSorted((a, b) => {
996
996
  const va = a.slice(a.lastIndexOf("@") + 1);
997
997
  const vb = b.slice(b.lastIndexOf("@") + 1);
998
998
  return semver.rcompare(va, vb);
@@ -1648,7 +1648,19 @@ async function prepareReleaseBranch(options) {
1648
1648
  return ok(void 0);
1649
1649
  }
1650
1650
  async function syncReleaseChanges(options) {
1651
- const { workspaceRoot, releaseBranch, commitMessage, hasChanges } = options;
1651
+ const { workspaceRoot, releaseBranch, commitMessage, hasChanges, additionalPaths } = options;
1652
+ if (additionalPaths && additionalPaths.length > 0) try {
1653
+ await run("git", [
1654
+ "add",
1655
+ "--",
1656
+ ...additionalPaths
1657
+ ], { nodeOptions: {
1658
+ cwd: workspaceRoot,
1659
+ stdio: "pipe"
1660
+ } });
1661
+ } catch (error) {
1662
+ logger.verbose(`Failed to stage additional paths: ${String(error)}`);
1663
+ }
1652
1664
  const committed = hasChanges ? await commitChanges(commitMessage, workspaceRoot) : ok(false);
1653
1665
  if (!committed.ok) return committed;
1654
1666
  const isAhead = await isBranchAheadOfRemote(releaseBranch, workspaceRoot);
@@ -2093,11 +2105,10 @@ async function calculateVersionUpdates({ workspacePackages, packageCommits, work
2093
2105
  });
2094
2106
  continue;
2095
2107
  }
2096
- newVersion = autoVersion;
2097
2108
  }
2098
2109
  const selectedVersion = await selectVersionPrompt(workspaceRoot, pkg, pkg.version, newVersion, {
2099
- defaultChoice: override ? "suggested" : "auto",
2100
- suggestedHint: `auto: ${determinedBump} → ${autoVersion}`
2110
+ defaultChoice: "suggested",
2111
+ suggestedHint: override ? `override: ${override.version}, auto: ${determinedBump} → ${autoVersion}` : `auto: ${determinedBump} → ${autoVersion}`
2101
2112
  });
2102
2113
  if (selectedVersion === null) continue;
2103
2114
  const userBump = calculateBumpType(pkg.version, selectedVersion);
@@ -2454,7 +2465,8 @@ async function prepareWorkflow(options) {
2454
2465
  workspaceRoot: options.workspaceRoot,
2455
2466
  releaseBranch: options.branch.release,
2456
2467
  commitMessage: "chore: update release versions",
2457
- hasChanges: true
2468
+ hasChanges: true,
2469
+ additionalPaths: [overridesPath]
2458
2470
  });
2459
2471
  if (!hasChangesToPush.ok) exitWithError("Failed to sync release changes.", void 0, hasChangesToPush.error);
2460
2472
  if (!hasChangesToPush.value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ucdjs/release-scripts",
3
- "version": "0.1.2",
3
+ "version": "0.1.5",
4
4
  "description": "@ucdjs release scripts",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -33,17 +33,18 @@
33
33
  "tinyexec": "1.0.4"
34
34
  },
35
35
  "devDependencies": {
36
- "@luxass/msw-utils": "0.6.1",
37
- "@types/node": "22.18.12",
36
+ "@luxass/msw-utils": "0.6.2",
37
+ "@types/node": "22.19.14",
38
38
  "@types/prompts": "2.4.9",
39
39
  "@types/semver": "7.7.1",
40
40
  "eta": "4.5.1",
41
41
  "msw": "2.12.14",
42
- "oxfmt": "^0.42.0",
43
- "oxlint": "^1.57.0",
44
- "tsdown": "0.21.2",
45
- "typescript": "5.9.3",
46
- "vitest": "4.1.0",
42
+ "oxfmt": "0.43.0",
43
+ "oxlint": "1.58.0",
44
+ "oxlint-tsgolint": "0.19.0",
45
+ "tsdown": "0.21.7",
46
+ "typescript": "6.0.2",
47
+ "vitest": "4.1.2",
47
48
  "vitest-testdirs": "4.4.3"
48
49
  },
49
50
  "inlinedDependencies": {