relizy 0.2.6-beta.0 → 0.2.6

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/cli.mjs CHANGED
@@ -5,7 +5,7 @@ import process from 'node:process';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import { printBanner, logger } from '@maz-ui/node';
7
7
  import { Command } from 'commander';
8
- import { W as isInCI, X as getCIName, b as bump, c as changelog, e as publish, a as providerRelease, r as release } from './shared/relizy.DAGRGqEb.mjs';
8
+ import { W as isInCI, X as getCIName, b as bump, c as changelog, e as publish, a as providerRelease, r as release } from './shared/relizy.Xd9rFefa.mjs';
9
9
  import 'changelogen';
10
10
  import 'fast-glob';
11
11
  import '@inquirer/prompts';
package/dist/index.d.mts CHANGED
@@ -638,8 +638,7 @@ interface ProviderReleaseOptions {
638
638
  }
639
639
  type PublishConfig = ChangelogConfig$1['publish'] & {
640
640
  /**
641
- * Package manager (e.g. `pnpm` or `npm`)
642
- * @values `pnpm`, `npm`, `yarn`, `bun`
641
+ * Package manager (e.g. `pnpm`, `npm`, `yarn` or `bun`)
643
642
  */
644
643
  packageManager?: PackageManager;
645
644
  /**
package/dist/index.d.ts CHANGED
@@ -638,8 +638,7 @@ interface ProviderReleaseOptions {
638
638
  }
639
639
  type PublishConfig = ChangelogConfig$1['publish'] & {
640
640
  /**
641
- * Package manager (e.g. `pnpm` or `npm`)
642
- * @values `pnpm`, `npm`, `yarn`, `bun`
641
+ * Package manager (e.g. `pnpm`, `npm`, `yarn` or `bun`)
643
642
  */
644
643
  packageManager?: PackageManager;
645
644
  /**
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { b as bump, c as changelog, n as checkGitStatusIfDirty, ae as confirmBump, u as createCommitAndTags, B as createGitlabRelease, h as defineConfig, q as detectGitProvider, D as detectPackageManager, E as determinePublishTag, a2 as determineReleaseType, a1 as determineSemverChange, Z as executeBuildCmd, Y as executeFormatCmd, V as executeHook, k as expandPackagesToBumpWithDependents, a6 as extractVersionFromPackageTag, o as fetchGitTags, g as generateChangelog, H as getAuthCommand, af as getBumpedIndependentPackages, ad as getBumpedPackageIndependently, X as getCIName, y as getCurrentGitBranch, z as getCurrentGitRef, f as getDefaultConfig, j as getDependentsOf, x as getFirstCommit, m as getGitStatus, P as getIndependentTag, T as getLastPackageTag, S as getLastRepoTag, Q as getLastStableTag, R as getLastTag, N as getPackageCommits, i as getPackageDependencies, a4 as getPackageNewVersion, M as getPackages, $ as getPackagesOrBumpedPackages, G as getPackagesToPublishInIndependentMode, F as getPackagesToPublishInSelectiveMode, ab as getPreid, K as getRootPackage, A as github, C as gitlab, O as hasLernaJson, _ as isBumpedPackage, ac as isChangedPreid, aa as isGraduating, a0 as isGraduatingToStableBetweenVersion, W as isInCI, a7 as isPrerelease, a9 as isPrereleaseReleaseType, a8 as isStableReleaseType, l as loadRelizyConfig, s as parseGitRemoteUrl, a as providerRelease, p as providerReleaseSafetyCheck, e as publish, I as publishPackage, d as publishSafetyCheck, v as pushCommitAndTags, J as readPackageJson, L as readPackages, r as release, U as resolveTags, t as topologicalSort, a5 as updateLernaVersion, w as writeChangelogToFile, a3 as writeVersion } from './shared/relizy.DAGRGqEb.mjs';
1
+ export { b as bump, c as changelog, n as checkGitStatusIfDirty, ae as confirmBump, u as createCommitAndTags, B as createGitlabRelease, h as defineConfig, q as detectGitProvider, D as detectPackageManager, E as determinePublishTag, a2 as determineReleaseType, a1 as determineSemverChange, Z as executeBuildCmd, Y as executeFormatCmd, V as executeHook, k as expandPackagesToBumpWithDependents, a6 as extractVersionFromPackageTag, o as fetchGitTags, g as generateChangelog, H as getAuthCommand, af as getBumpedIndependentPackages, ad as getBumpedPackageIndependently, X as getCIName, y as getCurrentGitBranch, z as getCurrentGitRef, f as getDefaultConfig, j as getDependentsOf, x as getFirstCommit, m as getGitStatus, P as getIndependentTag, T as getLastPackageTag, S as getLastRepoTag, Q as getLastStableTag, R as getLastTag, N as getPackageCommits, i as getPackageDependencies, a4 as getPackageNewVersion, M as getPackages, $ as getPackagesOrBumpedPackages, G as getPackagesToPublishInIndependentMode, F as getPackagesToPublishInSelectiveMode, ab as getPreid, K as getRootPackage, A as github, C as gitlab, O as hasLernaJson, _ as isBumpedPackage, ac as isChangedPreid, aa as isGraduating, a0 as isGraduatingToStableBetweenVersion, W as isInCI, a7 as isPrerelease, a9 as isPrereleaseReleaseType, a8 as isStableReleaseType, l as loadRelizyConfig, s as parseGitRemoteUrl, a as providerRelease, p as providerReleaseSafetyCheck, e as publish, I as publishPackage, d as publishSafetyCheck, v as pushCommitAndTags, J as readPackageJson, L as readPackages, r as release, U as resolveTags, t as topologicalSort, a5 as updateLernaVersion, w as writeChangelogToFile, a3 as writeVersion } from './shared/relizy.Xd9rFefa.mjs';
2
2
  import '@maz-ui/node';
3
3
  import 'node:fs';
4
4
  import 'node:path';
@@ -402,6 +402,23 @@ function isAllowedCommit({
402
402
  }
403
403
  return false;
404
404
  }
405
+ function isCommitOfTrackedPackages({
406
+ commit,
407
+ config
408
+ }) {
409
+ if (!config.monorepo?.packages?.length) {
410
+ return true;
411
+ }
412
+ const packages = readPackages({
413
+ cwd: config.cwd,
414
+ patterns: config.monorepo.packages,
415
+ ignorePackageNames: config.monorepo?.ignorePackageNames
416
+ });
417
+ return packages.some((pkg) => {
418
+ const path = relative(config.cwd, pkg.path);
419
+ return commit.body.includes(path);
420
+ });
421
+ }
405
422
  async function getPackageCommits({
406
423
  pkg,
407
424
  from,
@@ -428,13 +445,14 @@ async function getPackageCommits({
428
445
  if (!isAllowedCommit({ commit, type, changelog })) {
429
446
  return false;
430
447
  }
431
- if (pkg.path === changelogConfig.cwd || pkg.name === rootPackage.name) {
448
+ const isTracked = isCommitOfTrackedPackages({ commit, config });
449
+ if ((pkg.path === changelogConfig.cwd || pkg.name === rootPackage.name) && isTracked) {
432
450
  return true;
433
451
  }
434
452
  const packageRelativePath = relative(changelogConfig.cwd, pkg.path);
435
453
  const scopeMatches = commit.scope === pkg.name;
436
454
  const bodyContainsPath = commit.body.includes(packageRelativePath);
437
- return scopeMatches || bodyContainsPath;
455
+ return (scopeMatches || bodyContainsPath) && isTracked;
438
456
  });
439
457
  logger.debug(`Found ${commits.length} commit(s) for ${pkg.name} from ${from} to ${to}`);
440
458
  if (commits.length > 0) {
@@ -2440,7 +2458,7 @@ async function executePublishCommand({
2440
2458
  packageManager
2441
2459
  }) {
2442
2460
  logger.info(`${dryRun ? "[dry-run] " : ""}Publishing ${packageNameAndVersion} with tag "${tag}"`);
2443
- const dryRunPublish = dryRun && packageManager !== "npm" && packageManager !== "yarn";
2461
+ const dryRunPublish = dryRun && packageManager !== "npm" && packageManager !== "pnpm";
2444
2462
  if (dryRunPublish) {
2445
2463
  logger.info(`${dryRun ? "[dry-run] " : ""}Skipping actual publish for ${packageNameAndVersion}`);
2446
2464
  return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "relizy",
3
3
  "type": "module",
4
- "version": "0.2.6-beta.0",
4
+ "version": "0.2.6",
5
5
  "packageManager": "pnpm@10.22.0",
6
6
  "description": "Changelogen adapter for monorepo management with unified and independent versioning",
7
7
  "author": "Louis Mazel <me@loicmazuel.com>",
@@ -89,7 +89,7 @@
89
89
  "@commitlint/cz-commitlint": "^20.1.0",
90
90
  "@commitlint/types": "^20.0.0",
91
91
  "@maz-ui/eslint-config": "4.3.2-beta.1",
92
- "@types/node": "^24.10.1",
92
+ "@types/node": "^25.0.2",
93
93
  "@types/semver": "^7.7.1",
94
94
  "@vitest/coverage-v8": "^4.0.10",
95
95
  "cross-env": "^10.1.0",