@releasekit/version 0.5.0 → 0.6.0

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.
@@ -1146,6 +1146,7 @@ async function calculateVersion(config, options) {
1146
1146
  latestTag,
1147
1147
  name,
1148
1148
  path: pkgPath,
1149
+ commitCheckPath,
1149
1150
  type: optionsType,
1150
1151
  prereleaseIdentifier: optionsPrereleaseIdentifier
1151
1152
  } = options;
@@ -1243,7 +1244,7 @@ async function calculateVersion(config, options) {
1243
1244
  const releaseTypeFromCommits = recommendedBump && "releaseType" in recommendedBump ? recommendedBump.releaseType : void 0;
1244
1245
  const currentVersion = getCurrentVersionFromSource2();
1245
1246
  if (versionSource && versionSource.source === "git") {
1246
- const checkPath = pkgPath || cwd();
1247
+ const checkPath = commitCheckPath || pkgPath || cwd();
1247
1248
  const commitsLength = getCommitsLength(checkPath, versionSource.version);
1248
1249
  if (commitsLength === 0) {
1249
1250
  log(
@@ -1847,6 +1848,7 @@ function createSyncStrategy(config) {
1847
1848
  } = config;
1848
1849
  const formattedPrefix = formatVersionPrefix(versionPrefix || "v");
1849
1850
  let latestTag = await getLatestTag();
1851
+ const repoRoot = packages.root ?? process.cwd();
1850
1852
  let mainPkgPath = packages.root;
1851
1853
  let mainPkgName;
1852
1854
  let versionSourcePath = mainPkgPath;
@@ -1890,6 +1892,7 @@ function createSyncStrategy(config) {
1890
1892
  baseBranch,
1891
1893
  prereleaseIdentifier,
1892
1894
  path: versionSourcePath,
1895
+ commitCheckPath: repoRoot,
1893
1896
  name: versionSourceName,
1894
1897
  type: config.type
1895
1898
  });
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  loadConfig,
6
6
  log,
7
7
  printJsonOutput
8
- } from "./chunk-MRXNAFME.js";
8
+ } from "./chunk-NP6C2DJ2.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-MRXNAFME.js";
14
+ } from "./chunk-NP6C2DJ2.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.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Semantic versioning based on Git history and conventional commits",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",