Releases: theory/pg-semver
Release v0.40.0
Changes for v0.40.0:
- Updated the installation configuration to install the SQL and
documentation files intosemver
subdirectories. - Changed the tests to use
CREATE EXTENSION
instead of loading the
SQL source file directory. The latter was required for Postgres 9.0
and lower, which have not been supported since v0.20.0 back in 2018. - Fixed a bug that rejected pre-releases starting with a zero but
eventually include a dash, e.g.,1.2.3-02-3
. Thanks to Dylan
Bourque for the pull request (#70)! - ***** WARNING: This release breaks compatibility with previous versions! ******
Fixed a bug in the scanning of pre-releases that start with a zero.
It now properly scans the rest of the pre-release string. As a result,
existing semvers with pre-releases the start with a zero may have been
incorrectly interpreted as valid. Any versions returned by this query
will need the leading 0 removed from the pre-release before upgrading:
SELECT version FROM pkg WHERE get_semver_prerelease(version) ~ '^0\[0-9]+($|\+)'
Discovered while debugging unexpected test failures in #70.
Release v0.32.1
Changes for v0.32.1:
- Fixed compilation issue on Postgres 16.
Release v0.32.0
Changes for v0.32.0:
- Add support for binary input (receive) and output (send) functions.
Thanks to Anna Clemens for the pull request (#61)!
Release v0.31.2
Changes for v0.31.2:
- Add an overflow check and properly compare the max size of INT32
rather than INT. Thanks to Felix Lechner for the report and Tom Lane
for the C lesson (#58).
Release v0.31.1
Changes for v0.31.1:
- Updated the C code to pass the correct number of arguments to
hashint2()
. Thanks to Andrew Gierth for the spot. - Fixed an error in processing the prerelease where it could sometimes
incorrectly report throw an error saying "prerelease numbers can't
start with 0" for prereleases with no such leading zero.
semver v0.31.0
- Added a workaround for an LLVM bitcode compile error. Thanks to @mark-s-a for the report (#40).
- Removed
--load-language
from the options for running the tests, as it has not been needed since 9.1, we support 9.2 and higher, and it has been removed from Postgres 13. - Fixed an a collation error on Postgres 12 and higher. Thanks to Andrew for Marc Munro for the report and to Andrew Gierth for the fix (pgxn/pgxn-manager#67).
- Prerelease parts are now compared in ASCII sort order as specified by the spec, no longer case-insensitively. This is a breaking change in the sense that
1.0.0-rc1
will now be considered greater than1.0.0-RC1
rather than equivalent, but they're both still valid. See semver/semver#176 for the relevant discussion. Thanks to Andrew Gierth for the spot!
semver v0.30.0
-
WARNING: This release breaks compatibility with previous versions!
Previous versions of the semver extension incorrectly allowed some invalid prerelease and build metadata values. Details below, but BEFORE YOU UPGRADE we strongly recommend that you check for and repair any invalid semvers. You can find them using the official SemVer regular expression like so:SELECT name, version FROM packages WHERE version::text !~ '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$';
If no rows are returned, you should be good to go. If there are results, here are Examples of invalid semantic versions and how they should be repaired.
1.0.0-02799 -> 1.0.0-2799 1.0.0-0.02 -> 1.0.0-0.2 1.0.0-.20 -> 1.0.0-0.20 1.0.0+0+20 -> 1.0.0+0-20 or 1.0.0+0.20 1.0.0+.af -> 1.0.0+0.af or 1.0.0+af
And now, back to your regularly-scheduled changes.
-
Fixed an error formatting prerelease parts for semvers longer than
32 bytes. Thanks to @Nemo157 for the report and suggested fix (#48). -
Removed code that converted dashes to dots in prerelease parts. It
had been doing so on the assumption that dashes were invalid in SemVer
1.0 and 2.0 prerelease parts, but that does not turn out to be the case.
Thanks to @Nemo157 for the report (#46). -
Fixed the parsing of prerelease and metadata parts to allow leading
zeros for parts with non-numeric characters, e.g.,1.0.0-alpha.0a
, and
to disallow parts with leading zeros and only numeric characters, e.g.,
1.0.0-02799
. Thanks to @Nemo157 for the bug report, and to Joseph
Donahue for the SemVer spec expertise (#45). -
The metadata part may no longer contain plus signs other than the one
used to start the metadata part. -
The prerelease and metadata parts may no longer start with a dot.