Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(util): use node:querystring for buildURL #1677

Merged
merged 3 commits into from
Oct 3, 2022

Conversation

KhafraDev
Copy link
Member

@KhafraDev KhafraDev commented Oct 2, 2022

Refs: #1673
Fixes: #1672

There is very little performance difference between node's querystring and fast-querystring and it's very unlikely that buildURL is a performance bottleneck.

This pr is technically a breaking change as objects and undefined params are now allowed (null, undefined, objects, functions, etc.) and no longer throw an error.

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2022

Codecov Report

Base: 94.74% // Head: 94.72% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (de291ac) compared to base (7c93a8d).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1677      +/-   ##
==========================================
- Coverage   94.74%   94.72%   -0.02%     
==========================================
  Files          53       53              
  Lines        4892     4876      -16     
==========================================
- Hits         4635     4619      -16     
  Misses        257      257              
Impacted Files Coverage Δ
lib/core/util.js 97.88% <100.00%> (-0.22%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@ronag ronag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove tests?

@KhafraDev
Copy link
Member Author

the tests were checking error messages that were no longer applicable, I added tests for a bunch of types as a replacement. I could add them back but i'm not sure how useful they would be

@ronag
Copy link
Member

ronag commented Oct 3, 2022

LGTM assuming we are pretty sure this is not breaking

lib/core/util.js Outdated Show resolved Hide resolved
@anonrig
Copy link
Member

anonrig commented Oct 3, 2022

@KhafraDev Can you rebase your branch?

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ronag ronag merged commit bc636c5 into nodejs:main Oct 3, 2022
@kibertoad
Copy link
Contributor

@ronag @mcollina It's been forever since the last release, shall a new version be cut?

@anonrig
Copy link
Member

anonrig commented Oct 3, 2022

I'll open a new pull request to see the benchmark results for before/after fast-querystring.

@KhafraDev KhafraDev deleted the buildURL-perf branch October 3, 2022 16:08
metcoder95 pushed a commit to metcoder95/undici that referenced this pull request Dec 26, 2022
* feat(util): use node:querystring for buildURL

* fix: skip test on v12

* fix: handle case for empty object
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
* feat(util): use node:querystring for buildURL

* fix: skip test on v12

* fix: handle case for empty object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve buildURL performance
6 participants