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

fetch: implement new spec changes #1721

Merged
merged 4 commits into from Oct 23, 2022
Merged

fetch: implement new spec changes #1721

merged 4 commits into from Oct 23, 2022

Conversation

KhafraDev
Copy link
Member

lib/fetch/index.js Show resolved Hide resolved
lib/fetch/body.js Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2022

Codecov Report

Base: 89.55% // Head: 89.60% // Increases project coverage by +0.04% 🎉

Coverage data is based on head (7be2df5) compared to base (3f9d694).
Patch coverage: 93.93% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1721      +/-   ##
==========================================
+ Coverage   89.55%   89.60%   +0.04%     
==========================================
  Files          58       58              
  Lines        5257     5263       +6     
==========================================
+ Hits         4708     4716       +8     
+ Misses        549      547       -2     
Impacted Files Coverage Δ
lib/fetch/util.js 84.93% <75.00%> (-0.38%) ⬇️
lib/fetch/body.js 96.78% <100.00%> (+0.87%) ⬆️
lib/fetch/index.js 83.70% <100.00%> (+0.34%) ⬆️
lib/fetch/formdata.js 96.00% <0.00%> (+0.04%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

controller.enqueue(
typeof source === 'string' ? new TextEncoder().encode(source) : source
)
queueMicrotask(() => {
Copy link
Member

Choose a reason for hiding this comment

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

Yes, this is a known issue with node readable streams. I think we have the same queueMicrotask hack somewhere else.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we could move this into a closeReadableStream helper function and re-use? Then we can link additional information why that is needed in one place.

Copy link
Member Author

@KhafraDev KhafraDev Oct 21, 2022

Choose a reason for hiding this comment

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

Yeah I see it somewhere else, I actually copied it from there lol

Do you know why it happens? Some places don't use try/catch and some places do

Copy link
Member

Choose a reason for hiding this comment

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

I don't remember. Maybe @jasnell has an idea. I believe there is some issue over at the node repo.

Copy link
Member Author

Choose a reason for hiding this comment

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

added the helper

@ronag ronag merged commit c3671ec into nodejs:main Oct 23, 2022
@KhafraDev KhafraDev deleted the update-fetch branch October 23, 2022 18:46
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

3 participants