Skip to content

Commit

Permalink
(chore): Upgrade Dependancies (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanedey authored Apr 3, 2024
1 parent 9160557 commit 50b0ed9
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ public async Task CreateCustomTokenWithoutServiceAccount()
Credential = GoogleCredential.FromAccessToken(token),
ServiceAccountId = serviceAcct.Id,
ProjectId = serviceAcct.ProjectId,
}, "IAMSignApp");
},
"IAMSignApp");

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.1-beta.61">
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ internal static class IntegrationTestUtils
Credential = GoogleCredential.FromFile(ServiceAccountFile),
};
return FirebaseApp.Create(options);
}, true);
},
true);

public static FirebaseApp EnsureDefaultApp()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net6.0;</TargetFrameworks>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CodeAnalysisRuleSet>../../stylecop_test.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Google.Apis.Auth" Version="1.49.0" />
<PackageReference Include="Google.Apis.Auth" Version="1.67.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<PackageReference Include=" System.Security.Cryptography.Xml" Version="8.0.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FirebaseAdmin\FirebaseAdmin.csproj" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.1-beta.61">
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions FirebaseAdmin/FirebaseAdmin.Tests/Auth/FirebaseAuthTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using Xunit;

[assembly: CollectionBehavior(DisableTestParallelization = true)]

namespace FirebaseAdmin.Auth.Tests
{
public class FirebaseAuthTest : IDisposable
Expand Down
8 changes: 4 additions & 4 deletions FirebaseAdmin/FirebaseAdmin.Tests/FirebaseAdmin.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Google.Apis.Auth" Version="1.49.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="System.Linq.Async" Version="4.1.1" />
<PackageReference Include="Google.Apis.Auth" Version="1.67.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.1-beta.61">
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion FirebaseAdmin/FirebaseAdmin.Tests/Messaging/MessageTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public void DataMessage()
{
{ "topic", "test-topic" },
{ "data", new JObject() { { "k1", "v1" }, { "k2", "v2" } } },
}, message);
},
message);
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"3003684e85e61cf15f13150008c81f0b75a252673028e530ea95d0c581378da8c6846526ab9597" +
"4c6d0bc66d2462b51af69968a0e25114bde8811e0d6ee1dc22d4a59eee6a8bba4712cba839652f" +
"badddb9c")]

namespace FirebaseAdmin.Auth.Jwt
{
/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions FirebaseAdmin/FirebaseAdmin/Auth/Jwt/IAMSigner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ public IAMSigner(
RetryOptions = retryOptions,
});
this.keyId = new Lazy<Task<string>>(
async () => await DiscoverServiceAccountIdAsync(clientFactory)
.ConfigureAwait(false), true);
async () => await DiscoverServiceAccountIdAsync(clientFactory).ConfigureAwait(false), true);
}

public string Algorithm => JwtUtils.AlgorithmRS256;
Expand Down Expand Up @@ -98,7 +97,8 @@ public virtual async Task<string> GetKeyIdAsync(
+ "with service account credentials or specify a service account "
+ "ID with iam.serviceAccounts.signBlob permission. Please refer to "
+ "https://firebase.google.com/docs/auth/admin/create-custom-tokens for "
+ "more details on creating custom tokens.", e);
+ "more details on creating custom tokens.",
e);
}
}

Expand Down
6 changes: 3 additions & 3 deletions FirebaseAdmin/FirebaseAdmin/Auth/Multitenancy/Tenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ internal Tenant(TenantArgs args)
/// <summary>
/// Gets the tenant display name.
/// </summary>
public string DisplayName => args.DisplayName;
public string DisplayName => this.args.DisplayName;

/// <summary>
/// Gets a value indicating whether the email sign-in provider is enabled.
/// </summary>
public bool PasswordSignUpAllowed => args.PasswordSignUpAllowed ?? false;
public bool PasswordSignUpAllowed => this.args.PasswordSignUpAllowed ?? false;

/// <summary>
/// Gets a value indicating whether the email link sign-in is enabled.
/// </summary>
public bool EmailLinkSignInEnabled => args.EmailLinkSignInEnabled ?? false;
public bool EmailLinkSignInEnabled => this.args.EmailLinkSignInEnabled ?? false;

private string ExtractResourceId(string resourceName)
{
Expand Down
10 changes: 5 additions & 5 deletions FirebaseAdmin/FirebaseAdmin/FirebaseAdmin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Google.Api.Gax.Rest" Version="3.2.0" />
<PackageReference Include="Google.Apis.Auth" Version="1.49.0" />
<PackageReference Include="System.Collections.Immutable" Version="1.7.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.1-beta.61">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
<PackageReference Include="Google.Api.Gax.Rest" Version="4.8.0" />
<PackageReference Include="Google.Apis.Auth" Version="1.67.0" />
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="AsyncUsageAnalyzers" Version="1.0.0-alpha003">
Expand Down
1 change: 1 addition & 0 deletions FirebaseAdmin/FirebaseAdmin/FirebaseApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"3003684e85e61cf15f13150008c81f0b75a252673028e530ea95d0c581378da8c6846526ab9597" +
"4c6d0bc66d2462b51af69968a0e25114bde8811e0d6ee1dc22d4a59eee6a8bba4712cba839652f" +
"badddb9c")]

namespace FirebaseAdmin
{
internal delegate TResult ServiceFactory<out TResult>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ internal class InstanceIdServiceResponse
/// <summary>
/// Gets the number of errors returned by the operation.
/// </summary>
public int ErrorCount => Results?.Count(results => results.HasError) ?? 0;
public int ErrorCount => this.Results?.Count(results => results.HasError) ?? 0;

/// <summary>
/// Gets the number of results returned by the operation.
/// </summary>
public int ResultCount => Results?.Count() ?? 0;
public int ResultCount => this.Results?.Count() ?? 0;

/// <summary>
/// An instance Id response error.
Expand All @@ -41,7 +41,7 @@ internal class InstanceIdServiceResponseElement
/// <summary>
/// Gets a value indicating whether this response element in the response array is an error, as an empty element indicates success.
/// </summary>
public bool HasError => !string.IsNullOrEmpty(Error);
public bool HasError => !string.IsNullOrEmpty(this.Error);
}
}
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ We also welcome bug reports, feature requests, and code review feedback.

Admin .NET SDK supports the following frameworks:

* .NET Framework 4.6.1+
* .NET Framework 4.6.2+
* .NET Standard 2.0, providing .NET Core support
* .NET 6.0+

This is consistent with the frameworks supported by other .NET libraries
associated with Google Cloud Platform.
Expand Down

0 comments on commit 50b0ed9

Please sign in to comment.