@@ -19744,10 +19744,10 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
1974419744 (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
1974519745 }
1974619746 exports.error = error;
19747- function warning (message, properties = {}) {
19747+ function warning2 (message, properties = {}) {
1974819748 (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
1974919749 }
19750- exports.warning = warning ;
19750+ exports.warning = warning2 ;
1975119751 function notice(message, properties = {}) {
1975219752 (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
1975319753 }
@@ -24406,6 +24406,23 @@ async function run() {
2440624406 const lockfilePath = detectLockfile(workspacePath);
2440724407 const token = core4.getInput("github-token", { required: true });
2440824408 const prNumber = parseInt(core4.getInput("pr-number", { required: true }), 10);
24409+ const dependencyThreshold = parseInt(
24410+ core4.getInput("dependency-threshold") || "10",
24411+ 10
24412+ );
24413+ const sizeThreshold = parseInt(
24414+ core4.getInput("size-threshold") || "100000",
24415+ 10
24416+ );
24417+ const duplicateThreshold = parseInt(
24418+ core4.getInput("duplicate-threshold") || "1",
24419+ 10
24420+ );
24421+ const packSizeThreshold = parseInt(
24422+ core4.getInput("pack-size-threshold") || "50000",
24423+ 10
24424+ );
24425+ const excludePackages = core4.getInput("exclude-packages");
2440924426 if (Number.isNaN(prNumber) || prNumber < 1) {
2441024427 core4.info("No valid pull request number was found. Skipping.");
2441124428 return;
@@ -24437,22 +24454,26 @@ async function run() {
2443724454 }
2443824455 const currentDeps = parseLockfile(lockfilePath, currentPackageLock);
2443924456 const baseDeps = parseLockfile(lockfilePath, basePackageLock);
24440- const dependencyThreshold = parseInt(
24441- core4.getInput("dependency-threshold") || "10",
24442- 10
24443- );
24444- const sizeThreshold = parseInt(
24445- core4.getInput("size-threshold") || "100000",
24446- 10
24447- );
24448- const duplicateThreshold = parseInt(
24449- core4.getInput("duplicate-threshold") || "1",
24450- 10
24451- );
24452- const packSizeThreshold = parseInt(
24453- core4.getInput("pack-size-threshold") || "50000",
24454- 10
24455- );
24457+ if (excludePackages) {
24458+ try {
24459+ const excludeRegex = new RegExp(excludePackages);
24460+ core4.info(`Excluding packages matching pattern: ${excludePackages}`);
24461+ for (const packageName of currentDeps.keys()) {
24462+ if (excludeRegex.test(packageName)) {
24463+ currentDeps.delete(packageName);
24464+ }
24465+ }
24466+ for (const packageName of baseDeps.keys()) {
24467+ if (excludeRegex.test(packageName)) {
24468+ baseDeps.delete(packageName);
24469+ }
24470+ }
24471+ } catch (err) {
24472+ core4.warning(
24473+ `Invalid exclude-packages regex pattern: ${excludePackages}`
24474+ );
24475+ }
24476+ }
2445624477 core4.info(`Dependency threshold set to ${dependencyThreshold}`);
2445724478 core4.info(`Size threshold set to ${formatBytes(sizeThreshold)}`);
2445824479 core4.info(`Duplicate threshold set to ${duplicateThreshold}`);
0 commit comments