Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NuGet package manager #8

Merged
merged 50 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
978929a
Introduce package version factory
jerone Oct 5, 2024
1f4441f
Squash all NPM into one service
jerone Oct 5, 2024
4f013d3
Rename factory to manager
jerone Oct 5, 2024
e0880cb
Add package manager setting
jerone Oct 10, 2024
2d6b01a
PosInformatique.Moq.Analyzers
jerone Oct 11, 2024
bde7d80
Grammar
jerone Oct 11, 2024
69cfb08
Add NuGet service
jerone Oct 12, 2024
a006145
Parse version strict
jerone Oct 12, 2024
d2ffe00
Var url
jerone Oct 12, 2024
3c7c420
Improve logging
jerone Oct 12, 2024
c4f160c
Simplify FetchPackage return type
jerone Oct 12, 2024
40a97c5
Gui snapshot tests
jerone Oct 12, 2024
e327328
OnPackageManagerSettingChanged improvements
jerone Oct 12, 2024
ef5a3d2
Return null when package versions is absent
jerone Oct 12, 2024
7986621
GetVersions returns only valid versions
jerone Oct 12, 2024
e85c2a2
Clean up
jerone Oct 12, 2024
330463a
Chocolatey.NuGet.Versioning.xml
jerone Oct 13, 2024
e3e921a
Verify ignore stack traces
jerone Oct 13, 2024
11fb8e8
PackageManagerFactory tests
jerone Oct 13, 2024
136154a
📄
jerone Oct 14, 2024
f783527
Clean up
jerone Oct 14, 2024
0f962e5
NuGetServiceTests
jerone Oct 14, 2024
276e263
Trim whitespaces for package name
jerone Oct 14, 2024
60cbee4
NuGet Cheat Sheet
jerone Oct 20, 2024
02e596c
Add Search Keywords
jerone Oct 21, 2024
34257ec
📄
jerone Oct 21, 2024
b4c87bc
Clean up PackageManagerFactoryFixture
jerone Oct 21, 2024
a9e4732
Add support for all services in SemVersionRangeDataTypeDetector
jerone Oct 21, 2024
6407c5a
📄
jerone Oct 21, 2024
47fa55c
Remove todo
jerone Oct 21, 2024
22b2e7d
OnPackageManagerSettingChanged tests
jerone Oct 23, 2024
99afa3f
Feedback
jerone Oct 23, 2024
86f9378
Update metadata
jerone Oct 23, 2024
2acc708
Update package metadata
jerone Oct 25, 2024
b9b7f56
meziantou.validate-nuget-package excluded rule SymbolsNotFound
jerone Oct 25, 2024
04031b6
Fix meziantou.validate-nuget-package excluded rule SymbolsNotFound
jerone Oct 25, 2024
06baf9d
Run CI not on all branches
jerone Oct 25, 2024
654b2f5
Some CI improvements
jerone Oct 25, 2024
cc7d0ac
Replace Chocolatey.NuGet.Versioning with NuGet.Versioning source code
jerone Oct 25, 2024
9939597
Grammar
jerone Oct 25, 2024
bf9d56e
Prepare NuGet.Versioning for packing
jerone Oct 25, 2024
343a26f
Exclude from code cov
jerone Oct 25, 2024
c5ed247
Restore meziantou.validate-nuget-package
jerone Oct 25, 2024
c1437c3
Change folder name
jerone Oct 25, 2024
ff87830
Readme
jerone Oct 25, 2024
70bbde5
Exclude project from SonarCloud analysis
jerone Oct 25, 2024
34c636d
CSharpier ignore
jerone Oct 25, 2024
ce9fec5
📄
jerone Oct 25, 2024
cd083d5
Pack XML files
jerone Oct 25, 2024
33b9612
Fix null reference warning
jerone Oct 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .csharpierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NuGet.Versioning/**
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "CI & CD: Build & Test & Lint .NET Solution, Create & Validate & Publish N
on:
push:
branches:
- "**"
- "master"
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
pull_request:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Restore .NET tools
run: dotnet tool restore

- name: Linting
- name: Run linting
run: dotnet csharpier --check .

job_analyze_codeql:
Expand Down Expand Up @@ -195,15 +195,15 @@ jobs:
with:
global-json-file: "./global.json"

- name: Install nuget validator
- name: Install NuGet validator
run: dotnet tool install Meziantou.Framework.NuGetPackageValidation.Tool --global

- uses: actions/download-artifact@v4
with:
name: ${{ env.NuGetArtifactName }}
path: ${{ env.NuGetDirectory }}

- name: Validate package
- name: Validate NuGet package
shell: pwsh
run: meziantou.validate-nuget-package (Get-ChildItem "${{ env.NuGetDirectory }}/*.nupkg")

Expand Down
3 changes: 2 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="Moq.Contrib.HttpClient" Version="1.4.0" />
<PackageVersion Include="PosInformatique.Moq.Analyzers" Version="1.10.0" />
<PackageVersion Include="Semver" Version="2.3.0" />
<PackageVersion Include="Verify.Xunit" Version="27.0.1" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public override void Write(VerifyJsonWriter writer, IUIElement element)
{
writer.WriteMember(element, "{has close action}", prop.Name);
}
else if (IsSelectDropDownListItemSelectedAction(element, name, val))
{
writer.WriteMember(element, "{has selected item action}", prop.Name);
}
else
{
writer.WritePropertyName(name);
Expand Down Expand Up @@ -66,4 +70,22 @@ private static bool IsInfoBarCloseAction(IUIElement element, string name, object
{
return element is IUIInfoBar && name == nameof(IUIInfoBar.OnCloseAction) && val is not null;
}

/// <summary>
/// Detect if property is `OnItemSelectedAction` from a select dropdown list.
/// </summary>
/// <param name="element">Element.</param>
/// <param name="name">Property name.</param>
/// <param name="val">Property value.</param>
/// <returns>Whether property is `OnItemSelectedAction` from a select dropdown list.</returns>
private static bool IsSelectDropDownListItemSelectedAction(
IUIElement element,
string name,
object? val
)
{
return element is IUISelectDropDownList
&& name == nameof(IUISelectDropDownList.OnItemSelectedAction)
&& val is not null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Moq" />
<PackageReference Include="Moq.Contrib.HttpClient" />
<PackageReference Include="PosInformatique.Moq.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Verify.Xunit" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
Expand Down
3 changes: 3 additions & 0 deletions Jvw.DevToys.SemverCalculator.Tests/TestModuleInitializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public static void Initialize()
// Don't scrub Guids.
VerifierSettings.DontScrubGuids();

// Ignore exception stack traces.
VerifierSettings.IgnoreStackTrace();

VerifierSettings.AddExtraSettings(settings =>
{
// Export all properties, including those with default values.
Expand Down
Loading
Loading