From 31478fe83805c90ab72427af4299379283a92fea Mon Sep 17 00:00:00 2001 From: Maxwell Date: Thu, 23 Nov 2023 11:38:19 +0300 Subject: [PATCH] Map pnpm to npm_and_yarn --- .../Models/DependabotUpdateScheduleTests.cs | 2 +- server/Tingle.Dependabot.Tests/Workflow/UpdateRunnerTests.cs | 2 +- server/Tingle.Dependabot/Workflow/UpdateRunner.cs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/Tingle.Dependabot.Tests/Models/DependabotUpdateScheduleTests.cs b/server/Tingle.Dependabot.Tests/Models/DependabotUpdateScheduleTests.cs index 82141117..6ef2ef91 100644 --- a/server/Tingle.Dependabot.Tests/Models/DependabotUpdateScheduleTests.cs +++ b/server/Tingle.Dependabot.Tests/Models/DependabotUpdateScheduleTests.cs @@ -11,7 +11,7 @@ public class DependabotUpdateScheduleTests [InlineData(DependabotScheduleInterval.Weekly, "10:00", DependabotScheduleDay.Saturday, "00 10 * * 6")] [InlineData(DependabotScheduleInterval.Weekly, "15:00", null, "00 15 * * 1")] // defaults to Mondays [InlineData(DependabotScheduleInterval.Monthly, "17:30", DependabotScheduleDay.Saturday, "30 17 1 * *")] // ignores day - public void GenerateCronSchedule_Works(DependabotScheduleInterval interval, string time, DependabotScheduleDay? day, string expected) + public void GenerateCronSchedule_Works(DependabotScheduleInterval interval, string? time, DependabotScheduleDay? day, string expected) { var schedule = new DependabotUpdateSchedule { Interval = interval, }; if (time != null) schedule.Time = TimeOnly.Parse(time); diff --git a/server/Tingle.Dependabot.Tests/Workflow/UpdateRunnerTests.cs b/server/Tingle.Dependabot.Tests/Workflow/UpdateRunnerTests.cs index b074410c..802cff81 100644 --- a/server/Tingle.Dependabot.Tests/Workflow/UpdateRunnerTests.cs +++ b/server/Tingle.Dependabot.Tests/Workflow/UpdateRunnerTests.cs @@ -309,13 +309,13 @@ public void ConvertEcosystemToPackageManager_Works(string ecosystem, string expe { "mix", "hex" }, { "npm", "npm_and_yarn" }, { "yarn", "npm_and_yarn" }, + { "pnpm", "npm_and_yarn" }, { "pipenv", "pip" }, { "pip-compile", "pip" }, { "poetry", "pip" }, // retained { "nuget", "nuget" }, - { "npm", "npm_and_yarn" }, { "gradle", "gradle" }, { "maven", "maven" }, { "swift", "swift" }, diff --git a/server/Tingle.Dependabot/Workflow/UpdateRunner.cs b/server/Tingle.Dependabot/Workflow/UpdateRunner.cs index 899d4e56..7051cd6d 100644 --- a/server/Tingle.Dependabot/Workflow/UpdateRunner.cs +++ b/server/Tingle.Dependabot/Workflow/UpdateRunner.cs @@ -474,6 +474,7 @@ internal static IList> MakeExtraCredentials(ICollecti "npm" => "npm_and_yarn", // Additional ones "yarn" => "npm_and_yarn", + "pnpm" => "npm_and_yarn", "pipenv" => "pip", "pip-compile" => "pip", "poetry" => "pip",