enablement-build-monorepo-version 8.3.9 → 8.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enablement-build-monorepo-version",
3
- "version": "8.3.9",
3
+ "version": "8.4.1",
4
4
  "description": "This detects changes in the children packages of a monorepo.",
5
5
  "type": "module",
6
6
  "module": "./src/index.mjs",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "minimatch": "~10.1.1",
18
- "enablement-build-manifest": "1.8.1"
18
+ "enablement-build-manifest": "1.8.2"
19
19
  },
20
20
  "devDependencies": {
21
21
  "jest": "^30.4.2"
package/src/version.mjs CHANGED
@@ -134,18 +134,13 @@ function readCommitMessagesSinceTag(imageName, lastVersion, args, options) {
134
134
 
135
135
  const baseTag = findBaseTag(imageName, lastVersion);
136
136
  if (!baseTag) {
137
+ // No release tag to diff against — scanning full project history would pick up
138
+ // unrelated feat/refactor commits from long before the last release and cause
139
+ // an incorrect minor/major jump. Default to a patch bump instead.
137
140
  if (options.debug) {
138
- console.log('\x1b[33m%s\x1b[0m', `No matching base tag found for ${imageName}@${lastVersion}; falling back to recent history.`);
139
- }
140
- const fallbackCmd = hasScope
141
- ? `git log HEAD --pretty=%B --no-merges -- "${scopePath}"`
142
- : `git log HEAD --pretty=%B --no-merges`;
143
-
144
- try {
145
- return execSync(fallbackCmd, { encoding: 'utf8' }).trim();
146
- } catch {
147
- return '';
141
+ console.log('\x1b[33m%s\x1b[0m', `No matching base tag found for ${imageName}@${lastVersion}; defaulting to patch bump.`);
148
142
  }
143
+ return '';
149
144
  }
150
145
 
151
146
  const cmd = hasScope
@@ -578,9 +578,9 @@ describe("extractDirsFromPatterns", () => {
578
578
  expect(extractDirsFromPatterns(["*"])).toEqual([]);
579
579
  });
580
580
 
581
- it("handles deep globs by taking only the first segment", () => {
581
+ it("preserves the full literal prefix for a deep glob", () => {
582
582
  expect(extractDirsFromPatterns(["components/ui/**"])).toEqual([
583
- "components",
583
+ "components/ui",
584
584
  ]);
585
585
  });
586
586
  });