Skip to content

Commit

Permalink
Housekeeping: Update Packages Update Copyright (#318)
Browse files Browse the repository at this point in the history
* Housekeeping: Update Packages Update Copyright

* Update Build
  • Loading branch information
ChrisPulman authored May 1, 2024
1 parent 9d48a7d commit dc71369
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 71 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
configuration: Release
productNamespacePrefix: "Punchclock"
useVisualStudioPreview: true
dotNetBuild: true
useVisualStudioPreview: false
useMauiCheckDotNetTool: false
installWorkflows: false
dotNetBuild: true
3 changes: 2 additions & 1 deletion .github/workflows/ci-buildAndRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
with:
configuration: Release
productNamespacePrefix: "Punchclock"
useVisualStudioPreview: true
dotNetBuild: true
useVisualStudioPreview: false
useMauiCheckDotNetTool: false
secrets:
SIGN_CLIENT_USER_ID: ${{ secrets.SIGN_CLIENT_USER_ID }}
Expand Down
18 changes: 1 addition & 17 deletions src/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/reactiveui/punchclock/</PackageProjectUrl>
<Authors>.NET Foundation and Contributors</Authors>
<Owners>xpaulbettsx;ghuntley</Owners>
<Owners>xanaisbettsx;ghuntley</Owners>
<NoWarn>$(NoWarn);VSX1000;SA1010</NoWarn>
<Platform>AnyCPU</Platform>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down Expand Up @@ -33,22 +33,6 @@
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup Condition="$(IsTestProject)">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.1" />
<PackageReference Include="xunit.runner.console" Version="2.7.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.8" />
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
<PackageReference Include="Xunit.StaFact" Version="1.1.11" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="DiffEngine" Version="15.3.0" />
<PackageReference Include="PublicApiGenerator" Version="11.1.0" />
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(IsTestProject)' != 'true'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions src/Punchclock.Tests/API/ApiApprovalTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
using VerifyXunit;
using Xunit;

namespace Punchclock.APITests;
Expand All @@ -14,7 +13,6 @@ namespace Punchclock.APITests;
/// Tests for handling API approval.
/// </summary>
[ExcludeFromCodeCoverage]
[UsesVerify]
public class ApiApprovalTests
{
/// <summary>
Expand Down
15 changes: 14 additions & 1 deletion src/Punchclock.Tests/Punchclock.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,20 @@
<PackageReference Include="DynamicData" Version="8.*" />
<PackageReference Include="splat" Version="14.*" />
<PackageReference Include="PublicApiGenerator" Version="11.1.0" />
<PackageReference Include="Verify.Xunit" Version="22.5.0" />
<PackageReference Include="Verify.Xunit" Version="24.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.8.0" />
<PackageReference Include="xunit.runner.console" Version="2.8.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0" />
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
<PackageReference Include="Xunit.StaFact" Version="1.1.11" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="DiffEngine" Version="15.3.0" />
<PackageReference Include="PublicApiGenerator" Version="11.1.0" />
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Punchclock/KeyedOperation.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved.
// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
Expand Down
14 changes: 5 additions & 9 deletions src/Punchclock/OperationQueue.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved.
// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
Expand Down Expand Up @@ -124,10 +124,8 @@ public IObservable<T> EnqueueObservableOperation<T, TDontCare>(int priority, str
/// <param name="key">Items with the same key will be run in order.</param>
/// <param name="asyncCalculationFunc">The async method to execute when scheduled.</param>
/// <returns>The result of the async calculation.</returns>
public IObservable<T> EnqueueObservableOperation<T>(int priority, string key, Func<IObservable<T>> asyncCalculationFunc)
{
return EnqueueObservableOperation(priority, key, Observable.Never<Unit>(), asyncCalculationFunc);
}
public IObservable<T> EnqueueObservableOperation<T>(int priority, string key, Func<IObservable<T>> asyncCalculationFunc) =>
EnqueueObservableOperation(priority, key, Observable.Never<Unit>(), asyncCalculationFunc);

/// <summary>
/// This method enqueues an action to be run at a later time, according
Expand All @@ -137,10 +135,8 @@ public IObservable<T> EnqueueObservableOperation<T>(int priority, string key, Fu
/// <param name="priority">Higher priorities run before lower ones.</param>
/// <param name="asyncCalculationFunc">The async method to execute when scheduled.</param>
/// <returns>The result of the async calculation.</returns>
public IObservable<T> EnqueueObservableOperation<T>(int priority, Func<IObservable<T>> asyncCalculationFunc)
{
return EnqueueObservableOperation(priority, DefaultKey, Observable.Never<Unit>(), asyncCalculationFunc);
}
public IObservable<T> EnqueueObservableOperation<T>(int priority, Func<IObservable<T>> asyncCalculationFunc) =>
EnqueueObservableOperation(priority, DefaultKey, Observable.Never<Unit>(), asyncCalculationFunc);

/// <summary>
/// This method pauses the dispatch queue. Inflight operations will not
Expand Down
2 changes: 1 addition & 1 deletion src/Punchclock/OperationQueueExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved.
// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
Expand Down
17 changes: 4 additions & 13 deletions src/Punchclock/PriorityQueue.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved.
// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
Expand Down Expand Up @@ -99,10 +99,7 @@ public T[] DequeueSome(int count)
/// Removes all the items currently contained within the queue and returns them.
/// </summary>
/// <returns>All the items from the queue.</returns>
public T[] DequeueAll()
{
return DequeueSome(Count);
}
public T[] DequeueAll() => DequeueSome(Count);

/// <summary>
/// Adds a item in the correct location based on priority to the queue.
Expand Down Expand Up @@ -141,10 +138,7 @@ public bool Remove(T item)
return false;
}

private bool IsHigherPriority(int left, int right)
{
return _items[left].CompareTo(_items[right]) < 0;
}
private bool IsHigherPriority(int left, int right) => _items[left].CompareTo(_items[right]) < 0;

private void Percolate(int index)
{
Expand All @@ -166,10 +160,7 @@ private void Percolate(int index)
}
}

private void Heapify()
{
Heapify(0);
}
private void Heapify() => Heapify(0);

private void Heapify(int index)
{
Expand Down
9 changes: 3 additions & 6 deletions src/Punchclock/PrioritySemaphoreSubject.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved.
// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
Expand Down Expand Up @@ -26,7 +26,7 @@ internal class PrioritySemaphoreSubject<T> : ISubject<T>
/// <param name="sched">The scheduler to use when emitting the items.</param>
public PrioritySemaphoreSubject(int maxCount, IScheduler? sched = null)
{
_inner = sched != null ? (ISubject<T>)new ScheduledSubject<T>(sched) : new Subject<T>();
_inner = sched != null ? new ScheduledSubject<T>(sched) : new Subject<T>();
MaximumCount = maxCount;
}

Expand Down Expand Up @@ -100,10 +100,7 @@ public void OnError(Exception error)
}

/// <inheritdoc />
public IDisposable Subscribe(IObserver<T> observer)
{
return _inner.Subscribe(observer);
}
public IDisposable Subscribe(IObserver<T> observer) => _inner.Subscribe(observer);

private void YieldUntilEmptyOrBlocked()
{
Expand Down
17 changes: 4 additions & 13 deletions src/Punchclock/ScheduledSubject.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved.
// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
Expand Down Expand Up @@ -43,22 +43,13 @@ public ScheduledSubject(IScheduler scheduler, IObserver<T>? defaultObserver = nu
}

/// <inheritdoc />
public void OnCompleted()
{
_subject.OnCompleted();
}
public void OnCompleted() => _subject.OnCompleted();

/// <inheritdoc />
public void OnError(Exception error)
{
_subject.OnError(error);
}
public void OnError(Exception error) => _subject.OnError(error);

/// <inheritdoc />
public void OnNext(T value)
{
_subject.OnNext(value);
}
public void OnNext(T value) => _subject.OnNext(value);

/// <inheritdoc />
public IDisposable Subscribe(IObserver<T>? observer)
Expand Down
3 changes: 0 additions & 3 deletions src/global.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@
"sdk": {
"version": "8.0.10",
"rollForward": "latestMinor"
},
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "3.0.44"
}
}
2 changes: 1 addition & 1 deletion src/stylecop.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"documentPrivateFields": false,
"documentationCulture": "en-US",
"companyName": ".NET Foundation and Contributors",
"copyrightText": "Copyright (c) 2021 {companyName}. All rights reserved.\nLicensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the {licenseName} license.\nSee the {licenseFile} file in the project root for full license information.",
"copyrightText": "Copyright (c) 2024 {companyName}. All rights reserved.\nLicensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the {licenseName} license.\nSee the {licenseFile} file in the project root for full license information.",
"variables": {
"licenseName": "MIT",
"licenseFile": "LICENSE"
Expand Down
4 changes: 3 additions & 1 deletion version.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
"version": "3.4",
"publicReleaseRefSpec": [
"^refs/heads/main$", // we release out of master
"^refs/heads/preview/.*", // we release previews
"^refs/heads/rel/\\d+\\.\\d+\\.\\d+" // we also release branches starting with rel/N.N.N
],
"nugetPackageVersion":{
"nugetPackageVersion": {
"semVer": 2
},
"cloudBuild": {
Expand Down

0 comments on commit dc71369

Please sign in to comment.