You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Each package has its own README on nuget.org, and the README samples are compiled and run as tests, so each one builds as written (ADR-1003).
Public API tracking with PublicAPI.Shipped.txt and PublicAPI.Unshipped.txt in each packable project.
Each package is validated against version 1.2.0 on nuget.org when it is packed (PackageValidationBaselineVersion), so a binary-breaking change to the public API fails the pack.
CODE_OF_CONDUCT.md, GOVERNANCE.md, ROADMAP.md, docs/architecture.md and docs/assurance-case.md.
Each release's packages carry a signed build-provenance attestation: after the push to nuget.org, .github/workflows/publish.yml attaches the packages, the provenance file (<tag>.intoto.jsonl) and an SPDX SBOM (<tag>.spdx.json) to the GitHub release, and gh attestation verify <package> --repo NCodeGroup/PropertyBag checks a package (#30).
After each stable release, CI opens a draft pull request that raises the package validation baseline to the released version (#30).
docs/assurance-case.md states the security requirements, the threat model, the secure design principles applied and the weaknesses countered, and docs/architecture.md describes the components (#31).
Code coverage: ./build/Test-Coverage.ps1 fails below 98% line or branch coverage and CI runs it on every pull request, and .github/workflows/coverage.yml publishes the report to Codecov from every push to main. The tests cover PropertyBagFactory, DefaultRegistration, scopes over a key that held a value, and an empty bag's enumeration and count.
./build/gate.ps1 checks that the READMEs' samples match the tests, then runs the Definition of Done, whose Format stage checks the formatting with CSharpier, pinned in .config/dotnet-tools.json; CI and the local gate run it.
Each release's tag is signed with gitsign, and SECURITY.md says how to verify it (#24).
Changed
Breaking:IPropertyBag.Set<T>(key, value) is IPropertyBag.SetValue<T>(key, value), and the extensions Set<T>(value) and TryGet<T>(out value) are SetValue<T>(value) and TryGetValue<T>(out value); TryGetValue is in the new ReadOnlyPropertyBagExtensions class. Rename Set to SetValue and TryGet to TryGetValue at each call site (ADR-1004).
Breaking:DefaultPropertyBag is PropertyBagDictionary; rename it where code names the type (ADR-1004).
Breaking:PropertyBagDictionary, DefaultPropertyBagFactory and DefaultPropertyBagScope are sealed; compose them instead of deriving from them.
SetValue(value), TryGetValue(out value) and AddPropertyBag() throw ArgumentNullException for a null bag or service collection.
The README is rewritten around the 2.0 API, with a usage section per feature and an API overview, and the package descriptions and tags describe each package.
Updated the project from project-template v0.41.0 to v0.104.0 (build, analyzers, CI and documentation); the update itself changes no behavior of the library.
AssemblyVersion moves only with the major version: it is 2.0.0.0 for every 2.x release, while FileVersion and InformationalVersion keep the exact version.
Package and assembly versions come from version.json through Nerdbank.GitVersioning instead of the release tag: a release sets version.json to its version first, and CI refuses a release whose tag differs.
The solution file is NCode.PropertyBag.slnx, and dotnet build no longer creates packages: ./build/dod.ps1 and CI pack with dotnet pack (#29).
Each package's description and tags are set in its project file and describe that package, since the project.props files that held them were no longer imported; the project files keep only the settings build/ProjectTemplate.props doesn't make, and no file starts with a byte order mark (#29).
The projects are in src/ and the test project in tests/, the layout the project template gives .NET projects; moving them changes no package contents.
Releases are tagged and published when their pull request merges, and the packages reach nuget.org through trusted publishing, with no stored API key, from .github/workflows/publish.yml after a maintainer approves the nuget environment; .github/workflows/main.yml and the NUGET_APIKEY secret it used are gone (#24).
PropertyBagKey<T> compares two keys by name, since both always have the type T; the result of Equals does not change.
The project's icon is the NCode brand icon the other NCode packages carry.
Removed
Breaking: The net8.0 target: both packages target net10.0, since .NET 8 is out of support. Applications on .NET 8 stay on 1.2.0 (ADR-1002).
Fixed
Breaking: Disposing the scope that PropertyBagDictionary.Scope returns restores the value its key held before, as IPropertyBag.Scope, IPropertyBagScope and the README say, instead of removing the key; a key that held no value is still removed, and a second Dispose does nothing. Code that relied on the key being removed after a scope over an existing value calls Remove after disposing the scope (ADR-1000).