@ucdjs/release-scripts 0.1.0-beta.6 → 0.1.0-beta.8

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 +4 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -342,6 +342,7 @@ async function pushBranch(branch, workspaceRoot, options) {
342
342
  //#region src/github.ts
343
343
  async function getExistingPullRequest({ owner, repo, branch, githubToken }) {
344
344
  try {
345
+ logger.debug(`Requesting pull request for branch: ${branch} (url: https://api.github.com/repos/${owner}/${repo}/pulls?state=open&head=${branch})`);
345
346
  const res = await fetch(`https://api.github.com/repos/${owner}/${repo}/pulls?state=open&head=${branch}`, { headers: {
346
347
  Accept: "application/vnd.github.v3+json",
347
348
  Authorization: `token ${githubToken}`
@@ -379,6 +380,7 @@ async function upsertPullRequest({ owner, repo, title, body, head, base, pullNum
379
380
  head,
380
381
  base
381
382
  };
383
+ logger.debug(`${isUpdate ? "Updating" : "Creating"} pull request (url: ${url})`);
382
384
  const res = await fetch(url, {
383
385
  method,
384
386
  headers: {
@@ -790,11 +792,11 @@ async function release(options) {
790
792
  if (normalizedOptions.safeguards && !await isWorkingDirectoryClean(workspaceRoot)) exitWithError("Working directory is not clean. Please commit or stash your changes before proceeding.");
791
793
  const workspacePackages = await discoverWorkspacePackages(workspaceRoot, options);
792
794
  if (workspacePackages.length === 0) {
793
- logger.log("No packages found to analyze for release.");
795
+ logger.log("No packages found to release.");
794
796
  return null;
795
797
  }
796
798
  const versionUpdates = await inferVersionUpdates(workspacePackages, await getWorkspacePackageCommits(workspaceRoot, workspacePackages), workspaceRoot, options.prompts?.versions !== false);
797
- if (versionUpdates.length === 0) exitWithError("No packages have changes requiring a release", "Make sure you have commits since the last release");
799
+ if (versionUpdates.length === 0) logger.warn("No packages have changes requiring a release");
798
800
  const allUpdates = createDependentUpdates(buildPackageDependencyGraph(workspacePackages), workspacePackages, versionUpdates);
799
801
  const currentBranch = await getCurrentBranch(workspaceRoot);
800
802
  const existingPullRequest = await getExistingPullRequest({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ucdjs/release-scripts",
3
- "version": "0.1.0-beta.6",
3
+ "version": "0.1.0-beta.8",
4
4
  "description": "@ucdjs release scripts",
5
5
  "type": "module",
6
6
  "license": "MIT",