deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

semver: `parseRange` doesn't throw with invalid input

Open kt3k opened this issue 1 year ago • 0 comments

The below example doesn't throw a type error:

import { parseRange } from "@std/semver";
const range = parseRange("invalid");
console.log(range);

Instead it prints the below range object:

[
  [
    {
      operator: "<",
      major: 0,
      minor: 0,
      patch: 0,
      prerelease: [],
      build: []
    }
  ]
]

kt3k avatar May 23 '24 08:05 kt3k