Skip to content

v5.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Dec 05:40
· 45 commits to main since this release
163a887

Added

  • CollectionDiff.Compute returns the items one collection adds to and removes from another as a CollectionDiff<T>, whose Added and Removed count duplicates and ignore order, under the default or a given IEqualityComparer<T>. WatchDiffsAsync, an extension member on ICollectionDataSource<T>, yields the current items as added and then the items each change added and removed, for await foreach, and skips a change that adds and removes nothing, such as a reorder (#100, ADR-1033).
  • Providers and polling sources record metrics and traces on the meter and activity source NCode.LiveCollections, whose names LiveCollectionsTelemetry.MeterName and LiveCollectionsTelemetry.ActivitySourceName hold. The histogram ncode.livecollections.provider.rebuild.duration measures each build of a provider's collection in seconds, with error.type when the build throws, and ncode.livecollections.polling.refresh.duration measures each refresh of a polling source, with its ncode.livecollections.polling.refresh.trigger (timer or on_demand), its ncode.livecollections.polling.refresh.outcome (changed, unchanged or failed) and error.type when it fails; the spans ncode.livecollections.provider.rebuild and ncode.livecollections.polling.refresh mirror them. They record to the IMeterFactory that DefaultCollectionProviderFactory(IMeterFactory) and DefaultCollectionDataSourceFactory(TimeProvider, IMeterFactory) take, which the container picks when the host registers one, or to the one that the MeterFactory property of CollectionProviderOptions or PeriodicPollingCollectionDataSourceOptions names, and record nothing without one; docs/metrics.md lists each, and the collect metrics and traces guide shows how to turn them on (#103, ADR-1035).

Changed

  • Package validation compares each package with the published 5.0.0 package.
  • The samples in the readmes and on the documentation site subscribe with OnChange, which keeps following a source that signals from several threads at once, instead of ChangeToken.OnChange, which can stop following it (#177, ADR-1039).
  • The documentation site builds with NCodeGroup/docs v0.19.0, which installs its packages with pnpm, and node build/site.mjs tells someone without a toolchain clone to run pnpm install --frozen-lockfile in it (#174).
  • Updated from project-template v0.175.0 to v0.181.0: agent workflow commands, prompts, skills and agents, the template's scripts and decision records. A maintainer's word in a session authorizes protected paths in a filter run (ADR-0094), and a web frontend uses TypeScript, React and MUI and a documentation site Astro Starlight (ADR-0095).
  • ./build/dod.ps1 checks the Markdown links in a Markdown stage, as CI's Markdown checks job does, when Node.js is on PATH, so ./build/gate.ps1 runs no Markdown link stage of its own and no longer fails without Node.js, and AGENTS.md says to put Node.js on PATH first, with nvs use 26 where nvs manages it (#160).
  • The NuGet descriptions and readmes of both packages name what each offers. NCode.LiveCollections names every data source, static, observable, mutable, change-token, composite and periodic polling, the Transform, SelectItems, WhereItems, ConcatSources and Debounce sources derived from another, the consumer helpers, the collection diffs, and metrics and traces. NCode.LiveCollections.Abstractions names the data source contracts, the factory contracts and the options, the MeterFactory options for metrics and traces included (#166).
  • AGENTS.md records that epic #94's breaking stories shipped together as 5.0.0, and that a story that only adds carries a Release: line with the next minor version once the major before it has shipped, and none while a new major waits for its last breaking story (#164).