versionary 0.15.0 → 0.15.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/dist/git/commits.js +14 -8
- package/package.json +1 -1
package/dist/git/commits.js
CHANGED
|
@@ -355,11 +355,14 @@ function getCommitsSinceLastTag(cwd = process.cwd(), baselineSha) {
|
|
|
355
355
|
function getCommitsForPath(cwd = process.cwd(), baselineSha, packagePath = ".", excludePaths = []) {
|
|
356
356
|
const range = resolveRange(cwd, baselineSha);
|
|
357
357
|
const normalizedPackagePath = packagePath === "." ? "." : packagePath;
|
|
358
|
-
const excludes = excludePaths.
|
|
358
|
+
const excludes = excludePaths.flatMap((excludePath) => {
|
|
359
|
+
const normalizedExcludePath = excludePath
|
|
360
|
+
.replace(/^\.\//u, "")
|
|
361
|
+
.replace(/\/+$/u, "");
|
|
359
362
|
const combined = normalizedPackagePath === "."
|
|
360
|
-
?
|
|
361
|
-
: node_path_1.default.posix.join(normalizedPackagePath,
|
|
362
|
-
return `:(exclude)${combined}
|
|
363
|
+
? normalizedExcludePath
|
|
364
|
+
: node_path_1.default.posix.join(normalizedPackagePath, normalizedExcludePath);
|
|
365
|
+
return [`:(exclude)${combined}`, `:(exclude)${combined}/**`];
|
|
363
366
|
});
|
|
364
367
|
return readGitLog(cwd, range, [normalizedPackagePath, ...excludes]);
|
|
365
368
|
}
|
|
@@ -370,11 +373,14 @@ function getParsedCommitsSinceLastTag(cwd = process.cwd(), baselineSha) {
|
|
|
370
373
|
function getParsedCommitsForPath(cwd = process.cwd(), baselineSha, packagePath = ".", excludePaths = []) {
|
|
371
374
|
const range = resolveRange(cwd, baselineSha);
|
|
372
375
|
const normalizedPackagePath = packagePath === "." ? "." : packagePath;
|
|
373
|
-
const excludes = excludePaths.
|
|
376
|
+
const excludes = excludePaths.flatMap((excludePath) => {
|
|
377
|
+
const normalizedExcludePath = excludePath
|
|
378
|
+
.replace(/^\.\//u, "")
|
|
379
|
+
.replace(/\/+$/u, "");
|
|
374
380
|
const combined = normalizedPackagePath === "."
|
|
375
|
-
?
|
|
376
|
-
: node_path_1.default.posix.join(normalizedPackagePath,
|
|
377
|
-
return `:(exclude)${combined}
|
|
381
|
+
? normalizedExcludePath
|
|
382
|
+
: node_path_1.default.posix.join(normalizedPackagePath, normalizedExcludePath);
|
|
383
|
+
return [`:(exclude)${combined}`, `:(exclude)${combined}/**`];
|
|
378
384
|
});
|
|
379
385
|
return readGitLogFull(cwd, range, [normalizedPackagePath, ...excludes]);
|
|
380
386
|
}
|