Semver Range Lab

Semver Range Lab

This browser-local lab intersects each package's written ranges against only the version candidates you provide, then lists independent package combinations. It uses pinned node-semver 6.3.1 for caret, tilde, comparator, OR and prerelease matching. A green candidate satisfies every range for its package. A zero result means no listed version matches, not that no possible future or unlisted version exists. It does not query npm, resolve peer dependencies or prove an installation will succeed.

1. Candidate versions and constraints

Up to 6 packages, 40 candidate versions and 6 range lines per package. Show at most 100 combinations; no registry access.

Package 1

Strict SemVer X.Y.Z with optional -prerelease/+build. One per line or separated by commas; no leading v.

One range per line. Within a line use comparator spaces for AND and || for OR, e.g. ^1.2.0 or >=1.2.0 <2.0.0.

Package 2

Strict SemVer X.Y.Z with optional -prerelease/+build. One per line or separated by commas; no leading v.

One range per line. Within a line use comparator spaces for AND and || for OR, e.g. ^1.2.0 or >=1.2.0 <2.0.0.

Default node-semver policy admits only prereleases explicitly selected by a comparator with the same X.Y.Z tuple. Enabling this switch broadens all tests; it does not turn a version outside numeric bounds into a match.

Edit the two-package example and analyze.

Comments & questions

Semver Range Lab

This browser-local lab intersects each package's written ranges against only the version candidates you provide, then lists independent package combinations. It uses pinned node-semver 6.3.1 for caret, tilde, comparator, OR and prerelease matching. A green candidate satisfies every range for its package. A zero result means no listed version matches, not that no possible future or unlisted version exists. It does not query npm, resolve peer dependencies or prove an installation will succeed.

Key features

  • Check caret, tilde, comparator AND and OR ranges using node-semver rules
  • Show every supplied candidate in a per-constraint pass/fail matrix
  • Explain default prerelease tuple opt-in and an explicit include-prerelease mode
  • Identify a smallest subset of constraints with no shared listed candidate
  • Count independent cross-package choices exactly and display the first 100
  • Export input and bounded results as a local JSON file

How to use

  1. Load the safe example or add up to six named packages.
  2. Enter strict X.Y.Z candidate versions, one per line or comma-separated, and one range per line. Separate alternatives within a range with ||.
  3. Choose whether to include otherwise-excluded prereleases and analyze.
  4. Review each package's candidate matrix and the smallest conflicting rule group if nothing matches.
  5. Inspect compatible package combinations and download the JSON report if useful.

Use cases

  • Check whether two dependency declarations have a common listed release
  • See why ^0.2.3 excludes 0.3.0 while ~1.2.3 excludes 1.3.0
  • Find an excluded prerelease and explicitly compare policy modes
  • Enumerate a small finite set of upgrade choices across independent packages

Frequently asked questions

Does zero combinations prove the ranges themselves are impossible?

No. It proves no combination among the candidate versions entered here. A compatible version could be missing from the list or released later. The highlighted conflict subset is also defined only over supplied candidates.

How are OR and multiple lines combined?

A single line follows node-semver grammar: whitespace joins comparators with AND and || joins alternatives with OR. Different lines for the same package must all pass, so they form an intersection.

Why is a prerelease rejected even though it compares inside the range?

By default, node-semver only accepts a prerelease when a comparator in that same OR clause opts into the same major.minor.patch tuple. The checkbox applies includePrerelease to every range test and may admit other prereleases.

Is this a dependency solver for npm install?

No. Packages here are independent selection dimensions. It does not read a registry, recursively resolve dependencies, account for peer/optional/platform/workspace rules or run npm. Verify a real installation with its package manager.

Why are only 100 combinations shown?

The exact finite product count is computed from accepted candidates. At most the first 100 combinations are displayed and exported so a large Cartesian product cannot freeze the page.

Are versions or package details uploaded?

No. Parsing, filtering and JSON creation happen in this browser tab. No registry request, automatic save or app API submission is used.

Privacy

Package names, version lists and ranges stay in browser memory. Analysis and optional JSON download are local; nothing is sent to a registry or application API.

References

Related Tools

