Skip to content

quic: drop promise arg for sendDatagram - #67931

Open
martenrichter wants to merge 1 commit into
nodejs:mainfrom
martenrichter:droppromsenddatagram
Open

martenrichter wants to merge 1 commit into
nodejs:mainfrom
martenrichter:droppromsenddatagram

Conversation

@martenrichter

Copy link
Copy Markdown
Contributor

This drops the promise type for the datagram in
sendDatagram. This allows sendDatagram to become
sync.

Fixes: #67871

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/quic

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC transport implementation. labels Dec 1, 2026
This drops the promise type for the datagram in
sendDatagram. This allows sendDatagram to become
sync.

Fixes: nodejs#67871

Signed-off-by: Marten Richter <marten.richter@freenet.de>
@codecov

codecov Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.59%. Comparing base (abaee7d) to head (55b6a21).
⚠️ Report is 71 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67931      +/-   ##
==========================================
+ Coverage   90.52%   90.59%   +0.06%     
==========================================
  Files         805      802       -3     
  Lines      285842   286646     +804     
  Branches    55192    55377     +185     
==========================================
+ Hits       258771   259683     +912     
+ Misses      17165    17078      -87     
+ Partials     9906     9885      -21     
Files with missing lines Coverage Δ
lib/internal/quic/quic.js 100.00% <100.00%> (ø)

... and 91 files with indirect coverage changes

🚀 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.

@Ethan-Arrowood Ethan-Arrowood left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice!

@Ethan-Arrowood Ethan-Arrowood added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Dec 1, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Dec 1, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@pimterry pimterry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Small point on the docs, all the rest LGTM

Comment thread lib/internal/quic/quic.js
*
* If a Promise is given, it will be awaited before sending. If the
* session closes while awaiting, 0n is returned silently.
* @param {ArrayBufferView|string|Promise} datagram The datagram payload

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Both here and in quic.md we still have Promise in the param type, we should update both of these too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC transport implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quic: sendDatagram has only async type because of conversion

5 participants