Skip to content

Main content

SemVer Range Empty Intersection Witness Tool

Contradictory bound witness for supplied stable three-integer versions, excluding prerelease and range-expression parsing.

Loading tool…

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

  1. Enter lowerVersion, upperVersion, lowerInclusive, upperInclusive, lowerSource, upperSource. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
lowerVersionThree-component nonnegative numeric array [major,minor,patch]; no version string, prerelease or full range expression.Required. Array of safe integer; maximum items 256.
upperVersionThree-component nonnegative numeric array [major,minor,patch], under the upper inclusion flag.Required. Array of safe integer; maximum items 256.
lowerInclusiveLower InclusiveRequired. Boolean.
upperInclusiveUpper InclusiveRequired. Boolean.
lowerSourceLower SourceRequired. Text; maximum UTF-16 length 8192.
upperSourceUpper SourceRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
emptyEmptyRequired. Boolean.
conflictingBoundsConflicting BoundsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
json
{
  "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

  1. Calculation and input contract: development/semver-range-empty-intersection-witness — tool.io

Similar or alternative tools