Description
Check whether supplied numeric version bounds intersect.
Semantic versions separate core numbers, prerelease identifiers and build metadata. Numeric prerelease leading zeros are restricted while build identifiers preserve text; local identifier or bound checks do not implement complete dependency-range resolution.
Check whether supplied numeric version bounds intersect.
When to use this tool
Use SemVer Range Empty Intersection Witness when checking one explicit version-token or core-bound convention.
How to use the tool and how it works
- Enter lowerVersion, upperVersion, lowerInclusive, upperInclusive, lowerSource, upperSource. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read empty, conflictingBounds. Inspect empty before interpreting the associated values.
Check whether supplied numeric version bounds intersect. Require nonnegative three-component arrays; compare lexicographically and declare empty for reversed bounds or equal bounds lacking two inclusive flags; return source labels only when empty.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| lowerVersion | Three-component nonnegative numeric array [major,minor,patch]; no version string, prerelease or full range expression. | Required. Array of safe integer; maximum items 256. |
| upperVersion | Three-component nonnegative numeric array [major,minor,patch], under the upper inclusion flag. | Required. Array of safe integer; maximum items 256. |
| lowerInclusive | Lower Inclusive | Required. Boolean. |
| upperInclusive | Upper Inclusive | Required. Boolean. |
| lowerSource | Lower Source | Required. Text; maximum UTF-16 length 8192. |
| upperSource | Upper Source | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| empty | Empty | Required. Boolean. |
| conflictingBounds | Conflicting Bounds | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
{
"input": {
"lowerVersion": [
2,
0,
0
],
"upperVersion": [
1,
9,
9
],
"lowerInclusive": true,
"upperInclusive": true,
"lowerSource": "range-A lower",
"upperSource": "range-B upper"
},
"output": {
"empty": true,
"conflictingBounds": [
"range-A lower",
"range-B upper"
]
}
} Limitations and assumptions
- This checks core triples, not full SemVer ranges, prereleases or dependency compatibility.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use a conforming full version/range implementation and package-manager resolution when compatibility or installation is the question.
References
Similar or alternative tools
- SemVer Prerelease Numeric Token
Inspect prerelease identifier syntax and numeric leading zeros.
- SemVer Prerelease Leading Zero Flag
Flag numeric leading-zero violations in one prerelease identifier.