@knapsack-pro/core
Advanced tools
Comparing version 6.2.0 to 6.2.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.commitAuthors = exports.buildAuthor = exports.KnapsackProEnvConfig = void 0; | ||
exports.commitAuthors = exports.isShallowRepository = exports.buildAuthor = exports.KnapsackProEnvConfig = void 0; | ||
var childProcess = require("child_process"); | ||
@@ -231,2 +231,13 @@ var _1 = require("."); | ||
exports.buildAuthor = buildAuthor; | ||
var gitIsShallowRepository = function () { | ||
return execSync("git rev-parse --is-shallow-repository 2>/dev/null"); | ||
}; | ||
var $isShallowRepository = function (command) { | ||
return command().toString().trim() === 'true'; | ||
}; | ||
var isShallowRepository = function (command) { | ||
if (command === void 0) { command = gitIsShallowRepository; } | ||
return $isShallowRepository(command); | ||
}; | ||
exports.isShallowRepository = isShallowRepository; | ||
var $commitAuthors = function (command) { | ||
@@ -253,4 +264,12 @@ try { | ||
var gitCommitAuthors = function () { | ||
if (_1.isCI) { | ||
execSync("git fetch --shallow-since \"one month ago\" --quiet 2>/dev/null"); | ||
if (_1.isCI && (0, exports.isShallowRepository)()) { | ||
var gitFetchShallowSinceCommand = 'git fetch --shallow-since "one month ago" --quiet 2>/dev/null'; | ||
try { | ||
execSync(gitFetchShallowSinceCommand, { | ||
timeout: 5000, | ||
}); | ||
} | ||
catch (error) { | ||
knapsackProLogger.debug("Skip the `".concat(gitFetchShallowSinceCommand, "` command because it took too long. Error: ").concat(error.message)); | ||
} | ||
} | ||
@@ -257,0 +276,0 @@ return execSync("git log --since \"one month ago\" 2>/dev/null | git shortlog --summary --email 2>/dev/null"); |
{ | ||
"name": "@knapsack-pro/core", | ||
"version": "6.2.0", | ||
"version": "6.2.1", | ||
"description": "Knapsack Pro Core library splits tests across CI nodes and makes sure that tests will run in optimal time on each CI node. This library gives core features like communication with KnapsackPro.com API. This library is a dependency for other projects specific for particular test runner.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84104
2089