Closed cotyhamilton closed 7 months ago
This panics because semver won't allow a version to be compared with a tag. I think the API could be improved here, but if the API is carved in stone, then I think it should return false
if a version is compared with a tag, it shouldn't panic.
After some discussion with @dsherret it was decided that:
I think we just need to change deno_graph to give a nice error message when loading with a tag.
and
I don't want to change the matches API because where it's used should have a VersionReq with a RangeSet and not a tag. If anything probably the code that's using matches should be working with RangeSets instead and call matches on that, but that's a very large refactor that I'm not sure is worth doing (or even should be done) and I wouldn't recommend taking it on at the moment because of the focus on shipping JSR.
I closed the attached PR. Let's see if we can fix this in deno_graph
.
deno 1.40.2 (release, aarch64-apple-darwin) v8 12.1.285.6 typescript 5.3.3
Repro: https://github.com/cotyhamilton/deno-jsr-issue