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

[on hold] BREAKING(http/unstable): switch params and info args in Handler in route() for more conveniency #6094

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lowlighter
Copy link
Contributor

Closes #5884

Not sure if it qualifies for "breaking change" since the API is still unstable, but it does break apps relying on current implementation route()

As explained in the linked issue, since params: URLPatternResult is way more likely to be used than info: Deno.ServeHandlerInfo in non-default handlers, it makes sense to switch them for improved DX

@github-actions github-actions bot added the http label Oct 5, 2024
Copy link

codecov bot commented Oct 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.76%. Comparing base (065296c) to head (4cd2e8c).
Report is 38 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6094   +/-   ##
=======================================
  Coverage   96.75%   96.76%           
=======================================
  Files         509      509           
  Lines       39175    39175           
  Branches     5795     5795           
=======================================
+ Hits        37905    37908    +3     
+ Misses       1228     1225    -3     
  Partials       42       42           

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

@lowlighter lowlighter marked this pull request as ready for review October 5, 2024 17:13
@lowlighter lowlighter requested a review from kt3k as a code owner October 5, 2024 17:13
@lowlighter lowlighter changed the title BREAKING(http): switch params and info args in Handler in route() for more conveniency BREAKING(http/unstable): switch params and info args in Handler in route() for more conveniency Oct 5, 2024
@kt3k kt3k added the feedback welcome We want community's feedback on this issue or PR label Oct 29, 2024
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM.

There should be more usages for params than info in general. This change makes sense.

@kt3k
Copy link
Member

kt3k commented Oct 29, 2024

We recently removed the dependency to (unstable) route in main of CLI (in deno init --serve). ref. denoland/deno#26595

I think we still need to wait for a while (at least a few versions of CLI releases) to land this PR to avoid the troubles.

@kt3k kt3k changed the title BREAKING(http/unstable): switch params and info args in Handler in route() for more conveniency [on hold] BREAKING(http/unstable): switch params and info args in Handler in route() for more conveniency Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback welcome We want community's feedback on this issue or PR http
Projects
None yet
Development

Successfully merging this pull request may close these issues.

qol(http/route): typings and handler signature
2 participants