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(Headers): spec-compliant fill & constructor #1502

Merged
merged 1 commit into from Jun 20, 2022

Conversation

KhafraDev
Copy link
Member

@KhafraDev KhafraDev commented Jun 20, 2022

  • Removes TODOs in the fill method. Weird behavior can be entirely explained with one word: "webidl".
  • Fixes some invalid errors being thrown when HeadersInit is a function (in webidl, functions are considered Object types).
  • Adds a webidl record<key, value> converter.
  • Combined webidl.sequenceConverter and webidl.converters.sequence as the latter has no uses without the former.

p.s. once I make a pr for Response/Request idl, I am going to make a PR to improve the error messages.


No major changes in this pr. All current tests pass (other than 2 which were invalid) and node-fetch tests pass.

@codecov-commenter
Copy link

codecov-commenter commented Jun 20, 2022

Codecov Report

Merging #1502 (e0484a0) into main (8924332) will decrease coverage by 0.02%.
The diff coverage is 95.34%.

@@            Coverage Diff             @@
##             main    #1502      +/-   ##
==========================================
- Coverage   94.83%   94.80%   -0.03%     
==========================================
  Files          50       50              
  Lines        4512     4525      +13     
==========================================
+ Hits         4279     4290      +11     
- Misses        233      235       +2     
Impacted Files Coverage Δ
lib/fetch/webidl.js 97.98% <92.85%> (-1.28%) ⬇️
lib/fetch/headers.js 94.96% <100.00%> (-0.04%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8924332...e0484a0. Read the comment docs.

@mcollina mcollina merged commit 5f681a8 into nodejs:main Jun 20, 2022
@KhafraDev KhafraDev deleted the headers-fill-idl branch June 20, 2022 14:43
KhafraDev added a commit to KhafraDev/undici that referenced this pull request Jun 23, 2022
metcoder95 pushed a commit to metcoder95/undici that referenced this pull request Dec 26, 2022
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
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.

None yet

4 participants