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

更新依赖版本 #8

Merged
merged 8 commits into from
Sep 30, 2024
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
5 changes: 4 additions & 1 deletion .github/workflows/package_push_nuget.org.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ jobs:
- name: setting dotnet version
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
dotnet-version: |
6.0.x
7.0.x
8.0.x
include-prerelease: true

- name: restore
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pr_run_test_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ jobs:
- name: setting dotnet version
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
dotnet-version: |
6.0.x
7.0.x
8.0.x
include-prerelease: true

- name: Configure sysctl limits
Expand Down Expand Up @@ -65,4 +68,4 @@ jobs:
run: |
dotnet build /p:ContinuousIntegrationBuild=true
dotnet test --no-build --verbosity normal --collect "Code Coverage" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[*.Tests]*"


2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<MicrosoftPackageVersion>6.0.13</MicrosoftPackageVersion>
<MicrosoftPackageVersion>6.0.33</MicrosoftPackageVersion>

<PackageId>$(AssemblyName)</PackageId>
<PackageIcon>packageIcon.png</PackageIcon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TargetFrameworks>net6.0;</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0;</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ public class CompileRazorProjectFileSystem : RazorProjectFileSystem
{
private static ConcurrentBag<string> _globalUsing = new()
{
"@using Microsoft.AspNetCore.Components.Web"
"@using Microsoft.AspNetCore.Components.Web",
"@using Microsoft.AspNetCore.Components",
"@using System",
};

public static string GlobalUsing =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

private static List<RazorExtension>? _extensions;

private static RazorProjectEngine _engine;

Check warning on line 11 in src/Languages/Masa.Blazor.Extensions.Languages.Razor/RazorCompile.cs

View workflow job for this annotation

GitHub Actions / PR_Run_Test_CI

Non-nullable field '_engine' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

/// <summary>
/// Component initialization Initializes components before compilation
Expand All @@ -21,7 +21,7 @@
_references = refs;
_extensions = extensions;

var config = RazorConfiguration.Create(RazorLanguageVersion.Version_6_0, Constant.ROOT_NAMESPACE,
var config = RazorConfiguration.Create(RazorLanguageVersion.Latest, Constant.ROOT_NAMESPACE,
_extensions);

var proj = new CompileRazorProjectFileSystem();
Expand Down Expand Up @@ -96,7 +96,7 @@
if (string.IsNullOrWhiteSpace(targetCode))
return null;

if (cSharpDocument.Diagnostics.Count != 0)
if (cSharpDocument.Diagnostics.Count(v => v.Severity == RazorDiagnosticSeverity.Error) > 0)
{
throw new Exception(cSharpDocument.Diagnostics.First(v => v.Severity == RazorDiagnosticSeverity.Error)
.ToString());
Expand Down
Loading