Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
dotnet-version: |
8.0.x
9.0.x
10.0.x
11.0.x

- name: Initialize CodeQL
uses: github/codeql-action/init@v4.39.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
10.0.x
11.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
8 changes: 7 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
<Project>

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<Features>$(Features);runtime-async=on</Features>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- Npgsql 11.0.0-rc.3 pins EF Core to exactly 11.0.0-rc.3; drop once a stable Npgsql 11 ships -->
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1608</WarningsNotAsErrors>
</PropertyGroup>

<PropertyGroup>
<!-- S8969/S8970 (null-forgiving operator) are also switched off in .editorconfig, but
severities configured there never reach diagnostics reported against .razor files,
so the Razor generated code needs the suppression here as well. -->
<NoWarn>$(NoWarn);S8969;S8970</NoWarn>
<!-- New with the .NET 11 SDK: Blazor BL0013/BL0016 are opinionated style rules, and Sonar now
sees Razor-generated component classes and flags their plain Dispose() with S3881. -->
<NoWarn>$(NoWarn);BL0013;BL0016;S3881</NoWarn>
</PropertyGroup>

</Project>
41 changes: 20 additions & 21 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,44 @@
</ItemGroup>
<ItemGroup Label="Infrastructure">
<PackageVersion Include="Azure.Storage.Blobs" Version="12.30.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.14" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.14" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.14" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.14">
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="11.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="11.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="11.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="11.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="10.0.14" />
<PackageVersion Include="Microting.EntityFrameworkCore.MySql" Version="10.0.14" />
<PackageVersion Include="MongoDB.Driver" Version="3.12.0" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.3" />
<PackageVersion Include="RavenDB.Client" Version="7.2.6" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="11.0.0" />
<PackageVersion Include="Microting.EntityFrameworkCore.MySql" Version="11.0.0-preview.1" />
<PackageVersion Include="MongoDB.Driver" Version="3.13.0" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="11.0.0-rc.3" />
<PackageVersion Include="RavenDB.Client" Version="7.2.7" />
<PackageVersion Include="ZiggyCreatures.FusionCache.Locking.AsyncKeyed" Version="2.9.0" />
</ItemGroup>
<ItemGroup Label="Web">
<PackageVersion Include="AspNetCore.HealthChecks.UI.Client" Version="9.0.0" />
<PackageVersion Include="Azure.Identity" Version="1.21.0" />
<PackageVersion Include="Blazored.Toast" Version="4.2.1" />
<PackageVersion Include="Markdig" Version="1.4.0" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.14" />
<PackageVersion Include="NCronJob" Version="4.12.3" />
<PackageVersion Include="Markdig" Version="1.6.0" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="11.0.0" />
<PackageVersion Include="NCronJob" Version="4.14.0" />
<PackageVersion Include="LinkDotNet.BuildInformation" Version="2.2.0" />
<PackageVersion Include="ReverseMarkdown" Version="6.2.1" />
<PackageVersion Include="System.ServiceModel.Syndication" Version="10.0.14" />
<PackageVersion Include="ReverseMarkdown" Version="6.3.0" />
<PackageVersion Include="System.ServiceModel.Syndication" Version="11.0.0" />
<PackageVersion Include="NetEscapades.AspNetCore.SecurityHeaders" Version="1.3.1" />
</ItemGroup>
<ItemGroup Label="Tests">
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.14" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.14" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="11.0.0" />
<PackageVersion Include="NSubstitute" Version="6.2.0" />
<PackageVersion Include="RavenDB.TestDriver" Version="7.2.6" />
<PackageVersion Include="RavenDB.TestDriver" Version="7.2.7" />
<PackageVersion Include="Shouldly" Version="4.3.0" />
<PackageVersion Include="bunit" Version="2.13.3" />
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.11.2" />
<PackageVersion Include="xunit.v3" Version="4.0.1" />
<PackageVersion Include="bunit" Version="2.14.0" />
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.12.0" />
<PackageVersion Include="xunit.v3" Version="4.0.3" />
</ItemGroup>
<ItemGroup Label="Tools">
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
<PackageVersion Include="Microsoft.Playwright" Version="1.63.0" />
<PackageVersion Include="Microsoft.Playwright" Version="1.64.1" />
<PackageVersion Include="Spectre.Console" Version="0.57.2" />
</ItemGroup>
<ItemGroup Label="Source Code Generators">
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:11.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build
WORKDIR /src/LinkDotNet.Blog.Web
COPY ./ /
RUN dotnet restore "LinkDotNet.Blog.Web.csproj"
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "10.0.100",
"version": "11.0.100",
"rollForward": "latestMinor"
},
"test": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void Configure(EntityTypeBuilder<BlogPost> builder)
builder.Property(x => x.Likes).IsRequired();
builder.Property(x => x.IsPublished).IsRequired();

