PackageTrack
Sign in Get early access

pub_semver

Versions and version constraints implementing pub's versioning policy. This is very similar to vanilla semver, with a few corner cases.

2.2.0 9.2M downloads/mo #42 most downloaded on pub.dev dart-lang/tools

What this package is like to depend on

Last release 1 years ago

07 Mar 2025

Release timing varies

gaps range from 4 weeks to 1.6 years

Nearly every release is documented

notes for 27 of 28 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

29 releases · first in 2014

0 releases in the last 12 months

see the full history below

Release timeline

29 releases · Sep 2014 to Mar 2025
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 29
  1. 2.2.0 07 Mar 2025
    Release notes
    • Remove dependency on package:meta.
    • Mark Version class as final instead of with @sealed.
    • Clarify that the lists returned by the preRelease and build properties of Version and the ranges property of VersionUnion should not be modified.
    • Note that VersionConstraint.any and VersionConstraint.empty static fields shouldn't be reassigned and will be made final in a future release.
    Open source →
  2. 2.1.5 11 Dec 2024
    Release notes
    • Require Dart 3.4.0.
    • Move to dart-lang/tools monorepo.
    Open source →
  3. 2.1.4 04 May 2023
    Release notes
    • Added topics to pubspec.yaml.
    Open source →
  4. 2.1.3 12 Nov 2022
    Release notes
    • Add type parameters to the signatures of the Version.preRelease and Version.build fields (List ==> List<Object>). #74.
    • Require Dart 2.17.
    Open source →
  5. 2.1.2 14 Oct 2022
    Release notes
    • Add markdown badges to the readme.
    Open source →
  6. 2.1.1 07 Mar 2022
    Release notes
    • Fixed the version parsing pattern to only accept dots between version components.
    Open source →
  7. 2.1.0 14 Sep 2021
    Release notes
    • Added Version.canonicalizedVersion to help scrub leading zeros and highlight that Version.toString() preserves leading zeros.
    • Annotated Version with @sealed to discourage users from implementing the interface.
    Open source →
  8. 2.0.0 05 Feb 2021
    Release notes
    • Stable null safety release.
    • Version.primary now throws StateError if the versions argument is empty.
    Open source →
  9. 2.0.0-nullsafety.0 24 Nov 2020 pre-release

    Nothing published for this version

  10. 1.4.4 16 Mar 2020
    Release notes
    • Fix a bug of VersionRange.union where ranges bounded at infinity would get combined wrongly.

    1.4.3

    • Update Dart SDK constraint to >=2.0.0 <3.0.0.
    • Update package:collection constraint to ^1.0.0.
    Open source →
  11. 1.4.3 11 Feb 2020

    Nothing published for this version

  12. 1.4.2 19 Jul 2018
    Release notes
    • Set max SDK version to <3.0.0.
    Open source →
  13. 1.4.1 02 May 2018
    Release notes
    • Fix a bug where there upper bound of a version range with a build identifier could accidentally be rewritten.
    Open source →
  14. 1.4.0 02 May 2018
    Release notes
    • Add a Version.firstPreRelease getter that returns the first possible pre-release of a version.

    • Add a Version.isFirstPreRelease getter that returns whether a version is the first possible pre-release.

    • new VersionRange() with an exclusive maximum now replaces the maximum with its first pre-release version. This matches the existing semantics, where an exclusive maximum would exclude pre-release versions of that maximum.

      Explicitly representing this by changing the maximum version ensures that all operations behave correctly with respect to the special pre-release semantics. In particular, it fixes bugs where, for example, (>=1.0.0 <2.0.0-dev).union(>=2.0.0-dev <2.0.0) and (>=1.0.0 <3.0.0).difference(^1.0.0) wouldn't include 2.0.0-dev.

    • Add an alwaysIncludeMaxPreRelease parameter to new VersionRange(), which disables the replacement described above and allows users to create ranges that do include the pre-release versions of an exclusive max version.

    Open source →
  15. 1.3.7 13 Apr 2018
    Release notes
    • Fix more bugs with VersionRange.intersect(), VersionRange.difference(), and VersionRange.union() involving version ranges with pre-release maximums.
    Open source →
  16. 1.3.6 10 Apr 2018
    Release notes
    • Fix a bug where constraints that only allowed pre-release versions would be parsed as empty constraints.
    Open source →
  17. 1.3.5 05 Apr 2018
    Release notes
    • Fix a bug where VersionRange.intersect() would return incorrect results for pre-release versions with the same base version number as release versions.
    Open source →
  18. 1.3.4 03 Apr 2018
    Release notes
    • Fix a bug where VersionRange.allowsAll(), VersionRange.allowsAny(), and VersionRange.difference() would return incorrect results for pre-release versions with the same base version number as release versions.
    Open source →
  19. 1.3.3 30 Mar 2018
    Release notes
    • Fix a bug where VersionRange.difference() with a union constraint that covered the entire range would crash.
    Open source →
  20. 1.3.2 21 Nov 2016
    Release notes
    • Fix a checked-mode error in VersionRange.difference().
    Open source →
  21. 1.3.1 16 Nov 2016
    Release notes
    • Fix a new strong mode error.
    Open source →
  22. 1.3.0 08 Jun 2016
    Release notes
    • Make the VersionUnion class public. This was previously used internally to implement new VersionConstraint.unionOf() and VersionConstraint.union(). Now it's public so you can use it too.

    • Added VersionConstraint.difference(). This returns a constraint matching all versions matched by one constraint but not another.

    • Make VersionRange implement Comparable<VersionRange>. Ranges are ordered first by lower bound, then by upper bound.

    Open source →
  23. 1.2.4 01 Apr 2016
    Release notes
    • Fix all remaining strong mode warnings.
    Open source →
  24. 1.2.3 02 Nov 2015
    Release notes
    • Addressed three strong mode warnings.
    Open source →
  25. 1.2.2 21 Sep 2015
    Release notes
    • Make the package analyze under strong mode and compile with the DDC (Dart Dev Compiler). Fix two issues with a private subclass of VersionConstraint having different types for overridden methods.
    Open source →
  26. 1.2.1 21 May 2015
    Release notes
    • Allow version ranges like >=1.2.3-dev.1 <1.2.3 to match pre-release versions of 1.2.3. Previously, these didn't match, since the pre-release versions had the same major, minor, and patch numbers as the max; now an exception has been added if they also have the same major, minor, and patch numbers as the min and the min is also a pre-release version.
    Open source →
  27. 1.2.0 06 May 2015
    Release notes
    • Add a VersionConstraint.union() method and a new VersionConstraint.unionOf() constructor. These each return a constraint that matches multiple existing constraints.

    • Add a VersionConstraint.allowsAll() method, which returns whether one constraint is a superset of another.

    • Add a VersionConstraint.allowsAny() method, which returns whether one constraint overlaps another.

    • Version now implements VersionRange.

    Open source →
  28. 1.1.0 29 Oct 2014
    Release notes
    • Add support for the ^ operator for compatible versions according to pub's notion of compatibility. ^1.2.3 is equivalent to >=1.2.3 <2.0.0; ^0.1.2 is equivalent to >=0.1.2 <0.2.0.

    • Add Version.nextBreaking, which returns the next version that introduces breaking changes after a given version.

    • Add new VersionConstraint.compatibleWith(), which returns a range covering all versions compatible with a given version.

    • Add a custom VersionRange.hashCode to make it properly hashable.

    Open source →
  29. 1.0.0 26 Sep 2014
    Release notes
    • Initial release.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive