Skip to content

Commit 048d6f3

Browse files
committed
Merge branch 'master' into merge-master-into-openapi
2 parents 9bdea37 + 7ace826 commit 048d6f3

File tree

45 files changed

+194
-188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+194
-188
lines changed

.config/dotnet-tools.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"jetbrains.resharper.globaltools": {
6-
"version": "2024.1.0",
6+
"version": "2024.1.2",
77
"commands": [
88
"jb"
99
]
@@ -15,7 +15,7 @@
1515
]
1616
},
1717
"dotnet-reportgenerator-globaltool": {
18-
"version": "5.2.4",
18+
"version": "5.3.0",
1919
"commands": [
2020
"reportgenerator"
2121
]

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Tune GitHub-hosted runner network
3939
uses: smorimoto/tune-github-hosted-runner-network@v1
4040
- name: Setup PostgreSQL
41-
uses: ikalnytskyi/action-setup-postgres@v5
41+
uses: ikalnytskyi/action-setup-postgres@v6
4242
with:
4343
username: postgres
4444
password: postgres
@@ -302,7 +302,7 @@ jobs:
302302
dotnet nuget push "$env:GITHUB_WORKSPACE/packages/*.nupkg" --api-key "$env:GITHUB_TOKEN" --source 'github'
303303
- name: Publish documentation
304304
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
305-
uses: peaceiris/actions-gh-pages@v3
305+
uses: peaceiris/actions-gh-pages@v4
306306
with:
307307
github_token: ${{ secrets.GITHUB_TOKEN }}
308308
publish_branch: gh-pages

.github/workflows/qodana.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
2323
fetch-depth: 0 # a full history is required for pull request analysis
2424
- name: 'Qodana Scan'
25-
uses: JetBrains/qodana-action@v2023.3
25+
uses: JetBrains/qodana-action@v2024.1
2626
env:
2727
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
2828
- name: Upload results to artifacts on failure

package-versions.props

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<ApiDescriptionServerVersion>8.0.*</ApiDescriptionServerVersion>
1212
<BenchmarkDotNetVersion>0.13.*</BenchmarkDotNetVersion>
1313
<BlushingPenguinVersion>1.0.*</BlushingPenguinVersion>
14-
<BogusVersion>35.2.*</BogusVersion>
14+
<BogusVersion>35.5.*</BogusVersion>
1515
<CodeAnalysisVersion>4.9.*</CodeAnalysisVersion>
1616
<CoverletVersion>6.0.*</CoverletVersion>
1717
<DapperVersion>2.1.*</DapperVersion>
@@ -24,9 +24,8 @@
2424
<NewtonsoftJsonVersion>13.0.*</NewtonsoftJsonVersion>
2525
<SourceLinkVersion>8.0.*</SourceLinkVersion>
2626
<SwashbuckleVersion>6.5.*</SwashbuckleVersion>
27-
<TestSdkVersion>17.8.*</TestSdkVersion>
28-
<XunitVersion>2.6.*</XunitVersion>
29-
<XunitVisualStudioVersion>2.5.*</XunitVisualStudioVersion>
27+
<TestSdkVersion>17.9.*</TestSdkVersion>
28+
<XunitVersion>2.8.*</XunitVersion>
3029
</PropertyGroup>
3130

3231
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
@@ -35,7 +34,7 @@
3534

3635
<!-- Non-published dependencies (these are safe to update, won't cause a breaking change) -->
3736
<AspNetCoreVersion>8.0.*</AspNetCoreVersion>
38-
<EntityFrameworkCoreVersion>8.0.*-*</EntityFrameworkCoreVersion>
37+
<EntityFrameworkCoreVersion>8.0.*</EntityFrameworkCoreVersion>
3938
<SystemTextJsonVersion>$(AspNetCoreVersion)</SystemTextJsonVersion>
4039
</PropertyGroup>
4140

src/Examples/DapperExample/appsettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
// docker run --rm --detach --name dapper-example-postgresql-db -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres:latest
55
// docker run --rm --detach --name dapper-example-postgresql-management --link dapper-example-postgresql-db:db -e PGADMIN_DEFAULT_EMAIL=admin@admin.com -e PGADMIN_DEFAULT_PASSWORD=postgres -p 5050:80 dpage/pgadmin4:latest
66
"DapperExamplePostgreSql": "Host=localhost;Database=DapperExample;User ID=postgres;Password=postgres;Include Error Detail=true",
7-
// docker run --rm --detach --name dapper-example-mysql-db -e MYSQL_ROOT_PASSWORD=mysql -e MYSQL_DATABASE=DapperExample -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql -p 3306:3306 mysql:latest --default-authentication-plugin=mysql_native_password
7+
// docker run --rm --detach --name dapper-example-mysql-db -e MYSQL_ROOT_PASSWORD=mysql -e MYSQL_DATABASE=DapperExample -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql -p 3306:3306 mysql:latest
88
// docker run --rm --detach --name dapper-example-mysql-management --link dapper-example-mysql-db:db -p 8081:80 phpmyadmin/phpmyadmin
9-
"DapperExampleMySql": "Host=localhost;Database=DapperExample;User ID=mysql;Password=mysql",
9+
"DapperExampleMySql": "Host=localhost;Database=DapperExample;User ID=mysql;Password=mysql;SSL Mode=None;AllowPublicKeyRetrieval=True",
1010
// docker run --rm --detach --name dapper-example-sqlserver -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Passw0rd!" -p 1433:1433 mcr.microsoft.com/mssql/server:2022-latest
1111
"DapperExampleSqlServer": "Server=localhost;Database=DapperExample;User ID=sa;Password=Passw0rd!;TrustServerCertificate=true"
1212
},

src/JsonApiDotNetCore/CollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static bool DictionaryEqual<TKey, TValue>(this IReadOnlyDictionary<TKey,
8282

8383
public static IEnumerable<T> EmptyIfNull<T>(this IEnumerable<T>? source)
8484
{
85-
return source ?? Enumerable.Empty<T>();
85+
return source ?? [];
8686
}
8787

8888
public static IEnumerable<T> WhereNotNull<T>(this IEnumerable<T?> source)

test/DapperTests/IntegrationTests/DapperTestContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private WebApplicationFactory<TodoItem> CreateFactory()
5858
$"Host=localhost;Database=DapperExample-{Guid.NewGuid():N};User ID=postgres;Password=postgres;Include Error Detail=true");
5959

6060
builder.UseSetting("ConnectionStrings:DapperExampleMySql",
61-
$"Host=localhost;Database=DapperExample-{Guid.NewGuid():N};User ID=root;Password=mysql;SSL Mode=None");
61+
$"Host=localhost;Database=DapperExample-{Guid.NewGuid():N};User ID=root;Password=mysql;SSL Mode=None;AllowPublicKeyRetrieval=True");
6262

6363
builder.UseSetting("ConnectionStrings:DapperExampleSqlServer",
6464
$"Server=localhost;Database=DapperExample-{Guid.NewGuid():N};User ID=sa;Password=Passw0rd!;TrustServerCertificate=true");
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
using DapperExample;
2-
using FluentAssertions.Extensions;
32
using JetBrains.Annotations;
3+
using TestBuildingBlocks;
44

55
namespace DapperTests.IntegrationTests;
66

77
[UsedImplicitly(ImplicitUseTargetFlags.Members)]
88
internal sealed class FrozenClock : IClock
99
{
10-
private static readonly DateTimeOffset DefaultTime = 1.January(2020).At(1, 1, 1).AsUtc();
11-
12-
public DateTimeOffset UtcNow { get; set; } = DefaultTime;
10+
public DateTimeOffset UtcNow { get; set; } = FrozenSystemClock.DefaultDateTimeOffsetUtc;
1311
}

test/DapperTests/IntegrationTests/TestFakers.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
namespace DapperTests.IntegrationTests;
1111

12-
internal sealed class TestFakers : FakerContainer
12+
internal sealed class TestFakers
1313
{
1414
private readonly Lazy<Faker<TodoItem>> _lazyTodoItemFaker = new(() =>
1515
new Faker<TodoItem>()
16-
.UseSeed(GetFakerSeed())
16+
.MakeDeterministic()
1717
.RuleFor(todoItem => todoItem.Description, faker => faker.Lorem.Sentence())
1818
.RuleFor(todoItem => todoItem.Priority, faker => faker.Random.Enum<TodoItemPriority>())
1919
.RuleFor(todoItem => todoItem.DurationInHours, faker => faker.Random.Long(1, 250))
@@ -24,31 +24,31 @@ internal sealed class TestFakers : FakerContainer
2424

2525
private readonly Lazy<Faker<LoginAccount>> _lazyLoginAccountFaker = new(() =>
2626
new Faker<LoginAccount>()
27-
.UseSeed(GetFakerSeed())
27+
.MakeDeterministic()
2828
.RuleFor(loginAccount => loginAccount.UserName, faker => faker.Internet.UserName())
2929
.RuleFor(loginAccount => loginAccount.LastUsedAt, faker => faker.Date.PastOffset()
3030
.TruncateToWholeMilliseconds()));
3131

3232
private readonly Lazy<Faker<AccountRecovery>> _lazyAccountRecoveryFaker = new(() =>
3333
new Faker<AccountRecovery>()
34-
.UseSeed(GetFakerSeed())
34+
.MakeDeterministic()
3535
.RuleFor(accountRecovery => accountRecovery.PhoneNumber, faker => faker.Person.Phone)
3636
.RuleFor(accountRecovery => accountRecovery.EmailAddress, faker => faker.Person.Email));
3737

3838
private readonly Lazy<Faker<Person>> _lazyPersonFaker = new(() =>
3939
new Faker<Person>()
40-
.UseSeed(GetFakerSeed())
40+
.MakeDeterministic()
4141
.RuleFor(person => person.FirstName, faker => faker.Name.FirstName())
4242
.RuleFor(person => person.LastName, faker => faker.Name.LastName()));
4343

4444
private readonly Lazy<Faker<Tag>> _lazyTagFaker = new(() =>
4545
new Faker<Tag>()
46-
.UseSeed(GetFakerSeed())
46+
.MakeDeterministic()
4747
.RuleFor(tag => tag.Name, faker => faker.Lorem.Word()));
4848

4949
private readonly Lazy<Faker<RgbColorType>> _lazyRgbColorFaker = new(() =>
5050
new Faker<RgbColorType>()
51-
.UseSeed(GetFakerSeed())
51+
.MakeDeterministic()
5252
.RuleFor(rgbColor => rgbColor.Id, faker => RgbColorType.Create(faker.Random.Byte(), faker.Random.Byte(), faker.Random.Byte())
5353
.Id));
5454

test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionFakers.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@
66

77
namespace JsonApiDotNetCoreTests.IntegrationTests.Archiving;
88

9-
internal sealed class TelevisionFakers : FakerContainer
9+
internal sealed class TelevisionFakers
1010
{
1111
private readonly Lazy<Faker<TelevisionNetwork>> _lazyTelevisionNetworkFaker = new(() => new Faker<TelevisionNetwork>()
12-
.UseSeed(GetFakerSeed())
12+
.MakeDeterministic()
1313
.RuleFor(network => network.Name, faker => faker.Company.CompanyName()));
1414

1515
private readonly Lazy<Faker<TelevisionStation>> _lazyTelevisionStationFaker = new(() => new Faker<TelevisionStation>()
16-
.UseSeed(GetFakerSeed())
16+
.MakeDeterministic()
1717
.RuleFor(station => station.Name, faker => faker.Company.CompanyName()));
1818

1919
private readonly Lazy<Faker<TelevisionBroadcast>> _lazyTelevisionBroadcastFaker = new(() => new Faker<TelevisionBroadcast>()
20-
.UseSeed(GetFakerSeed())
20+
.MakeDeterministic()
2121
.RuleFor(broadcast => broadcast.Title, faker => faker.Lorem.Sentence())
2222
.RuleFor(broadcast => broadcast.AiredAt, faker => faker.Date.PastOffset().TruncateToWholeMilliseconds())
2323
.RuleFor(broadcast => broadcast.ArchivedAt, faker => faker.Date.RecentOffset().TruncateToWholeMilliseconds()));
2424

2525
private readonly Lazy<Faker<BroadcastComment>> _lazyBroadcastCommentFaker = new(() => new Faker<BroadcastComment>()
26-
.UseSeed(GetFakerSeed())
26+
.MakeDeterministic()
2727
.RuleFor(comment => comment.Text, faker => faker.Lorem.Paragraph())
2828
.RuleFor(comment => comment.CreatedAt, faker => faker.Date.PastOffset().TruncateToWholeMilliseconds()));
2929

0 commit comments

Comments
 (0)