builder.Property(x => x.Tags).HasMaxLength(2048);
builder.PrimitiveCollection(x => x.Tags).HasMaxLength(2048);
builder.Property(x => x.AuthorName).HasMaxLength(256).IsRequired(false);

builder.HasIndex(x => new { x.IsPublished, x.UpdatedDate })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void Configure(EntityTypeBuilder<BlogPostVersion> builder)
builder.Property(x => x.PreviewImageUrlFallback).HasMaxLength(1024);
builder.Property(x => x.Content).IsRequired();
builder.Property(x => x.ShortDescription).IsRequired();
builder.Property(x => x.Tags).HasMaxLength(2048);
builder.PrimitiveCollection(x => x.Tags).HasMaxLength(2048);
builder.Property(x => x.IsPublished).IsRequired();
builder.Property(x => x.ReadingTimeInMinutes).IsRequired();
builder.Property(x => x.AuthorName).HasMaxLength(256).IsRequired(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private static Task HandleRedirect(AuthInformation auth, RedirectContext context
var postLogoutUri = context.Properties.RedirectUri;
if (!string.IsNullOrEmpty(postLogoutUri))
{
if (postLogoutUri.StartsWith('/'))
if (postLogoutUri.StartsWith('/', StringComparison.Ordinal))
{
var request = context.Request;
postLogoutUri = request.Scheme + "://" + request.Host + request.PathBase + postLogoutUri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,6 @@
private void OpenShortCodeDialog()
{
ShortCodeDialog.Open();
StateHasChanged();
}

private async Task OpenTemplateDialog()
Expand All @@ -495,7 +494,6 @@
}

blogPostTemplates = await TemplateRepository.GetAllAsync();
StateHasChanged();
}

private void LoadTemplate(BlogPostTemplate template)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@
public void Close()
{
isOpen = false;
StateHasChanged();
}

private void Compute()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,5 @@ else
await BlogPostVersionService.RestoreVersionAsync(blogPostFromDb, version);
ToastService.ShowSuccess($"Restored version {version.VersionNumber}");
blogPostFromDb = await BlogPostRepository.GetByIdAsync(BlogPostId);
StateHasChanged();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public async Task<SitemapUrlSet> CreateSitemapAsync(string baseUri)

var urlSet = new SitemapUrlSet();

if (!baseUri.EndsWith('/'))
if (!baseUri.EndsWith('/', StringComparison.Ordinal))
{
baseUri += "/";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
{
isBookmarked = !isBookmarked;
await BookmarkService.SetBookmark(BlogPost.Id, isBookmarked);
StateHasChanged();
}

public override Task SetParametersAsync(ParameterView parameters)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ else if (BlogPost is not null)

isBookmarked = !isBookmarked;
await BookmarkService.SetBookmark(BlogPost.Id, isBookmarked);
StateHasChanged();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" />
<PackageReference Include="RavenDB.TestDriver" />
</ItemGroup>

Expand Down
Loading