Skip to content

Releases: McSherry/McSherry.SemanticVersioning

v1.4.1

10 Jan 20:48
v1.4.1
bd5dbc5
Compare
Choose a tag to compare

This patch release adds a .NET 5 build target.

Installation

This update can be installed from NuGet by entering the following into the command-line client:

Install-Package McSherry.SemanticVersioning -Version 1.4.1

v1.4.0

04 Jun 17:14
v1.4.0
53c610f
Compare
Choose a tag to compare

This minor release adds new features, new targets, and corrections.

Features

  • Custom format strings are now supported (#17)
    The SemanticVersion.ToString method can now be passed a custom format string that enables free-form formatting, comparable to that DateTime.ToString permits. Full details are available in documentation but, for example, the standard format for semantic versions uses the format string M.m.pRRDD.

  • Semantic versions can now be deconstructed (5396527)
    A pair of new SemanticVersion.Deconstruct methods are added to support deconstruction to tuples, which may add convenience when working with instances in a foreach loop.

  • Parser benchmarking now employed (#16)
    The project now includes BenchmarkDotNet runners as part of its standard build process, allowing performance tracking between changes.

  • New build and test targets
    The project now targets .NET Core 2.1 and 3.1 as part of its standard build process. This reflects the 'end of life' status of .NET Core 1.0 and means that the two current long-term support (LTS) releases of .NET Core are specifically tested. End-of-life targets may eventually be removed.

Deprecations

Following the inclusion of support for custom format strings, the 'prefixed' variants of the standard format strings included in previous releases (link) are now deprecated. At present, use will generate only a warning. In future, this may be upgraded to an error. However, to maintain compatibility, support for them will not be removed in this major version stream.

Bug fixes

  • Redundant wildcard support (#21)
    The version ranges supported now include those with redundant wildcards (e.g. 1.x.x vs. just 1.x). These were previously excluded but, as node-semver supports them, should have been included.

  • Deserialisation support corrections (065d1a3)
    A failure to mark an internal member with OptionalFieldAttribute, which may have prevented cross-version deserialisation, has been corrected.

  • Documentation fixes
    A number of typos and Markdown mis-formattings in the API documentation have been corrected.

Installation

This update can be installed from NuGet by entering the following into the command-line client:

Install-Package McSherry.SemanticVersioning -Version 1.4.0

v1.3.0

14 Jun 22:18
v1.3.0
8e762fa
Compare
Choose a tag to compare

This minor update adds new features and corrections.

Features

  • Advanced version range syntax is now supported (#13)
    Support for node-semver caret, tilde, hyphen, and X-range operators in VersionRange is added, allowing more complex comparisons to be done simply.

  • Semantic versions can now be parsed greedily (#14)
    By passing the ParseMode.Greedy flag, the SemanticVersion parser can now be configured to attempt to return a valid version at the first error it encounters. This is intended to allow including information after a version string that the caller is able to handle.

  • Semantic version parser now exposes IEnumerator<char> to callers (fd19275)
    This enables a caller to pick up where the parser left off. Used in combination with greedy parsing, it makes the job of the caller in processing anything stored after a version string easier. It would, for example, make converting a System.Version of 1.0.0.0 to a semantic version easier than it is currently.

  • Version range comparisons are no longer transparently memoized (#10)
    The VersionRange class now exposes an instance MemoizationAgent member, which enables caching the results of comparisons and which is disabled by default. This enables consumers to provide their own caching mechanism without potentially causing unexplained high memory usage.

Bug fixes

  • Version range comparisons where one SemanticVersion has pre-release identifiers and the other doesn't are now performed correctly (581d44e, 27b6b2a). Prior to this, a comparison would be erroneously performed if the right-hand version had identifiers and the left-hand version didn't.

Installation

This update can be installed from NuGet by entering the following into the command-line client:

Install-Package McSherry.SemanticVersioning -Version 1.3.0

v1.2.1

07 Apr 19:42
v1.2.1
b81d3dc
Compare
Choose a tag to compare

This minor update allows McSherry.SemanticVersioning to target:

  • .NET Framework 4.5
  • .NET Framework 4.6
  • .NET Standard 1.0
  • .NET Core 1.0

There are no other user-relevant changes.

This update can be installed from NuGet by entering the following into the command-line client:

Install-Package McSherry.SemanticVersioning -Version 1.2.1

v1.2.0

14 Jul 13:26
Compare
Choose a tag to compare

Release v1.2.0 is another minor release. The most significant changes introduced are:

  • Support for Monotonic Versions (#6)
    A new namespace, McSherry.SemanticVersioning.Monotonic, is added to aid and support
    the use of Monotonic Versions. Monotonic Versions are mostly compatible with Semantic
    versions, and so having support in one library reduces dependencies. See the pull request
    for more information.
  • Memoization of parsed SemanticVersions is adjusted
    Memoization as introduced in the previous release could cause high memory usage in certain
    situations. Memoization is now optional, off by default, and can be enabled by providing a
    class which implements IDictionary<string, SemanticVersion> via a new hook introduced as a
    static property (SemanticVersion.MemoizationAgent).

A minor bug with the NuGet package is also corrected (see #4, thanks @niemyjski).

This update is available now from GitHub and NuGet.

v1.1.0

28 Nov 13:01
Compare
Choose a tag to compare

Release v1.1.0 is a minor release, and brings the following changes:

  • SemanticVersion parsing memoized, now up to 20x faster (b9429a6).
    Memoization of the results of parsing is enabled so that parsing the same string again will
    avoid going through the parser and will instead pull the result from a cache of previously-parsed
    instances.
  • Support for Version Ranges (#1) introduced.
    The library now supports using version ranges for complex comparisons against versions.
  • The ParseMode.Lenient value is defined.
    This value is the opposite of ParseMode.Strict, and makes it nicer for code that wants to
    enable all parsing flags without having specific knowledge of each flag.

The release is available now from GitHub and NuGet.

Release v1.0.0

16 Oct 13:27
Compare
Choose a tag to compare

libSemVer.NET is in a state where I'd consider it stable and feature-complete enough to be usable, so now is as good a time as any to mark the v1.0.0 release.

So, what is it good for?

libSemVer.NET is intended to be simple to use and "plug and play." Just add it as a NuGet dependency, import the McSherry.SemanticVersioning namespace, and get started. Right now, the library does the essentials for you. It can:

  • Parse a semantic version from a string, optionally accepting prefixes (i.e. v1.0.0 instead of 1.0.0) and allowing you to omit the third version component (1.0 instead of 1.0.0). To provide a sane default, these options must be enabled by passing a flag to the Parse or TryParse methods.
  • Determine the equivalency of two semantic versions as well as the equality. Sometimes you care about whether versions are exactly equal and sometimes you only care about whether they can be treated as equivalents, so this library can do both. IEquatable<T> is implemented, too.
  • Compare semantic versions. Comparison operators (>, <, >=, <=) and interfaces (IComparable<T>) are implemented so that semantic versions can be compared, ordered, and used in ordered collections.
  • Determine if two versions are compatible. I thought this would be a pretty common use-case and so a desirable feature, so the library has a method to determine whether one semantic version is backwards-compatible with another.
  • Format a semantic version. IFormattable is implemented, and this version of the library includes four accepted format strings (really, it's more 2+2: two formats, each with "prefixed" and "unprefixed" variants).

How do I get it?

The source is here, and you can install it via NuGet by running this from the package manager console:

Install-Package McSherry.SemanticVersion

1.0.0 - Release Candidate 1

10 Oct 14:16
Compare
Choose a tag to compare
Pre-release

The first release candidate for v1.0.0. If nothing is found to be wrong, this will probably be the build that is used for release.