Repository navigation
chore(url): release [email protected] - #4992
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4992 +/- ##
=======================================
Coverage 95.82% 95.82%
=======================================
Files 458 458
Lines 37853 37853
Branches 5563 5563
=======================================
Hits 36272 36272
Misses 1541 1541
Partials 40 40 ☔ View full report in Codecov by Sentry. |
lucacasonato
left a comment
There was a problem hiding this comment.
I don't think the basename behaviour makes sense - we should not stabilize it.
Namely the fact that it is really
import { basename } from "@std/path/posix";
if (url.path !== "/") {
return basename(url.path);
} else {
return url.hostname;
}Additionally, the connotation that url.* methods operates on a URL is not really correct. It operates on URLs that have posix formatted paths. This is weird, because not all URLs have posix formatted paths. Take for example data URLs:
> new URL("data:application/javascript,1+1;")
URL {
href: "data:application/javascript,1+1;",
origin: "null",
protocol: "data:",
username: "",
password: "",
host: "",
hostname: "",
port: "",
pathname: "application/javascript,1+1;",
hash: "",
search: ""
}
This is not a posix formatted path.
Because of this, I think that really we shouldn't be doing this - we should just document that people can use join, basename, and friends from @std/path/posix.
|
Frankly, the purpose of |
|
Perhaps, one of the only things |
|
Closing as we're instead removing |
To be merged July 7.
Closes #4924