@releasekit/version 0.6.0 → 0.6.1

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.
@@ -1982,6 +1982,32 @@ function createSyncStrategy(config) {
1982
1982
  ];
1983
1983
  }
1984
1984
  const workspaceNames = updatedPackages.filter((n) => n !== "root");
1985
+ let repoUrl = null;
1986
+ for (const searchPath of [mainPkgPath, versionSourcePath].filter(Boolean)) {
1987
+ try {
1988
+ const pkgJsonPath = path8.join(searchPath, "package.json");
1989
+ if (fs10.existsSync(pkgJsonPath)) {
1990
+ const pkgJson = JSON.parse(fs10.readFileSync(pkgJsonPath, "utf8"));
1991
+ let url;
1992
+ if (typeof pkgJson.repository === "string") {
1993
+ url = pkgJson.repository;
1994
+ } else if (pkgJson.repository?.url) {
1995
+ url = pkgJson.repository.url;
1996
+ }
1997
+ if (url) {
1998
+ if (url.startsWith("git+")) {
1999
+ url = url.slice(4);
2000
+ }
2001
+ if (url.endsWith(".git")) {
2002
+ url = url.slice(0, -4);
2003
+ }
2004
+ repoUrl = url;
2005
+ break;
2006
+ }
2007
+ }
2008
+ } catch {
2009
+ }
2010
+ }
1985
2011
  if (config.packageSpecificTags && workspaceNames.length > 0) {
1986
2012
  for (const pkgName of workspaceNames) {
1987
2013
  addChangelogData({
@@ -1989,7 +2015,7 @@ function createSyncStrategy(config) {
1989
2015
  version: nextVersion,
1990
2016
  previousVersion: latestTag || null,
1991
2017
  revisionRange,
1992
- repoUrl: null,
2018
+ repoUrl,
1993
2019
  entries: changelogEntries
1994
2020
  });
1995
2021
  }
@@ -1999,7 +2025,7 @@ function createSyncStrategy(config) {
1999
2025
  version: nextVersion,
2000
2026
  previousVersion: latestTag || null,
2001
2027
  revisionRange,
2002
- repoUrl: null,
2028
+ repoUrl,
2003
2029
  entries: changelogEntries
2004
2030
  });
2005
2031
  }
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  loadConfig,
6
6
  log,
7
7
  printJsonOutput
8
- } from "./chunk-NP6C2DJ2.js";
8
+ } from "./chunk-OLXJQCLG.js";
9
9
  import {
10
10
  readPackageVersion
11
11
  } from "./chunk-Q3FHZORY.js";
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  flushPendingWrites,
12
12
  getJsonData,
13
13
  loadConfig
14
- } from "./chunk-NP6C2DJ2.js";
14
+ } from "./chunk-OLXJQCLG.js";
15
15
  import {
16
16
  BaseVersionError
17
17
  } from "./chunk-Q3FHZORY.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@releasekit/version",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Semantic versioning based on Git history and conventional commits",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",