Repository navigation
Releases
Releases · NCodeGroup/PropertyBag
v2.1.0
Added
GetValue,GetValueOrDefaultandContainsKeyonIReadOnlyPropertyBag;GetValuethrowsKeyNotFoundExceptionnaming the key when the bag holds no value for it (ADR-1011).TryAdd,GetOrAddandTryRemoveonIPropertyBag, each composed fromTryGetValueand a write (ADR-1011).ConcurrentPropertyBagDictionary, a bag that is safe from several threads, with atomicTryAdd,GetOrAddandTryRemove, and enumeration over a snapshot (ADR-1011).LayeredPropertyBagandCreateChild(): a child bag that reads through to its parent, keeps its own writes and removals, and never writes the parent (ADR-1011).ReadOnlyPropertyBagandAsReadOnly(): a read-only view that cannot be cast back toIPropertyBag(ADR-1011).- The guides "Layer a child bag over a parent" and "Share a bag across threads" on the documentation site, and sections on the read and write helpers and protected views (ADR-1011).
Changed
PropertyBagKey.ToString()andPropertyBagKey<T>.ToString()return the name and the value type, such asUserName (System.String), where they returned the struct's type name, such asNCode.PropertyBag.PropertyBagKey(ADR-1011).- Package validation compares each package with the published 2.0.2 package.
v2.0.2
Added
- FsCheck property tests for
PropertyBagKey,PropertyBagKey<T>,PropertyBagDictionaryand the name-inferringSetValueandTryGetValueextensions, with a fixed seed so every run is deterministic; OpenSSF Scorecard's Fuzzing check counts them. .github/workflows/reproducible-build.ymlpacks every pull request and push tomaintwice, from checkouts in different folders, and every Monday rebuilds the newest release's tag and compares it with the packages attached to the release;build/Compare-Packages.ps1compares two folders of packages entry by entry, and the gate tests it offline (#46, ADR-1010).- The README shows the OpenSSF Best Practices badge of project 16954 (#46).
docs/assurance-case.mdlists the packages' inputs and the checks each makes, the assertions the tests run with, the regression tests of the scope fix and the reproducible-build evidence, and records a security review of the library and its release workflows;docs/architecture.mdsays the packages show people no text (#46).
Changed
- Package validation compares each package with the published 2.0.1 package.
- Updated the project from project-template v0.104.0 to v0.108.0 (workflow commands, release rules and documentation); the update itself changes no behavior of the library.
- The packages' copyright is
Copyright © NCode Group, without the year of the build, so a rebuild of a release's tag in a later year gives the same packages (#46, ADR-1010). GOVERNANCE.mdnames the maintainer, @polewskm, and the owners of the organization and the packages (#46).
v2.0.1
Added
- A documentation site at https://propertybag.ncode.io/, built from
docs/site/by the shared NCodeGroup/docs toolchain: a quick start, a guide for each task, the concepts behind keys and the default bag, and an API map of every public member, which the gate checks against bothPublicAPI.Shipped.txtfiles..github/workflows/docs.ymlbuilds it on every pull request and publishes it frommain(#37, ADR-1005, ADR-1008, ADR-1009). - Every C# sample on the site is a compiled test in
tests/NCode.PropertyBag.Site.Teststhat uses only the public API, and the gate checks every sample's marker and key (#37, ADR-1006). - The gate compiles every example in the XML documentation of
src/against both packages (build/Test-XmlDocExamples.ps1), so each example IntelliSense shows builds as written (#37).
Changed
- Package validation compares each package with the published 2.0.0 package.
- Each package's project website on nuget.org is the documentation site, https://propertybag.ncode.io/, instead of the repository (#37, ADR-1009).
- The repository README and both package READMEs link to the documentation site (#37).
- The XML documentation of
IReadOnlyPropertyBag.Clonesays that how values are copied is up to the implementation, and that the default implementation clones eachICloneablevalue, as the README and the documentation site say; it described every copy as shallow. - The README samples check is
build/Assert-Markdown.ps1, which the gate tests offline first; it reads file names as git stores them and fails when git fails, where a failure read as "nothing changed" (#37).
v2.0.0
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.txtandPublicAPI.Unshipped.txtin 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.mdanddocs/assurance-case.md.- Each release's packages carry a signed build-provenance attestation: after the push to nuget.org,
.github/workflows/publish.ymlattaches the packages, the provenance file (<tag>.intoto.jsonl) and an SPDX SBOM (<tag>.spdx.json) to the GitHub release, andgh attestation verify <package> --repo NCodeGroup/PropertyBagchecks 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.mdstates the security requirements, the threat model, the secure design principles applied and the weaknesses countered, anddocs/architecture.mddescribes the components (#31).- Code coverage:
./build/Test-Coverage.ps1fails below 98% line or branch coverage and CI runs it on every pull request, and.github/workflows/coverage.ymlpublishes the report to Codecov from every push tomain. The tests coverPropertyBagFactory,DefaultRegistration, scopes over a key that held a value, and an empty bag's enumeration and count. ./build/gate.ps1checks 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.mdsays how to verify it (#24).
Changed
- Breaking:
IPropertyBag.Set<T>(key, value)isIPropertyBag.SetValue<T>(key, value), and the extensionsSet<T>(value)andTryGet<T>(out value)areSetValue<T>(value)andTryGetValue<T>(out value);TryGetValueis in the newReadOnlyPropertyBagExtensionsclass. RenameSettoSetValueandTryGettoTryGetValueat each call site (ADR-1004). - Breaking:
DefaultPropertyBagisPropertyBagDictionary; rename it where code names the type (ADR-1004). - Breaking:
PropertyBagDictionary,DefaultPropertyBagFactoryandDefaultPropertyBagScopeare sealed; compose them instead of deriving from them. SetValue(value),TryGetValue(out value)andAddPropertyBag()throwArgumentNullExceptionfor anullbag 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.
AssemblyVersionmoves only with the major version: it is2.0.0.0for every 2.x release, whileFileVersionandInformationalVersionkeep the exact version.- Package and assembly versions come from
version.jsonthrough Nerdbank.GitVersioning instead of the release tag: a release setsversion.jsonto its version first, and CI refuses a release whose tag differs. - The solution file is
NCode.PropertyBag.slnx, anddotnet buildno longer creates packages:./build/dod.ps1and CI pack withdotnet pack(#29). - Each package's description and tags are set in its project file and describe that package, since the
project.propsfiles that held them were no longer imported; the project files keep only the settingsbuild/ProjectTemplate.propsdoesn't make, and no file starts with a byte order mark (#29). - The projects are in
src/and the test project intests/, 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.ymlafter a maintainer approves thenugetenvironment;.github/workflows/main.ymland theNUGET_APIKEYsecret it used are gone (#24). - Every C# file starts with
// Copyright © NCode Groupand// SPDX-License-Identifier: Apache-2.0in place of the Apache license preamble, and CSharpier formats the code. PropertyBagKey<T>compares two keys by name, since both always have the typeT; the result ofEqualsdoes not change.- The project's icon is the NCode brand icon the other NCode packages carry.
Removed
- Breaking: The
net8.0target: both packages targetnet10.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.Scopereturns restores the value its key held before, asIPropertyBag.Scope,IPropertyBagScopeand the README say, instead of removing the key; a key that held no value is still removed, and a secondDisposedoes nothing. Code that relied on the key being removed after a scope over an existing value callsRemoveafter disposing the scope (ADR-1000).