Skip to content

Conversation

@ysknsid25
Copy link
Contributor

resolves #322

Signed-off-by: ysknsid25 <kengo071225@gmail.com>
@codecov
Copy link

codecov bot commented Apr 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.51%. Comparing base (27996d3) to head (f86d85b).
⚠️ Report is 100 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #490       +/-   ##
===========================================
+ Coverage   56.86%   86.51%   +29.64%     
===========================================
  Files          16        5       -11     
  Lines         728      267      -461     
  Branches      113      134       +21     
===========================================
- Hits          414      231      -183     
+ Misses        303       32      -271     
+ Partials       11        4        -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

ysknsid25 and others added 3 commits November 23, 2025 08:42
Signed-off-by: ysknsid25 <kengo071225@gmail.com>
Signed-off-by: ysknsid25 <kengo071225@gmail.com>
@ysknsid25 ysknsid25 requested a review from pi0 November 23, 2025 00:10
@pi0 pi0 changed the title feat: Support usage of URLSearchParams feat: allow passing URLSearchParams to query config Nov 24, 2025
query: Record<string, any> | URLSearchParams | undefined
) {
if (query instanceof URLSearchParams) {
return Object.fromEntries(query.entries());
Copy link
Member

Choose a reason for hiding this comment

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

We can use a safer one liner:

typeof query?.entries === 'function' ? Object.fromEntries(query.entries()) : query

Copy link
Member

Choose a reason for hiding this comment

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

Another issue here is that, we are loose multi-value:

const q = new URLSearchParams() // q.toString() === "tag=a&tag=b"
q.append("tag", "a")
q.append("tag", "b")
Object.fromEntries(q.entries()) // {tag: 'b'}

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.

Support usage of URLSearchParams as a value for query / params

2 participants