Skip to content

quic: drop promise arg for sendDatagram - #67931

Open
martenrichter wants to merge 2 commits into
nodejs:mainfrom
martenrichter:droppromsenddatagram
Open

martenrichter wants to merge 2 commits 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.58%. Comparing base (abaee7d) to head (e7716ea).
⚠️ Report is 93 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67931      +/-   ##
==========================================
+ Coverage   90.52%   90.58%   +0.05%     
==========================================
  Files         805      802       -3     
  Lines      285842   286852    +1010     
  Branches    55192    55398     +206     
==========================================
+ Hits       258771   259852    +1081     
+ Misses      17165    17103      -62     
+ Partials     9906     9897       -9     
Files with missing lines Coverage Δ
lib/internal/quic/quic.js 100.00% <100.00%> (ø)

... and 94 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 Outdated
*
* 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Well, I have overlooked this. Should now be fixed! (I am really bad on spotting all places to change stuff).

@pimterry pimterry added commit-queue PRs queued for automated landing through the Commit Queue. commit-queue-squash PRs the Commit Queue should land as one squashed commit. labels Dec 2, 2026
@Ethan-Arrowood Ethan-Arrowood added request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels Dec 2, 2026
@Ethan-Arrowood

Copy link
Copy Markdown
Contributor

re-requesting CI since commit-queue will block on the new commit.

@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 2, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

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

Labels

commit-queue-squash PRs the Commit Queue should land as one squashed commit. 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

6 participants