network icon indicating copy to clipboard operation
network copied to clipboard

chore(dht): Use `URLSearchParams` to parse search params

Open mondoreale opened this issue 11 months ago • 0 comments

Summary

I switch to URLSearchParams for query param parsing and kill a dependency (querystring).

URLSearchParams is

  • Widely supported by browsers (97%+).
  • Available in node (global scope) since v15, stable since v10.

querystring is

  • Deprecated.
  • Doesn't seem to work well in browsers (breaks browser tests if not treated properly).

Changes

  • Ditch querystring
  • Use URLSearchParams instead

Limitations and future improvements

  • n/a

Checklist before requesting a review

  • [x] Is this a breaking change? If it is, be clear in summary.
  • [x] Read through code myself one more time.
  • [x] Make sure any and all TODO comments left behind are meant to be left in.
  • [x] Has reasonable passing test coverage?
  • [x] Updated changelog if applicable.
  • [x] Updated documentation if applicable.

mondoreale avatar Feb 20 '25 13:02 mondoreale