npm Lockfile Conflict ResolverFile Manifest VerifierJSON Schema ValidatorWasm Module InspectorHreflang Matrix CheckerAST Query PlaygroundContainer Build GraphDependency Graph ExplorerCron Schedule AuditorPatch Review WorkbenchSource Map ExplorerLocalization Catalog AuditorStructured Data ReviewerHTTP Archive AnalyzerWebhook Signature LabProtobuf Schema WorkbenchGraphQL Schema LabAvro Schema EvolutionLocal SQL WorkbenchSchema Form BuilderMesh Repair WorkbenchPipe Network LabRobot Arm Kinematics LabThermal Network LabBeam Response LabGear Train DesignerTolerance Stackup LabSensor Calibration FitPCB Stackup PlannerDigital Filter DesignerNetwork Reachability MapSun Shadow MapGPS Error SimulatorDigital Logic SimulatorAnalog Circuit LabMechanism Linkage LabAnalysis Mesh GeneratorOpenAPI Contract InspectorDatabase Migration PlannerDimensional Equation CheckerTruss Force LabBoolean Minimization LabControl Response LabQueueing Simulation LabGeofence Event SimulatorCoordinate Reference LabSurvey Traverse LabRaster Classification LabChoropleth Design LabMap Print ComposerRaster Reprojection LabElevation Contour MakerTerrain Viewshed LabWatershed DelineatorMap Tile PackagerText File Encoding WorkbenchFilesystem Portability AuditorSBOM License ExplorerFile Signature AuditorSource Secret AuditorOffline Web Package BuilderCertificate Chain InspectorTorrent Metainfo InspectorChunked File PackagerEncrypted File VaultDuplicate File FinderArchive WorkbenchDesign Token ManagerSpacing Token DesignerResponsive Type SystemPackaging Dieline DesignerSVG Icon Sprite PackerFlex Layout PlaygroundCSS Grid PlaygroundRegex Equivalence LabMarkdown Repository AuditorLog Template MinerResponsive Layout AuditorEmail Template PreviewInternal Link GraphState Machine TesterPetri Net SimulatorGit History VisualizerCurl Request WorkbenchBinary Protocol DesignerHex File EditorBinary Patch WorkbenchFile Signature WorkbenchAPI Mock SandboxSchema Column MapperEvent Log SessionizerER Diagram DesignerTime Series Gap AuditorStratified Data SplitterData Lineage DesignerDecision Tree LabData Anonymization WorkbenchData Expectation RunnerBasket Pattern AnalyzerRobots Policy TesterSEO HTML AuditorAccessibility Structure AuditorSyndication Feed WorkbenchIndexNow Payload BuilderCrawl Log AnalyzerCSP Policy WorkbenchSearch Performance AnalyzerCSV Formula Risk AuditorCORS Response SimulatorCache Header LabCookie Policy InspectorWeb Vitals Trace LabSitemap Health AuditorBatch File RenamerFolder Space MapFolder Difference ReviewerRoute Order OptimizerGeoJSON Map EditorPolygon Overlay LabCartographic Label PlacerSpatial Table JoinGeoJSON Topology AuditorGPX Track AnalyzerTrack Privacy RedactorCSV Table JoinCSV Pivot WorkbenchScientific Data ProfilerTabular Cleaning WorkbenchRecord ReconciliationData Dictionary BuilderCanonical Graph AuditorRedirect Plan TesterHTTP response and ping reference testBrowser and System InformationJSON ↔ YAML ConverterXML ↔ JSON ConverterHTML FormatterJavaScript MinifierMock Data Generator.gitignore GeneratorLicense GeneratorUser-Agent ParserPassword Strength CheckerCode to ImageXML FormatterHTTP Status Code LookupMIME Type LookupJS & SQL String EscapeCSS Box Shadow GeneratorCSS Gradient GeneratorIndent ConverterNumber Base ConverterUnicode Escape ConverterUnicode InspectorJSON Structure DiffMarkdown Table GeneratorBase64 EncoderJSON FormatterURL EncoderSQL FormatterCron Expression GeneratorRegex TesterUUID GeneratorHash GeneratorTimestamp ConverterJWT DecoderHTML Entity ConverterMarkdown PreviewCSS MinifierMeta Tag GeneratorJSON ↔ CSVCase ConverterImage to Base64
Explore all Dev Tools tools →Image/Media →Text/Convert →Life/Fun →