-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Historically ufo was started as a polyfill for URL
when there were no enough browser coverage and also due to behavior variations. Now that URL is an standard de-facto, we can migrate to it for all (for parse/stringify) or at least for resolve/normalize Utils.
One of the biggest breaking change side-effects of this is that we will encode more characters even then they not not necessary and parsable. The initial behavior was taken from vue-router
that preferred to keep URL readability and encode in must-have situations only. (one example: #164)
Second thing to consider is the performance part which probably worth a decent benchmark against URL
implementation of major JS runtimes (Browsers, Node, Bun, Deno, Cloudflare workers) comparing to current regex based parseURL
.
--
Update: I am thinking if we could ship it even faster with ufo/url
or ufo/web
to allow progressive opt-in and later in v2, have backward compact with ufo/compat
. Only have to figure out a way to make bundling work to switch impl of encoding utils.