Skip to content

Commit 61fc460

Browse files
authored
Merge pull request #270 from mattfarina/relnotes-3.4.0
Update the release notes and readme for new version
2 parents dc05094 + 69a63e7 commit 61fc460

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

CHANGELOG.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Changelog
22

3+
## 3.4.0 (2025-06-27)
4+
5+
### Added
6+
7+
- #268: Added property to Constraints to include prereleases for Check and Validate
8+
9+
### Changed
10+
11+
- #263: Updated Go testing for 1.24, 1.23, and 1.22
12+
- #269: Updated the error message handling for message case and wrapping errors
13+
- #266: Restore the ability to have leading 0's when parsing with NewVersion.
14+
Opt-out of this by setting CoerceNewVersion to false.
15+
16+
### Fixed
17+
18+
- #257: Fixed the CodeQL link (thanks @dmitris)
19+
- #262: Restored detailed errors when failed to parse with NewVersion. Opt-out
20+
of this by setting DetailedNewVersionErrors to false for faster performance.
21+
- #267: Handle pre-releases for an "and" group if one constraint includes them
22+
23+
## 3.3.1 (2024-11-19)
24+
25+
### Fixed
26+
27+
- #253: Fix for allowing some version that were invalid
28+
329
## 3.3.0 (2024-08-27)
430

531
### Added
@@ -137,7 +163,7 @@ functions. These are described in the added and changed sections below.
137163
- #78: Fix unchecked error in example code (thanks @ravron)
138164
- #70: Fix the handling of pre-releases and the 0.0.0 release edge case
139165
- #97: Fixed copyright file for proper display on GitHub
140-
- #107: Fix handling prerelease when sorting alphanum and num
166+
- #107: Fix handling prerelease when sorting alphanum and num
141167
- #109: Fixed where Validate sometimes returns wrong message on error
142168

143169
## 1.4.2 (2018-04-10)

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ other versions, convert the version back into a string, and get the original
5050
string. Getting the original string is useful if the semantic version was coerced
5151
into a valid form.
5252

53+
There are package level variables that affect how `NewVersion` handles parsing.
54+
55+
- `CoerceNewVersion` is `true` by default. When set to `true` it coerces non-compliant
56+
versions into SemVer. For example, allowing a leading 0 in a major, minor, or patch
57+
part. This enables the use of CalVer in versions even when not compliant with SemVer.
58+
When set to `false` less coercion work is done.
59+
- `DetailedNewVersionErrors` provides more detailed errors. It only has an affect when
60+
`CoerceNewVersion` is set to `false`. When `DetailedNewVersionErrors` is set to `true`
61+
it can provide some more insight into why a version is invalid. Setting
62+
`DetailedNewVersionErrors` to `false` is faster on performance but provides less
63+
detailed error messages if a version fails to parse.
64+
5365
## Sorting Semantic Versions
5466

5567
A set of versions can be sorted using the `sort` package from the standard library.
@@ -160,6 +172,10 @@ means `>=1.2.3-BETA` will return `1.2.3-alpha`. What you might expect from case
160172
sensitivity doesn't apply here. This is due to ASCII sort ordering which is what
161173
the spec specifies.
162174

175+
The `Constraints` instance returned from `semver.NewConstraint()` has a property
176+
`IncludePrerelease` that, when set to true, will return prerelease versions when calls
177+
to `Check()` and `Validate()` are made.
178+
163179
### Hyphen Range Comparisons
164180

165181
There are multiple methods to handle ranges and the first is hyphens ranges.

0 commit comments

Comments
 (0)